/* Neutrals are warmed a few degrees toward the accent rather than left pure grey,
   so the dark ground reads as dusk rather than as a default black. */

:root {
  --accent: #ff4a17;
  --accent-ink: #140f0c;
  --font: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --wrap: 1180px;
}

/* --accent is the brand orange, used for large display type where WCAG asks for 3:1.
   --accent-strong is the same hue darkened for SMALL text, which needs 4.5:1. On the
   dark ground the brand orange already clears it, so the two are identical there; on
   the light ground it only reaches 3.2:1, so light mode darkens it. */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-strong: #ff4a17;
  --bg: #0c0b0a;
  --bg-alt: #151210;
  --fg: #f5f2ee;
  --fg-dim: #a49c93;
  --rule: #2c2723;
  --card: #16130f;
  --shadow: 0 1px 0 rgba(255,255,255,.04);
  --logo-filter: invert(1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #faf8f5;
    --bg-alt: #f1ece5;
    --fg: #14110e;
    --fg-dim: #5f594f;
    --rule: #e0d9cf;
    --card: #fffefc;
    --shadow: 0 1px 2px rgba(20,17,14,.07);
    --logo-filter: none;
    --accent-strong: #bd3711;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8f5;
  --bg-alt: #f1ece5;
  --fg: #14110e;
  --fg-dim: #5f594f;
  --rule: #e0d9cf;
  --card: #fffefc;
  --shadow: 0 1px 2px rgba(20,17,14,.07);
  --logo-filter: none;
  --accent-strong: #bd3711;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.94;
  font-weight: 700;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(3rem, 11vw, 7.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.05rem; letter-spacing: .04em; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1.25rem; font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem clamp(1.25rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  text-decoration: none;
  display: grid;
  grid-template-areas: "run col" "run sto";
  column-gap: .4rem;
  align-items: center;
  line-height: .9;
  text-transform: uppercase;
}
.wordmark-run { grid-area: run; font-size: 1.9rem; font-weight: 700; letter-spacing: -.04em; }
.wordmark-col { grid-area: col; font-size: .78rem; font-weight: 700; letter-spacing: .12em; }
.wordmark-sto { grid-area: sto; font-size: .68rem; letter-spacing: .2em; color: var(--fg-dim); }

.site-nav { margin-left: auto; display: flex; gap: 1.6rem; }
.site-nav a {
  text-decoration: none; text-transform: uppercase;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent); }

.theme-toggle {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; padding: 0;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--fg-dim); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; grid-area: 1 / 1; }
.icon-sun circle { fill: currentColor; }
.icon-sun line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-moon path { fill: currentColor; }

/* Show the icon of the theme the button switches TO. The default (no data-theme) is
   dark, so the sun shows; prefers-color-scheme flips that only while unset. */
.icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-sun { display: none; }
  :root:not([data-theme]) .icon-moon { display: block; }
}
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

@media (max-width: 860px) {
  .site-nav { gap: 1rem; order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .site-head { flex-wrap: wrap; row-gap: .6rem; }
  .theme-toggle { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero { position: relative; isolation: isolate; min-height: min(88vh, 820px); display: flex; align-items: flex-end; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(6,6,7,.94) 0%, rgba(6,6,7,.72) 38%, rgba(6,6,7,.30) 70%, rgba(6,6,7,.45) 100%);
}
.hero-inner {
  max-width: var(--wrap); margin-inline: auto; width: 100%;
  padding: 4rem clamp(1.25rem, 5vw, 3rem) 3.5rem;
  color: #f6f4f1;
}

.eyebrow {
  text-transform: uppercase; font-size: .74rem; font-weight: 700;
  letter-spacing: .22em; color: var(--accent); margin-bottom: 1rem;
}

.hero h1 { margin-bottom: .35em; }

.hero-lede { max-width: 46ch; font-size: 1.1rem; color: #dedad4; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-block; text-decoration: none;
  text-transform: uppercase; font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  padding: .95rem 1.6rem; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.hero .btn-ghost { color: #f6f4f1; }
.hero .btn-ghost:hover { background: #f6f4f1; color: #0b0b0c; border-color: #f6f4f1; }

/* ---------- next run ---------- */

.nextrun {
  margin-top: 2.25rem;
  border-left: 4px solid var(--accent);
  padding: .1rem 0 .1rem 1.15rem;
  max-width: 30rem;
}
.nextrun-label {
  text-transform: uppercase; letter-spacing: .2em; font-size: .7rem;
  font-weight: 700; color: var(--accent); margin-bottom: .35rem;
}
.nextrun-when {
  text-transform: uppercase; font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.05; margin-bottom: .2rem;
}
.nextrun-where { color: #cfcbc5; margin-bottom: .35rem; }
.nextrun-count { font-variant-numeric: tabular-nums; font-weight: 700; color: #f6f4f1; margin: 0; }
.nextrun.is-live .nextrun-count { color: var(--accent); }

/* ---------- bands ---------- */

/* Tinted bands are named explicitly rather than derived with :nth-of-type, because the
   weather section removes itself when the forecast is unavailable and would otherwise
   shift the alternation. */
.band { padding-block: clamp(4rem, 9vw, 7.5rem); border-top: 1px solid var(--rule); }
.band--tint { background: var(--bg-alt); }

.section-lede, .lead { color: var(--fg-dim); max-width: 62ch; font-size: 1.05rem; }
.lead { color: var(--fg); }

.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.stat-row { list-style: none; display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); padding: 0; margin: 2.25rem 0 0; }
.stat-row li { display: flex; flex-direction: column; }
.stat-row strong {
  font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1;
  letter-spacing: -.04em; color: var(--accent);
}
.stat-row span { text-transform: uppercase; font-size: .72rem; letter-spacing: .14em; color: var(--fg-dim); margin-top: .45rem; }

/* The group shots are wide subjects — ~40 people in a horizontal band. Side-by-side
   portrait tiles cropped the people at both edges, so they stack as landscape instead.
   The files are pre-cropped to 3:2 around the group; keep that ratio if you swap them. */
.about-figs { margin: 0; display: grid; gap: .75rem; }
.about-figs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- run cards ---------- */

.run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 3rem; }
@media (max-width: 880px) { .run-grid { grid-template-columns: 1fr; } }

.run-card {
  background: var(--card); border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.run-kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
  font-weight: 700; color: var(--accent-strong); margin-bottom: .9rem;
}
.run-time {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  text-transform: uppercase; letter-spacing: -.03em; margin-bottom: .85rem;
}
.run-day { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; line-height: 1; }
.run-clock {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.run-blurb { color: var(--fg-dim); }

.venue {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  border-block: 1px solid var(--rule); padding-block: .9rem; margin-block: 1.2rem;
}
.venue-name { font-weight: 700; margin: 0; }
.venue-area { color: var(--fg-dim); margin: 0; }
.venue-map { margin-left: auto; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

.groups { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-bottom: 1.75rem; }
.groups th, .groups td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--rule); }
.groups thead th {
  text-transform: uppercase; font-size: .68rem; letter-spacing: .14em;
  color: var(--fg-dim); font-weight: 700;
}
.groups tbody th { font-size: 1.1rem; width: 3.5rem; }
.groups tbody tr { transition: background-color .2s; }
.groups tbody tr.is-match { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.groups tbody tr.is-match th { color: var(--accent-strong); }
.groups tbody tr.is-match td:last-child { font-weight: 700; }

.btn-cal {
  align-self: flex-start;
  margin-top: auto;
  border: 0;
  border-bottom: 2px solid var(--accent);
  padding: 0 0 .2rem;
  color: var(--fg);
}
.btn-cal:hover { color: var(--accent); }

/* ---------- pace picker ---------- */

.picker-box {
  margin-top: 2.5rem; max-width: 46rem;
  background: var(--card); border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3.5vw, 2.5rem); box-shadow: var(--shadow);
}
.picker-label { display: block; text-transform: uppercase; font-size: .72rem; letter-spacing: .14em; color: var(--fg-dim); font-weight: 700; }
.picker-value {
  display: block; font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1.05; color: var(--accent);
  font-variant-numeric: tabular-nums; margin: .3rem 0 1.2rem;
}
.picker-box input[type="range"] { width: 100%; accent-color: var(--accent); height: 1.75rem; cursor: pointer; }
.picker-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--fg-dim); letter-spacing: .1em; }
.picker-verdict { margin: 1.5rem 0 0; font-size: 1.05rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.picker-verdict strong { color: var(--accent-strong); }

/* ---------- weather ---------- */

.weather-card {
  margin-top: 2rem; max-width: 38rem;
  border: 1px solid var(--rule); background: var(--card);
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.25rem);
}
.weather-body { min-width: 0; }
.weather-body > :last-child { margin-bottom: 0; }

.weather-icon { flex: none; width: clamp(5.5rem, 16vw, 8rem); height: auto; aspect-ratio: 1; }

.wi-cloud > * { fill: var(--fg); }
.wi-cloud-back > * { fill: var(--fg-dim); opacity: .5; }
.wi-moon > * { fill: var(--accent); }
.wi-sun > circle { fill: var(--accent); }
.wi-rays > line { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.wi-drops > line { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.wi-flake > line { stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round; }
.wi-flake { transform-box: fill-box; transform-origin: center; }
.wi-fog-lines > line { stroke: var(--fg-dim); stroke-width: 6; stroke-linecap: round; }
.wi-bolt > path { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .wi-drops > line { animation: wi-fall 1.5s var(--d, 0s) infinite ease-in; }
  .wi-flake { animation: wi-drift 2.8s var(--d, 0s) infinite ease-in-out; }
  .wi-rays { animation: wi-spin 26s linear infinite; transform-origin: 48px 40px; }
  .wi-bolt { animation: wi-flash 3.2s infinite steps(1); }
}

@keyframes wi-fall {
  0%   { opacity: 0; transform: translateY(-6px); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}
@keyframes wi-drift {
  0%, 100% { opacity: .35; transform: translateY(-3px); }
  50%      { opacity: 1; transform: translateY(3px); }
}
@keyframes wi-spin { to { transform: rotate(360deg); } }
@keyframes wi-flash { 0%, 82% { opacity: 1; } 86% { opacity: .25; } 90% { opacity: 1; } 94% { opacity: .3; } }

@media (max-width: 520px) {
  .weather-card { flex-direction: column; align-items: flex-start; }
}
.weather-when { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--fg-dim); }
.weather-temp {
  font-size: clamp(2.8rem, 8vw, 4.5rem); font-weight: 700; letter-spacing: -.05em;
  line-height: 1; margin: .1rem 0 .5rem; font-variant-numeric: tabular-nums;
}
.weather-desc { font-size: 1.15rem; margin-bottom: .4rem; }
.weather-meta { color: var(--fg-dim); margin: 0; font-size: .92rem; }

/* ---------- perks ---------- */

.perk-grid { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 880px) { .perk-grid { grid-template-columns: 1fr; } }
.perk-grid li { border-top: 3px solid var(--accent); padding-top: 1.25rem; }
.perk-grid h3 { margin-bottom: .6em; }
.perk-grid p { color: var(--fg-dim); margin: 0; }

/* ---------- social strip ---------- */

.social-strip { display: grid; grid-template-columns: 1fr 1fr; padding: 0; align-items: stretch; }
.social-strip img { width: 100%; height: 100%; object-fit: cover; min-height: 20rem; }
.social-strip-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem);
}
.social-strip-copy p { color: var(--fg-dim); max-width: 42ch; margin: 0; }
@media (max-width: 880px) { .social-strip { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */

.faq-list { margin-top: 2.5rem; max-width: 46rem; border-top: 1px solid var(--rule); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.35rem 2.5rem 1.35rem 0; position: relative;
  font-weight: 700; font-size: 1.08rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq-list details[open] summary::after { content: "\2212"; }
/* The answer shares the question's measure: same right inset as the summary, which
   reserves room for the +/- marker. A 60ch cap here made answers stop short of the
   question above them. Justified text needs hyphenation or it opens rivers. */
.faq-list details p {
  color: var(--fg-dim);
  margin: 0;
  padding: 0 2.5rem 1.35rem 0;
  text-align: justify;
  hyphens: auto;
  text-wrap: pretty;
}
.faq-list details p a { color: var(--accent-strong); }

/* ---------- contact ---------- */

.contact-inner { text-align: center; }
/* Letterbox rather than 3:2 so it can run the full width without the section getting
   tall. The file is pre-cropped to 2.5:1 around the group; keep that ratio if you swap
   it, since cropping this photo vertically starts cutting raised arms and feet. */
.contact-photo {
  width: 100%; aspect-ratio: 5 / 2; object-fit: cover;
  margin: 0 auto 2.75rem;
}
.contact-lede { color: var(--fg-dim); max-width: 46ch; margin-inline: auto; font-size: 1.05rem; }
.contact-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--rule); padding-block: 2.5rem; }
.foot-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.foot-logo { width: 56px; height: 56px; filter: var(--logo-filter); }
.foot-name { text-transform: uppercase; font-weight: 700; letter-spacing: .06em; margin: 0; }
.foot-meta { color: var(--fg-dim); font-size: .88rem; margin: .25rem 0 0; }
.foot-links { margin-left: auto; display: flex; gap: 1.5rem; }
.foot-links a { text-transform: uppercase; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-decoration: none; border-bottom: 2px solid transparent; }
.foot-links a:hover { border-bottom-color: var(--accent); }
@media (max-width: 640px) { .foot-links { margin-left: 0; width: 100%; } }
