/* ==========================================================================
   ZONE 2 RUNNERS CLUB - shared site styles (home, run with us)
   Dark editorial: ink ground, bone type, slate accent. 8px spacing scale.
   ========================================================================== */
:root {
  --ink: #101114; --ink2: #16171a; --charcoal: #2C2D32;
  --bone: #EDE6DA; --bone-60: rgba(237,230,218,0.6); --bone-40: rgba(237,230,218,0.4);
  --slate: #6E8BA4; --slate-hover: #5A768F;
  --line: rgba(237,230,218,0.14);
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 24px; --sp-xl: 48px; --sp-2xl: 80px; --sp-3xl: 120px;
  --font-sans: 'TT Prosto Sans', 'TT Prosto Sans Trial', 'Futura', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Bookman Old Style', 'Bookman', 'ITC Bookman', Georgia, serif;
  --max: 1200px; --measure: 640px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 17px; line-height: 1.6; color: var(--bone); background: var(--ink);
       -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--slate); color: var(--ink); }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--sp-lg); }
.section { padding-block: var(--sp-2xl); }
@media (min-width: 1024px) { .section { padding-block: var(--sp-3xl); } }

/* Type */
.kicker { font-weight: 700; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--slate); }
.display { font-weight: 700; font-size: clamp(44px, 8vw, 96px); line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.h2 { font-weight: 700; font-size: clamp(30px, 4.5vw, 48px); line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.tagline { font-family: var(--font-serif); font-style: italic; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: var(--bone-60); }
.muted { color: var(--bone-60); }
.measure { max-width: var(--measure); }
.prose p + p { margin-top: var(--sp-md); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px;
       border-radius: 5px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
       transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 100ms ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--slate); color: var(--ink); border: 1.5px solid var(--slate); }
.btn-primary:hover { background: var(--slate-hover); border-color: var(--slate-hover); }
.btn-ghost { background: rgba(16,17,20,0.35); color: var(--bone); border: 1.5px solid var(--bone-40); }
.btn-ghost:hover { border-color: var(--slate); color: var(--slate); }
.btn-caps { font-size: 12px; letter-spacing: 0.25em; text-indent: 0.25em; text-transform: uppercase; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(16,17,20,0.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.nav-mark img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: var(--sp-lg); list-style: none; }
.nav-links a { font-weight: 700; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
               color: var(--bone-60); padding: var(--sp-sm) 0; transition: color 200ms ease; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--bone); }
.nav-links .btn { padding: 10px 18px; min-height: 40px; }
@media (max-width: 640px) { .nav-links { gap: var(--sp-md); } .nav-links .hide-sm { display: none; } }

/* Hero */
.hero { position: relative; min-height: min(88vh, 960px); min-height: min(88dvh, 960px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2); }
.hero-scrim { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,17,20,0.55) 0%, rgba(16,17,20,0.25) 35%, rgba(16,17,20,0.85) 80%, var(--ink) 100%); }
.hero-grain { position: absolute; inset: 0; opacity: 0.12; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-block: var(--sp-2xl) var(--sp-xl); }
.hero-grid { display: grid; gap: var(--sp-xl); }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.hero .kicker { margin-bottom: var(--sp-md); }
.hero .tagline { margin-top: var(--sp-md); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-md); margin-top: var(--sp-lg); }

/* Next-up card and event cards */
.card { background: rgba(22,23,26,0.85); border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-lg); backdrop-filter: blur(6px); }
.ev-title { font-weight: 700; font-size: 24px; line-height: 1.15; margin-top: var(--sp-xs); }
.ev-when { margin-top: var(--sp-sm); font-weight: 700; }
.ev-venue { margin-top: var(--sp-xs); font-size: 15px; }
.ev-venue a { text-decoration: none; border-bottom: 1px solid var(--slate); }
.ev-blurb { margin-top: var(--sp-sm); font-size: 15px; color: var(--bone-60); }
.ev-actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-md); }

.ev { display: grid; grid-template-columns: 84px 1fr; gap: var(--sp-lg); padding: var(--sp-lg) 0; border-top: 1px solid var(--line); }
.ev:last-child { border-bottom: 1px solid var(--line); }
.ev-date { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4px; }
.ev-dow { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--slate); font-weight: 700; }
.ev-day { font-size: 44px; font-weight: 700; line-height: 1; margin-top: 4px; }
.ev-mon { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone-60); font-weight: 700; margin-top: 2px; }

.grid-2 { display: grid; gap: var(--sp-lg); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.wk { background: var(--ink2); border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-lg); }

/* Section heads */
.sec-head { margin-bottom: var(--sp-xl); }
.sec-head .kicker { margin-bottom: var(--sp-md); }

/* Rhythm strip */
.rhythm { display: grid; gap: var(--sp-lg); }
@media (min-width: 768px) { .rhythm { grid-template-columns: repeat(3, 1fr); } }
.rhythm div { border-top: 1px solid var(--line); padding-top: var(--sp-md); }
.rhythm strong { display: block; font-size: 40px; line-height: 1; font-weight: 700; }
.rhythm span { display: block; margin-top: var(--sp-sm); font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--bone-60); font-weight: 700; }

/* Photo grid */
.photos { display: grid; gap: var(--sp-md); }
@media (min-width: 768px) { .photos { grid-template-columns: repeat(3, 1fr); } .photos img:nth-child(2) { margin-top: var(--sp-xl); } }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; filter: grayscale(0.3) contrast(1.05); }

/* CTA band */
.band { background: var(--charcoal); text-align: center; }
.band .h2 { max-width: 20ch; margin-inline: auto; }
.band .tagline { margin-top: var(--sp-md); }
.band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-md); margin-top: var(--sp-lg); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: var(--sp-xl); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-lg); }
.footer-mark img { height: 44px; }
.icons { display: flex; gap: var(--sp-sm); }
.icons a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--bone-60); transition: color 200ms ease; }
.icons a:hover { color: var(--slate); }
.icons svg { width: 22px; height: 22px; fill: currentColor; }
.icons svg.stroked { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-small { width: 100%; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bone-40); font-weight: 700; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-sm); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease-out, transform 500ms ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Next-up strip (mobile): a slim line under the hero so the photo stays clean */
.hide-mobile { display: block; }
.show-mobile { display: none; }
@media (max-width: 1023px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
  .hero { align-items: flex-end; }
  /* Zoom tight on the ZONE 2 runners, like the launch page */
  .hero-photo { transform: scale(1.8); transform-origin: 50% 45%; animation: none; }
  /* Compact text block so the photo owns the frame */
  .hero-inner { padding-block: var(--sp-xl) var(--sp-lg); }
  .hero .kicker { font-size: 10px; }
  .hero-actions { flex-wrap: nowrap; gap: var(--sp-sm); margin-top: var(--sp-md); }
  .hero-actions .btn { min-height: 42px; padding: 10px 16px; font-size: 13px; }
}
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink2); }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); padding-block: var(--sp-md); }
.strip .kicker { margin-bottom: 2px; }
.strip-title { font-weight: 700; font-size: 17px; line-height: 1.2; }
.strip-when { font-size: 13px; color: var(--bone-60); margin-top: 2px; }
.strip .btn { min-height: 42px; padding: 10px 16px; font-size: 14px; }

/* Hero headline on one line, fluid so it never wraps */
.display-line { white-space: nowrap; font-size: clamp(42px, 6.5vw, 84px); }

/* Discreet hero tagline: small serif italic with a slow sheen drifting through it */
.tagline-hero {
  margin-top: var(--sp-md);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--bone-60);
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .tagline-hero {
    background: linear-gradient(100deg,
      rgba(237,230,218,0.45) 0%, rgba(237,230,218,0.45) 38%,
      rgba(237,230,218,0.95) 47%, rgba(110,139,164,0.95) 53%,
      rgba(237,230,218,0.45) 62%, rgba(237,230,218,0.45) 100%);
    background-size: 300% 100%;
    background-position: 120% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: sheen 8s ease-in-out 2s infinite;
  }
}
@keyframes sheen {
  0%   { background-position: 120% 0; }
  55%  { background-position: -140% 0; }
  100% { background-position: -140% 0; }
}
@media (max-width: 1023px) {
  .display-line { font-size: min(11vw, 44px); }
  .tagline-hero { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tagline-hero { animation: none; background: none; color: var(--bone-60); -webkit-text-fill-color: currentColor; }
}

/* Gallery: masonry columns, quiet monochrome that wakes on touch */
.gallery { columns: 2; column-gap: var(--sp-md); }
@media (min-width: 768px) { .gallery { columns: 3; column-gap: var(--sp-lg); } }
.g-item {
  margin: 0 0 var(--sp-md); break-inside: avoid; border-radius: 8px; overflow: hidden;
  opacity: 0; transform: translateY(16px);
  transition: opacity 450ms ease-out, transform 450ms ease-out;
}
@media (min-width: 768px) { .g-item { margin-bottom: var(--sp-lg); } }
.g-item.in { opacity: 1; transform: none; }
.g-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.g-open img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(0.85) contrast(1.05);
  transform: scale(1.001);
  transition: filter 300ms ease, transform 300ms ease;
}
.g-open:hover img, .g-open:focus-visible img, .g-open:active img { filter: grayscale(0) contrast(1); transform: scale(1.03); }
.g-open:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1100px); }
.lightbox::backdrop { background: rgba(10, 11, 13, 0.92); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; gap: var(--sp-sm); }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { text-align: center; font-size: 13px; color: var(--bone-60); }
.lb-btn {
  position: fixed; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(22, 23, 26, 0.8); color: var(--bone); font-size: 22px; line-height: 1;
  transition: background-color 200ms ease, color 200ms ease;
}
.lb-btn:hover { background: var(--slate); color: var(--ink); }
.lb-btn:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) {
  .g-item { opacity: 1; transform: none; transition: none; }
  .g-open img { transition: none; }
}

/* Mobile gallery: a cinematic filmstrip you swipe through, snap by snap */
@media (max-width: 1023px) {
  .gallery {
    columns: auto;
    display: flex;
    gap: var(--sp-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--sp-lg));
    padding-inline: var(--sp-lg);
    padding-bottom: var(--sp-sm);
  }
  .gallery::-webkit-scrollbar { display: none; }
  .g-item {
    flex: 0 0 auto;
    height: min(56vh, 460px);
    max-width: 86vw;
    margin: 0;
    scroll-snap-align: center;
  }
  .g-open, .g-open img { height: 100%; width: 100%; object-fit: cover; }
}
