/* ==========================================================
   MILD ACTIVITY — site styles
   Brand palette taken from the Mild Activity identity:
   tomato, chocolate, peach, cream, sage.
   ========================================================== */

:root {
  /* Brand colours */
  --tomato: #ff482b;
  --tomato-deep: #e5361b;
  --choc: #452a25;
  --peach: #ffddb0;
  --cream: #fff3e5;
  --sage: #d3d3ca;
  --white: #ffffff;

  /* Roles */
  --paper: var(--cream);
  --ink: var(--choc);
  --ink-soft: rgba(69, 42, 37, 0.72);
  --line: rgba(69, 42, 37, 0.16);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--tomato); color: var(--cream); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Small uppercase labels (brand type, tracked out) */
.mono {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--tomato); outline-offset: 3px; }

/* ---------- Brand marks (single-colour SVGs, tinted with currentColor) ---------- */

.mark {
  display: block;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.mark-mild     { --src: url(assets/brand/mild-wordmark.svg);      aspect-ratio: 1200 / 561; }
.mark-runner   { --src: url(assets/brand/runner-mark.svg);        aspect-ratio: 1200 / 1375; }
.mark-type     { --src: url(assets/brand/mild-activity-type.svg); aspect-ratio: 1200 / 468; }
.lockup        { display: block; width: 100%; height: auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 243, 229, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--choc); }
.logo .mark-mild { width: 92px; }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-links a:not(.btn):hover { color: var(--tomato); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
}

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a { display: block; padding: 14px 0; font-size: 0.95rem; }
  .nav-links .btn { margin-top: 12px; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--tomato); color: var(--cream) !important;
  border: 2px solid var(--tomato);
  padding: 13px 24px; border-radius: 999px;
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { background: var(--tomato-deep); border-color: var(--tomato-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--cream) !important; }
.btn.light { background: var(--cream); color: var(--choc) !important; border-color: var(--cream); }
.btn.light:hover { background: transparent; color: var(--cream) !important; }
.btn.peach { background: var(--peach); color: var(--choc) !important; border-color: var(--peach); }
.btn.peach:hover { background: transparent; color: var(--peach) !important; }
.btn.sm { padding: 10px 18px; font-size: 0.78rem; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Headings ---------- */

h1, h2 {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; margin: 0;
}
h2 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); }
h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.005em; margin: 0 0 8px; }

/* ---------- Scroll-driven intro ---------- */

.scrolly { position: relative; height: 280vh; padding: 0; }
.stage {
  position: sticky; top: 72px; height: calc(100vh - 72px); height: calc(100svh - 72px);
  display: grid; grid-template-rows: auto 1fr auto auto; align-items: center;
  overflow: hidden;
}
.stage-top { display: flex; justify-content: center; align-items: center; padding-top: 20px; }
.scroll-hint { color: var(--ink-soft); transition: opacity .2s; }

.stage-lockup { width: min(84vw, 820px, calc((100svh - 72px) * 1.05)); margin: 0 auto; }

.stage-lines {
  position: relative; height: 1.2em; margin: 0 0 clamp(8px, 3vh, 32px); text-align: center;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.3rem, 3.2vw, 2.4rem); color: var(--choc);
}
.stage-lines span { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; }
.stage-lines span.on { opacity: 1; transform: none; }

.track { position: relative; padding-bottom: clamp(16px, 3vh, 28px); }
.runner-lane { position: relative; height: clamp(110px, 22vh, 230px); }
.runner { position: absolute; left: 0; bottom: -6px; height: 100%; width: auto; aspect-ratio: 293 / 360; will-change: transform; }
.track-line { height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--choc) 0 18px, transparent 18px 30px); opacity: .85; }
.track-marks { display: flex; justify-content: space-between; margin-top: 10px; color: var(--ink-soft); }
.odometer { position: absolute; right: var(--gutter); top: -8px; transform: translateY(-100%); color: var(--choc); font-size: .9rem; }
.odometer b { font-size: 1.6rem; color: var(--tomato); letter-spacing: 0; }

@media (max-width: 760px) {
  .scrolly { height: 240vh; }
  .stage-lockup { width: 92vw; }
  .track-marks span:nth-child(even) { visibility: hidden; }
  .odometer { position: static; transform: none; text-align: center; margin-top: 4px; }
  .odometer b { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .scrolly { height: auto; }
  .stage { position: relative; top: 0; height: auto; min-height: 80vh; gap: 24px; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(24px, 4vw, 48px) 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hero-meta {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  gap: 20px; margin: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 28px);
}
.hero-meta p { margin: 0; max-width: 40ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); }

@media (max-width: 760px) { .hero-meta { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--tomato); color: var(--cream); padding: 7px 12px; border-radius: 999px;
}

.hero-photo {
  position: relative; border-radius: var(--radius); overflow: hidden; margin: 0;
  aspect-ratio: 16 / 8; background: var(--sage);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption, .gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 48px 18px 16px;
  color: var(--white); font-size: .8rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
  background: linear-gradient(to top, rgba(28,16,13,.55), rgba(28,16,13,0));
}
@media (max-width: 760px) { .hero-photo { aspect-ratio: 4 / 4.4; } }

/* ---------- Marquee ---------- */

.marquee { margin-top: clamp(48px, 7vw, 88px); background: var(--tomato); color: var(--cream); overflow: hidden; white-space: nowrap; padding: 16px 0; }
.marquee-track { display: inline-flex; align-items: center; gap: 36px; animation: scroll 36s linear infinite; }
.marquee span { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.6rem); letter-spacing: 0.02em; text-transform: uppercase; }
.marquee .mark-runner { width: 30px; color: var(--peach); flex-shrink: 0; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- Sections ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .mono { color: var(--tomato); }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-grid .photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--sage); margin: 0; }
.about-grid .photo img { width: 100%; height: 100%; object-fit: cover; }
.pillars { list-style: none; padding: 0; margin: 32px 0 0; }
.pillars li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.pillars li:last-child { border-bottom: 1px solid var(--line); }
.pillars .num { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--tomato); padding-top: 4px; }
.pillars p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid .photo { aspect-ratio: 4/3.4; } }

/* Runs */
.runs { background: var(--choc); color: var(--cream); position: relative; overflow: hidden; }
.runs h2 { color: var(--cream); }
.runs .section-head .mono { color: var(--peach); }
.runs .lede { color: rgba(255,243,229,.74); }
.runs-figure { position: absolute; right: -40px; top: 40px; width: clamp(160px, 24vw, 340px); color: var(--tomato); opacity: .9; pointer-events: none; }
.run-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; position: relative; }
.run-card {
  border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px;
  background: var(--cream); color: var(--choc); transition: transform .2s;
}
.run-card:nth-child(2) { background: var(--peach); }
.run-card:nth-child(3) { background: var(--sage); }
.run-card:nth-child(4) { background: var(--white); }
.run-card:hover { transform: translateY(-4px); }
.run-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.run-card .when { color: var(--tomato); }
.badge {
  font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--choc); color: var(--cream); padding: 5px 10px; border-radius: 999px;
}
.run-name { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1; text-transform: uppercase; margin: 0; }
.run-where { margin: -4px 0 0; font-weight: 600; }
.paces { width: 100%; border-collapse: collapse; font-size: .95rem; }
.paces th, .paces td { text-align: left; padding: 9px 0; border-top: 1px solid rgba(69,42,37,.16); vertical-align: baseline; }
.paces tr:last-child th, .paces tr:last-child td { border-bottom: 1px solid rgba(69,42,37,.16); }
.paces th { font-weight: 500; opacity: .7; padding-right: 12px; }
.paces .d { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--tomato); padding-right: 12px; white-space: nowrap; }
.paces td:last-child { text-align: right; font-weight: 600; }
.paces-note { margin: 0; padding: 10px 0; border-top: 1px solid rgba(69,42,37,.16); border-bottom: 1px solid rgba(69,42,37,.16); opacity: .75; }
.run-body { margin: 0; color: rgba(69,42,37,.8); }
.leader { margin: auto 0 0; padding-top: 4px; }

.classes-head { margin: clamp(48px, 7vw, 80px) 0 20px; display: grid; gap: 8px; }
.classes-head .mono { color: var(--peach); }
.classes-head h3 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); text-transform: uppercase; margin: 0; color: var(--cream); }
.class-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.class-card {
  border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px;
  border: 1.5px solid rgba(255,221,176,.35); color: var(--cream);
}
.class-card .when { color: var(--peach); }
.class-card .badge { background: var(--tomato); }
.class-card .run-body { color: rgba(255,243,229,.78); }
.class-meta { margin: 0; display: grid; gap: 6px; }
.class-meta div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,243,229,.14); }
.class-meta dt { color: rgba(255,243,229,.6); padding-top: 3px; }
.class-meta dd { margin: 0; }
.booking-soon { margin-top: auto; color: var(--peach); }
.class-card .btn { margin-top: auto; align-self: flex-start; }
.runs-note {
  margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-radius: var(--radius); border: 1px solid rgba(255,243,229,.18); position: relative;
}
.runs-note p { margin: 0; color: rgba(255,243,229,.85); }
.runs-note .mono { color: var(--peach); }
@media (max-width: 860px) { .run-cards, .class-cards { grid-template-columns: 1fr; } .runs-figure { width: 120px; top: 24px; right: -20px; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 28px; border-radius: var(--radius); background: var(--white); }
.step .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tomato); color: var(--cream); font-family: var(--font-display); font-weight: 700; margin-bottom: 18px; }
.step p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { padding-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(200px, 24vw, 340px); gap: 16px; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--sage); position: relative; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-grid figure:hover img { transform: scale(1.03); }
.g-a { grid-column: span 7; grid-row: span 2; }
.g-b { grid-column: span 5; }
.g-c { grid-column: span 5; }
.g-d { grid-column: span 6; }
.g-e { grid-column: span 3; }
.g-f { grid-column: span 3; }
.g-g { grid-column: span 12; grid-row: span 2; }
@media (max-width: 760px) {
  .gallery-grid { grid-auto-rows: auto; gap: 10px; }
  .gallery-grid figure { grid-column: span 6; grid-row: auto; aspect-ratio: 4 / 5; }
  .g-a, .g-d, .g-g { grid-column: span 12; aspect-ratio: 4 / 3; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--peach); color: var(--choc);
  font-weight: 700; font-size: 1.1rem; transition: transform .2s, background .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--tomato); color: var(--cream); }
.faq details p { margin: 0 0 22px; color: var(--ink-soft); max-width: 60ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--tomato); color: var(--cream); text-align: center; }
.cta-band .mark-mild { width: min(72%, 560px); margin: 20px auto 0; color: var(--cream); }
.cta-band .mono { color: var(--choc); }
.cta-band p { margin: 24px auto 32px; max-width: 44ch; font-size: 1.15rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--choc); color: var(--cream); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 14px; color: var(--peach); font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--tomato); }
.footer-brand { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 16px; }
.footer-brand .mark-runner { width: 56px; color: var(--tomato); }
.footer-brand .mark-type { width: 170px; color: var(--peach); }
.footer-brand + p { margin: 0; color: rgba(255,243,229,.65); max-width: 30ch; }
.footer-base {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,243,229,.14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: rgba(255,243,229,.5);
}
.footer-base a { text-decoration: none; }
.footer-base a:hover { color: var(--cream); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Join / Terms page hero ---------- */

.page-hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.8rem, 8.5vw, 6.5rem); margin-top: 16px; }
.page-hero h1 em { font-style: normal; color: var(--tomato); }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; padding-bottom: clamp(64px, 9vw, 120px); }
.join-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--sage); position: sticky; top: 100px; margin: 0; }
.join-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .join-grid { grid-template-columns: 1fr; } .join-photo { position: static; aspect-ratio: 4/3; order: -1; } }

.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); }
.form-intro { color: var(--ink-soft); margin: 0 0 24px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--font-display); font-weight: 700; font-size: 0.74rem; letter-spacing: .1em; text-transform: uppercase; }
.field input {
  font: inherit; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--cream); color: var(--ink); width: 100%;
}
.field input:focus { outline: none; border-color: var(--tomato); box-shadow: 0 0 0 3px rgba(255,72,43,.18); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }

.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 8px 0 14px; font-size: .95rem; color: var(--ink-soft); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--tomato); }
.check a { color: var(--ink); }

.form-card .btn { width: 100%; margin-top: 10px; padding: 16px 22px; }
.hidden { display: none !important; }
.form-error { color: var(--tomato-deep); font-size: .9rem; margin: 6px 0 0; min-height: 1.2em; }

.success { text-align: center; padding: 12px 0; }
.success .mark-runner { width: 90px; margin: 0 auto 16px; color: var(--tomato); }
.success .big { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; text-transform: uppercase; margin: 0 0 8px; }
.success p { color: var(--ink-soft); margin: 0 0 24px; }

.rules { list-style: none; padding: 0; margin: 24px 0 0; }
.rules li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules .mono { color: var(--tomato); padding-top: 3px; }
.rules p { margin: 0; color: var(--ink-soft); }
.rules strong { color: var(--ink); display: block; font-family: var(--font-display); }

/* ---------- Terms ---------- */

.legal { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 80px); padding-bottom: clamp(64px, 9vw, 120px); }
.legal nav { position: sticky; top: 100px; align-self: start; }
.legal nav ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legal nav a { text-decoration: none; color: var(--ink-soft); font-size: .92rem; }
.legal nav a:hover { color: var(--tomato); }
.legal article { max-width: 68ch; }
.legal article h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 44px 0 12px; line-height: 1.1; }
.legal article h2:first-child { margin-top: 0; }
.legal article h2 .mono { color: var(--tomato); display: block; margin-bottom: 6px; }
.legal article p { color: var(--ink-soft); }
.legal .callout { background: var(--choc); color: var(--cream); padding: 22px 24px; border-radius: var(--radius); margin-top: 44px; }
.legal .callout p { color: rgba(255,243,229,.88); margin: 0; }
@media (max-width: 860px) { .legal { grid-template-columns: 1fr; } .legal nav { position: static; } }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-top: 64px; padding-bottom: 64px; }
.lost .mark-runner { width: 160px; margin: 0 auto 24px; color: var(--tomato); transform: rotate(-12deg); }
.lost h1 { font-size: clamp(3rem, 10vw, 6rem); }
.lost p { color: var(--ink-soft); margin: 16px 0 28px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Run card photos */
.run-photo { object-position: 30% 50%; width: calc(100% + 2 * clamp(22px, 3vw, 32px)); max-width: none; margin: calc(-1 * clamp(22px, 3vw, 32px)) calc(-1 * clamp(22px, 3vw, 32px)) 4px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.class-card .run-photo { border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.photo-fallback { display: grid; place-items: center; background: var(--peach); }
.photo-fallback .mark-runner { height: 62%; width: auto; aspect-ratio: 1200 / 1375; color: var(--tomato); }

/* ---------- EXPERIMENT: photo behind the scroll intro ---------- */
.stage > * { position: relative; z-index: 1; }
.stage > .stage-bg {
  position: absolute; inset: -24px; z-index: 0;
  background-size: cover; background-position: center 40%;
  transform: scale(1.04); will-change: filter;
}
.stage-bg::after { content: ""; position: absolute; inset: 0; background: rgba(28, 16, 13, var(--wash, .28)); }
.has-bg .lockup path:not(.lk-mild) { fill: var(--cream); }
.has-bg .stage-lines, .has-bg .scroll-hint, .has-bg .track-marks, .has-bg .odometer { color: var(--cream); }
.has-bg .stage-lines, .has-bg .track-marks, .has-bg .odometer { text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.has-bg .odometer b { color: var(--peach); }
.has-bg .track-line { background: repeating-linear-gradient(90deg, var(--cream) 0 18px, transparent 18px 30px); }

/* Confetti burst at the end of the track */
.stage > .confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* Final tagline ("We move.") picks up the km counter's colour */
.stage-lines span:last-child { color: var(--tomato); }
.has-bg .stage-lines span:last-child { color: var(--peach); }

/* Overlays embed (ovrlay.io) */
.overlays { padding-top: 0; }
.overlay-embed { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.overlay-embed iframe { display: block; border: 0; }
.overlay-fallback { margin: 14px 0 0; text-align: right; }
.overlay-fallback a { text-decoration: none; color: var(--tomato); }
.overlay-fallback a:hover { text-decoration: underline; }

/* Keep in-page links clear of the sticky header */
section[id] { scroll-margin-top: 80px; }
