@font-face { font-family: "Brutal Type"; src: url("../fonts/BrutalType-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Brutal Type"; src: url("../fonts/BrutalType-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Brutal Type"; src: url("../fonts/BrutalType-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Brutal Type"; src: url("../fonts/BrutalType-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --y: #FFED00;
  --ink: #0B0B0B;
  --s1: #1A1A1A;
  --s2: #262626;
  --mute: #999999;
  --paper: #F5F5F5;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: clamp(16px, 4vw, 56px);
  --sec: clamp(88px, 14vh, 168px);
  /* z-index scale: grain 90, fixed ui 95, gate 100 */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: "Brutal Type", system-ui, sans-serif; font-weight: 500; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100dvh; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; }
.clock, .countdown b, .bar__val, .station__delta, .run dd, .opt strong, .card strong, .gate__count, .tbl { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* buttons */
.btn { min-height: 52px; padding: 0 28px; font-weight: 900; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, color .2s; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--y); color: var(--ink); }
.btn--primary:hover { background: var(--paper); }
.btn--ghost { min-height: 44px; padding: 0 8px; font-weight: 700; font-size: 14px; letter-spacing: .1em; color: var(--mute); text-decoration: underline; text-underline-offset: 6px; }
.btn--ghost:hover { color: var(--paper); }

/* gate */
.gate {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 5vh, 48px);
  padding: 0 var(--gut); background: var(--ink); text-align: center;
  transition: opacity .8s var(--ease), visibility 0s linear .8s, background-color .1s;
}
.gate__meta { font-weight: 700; font-size: 13px; letter-spacing: .3em; color: var(--mute); }
.gate__team { font-weight: 900; font-size: clamp(36px, 7vw, 104px); line-height: .9; }
.gate__actions { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: center; }
.gate__count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-weight: 900; font-size: clamp(140px, 32vw, 460px); line-height: .8; color: var(--y); }
.gate.is-counting > :not(.gate__count) { visibility: hidden; }
.gate.is-go { background: var(--y); }
.gate.is-go .gate__count { color: var(--ink); }
.gate.is-gone { opacity: 0; visibility: hidden; }

/* fixed ui */
.mute { position: fixed; top: 16px; right: 16px; z-index: 95; min-height: 44px; padding: 0 16px; border: 1px solid var(--y); background: rgb(11 11 11 / .6); color: var(--y); font-weight: 700; font-size: 12px; letter-spacing: .2em; }
.mute[aria-pressed="true"] { color: var(--mute); border-color: var(--s2); }
.rail {
  position: fixed; right: var(--gut); bottom: 20px; z-index: 95; display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: rgb(11 11 11 / .82); font-weight: 700; font-size: 11px; letter-spacing: .12em; color: var(--mute);
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s linear .4s;
}
.in-stations .rail { opacity: 1; visibility: visible; transition: opacity .4s; }
.rail button { display: grid; place-items: center; min-width: 38px; height: 32px; border: 1px solid var(--s2); font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--mute); transition: background-color .3s, color .3s, border-color .3s; }
.rail button:hover { color: var(--paper); border-color: var(--mute); }
.rail button.is-on { background: var(--y); color: var(--ink); border-color: var(--y); }
@media (max-width: 899px) {
  .rail { left: 8px; right: 8px; bottom: 8px; gap: 2px; padding: 4px; justify-content: space-between; }
  .rail span { display: none; }
  .rail button { flex: 1; min-width: 0; height: 44px; }
}

/* hero */
.hero { position: relative; min-height: 100dvh; overflow: hidden; display: grid; align-items: end; }
.hero__media { position: absolute; inset: 0; transform-origin: 52% 30%; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; filter: contrast(1.15) brightness(.72); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 6%, rgb(11 11 11 / 0) 58%); pointer-events: none; }
/* names sit inside the zooming media so they stay above each athlete; % measured on the photo at scale 1 */
.hero__name { position: absolute; top: 20%; translate: -50% 0; font-weight: 900; font-size: clamp(12px, 1.3vw, 18px); letter-spacing: .32em; color: var(--y); }
.hero__name--l { left: 35.5%; }
.hero__name--r { left: 69%; }
.hero__copy { position: relative; z-index: 2; display: grid; gap: clamp(20px, 4vh, 40px); padding: 0 var(--gut) clamp(28px, 7vh, 80px); }
.hero__eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .3em; color: var(--y); margin-bottom: 14px; }
.hero__title { font-weight: 900; font-size: clamp(64px, 13vw, 210px); line-height: .84; letter-spacing: -.01em; }
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: block; }
.countdown { display: flex; gap: clamp(16px, 3vw, 40px); }
.countdown span { display: grid; }
.countdown b { font-weight: 900; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; }
.countdown small { font-weight: 700; font-size: 11px; letter-spacing: .24em; color: var(--mute); }
@media (min-width: 900px) { .hero__copy { grid-template-columns: 1fr auto; align-items: end; } }
@media (max-width: 899px) { .hero__name { top: 25%; } .hero__name--l { left: 26%; } .hero__name--r { left: 81%; } }

/* chapters */
.chapter { position: relative; padding: var(--sec) var(--gut); }
.chapter__date { font-weight: 900; font-size: clamp(20px, 2vw, 28px); letter-spacing: .2em; color: var(--y); }
.clock { font-weight: 900; font-size: clamp(72px, 11vw, 190px); line-height: .9; letter-spacing: -.02em; margin-top: 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-weight: 700; font-size: 15px; letter-spacing: .14em; color: var(--mute); }
.chapter--mag { display: grid; gap: 40px; }
.chapter__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--s1); }
.chapter__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; filter: contrast(1.15); }
@media (min-width: 900px) { .chapter--mag { grid-template-columns: 6fr 5fr; align-items: center; gap: 64px; } }
.chapter--set { min-height: 100dvh; display: grid; align-content: center; }
.clock--xl { font-size: clamp(88px, 17vw, 300px); }
.delta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; margin-top: clamp(16px, 3vh, 32px); }
.delta__main { display: inline-block; font-weight: 900; font-size: clamp(56px, 8vw, 140px); line-height: 1; color: var(--y); }
.delta__sub { font-weight: 700; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .12em; }
.quote { margin-top: clamp(40px, 8vh, 88px); max-width: 34ch; border-left: 4px solid var(--y); padding-left: 20px; }
.quote p { font-weight: 500; font-size: clamp(18px, 1.8vw, 26px); line-height: 1.35; }
.quote cite { display: block; margin-top: 10px; font-style: normal; font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--mute); }
@media (min-width: 900px) { .quote { justify-self: end; } }

/* stations */
.stations { position: relative; background: var(--ink); }
.station { position: relative; display: grid; background: var(--ink); }
.station__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--s1); }
.station__media img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.25) brightness(.85); }
.station__tag { position: absolute; left: 0; bottom: 0; background: var(--y); color: var(--ink); font-weight: 900; font-size: clamp(44px, 6vw, 104px); line-height: 1; padding: .1em .22em .02em; }
.station__body { display: grid; gap: 12px; align-content: center; padding: 32px var(--gut) 56px; }
.station__spec { font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--mute); }
.station__name { font-weight: 900; font-size: clamp(40px, 5.2vw, 92px); line-height: .9; letter-spacing: -.01em; text-transform: uppercase; }
.bars { display: grid; gap: 10px; margin-top: 18px; max-width: 520px; }
.bar { display: grid; grid-template-columns: 1fr 11ch; gap: 14px; align-items: center; }
.bar__fill { display: block; height: 12px; transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.bar--mag .bar__fill { background: var(--mute); }
.bar--set .bar__fill { background: var(--y); transition-delay: .15s; }
.is-in .bar__fill { transform: scaleX(var(--w)); }
.bar__val { font-weight: 700; font-size: 14px; letter-spacing: .06em; color: var(--mute); white-space: nowrap; }
.bar--set .bar__val { color: var(--paper); }
.station__delta { font-weight: 900; font-size: clamp(56px, 7vw, 128px); line-height: 1; margin-top: 6px; }
.station__delta.is-faster { color: var(--y); }
.swap { margin-top: 14px; max-width: 520px; }
.swap__label { margin-bottom: 8px; font-weight: 700; font-size: 12px; letter-spacing: .2em; color: var(--mute); }
.swap__label small { font-size: 12px; letter-spacing: .1em; }
.swap__bar { display: flex; gap: 2px; height: 30px; }
.swap__seg {
  display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 700; font-size: 11px; color: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); transition-delay: calc(.5s + var(--i) * 60ms);
}
.swap__seg--M { background: var(--y); }
.swap__seg--A { background: var(--paper); }
.is-in .swap__seg { transform: scaleY(1); }
.swap__note { margin-top: 8px; font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--mute); }
.run { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 28px var(--gut); background: var(--y); color: var(--ink); }
.run__label { font-weight: 900; font-size: clamp(40px, 6vw, 112px); line-height: .85; }
.run__paces { display: flex; gap: 24px; }
.run dt { font-weight: 700; font-size: 12px; letter-spacing: .2em; }
.run dd { font-weight: 900; font-size: clamp(28px, 3vw, 48px); line-height: 1; }
.run dd small { font-size: 14px; font-weight: 700; }
@media (max-width: 899px) { .stations { padding-bottom: 60px; } }
@media (min-width: 900px) {
  .station { grid-template-columns: 62fr 38fr; min-height: 100dvh; }
  .station__media { aspect-ratio: auto; }
  .run { grid-template-columns: 1fr; align-content: center; min-height: 50dvh; }
  .run__paces { flex-direction: column; }
  html.motion .stations { height: 100dvh; overflow: hidden; }
  html.motion .stations__track { display: flex; width: max-content; height: 100dvh; will-change: transform; }
  html.motion .station { width: 100vw; height: 100dvh; }
  html.motion .run { width: 34vw; height: 100dvh; min-height: 0; padding: var(--gut); }
}

/* deep dive: tables + radar */
.deep { padding: var(--sec) var(--gut); }
.deep__title { font-weight: 900; font-size: clamp(40px, 6vw, 96px); line-height: .9; }
.deep__grid { display: grid; gap: 48px; margin-top: 40px; }
@media (min-width: 900px) { .deep__grid { grid-template-columns: 1fr 1fr; gap: 56px 64px; align-items: start; } }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl caption { padding-bottom: 12px; text-align: left; font-weight: 900; font-size: clamp(22px, 2.4vw, 32px); }
.tbl caption small { margin-left: 8px; font-weight: 700; font-size: 12px; letter-spacing: .16em; color: var(--mute); }
.tbl th, .tbl td { padding: 7px 10px; text-align: right; white-space: nowrap; font-size: 15px; }
.tbl th:first-child { padding-left: 0; text-align: left; }
.tbl thead th { border-bottom: 1px solid var(--s2); font-weight: 700; font-size: 12px; letter-spacing: .16em; color: var(--mute); }
.tbl tbody th { font-weight: 700; font-size: 13px; letter-spacing: .1em; color: var(--mute); }
.tbl td { font-weight: 500; color: var(--mute); }
.tbl td.is-best { font-weight: 700; color: var(--paper); }
.tbl .is-race { font-weight: 700; color: var(--y); }
.tbl tfoot th, .tbl tfoot td { padding-top: 12px; border-top: 1px solid var(--s2); font-weight: 900; font-size: 17px; color: var(--paper); }
.tbl tfoot .is-race { color: var(--y); }
.tbl--total tfoot th, .tbl--total tfoot td { font-size: clamp(17px, 2vw, 24px); }
.note { margin-top: 14px; font-size: 13px; color: var(--mute); }
@media (max-width: 600px) {
  .tbl th, .tbl td { padding: 6px 5px; font-size: 13px; }
  .tbl tfoot th, .tbl tfoot td, .tbl--total tfoot th, .tbl--total tfoot td { font-size: 14px; }
}

/* target */
.target { padding: calc(var(--sec) / 2) var(--gut) var(--sec); }
.target__title, .plan__title { font-weight: 900; font-size: clamp(40px, 6vw, 96px); line-height: .9; }
.target__opts { display: grid; gap: 8px; margin-top: 40px; }
.opt { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 0; text-align: left; color: var(--mute); transition: color .25s; }
.opt strong { font-weight: 900; font-size: clamp(56px, 9vw, 160px); line-height: .9; }
.opt span { font-weight: 700; font-size: 13px; letter-spacing: .2em; }
.opt:hover { color: var(--paper); }
.opt[aria-checked="true"] { color: var(--y); }
.target__range { margin-top: 24px; font-weight: 700; font-size: clamp(18px, 2vw, 28px); letter-spacing: .08em; }
@media (min-width: 900px) {
  .target__opts { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .opt { flex-direction: column; border-top: 4px solid currentColor; padding-top: 20px; }
}

/* plan */
.plan { padding: var(--sec) var(--gut); border-top: 1px solid var(--s2); }
.plan__list { margin-top: 40px; display: grid; }
.plan__list li { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 18px 0; font-weight: 900; font-size: clamp(24px, 3.4vw, 56px); line-height: 1.05; text-transform: uppercase; }
.plan__box { width: .7em; height: .7em; border: 3px solid var(--y); }
@media (min-width: 900px) { .plan { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; } .plan__list { margin-top: 0; } }

/* finale: B/W cards that bloom into colour on hover, focus or tap */
.finale { padding: var(--sec) var(--gut) calc(var(--sec) / 2); }
.finale__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--s1); }
.card img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); transition: filter .7s var(--ease), transform .7s var(--ease); }
.card[tabindex] { cursor: pointer; }
.card.is-color img, .card:focus-visible img { filter: grayscale(0) contrast(1); transform: scale(1.03); }
@media (hover: hover) { .card:hover img { filter: grayscale(0) contrast(1); transform: scale(1.03); } }
.card figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 8px; padding: 14px; background: linear-gradient(rgb(11 11 11 / 0), rgb(11 11 11 / .88)); }
.card figcaption span { font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--y); }
.card strong { font-weight: 900; font-size: clamp(22px, 2.6vw, 40px); line-height: 1; }
.card--race { grid-column: 1 / -1; aspect-ratio: 4 / 3; outline: 1px solid var(--y); outline-offset: -1px; }
.card__q { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: clamp(160px, 24vw, 380px); line-height: 1; color: var(--y); }
@media (min-width: 900px) { .finale__grid { grid-template-columns: 1fr 1fr 1.35fr; gap: 16px; align-items: end; } .card--race { grid-column: auto; aspect-ratio: 3 / 4; } }

.foot { padding: 32px var(--gut) 48px; border-top: 1px solid var(--s2); font-size: 13px; color: var(--mute); }
.credits { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.credits li:first-child { width: 100%; font-weight: 700; color: var(--paper); }

/* radar */
.seg { display: flex; width: max-content; border: 1px solid var(--s2); }
.seg button { min-height: 44px; padding: 0 18px; font-weight: 700; font-size: 13px; letter-spacing: .18em; color: var(--mute); }
.seg button[aria-selected="true"] { background: var(--y); color: var(--ink); }
.radar__chart svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.ring, .spoke { fill: none; stroke: var(--s2); stroke-width: 1; }
.lbl { fill: var(--mute); font: 700 15px "Brutal Type", sans-serif; letter-spacing: .06em; }
@media (max-width: 600px) { .lbl { font-size: 26px; } }
.poly { stroke-width: 2.5; stroke-linejoin: round; }
.poly--mag { fill: rgb(153 153 153 / .16); stroke: var(--mute); stroke-dasharray: 6 5; }
.poly--set { fill: rgb(255 237 0 / .2); stroke: var(--y); }
.poly--est { fill: none; stroke: var(--paper); stroke-width: 2; stroke-dasharray: 1 6; stroke-linecap: round; }
.poly--race { fill: none; stroke: var(--paper); stroke-width: 3; }
.radar__legend { display: flex; flex-wrap: wrap; gap: 12px 28px; font-weight: 700; font-size: 13px; letter-spacing: .18em; }
.lg::before { content: ""; display: inline-block; width: 28px; margin-right: 10px; vertical-align: middle; border-top: 3px dashed var(--mute); }
.lg--set::before { border-top: 3px solid var(--y); }
.lg--est::before { border-top: 3px dotted var(--paper); }
.lg--race::before { border-top: 3px solid var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; }
}
