/* Bayley Currey Racing v2
   Motion rules (Emil Kowalski design-engineering):
   - only transform/opacity/clip-path animate
   - ease-out for enter, ease-in-out for on-screen movement, never ease-in
   - UI feedback under 300ms, exits faster than enters
   - hover gated to fine pointers, press feedback on :active
*/
:root {
  --ink: #08080a;
  --ink-2: #0e0e12;
  --ink-3: #16161c;
  --paper: #f3f3f0;
  --muted: #a9a9b3;
  --line: rgb(255 255 255 / .12);
  --red: #ff2430;
  --red-soft: #ff626a;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Rajdhani', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --bar-h: 68px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 6px;
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 24px);
  background: var(--ink);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 500 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: #c91420; color: #fff; }
:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 4px; border-radius: 2px; }
a, button, summary, [role="button"] { touch-action: manipulation; }
button, summary, .btn, .chips, .card-tag, .label { -webkit-user-select: none; user-select: none; }

.wrap { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 12px 18px; background: #fff; color: #000; border-radius: var(--radius); transform: translateY(-160%); }
.skip:focus { transform: none; }

.label { color: var(--red-soft); font: 600 .8125rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.dim { color: #6c6c76; }
.fine { color: var(--muted); font-size: .875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: 700 .9375rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .8125rem; }
.btn-red { background: var(--red); color: #fff; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgb(255 255 255 / .28); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-red:hover { background: #e01a25; }
  .btn-light:hover { background: #fff; }
  .btn-dark:hover { background: #222229; }
  .btn-ghost:hover { border-color: #fff; background: rgb(255 255 255 / .06); }
}

.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font: 700 .875rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
}
.link::after {
  content: ''; width: 18px; height: 1.5px; background: var(--red);
  transition: transform 200ms var(--ease-out);
  transform-origin: left;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover::after { transform: scaleX(1.6); }
}

/* ---------- Header bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 90;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 240ms ease, border-color 240ms ease;
  border-bottom: 1px solid transparent;
}
.bar::before {
  content: ''; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgb(8 8 10 / .7), rgb(8 8 10 / 0));
  transition: opacity 240ms ease;
}
.bar[data-scrolled="true"]::before { opacity: 0; }
.bar[data-scrolled="true"] { background: rgb(8 8 10 / .86); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.bar-inner { display: flex; align-items: center; gap: 24px; height: var(--bar-h); width: min(1440px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.bar-logo img { width: 168px; }
.bar-links { display: none; gap: 4px; margin-left: auto; }
.bar-links a {
  position: relative; display: flex; align-items: center; height: 40px; padding: 0 12px;
  font: 600 .9375rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: #cfcfd6;
  transition: color 160ms ease;
}
.bar-links a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease-out);
}
.bar-links a[aria-current="true"] { color: #fff; }
.bar-links a[aria-current="true"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .bar-links a:hover { color: #fff; } }
.bar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.bar-links + .bar-actions { margin-left: 8px; }
.bar-sponsor { display: none; }
.bar-menu {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border: 1px solid rgb(255 255 255 / .28); border-radius: var(--radius);
  font: 700 .8125rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  transition: transform 140ms var(--ease-out);
}
.bar-menu:active { transform: scale(0.96); }
.bar-menu-lines { position: relative; width: 16px; height: 10px; }
.bar-menu-lines::before, .bar-menu-lines::after { content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
.bar-menu-lines::before { top: 0; } .bar-menu-lines::after { bottom: 0; }
@media (min-width: 1100px) {
  .bar-links { display: flex; }
  .bar-sponsor { display: inline-flex; }
  .bar-menu { display: none; }
}

/* ---------- Bottom sheet menu ---------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 95; background: rgb(0 0 0 / .55);
  opacity: 0; transition: opacity 300ms ease;
}
.sheet-scrim[data-open="true"] { opacity: 1; }
.sheet {
  position: fixed; inset: auto 0 0; z-index: 100;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--ink-3); border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  /* Exit is quicker than entry; visibility flips only after the slide finishes */
  transition: transform 240ms var(--ease-out), visibility 0s linear 240ms;
  visibility: hidden;
}
.sheet[data-open="true"] { transform: translateY(0); visibility: visible; transition: transform 480ms var(--ease-drawer), visibility 0s; }
.sheet[data-dragging="true"] { transition: none; }
.sheet-handle { display: grid; place-items: center; height: 28px; cursor: grab; touch-action: none; }
.sheet-handle span { width: 40px; height: 5px; border-radius: 3px; background: #44444d; }
.sheet-links { display: grid; }
.sheet-links a {
  display: flex; align-items: baseline; gap: 14px; padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font: 800 1.75rem/1 var(--display); text-transform: uppercase;
  transition: transform 140ms var(--ease-out), color 140ms ease;
}
.sheet-links a:active { transform: scale(0.985); color: var(--red-soft); }
.sheet-links span { width: 22px; color: #6c6c76; font: 600 .75rem/1 var(--body); letter-spacing: .1em; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.sheet-close { width: 100%; min-height: 48px; margin-top: 10px; color: var(--muted); font: 600 .875rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Page-load entrance (rare, so it can have character) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.in { animation: rise 700ms var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 70ms); }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; align-items: end;
  min-height: 100svh;
  padding: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 32px) var(--gutter) clamp(32px, 6vw, 72px);
  isolation: isolate; overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; z-index: -1; margin: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 18%; animation: settle 1400ms var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.06); opacity: 0; } }
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 4%, rgb(8 8 10 / .86) 34%, rgb(8 8 10 / .15) 64%, rgb(8 8 10 / .5) 100%);
}
.hero-copy { display: grid; justify-items: start; gap: 14px; width: min(560px, 100%); }
.hero-mark { width: clamp(110px, 32vw, 160px); }
.hero-mark img { width: 100%; }
.hero-line { font: 800 clamp(2.6rem, 11vw, 5rem)/.92 var(--display); text-transform: uppercase; }
.hero-sub { color: var(--muted); font: 600 1rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hero-news {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 6px;
  color: #e9e9ee; font-weight: 600; font-size: 1rem;
  transition: color 160ms ease;
}
.pill { padding: 4px 8px; border-radius: 3px; background: var(--red); color: #fff; font: 700 .6875rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) { .hero-news:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; } }

@media (min-width: 900px) {
  .hero { align-items: center; grid-template-columns: 1fr 1fr; }
  .hero-photo { left: 42%; }
  .hero-photo::after {
    background:
      linear-gradient(to right, var(--ink) 0%, rgb(8 8 10 / .7) 22%, rgb(8 8 10 / 0) 55%),
      linear-gradient(to top, var(--ink) 0%, rgb(8 8 10 / 0) 28%);
  }
  .hero-copy { gap: 16px; }
  .hero-mark { width: clamp(150px, 13vw, 200px); }
  .hero-line { font-size: clamp(3.5rem, 5.2vw, 5.5rem); }
}

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--line); background: var(--ink-2); }
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { display: grid; gap: 6px; padding: 26px 0; }
.stat:nth-child(odd) { padding-right: 16px; }
.stat:nth-child(n+3) { border-top: 1px solid var(--line); }
.stat strong { font: 800 clamp(2.75rem, 9vw, 4.5rem)/.9 var(--display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font: 600 .8125rem/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; }
@media (min-width: 760px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 36px 24px; }
  .stat:first-child { padding-left: 0; }
  .stat + .stat { border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section-alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }
.head h2 { font-size: clamp(2.6rem, 7vw, 4.75rem); text-transform: uppercase; }
.head-row { align-items: end; }
@media (min-width: 760px) { .head-row { grid-template-columns: 1fr auto; } }
.sub-label { margin: clamp(56px, 7vw, 88px) 0 20px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Recap ---------- */
.recap { display: grid; gap: 24px; }
.recap-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
.recap-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.recap-copy { display: grid; gap: 16px; align-content: center; }
.recap-copy h3 { font-size: clamp(2rem, 5vw, 3.25rem); text-transform: uppercase; }
.recap-copy > p:not(.label) { color: #d4d4da; font-size: 1.125rem; }
@media (min-width: 900px) {
  .recap { grid-template-columns: 1.35fr 1fr; gap: 24px 48px; }
  .recap .fold { grid-column: 1 / -1; }
}

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 4px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chips div { display: grid; gap: 4px; padding: 14px 16px; background: var(--ink); }
.section-alt .chips div { background: var(--ink-2); }
.chips dt { color: var(--muted); font: 600 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.chips dd { margin: 0; font: 800 1.875rem/1 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Expandable (details) ---------- */
.fold { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 12px 0; list-style: none; cursor: pointer;
  font: 700 .9375rem/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary:active .fold-icon { transform: scale(0.9); }
.fold[open] summary:active .fold-icon { transform: rotate(45deg) scale(0.9); }
.fold-close { display: none; }
.fold[open] .fold-open { display: none; }
.fold[open] .fold-close { display: inline; }
.fold-icon {
  position: relative; flex: none; width: 36px; height: 36px; border: 1px solid rgb(255 255 255 / .28); border-radius: 50%;
  transition: transform 220ms var(--ease-out), background-color 160ms ease;
}
.fold-icon::before, .fold-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; translate: -50% -50%; }
.fold-icon::after { rotate: 90deg; }
.fold[open] .fold-icon { transform: rotate(45deg); background: var(--red); border-color: var(--red); }
@media (hover: hover) and (pointer: fine) { .fold summary:hover .fold-icon { border-color: #fff; } }

/* Height animation where the browser supports animating to auto; instant elsewhere */
.fold::details-content {
  block-size: 0; overflow: clip;
  transition: block-size 320ms var(--ease-in-out), content-visibility 320ms allow-discrete;
}
.fold[open]::details-content { block-size: auto; }
.fold-body { padding: 8px 0 32px; }

.prose { display: grid; gap: 18px; max-width: 68ch; color: #d4d4da; font-size: 1.0625rem; }
.prose strong { color: #fff; }
.prose a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.prose blockquote { margin: 10px 0; padding-left: 20px; border-left: 2px solid var(--red); }
.prose blockquote p { color: #fff; font: 700 clamp(1.25rem, 2.4vw, 1.625rem)/1.25 var(--display); }
.prose blockquote footer { margin-top: 10px; color: var(--muted); font: 600 .75rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.sources { font-size: .9375rem; color: var(--muted); }

.recap-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.shot, .grid button { display: block; width: 100%; overflow: hidden; border-radius: 4px; background: var(--ink-3); transition: transform 140ms var(--ease-out); }
.shot:active, .grid button:active { transform: scale(0.98); }
.shot img, .grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 500ms var(--ease-out), opacity 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .shot:hover img, .grid button:hover img { transform: scale(1.04); }
}

/* ---------- Announcement ---------- */
.announce { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .announce { grid-template-columns: minmax(300px, 420px) 1fr; gap: 48px; } }
.reel { display: grid; gap: 18px; }
.reel-media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-3); }
.reel-media > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.reel-media iframe { width: 100% !important; min-width: 0 !important; margin: 0 !important; border-radius: 0 !important; }
.reel-play {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 20px 0 8px; border-radius: 999px;
  background: rgb(8 8 10 / .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 700 .875rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.reel-play:active { transform: scale(0.96); }
.reel-play-icon { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--red); }
.reel-play-icon::after { content: ''; position: absolute; left: 15px; top: 12px; border-left: 11px solid #fff; border-block: 7px solid transparent; }
@media (hover: hover) and (pointer: fine) { .reel-play:hover { background: rgb(8 8 10 / .92); } }
.reel-meta { display: grid; gap: 8px; }
.reel-meta h3 { font-size: 2rem; text-transform: uppercase; }
.reel-status { color: var(--muted); font-size: .9375rem; }
.release summary { align-items: flex-start; padding: 22px 0; text-transform: none; letter-spacing: 0; }
.release-head { display: grid; gap: 10px; }
.release-title { font: 800 clamp(1.75rem, 3.6vw, 2.5rem)/1 var(--display); text-transform: uppercase; }
.release .fold-open, .release .fold-close { color: var(--muted); font: 700 .8125rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Schedule ---------- */
.races { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .races { grid-template-columns: 1fr 1fr; } }
.race { display: grid; align-content: start; gap: 10px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.race-date { color: var(--muted); font: 700 .8125rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.race-done .race-date { color: var(--red-soft); }
.race h3 { font-size: clamp(1.75rem, 4vw, 2.5rem); text-transform: uppercase; }
.race-name { color: #cfcfd6; }
.race-facts { display: grid; gap: 10px; margin: 10px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.race-facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; }
.race-facts dt { color: var(--muted); font: 600 .75rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.race-facts dd { margin: 0; }
.result { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 3px; background: var(--red); font: 800 1rem/1.3 var(--display); }

/* ---------- About ---------- */
.about { display: grid; gap: 32px; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; } }
.about-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.about-photo figcaption { position: absolute; left: 14px; bottom: 14px; padding: 6px 10px; border-radius: 3px; background: rgb(8 8 10 / .78); font: 600 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.about-copy { display: grid; gap: 18px; justify-items: start; }
.about-copy h2 { font-size: clamp(2.6rem, 6.5vw, 4.5rem); text-transform: uppercase; }
.about-copy > p:not(.label) { color: #d4d4da; font-size: 1.125rem; }
.roles { display: grid; gap: 1px; width: 100%; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 520px) { .roles { grid-template-columns: 1fr 1fr; } }
.roles div { display: grid; gap: 6px; padding: 16px 18px; background: var(--ink); }
.roles span { color: var(--muted); font: 600 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.roles strong { font: 800 1.375rem/1.05 var(--display); text-transform: uppercase; }

/* ---------- Career ---------- */
.record { display: flex; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.record div { display: grid; gap: 4px; padding: 10px 16px; }
.record div + div { border-left: 1px solid var(--line); }
.record dd { margin: 0; font: 800 1.75rem/1 var(--display); font-variant-numeric: tabular-nums; }
.record dt { color: var(--muted); font: 600 .6875rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }

.cards { display: grid; gap: 14px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(6, 1fr); } .card { grid-column: span 6; } .card-tile { grid-column: span 2; } }
.card { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.card-photo { margin: 0; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { display: grid; align-content: start; gap: 12px; padding: clamp(20px, 3vw, 32px); }
.card h3 { font-size: clamp(1.625rem, 3.4vw, 2.375rem); text-transform: uppercase; }
.card p:not(.card-tag) { color: #cfcfd6; }
.card-tag { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 600 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.card-tag b { padding: 4px 7px; border-radius: 3px; background: var(--red); color: #fff; font-weight: 700; }
@media (min-width: 900px) {
  .card-wide { grid-template-columns: 1.2fr 1fr; }
  .card-wide .card-body { align-content: center; padding: 40px; }
  .card-flip .card-photo { order: 2; }
}
.card-plain .card-body { grid-template-columns: auto; }
@media (min-width: 900px) { .card-plain .card-body { grid-template-columns: 200px 1fr 1.4fr; align-items: center; gap: 32px; } }

.card-tracks { padding: clamp(14px, 3vw, 40px); gap: 28px; }
.tracks-head { display: grid; gap: 12px; max-width: 640px; }
.tracks-head h3 { font-size: clamp(2rem, 4.6vw, 3rem); }
.tracks-head p:last-child { color: #cfcfd6; }
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .tracks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 900px) { .tracks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tracks li { display: grid; align-content: start; gap: 10px; padding: clamp(12px, 2vw, 16px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); }
.tracks svg { width: 100%; aspect-ratio: 2; }
.tracks path {
  fill: none; stroke: #5d5d68; stroke-width: 3; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.js .tracks path { stroke-dashoffset: 1; transition: stroke-dashoffset 1100ms var(--ease-in-out); transition-delay: var(--d, 0ms); }
.js .tracks.is-in path { stroke-dashoffset: 0; }
.tracks li:has(.top5) path { stroke: var(--paper); }
.tracks li.track-best path { stroke: var(--red); }
.tracks strong { font: 800 clamp(1.0625rem, 2.4vw, 1.25rem)/1 var(--display); text-transform: uppercase; }
.finishes { display: flex; flex-wrap: wrap; gap: 6px; }
.finishes a {
  display: grid; gap: 2px; min-height: 44px; padding: 6px 10px; border-radius: 4px;
  border: 1px solid var(--line); color: var(--muted); font: 600 .6875rem/1.1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  transition: transform 140ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}
.finishes a b { color: #fff; font: 800 1.25rem/1 var(--display); letter-spacing: 0; }
.finishes a.top5 { border-color: rgb(255 36 48 / .5); }
.finishes a.top5 b { color: var(--red-soft); }
.finishes a:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .finishes a:hover { border-color: #fff; background: rgb(255 255 255 / .05); } }
.key i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1px solid rgb(255 36 48 / .7); border-radius: 2px; vertical-align: -1px; }

/* ---------- Story / timeline ---------- */
.story-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .story-grid { grid-template-columns: 360px 1fr; gap: 80px; align-items: start; }
  .story-side { position: sticky; top: calc(var(--bar-h) + 40px); }
}
.story-side { display: grid; gap: 16px; }
.story-side h2 { font-size: clamp(2.6rem, 6vw, 4.5rem); text-transform: uppercase; }
.story-side > p:not(.label) { color: #cfcfd6; }
.chapters { display: none; margin-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .chapters { display: grid; } }
.chapters a {
  display: flex; align-items: center; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--line);
  color: #8a8a94; font: 700 1.25rem/1 var(--display); text-transform: uppercase;
  transition: color 200ms ease;
}
.chapters span { font: 600 .75rem/1 var(--body); letter-spacing: .1em; }
.chapters a[aria-current="true"] { color: #fff; }
.chapters a[aria-current="true"] span { color: var(--red); }
@media (hover: hover) and (pointer: fine) { .chapters a:hover { color: #fff; } }

.story-line { position: relative; padding-left: 34px; }
.story-rail { position: absolute; left: 6px; top: 6px; bottom: 0; width: 2px; background: var(--line); overflow: hidden; }
.story-rail span { position: absolute; inset: 0; background: var(--red); transform-origin: top; transform: scaleY(var(--p, 0)); will-change: transform; }
.chapter + .chapter { margin-top: 64px; }
.chapter-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; font-size: clamp(1.75rem, 4vw, 2.5rem); text-transform: uppercase; }
.chapter-title span { color: var(--red); font: 600 .875rem/1 var(--body); letter-spacing: .1em; }
.mile { position: relative; display: grid; gap: 10px; padding-bottom: 44px; }
.mile::before {
  content: ''; position: absolute; left: -33px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); border: 2px solid #55555f;
  transition: border-color 300ms ease, background-color 300ms ease;
}
.mile.is-in::before { border-color: var(--red); }
.mile-now::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 5px rgb(255 36 48 / .2); }
.mile-year { color: var(--red-soft); font: 700 .875rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.mile h4 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); text-transform: uppercase; }
.mile > p:not(.mile-year) { max-width: 56ch; color: #cfcfd6; }
.mile figure { position: relative; max-width: 560px; margin: 8px 0 0; overflow: hidden; border-radius: var(--radius); }
.mile figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mile figcaption { position: absolute; left: 10px; bottom: 10px; padding: 5px 8px; border-radius: 3px; background: rgb(8 8 10 / .78); font: 600 .6875rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.mile-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; }
.mile-pair figure { margin-top: 8px; }

/* ---------- Merch (paper break) ---------- */
.merch { padding-block: clamp(64px, 9vw, 120px); background: var(--paper); color: var(--ink); }
.merch-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .merch-grid { grid-template-columns: 300px 1fr; gap: 56px; align-items: center; } }
.merch-copy { display: grid; gap: 18px; justify-items: start; }
.merch-mark { width: 76px; padding: 6px; border-radius: var(--radius); background: var(--ink); }
.merch-copy h2 { font-size: clamp(2.8rem, 7vw, 4.75rem); text-transform: uppercase; }
.merch-items {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(68vw, 300px); gap: 12px;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.merch-items::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .merch-items { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; overflow: visible; } }
.merch-items li { scroll-snap-align: start; }
.merch-items a { display: grid; gap: 12px; transition: transform 140ms var(--ease-out); }
.merch-items a:active { transform: scale(0.98); }
.merch-items img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: #e7e7e3; transition: transform 500ms var(--ease-out); }
.merch-items span { font: 800 1.375rem/1 var(--display); text-transform: uppercase; }
.merch-items li { overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .merch-items a:hover img { transform: scale(1.03); } }

/* ---------- Gallery ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid li { animation: rise 420ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
.grid-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.grid-foot .label { color: var(--muted); }

/* ---------- Partners ---------- */
.partners { display: grid; gap: 14px; }
@media (min-width: 900px) { .partners { grid-template-columns: 1fr 1fr; } }
.partner { display: grid; gap: 22px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.partner > div { display: grid; gap: 10px; justify-items: start; }
.partner h3 { font-size: 2rem; text-transform: uppercase; }
.partner p:not(.label) { color: #cfcfd6; }
.partner-logo { display: flex; align-items: center; justify-content: center; height: 150px; min-width: 0; padding: 20px; overflow: hidden; border-radius: 4px; background: #fff; }
.partner-logo img { width: 100%; height: 110px; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.cta { display: grid; gap: 22px; align-items: center; margin-top: 14px; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius); background: var(--red); color: #fff; }
.cta .label { color: rgb(255 255 255 / .8); }
.cta h3 { margin: 8px 0; font-size: clamp(2.2rem, 5vw, 3.5rem); text-transform: uppercase; }
.cta .btn { justify-self: start; }
.cta .btn-red { background: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cta .btn-red:hover { background: #222229; } }
@media (min-width: 760px) { .cta { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.foot { padding: 48px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 28px; }
.foot-grid img { width: 180px; }
.foot-grid p { margin-top: 14px; color: var(--muted); font-size: .9375rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: #cfcfd6; font: 600 .9375rem/1 var(--body); letter-spacing: .04em; text-transform: uppercase; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover { color: #fff; } }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1fr auto auto; gap: 56px; align-items: start; } .foot nav { display: grid; gap: 0; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: transparent; }
.lightbox-bg { position: absolute; inset: 0; background: #050507; opacity: 0; transition: opacity 260ms ease; }
.lightbox[data-shown="true"] .lightbox-bg { opacity: 1; }
.lightbox-frame {
  position: absolute; inset: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(88px + env(safe-area-inset-bottom, 0px));
  display: grid; place-content: center; justify-items: center; gap: 14px; margin: 0; touch-action: none;
}
.lightbox-frame img { max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto; border-radius: 4px; transform-origin: 0 0; will-change: transform; }
.lightbox-frame figcaption { max-width: 60ch; text-align: center; color: #cfcfd6; font-size: .9375rem; opacity: 0; transition: opacity 200ms ease; }
.lightbox[data-shown="true"] figcaption { opacity: 1; }
.lightbox-ui {
  position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); translate: -50% 0;
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgb(28 28 34 / .9); border: 1px solid var(--line);
  opacity: 0; transition: opacity 200ms ease;
}
.lightbox[data-shown="true"] .lightbox-ui { opacity: 1; }
.lightbox-count { padding: 0 12px; white-space: nowrap; color: var(--muted); font: 600 .8125rem/1 var(--body); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.lightbox-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.lightbox-btn:active { transform: scale(0.92); }
.lightbox-btn svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .lightbox-btn:hover { background: rgb(255 255 255 / .1); } }
html.locked, html.locked body { overflow: hidden; }

/* ---------- Scroll reveals (only once JS is running) ---------- */
.js [data-reveal], .js [data-reveal-group] > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in, .js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
/* Clip the image, not the figure, so the observers (and lazy loading) still see the box */
.js [data-clip] img { clip-path: inset(100% 0 0 0); transform: scale(1.08); transition: clip-path 900ms var(--ease-in-out), transform 1200ms var(--ease-out); }
.js [data-clip].is-in img { clip-path: inset(0 0 0 0); transform: none; }

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .in, .grid li { animation-name: fade; animation-duration: 300ms; }
  @keyframes fade { from { opacity: 0; } }
  .hero-photo img { animation: fade 400ms ease both; }
  .js [data-reveal], .js [data-reveal-group] > * { transform: none; transition: opacity 300ms ease; }
  .js [data-clip] img { clip-path: none; transform: none; opacity: 0; transition: opacity 400ms ease; }
  .js [data-clip].is-in img { opacity: 1; }
  .js .tracks path { stroke-dashoffset: 0; transition: none; }
  .story-rail span { transform: scaleY(1); }
  .sheet, .sheet[data-open="true"] { transition: transform 1ms, visibility 1ms; }
  .fold::details-content { transition: none; }
}

.season-status { padding-top:16px; border-top:1px solid var(--line); scroll-margin-top:calc(var(--bar-h) + 24px); }
.season-status strong { display:block; color:var(--paper); }
