/* RIGGERS promo — page frame (section bands, dividers, spacing), preloader, top bar, toast, hero, round timeline.
   Frame rules use :where() (zero specificity) so any section's own stylesheet overrides them. */

:root {
  --tb-h: 60px;
  --grain-asphalt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .56 0 0 0 0 .54 0 0 0 0 .5 0 0 0 1.5 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  --grain-concrete: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .58 0 0 0 0 .52 0 0 0 .7 -.26'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
}

/* ---------- Page frame: alternating asphalt / concrete bands ---------- */
/* Pre-entrance rotated cards (catalog drop-in, tilts) poked 0.6px past the edge and mobile Chrome widened the layout
   viewport to 392px. clip (not hidden) keeps sticky/pinning working. */
main { overflow-x: clip; }
:where(main > section:not(#hero)) {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px);
  scroll-margin-top: var(--tb-h);
  border-top: 4px solid #0c0b0a;
  background: var(--grain-asphalt), radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, .035), transparent 60%), #1a1917;
}
:where(#garage, #hazards, #videos, #crew) {
  background:
    radial-gradient(circle at 60px 60px, rgba(0, 0, 0, .35) 0 3px, rgba(255, 255, 255, .05) 3.5px 4.5px, transparent 5px) 0 0 / 240px 240px,
    var(--grain-concrete), var(--grain-asphalt),
    linear-gradient(180deg, #252420, #1f1e1b);
}
/* Hazard-tape rules where the page changes gear. */
:where(#loop, #garage, #hazards, #crew) {
  border-top: 14px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, #151412 14px 28px) 14 0 0 0 / 14px 0 0 0;
}

:where(main > section) .mount-fail {
  max-width: 560px; margin: 0 auto; padding: 22px 26px; text-align: center; transform: rotate(-.6deg);
  border: 2px dashed rgba(242, 194, 48, .45); color: var(--paper-dim);
  font-size: 20px; text-transform: uppercase; letter-spacing: .06em;
}

/* ---------- Preloader: a garage roll-up shutter ---------- */
body:has(#preloader:not(.gone)) { overflow: hidden; }
#preloader {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: var(--gutter);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 214, 150, .08), transparent 55%),
    radial-gradient(ellipse at 20% 90%, rgba(138, 75, 42, .25), transparent 50%),
    var(--grain-asphalt),
    repeating-linear-gradient(180deg, #2c2a26 0 9px, #3a3732 9px 11px, #1b1a17 11px 14px, #26241f 14px 26px);
  transition: transform .9s cubic-bezier(.7, 0, .25, 1);
}
#preloader::after { /* shutter bottom rail */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 18px, #151412 18px 36px);
  box-shadow: 0 -4px 0 #0c0b0a, 0 -8px 14px rgba(0, 0, 0, .5);
}
#preloader.gone { transform: translateY(-102%); }
#preloader.gone .pre-inner { transform: translateY(40px); transition: transform .9s ease-in; }
#preloader .pre-inner { display: grid; justify-items: center; gap: 14px; text-align: center; }
#preloader .pre-logo { font-size: clamp(64px, 12vw, 150px); margin-bottom: .16em; text-shadow: 0 4px 0 #0c0b0a, 0 12px 30px rgba(0, 0, 0, .6); }
#preloader .pre-wheel {
  width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; margin-bottom: -6px;
  background:
    radial-gradient(circle, transparent 0 55%, #0e0d0c 56% 100%),
    repeating-conic-gradient(#151412 0 9deg, #34312c 9deg 18deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .6);
  animation: pre-wobble 1.1s linear infinite;
}
#preloader .pre-wheel span {
  width: 54%; height: 54%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 22%, #151412 0 7%, transparent 8%), radial-gradient(circle at 78% 62%, #151412 0 7%, transparent 8%),
    radial-gradient(circle at 22% 62%, #151412 0 7%, transparent 8%), radial-gradient(circle, #3a3733 0 22%, #9c988f 24% 70%, #6a675f 72%);
}
@keyframes pre-wobble { /* a bent rim: spins and wobbles like it is about to leave */
  0% { transform: rotate(0) translateX(0); } 25% { transform: rotate(90deg) translateX(2px); }
  50% { transform: rotate(180deg) translateX(0); } 75% { transform: rotate(270deg) translateX(-2px); } 100% { transform: rotate(360deg); }
}
#preloader .pre-bar {
  position: relative; width: min(520px, 82vw); height: 26px; border-radius: 3px; overflow: hidden;
  background: #0f0e0c; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08);
  border: 1px solid #000;
}
#preloader .pre-fill {
  width: 0; height: 100%; transition: width .35s ease-out;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, #151412 14px 28px);
  animation: pre-crawl .6s linear infinite; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25);
}
@keyframes pre-crawl { to { background-position: 39.6px 0; } }
#preloader .pre-pct {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 600 14px/1 var(--font-body);
  color: var(--paper); background: #0f0e0c; padding: 3px 6px; border-radius: 2px; letter-spacing: .08em;
}
#preloader .pre-status { font-size: clamp(16px, 1.4vw + 8px, 22px); text-transform: uppercase; letter-spacing: .06em; min-height: 1.5em; }
#preloader .pre-tip { font-size: 16px; min-height: 1.4em; }
#preloader .pre-go { margin-top: 10px; font-size: clamp(20px, 1.6vw + 10px, 28px); padding: .7em 1.8em .64em; animation: pre-pulse 1.6s ease-in-out infinite; }
@keyframes pre-pulse { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 0 #0d0c0b, 0 0 0 8px rgba(242, 194, 48, .16), 0 10px 18px rgba(0, 0, 0, .4); } }

/* ---------- Top bar ---------- */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 800; height: var(--tb-h); }
#topbar::before { /* gradient over the hero, metal strip once scrolled */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(21, 20, 18, .72), rgba(21, 20, 18, 0));
  transition: opacity .3s;
}
#topbar::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #34322d, #22211e 60%, #1a1917);
  border-bottom: 4px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--hazard) 0 8px, #151412 8px 16px) 0 0 4 0 / 0 0 4px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
#topbar.solid::before { opacity: 0; }
#topbar.solid::after { opacity: 1; }
#topbar .tb-inner { height: 100%; max-width: 1480px; margin: 0 auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: clamp(10px, 1.4vw, 22px); }
#topbar .tb-logo { font-size: 30px; text-decoration: none; text-shadow: 0 2px 0 #0c0b0a; flex: none; transition: transform .15s; }
#topbar .tb-logo:hover { transform: rotate(-3deg) scale(1.05); }
#topbar .tb-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#topbar .tb-nav a { font-size: 14px; text-decoration: none; transition: transform .12s ease, filter .12s; }
#topbar .tb-nav a:hover { transform: translateY(-2px) rotate(0deg); filter: brightness(1.08); }
#topbar .tb-nav a:active { transform: translateY(1px) rotate(0deg); }
#topbar .tb-nav a.on { background: linear-gradient(180deg, #ffd54a, #e0ab12); }
#topbar .tb-odo {
  display: flex; align-items: baseline; gap: 6px; flex: none; padding: 6px 10px; border-radius: 3px;
  background: #0f0e0c; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .07);
  font: 600 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: .12em; color: var(--paper-dim);
}
#topbar .tb-odo b { font-size: 18px; color: var(--hazard); letter-spacing: .18em; font-variant-numeric: tabular-nums; }
#topbar .tb-mute {
  display: flex; align-items: center; gap: 8px; padding: 6px 2px; background: none; border: 0; cursor: pointer; flex: none;
  font: 600 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: .14em; color: var(--paper-dim);
}
#topbar .tb-switch {
  position: relative; width: 46px; height: 24px; border-radius: 3px; background: #0f0e0c;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .08);
}
#topbar .tb-switch::before { /* status LED */
  content: ''; position: absolute; right: -10px; top: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--alarm); box-shadow: 0 0 6px var(--alarm);
}
#topbar .tb-switch i {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 20px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, #6b675f 0 2px, #9c988f 2px 4px), #8f8474;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 3px rgba(0, 0, 0, .6);
  transition: transform .14s cubic-bezier(.3, 1.6, .5, 1);
}
#topbar .tb-mute[aria-checked='true'] .tb-switch i { transform: translateX(20px); }
#topbar .tb-mute[aria-checked='true'] .tb-switch::before { background: var(--toxic); box-shadow: 0 0 8px var(--toxic); }
#topbar .tb-mute:hover .tb-switch i { filter: brightness(1.15); }
#topbar .tb-wish { flex: none; text-decoration: none; }
#topbar .tb-burger { display: none; }

@media (max-width: 1180px) { #topbar .tb-odo { display: none; } }
@media (max-width: 900px) {
  #topbar .tb-inner { gap: 10px; }
  #topbar .tb-mute { margin-left: auto; }
  #topbar .tb-mute-label { display: none; }
  #topbar .tb-switch::before { right: auto; left: -11px; }
  #topbar .tb-burger {
    display: grid; align-content: center; gap: 5px; width: 44px; height: 40px; padding: 0 9px; flex: none; cursor: pointer;
    background: linear-gradient(180deg, #45423b, #2a2824); border: 2px solid #0d0c0b; border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 0 #0d0c0b;
  }
  #topbar .tb-burger i { display: block; height: 4px; border-radius: 1px; background: var(--dust); transition: transform .2s, opacity .2s; }
  #topbar .tb-burger i:nth-child(2) { width: 80%; }
  #topbar.open .tb-burger i:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  #topbar.open .tb-burger i:nth-child(2) { opacity: 0; }
  #topbar.open .tb-burger i:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  #topbar .tb-nav {
    position: absolute; top: calc(var(--tb-h) + 4px); right: var(--gutter); margin: 0; width: min(280px, calc(100vw - 2 * var(--gutter)));
    flex-direction: column; align-items: stretch; gap: 12px; padding: 22px 24px;
    background: linear-gradient(160deg, #34322d, var(--plate) 45%, #1b1a17); border: 1px solid #0c0b0a; border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .18s, transform .18s, visibility 0s .18s;
  }
  #topbar.open .tb-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .18s, transform .18s; }
  #topbar .tb-nav a { font-size: 18px; text-align: center; }
}
@media (max-width: 480px) {
  #topbar .tb-inner { gap: 8px; }
  #topbar .tb-logo { font-size: 24px; }
  #topbar .tb-wish { font-size: 13px; padding: .5em .7em .45em; letter-spacing: .03em; }
}

/* ---------- Toast: masking tape slapped on the bottom ---------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 9500; max-width: min(90vw, 560px); cursor: pointer;
  padding: .7em 1.5em .62em; color: #1d1b18; font: 600 clamp(16px, 1vw + 10px, 20px)/1.2 var(--font-body);
  text-transform: uppercase; letter-spacing: .04em; text-align: center;
  background: linear-gradient(180deg, rgba(236, 222, 178, .98), rgba(214, 198, 152, .98));
  clip-path: polygon(0 6%, 4% 0, 9% 8%, 14% 1%, 22% 7%, 30% 0, 41% 6%, 52% 1%, 63% 8%, 72% 0, 83% 7%, 91% 1%, 100% 6%,
    98% 50%, 100% 94%, 92% 100%, 84% 93%, 74% 100%, 63% 94%, 51% 100%, 40% 93%, 29% 100%, 18% 94%, 8% 100%, 0 94%, 2% 50%);
  opacity: 0; transform: translate(-50%, 30px) rotate(-6deg) scale(.7); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-1.8deg); pointer-events: auto; transition: opacity .12s, transform .32s cubic-bezier(.2, 1.7, .4, 1); }

/* ---------- Hero: a sticky 3D stage; the extra height is the scroll that rolls the kart away ---------- */
#hero { position: relative; height: 175vh; height: 175svh; background: #1a1917; }
#hero .hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; --p: 0; --pp: 0; }
#hero .hero-poster {
  position: absolute; inset: 0; filter: sepia(.25) saturate(.85);
  background: linear-gradient(180deg, rgba(21, 20, 18, .15), rgba(21, 20, 18, .7)), url('../assets/shots/v2_aerial.jpg') center / cover;
}
#hero .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s; touch-action: pan-y; }
#hero.ready .hero-canvas { opacity: 1; }
#hero .hero-scrim {
  position: absolute; inset: 0; pointer-events: none; opacity: calc(1 - var(--p));
  background:
    linear-gradient(90deg, rgba(21, 20, 18, .72) 0%, rgba(21, 20, 18, .4) 30%, rgba(21, 20, 18, 0) 54%),
    linear-gradient(0deg, rgba(21, 20, 18, .55), rgba(21, 20, 18, 0) 20%);
}
#hero .hero-copy {
  position: absolute; left: var(--gutter); top: 50%; width: min(640px, 50vw); pointer-events: none;
  transform: translateY(calc(-44% - var(--p) * 140px)); opacity: calc(1 - var(--p) * 2.6);
}
#hero .hero-copy > * { pointer-events: auto; }
#hero .hero-stencil {
  margin: 0 0 .2em; font: 600 clamp(15px, .8vw + 10px, 22px)/1 var(--font-body); letter-spacing: .38em; text-transform: uppercase;
  color: var(--haze); text-shadow: 0 0 6px rgba(232, 216, 190, .35), 0 2px 0 rgba(0, 0, 0, .6);
  -webkit-mask-image: linear-gradient(180deg, #000 47%, transparent 47% 56%, #000 56%);
  mask-image: linear-gradient(180deg, #000 47%, transparent 47% 56%, #000 56%);
}
#hero .hero-logo {
  position: relative; display: inline-block; margin: 0 0 .12em -.04em; font-size: clamp(84px, 10.5vw, 176px); font-weight: 400;
  -webkit-text-stroke: 4px #151412; paint-order: stroke fill; text-shadow: 0 6px 0 #0c0b0a, 0 18px 40px rgba(0, 0, 0, .55);
}
#hero .drip { /* the paint is still wet */
  position: absolute; top: 78%; width: .045em; border-radius: 0 0 .05em .05em; background: var(--hazard);
  box-shadow: 1px 0 0 #151412, -1px 0 0 #151412; animation: drip 7s cubic-bezier(.5, 0, .9, .6) infinite;
}
#hero .drip:nth-of-type(1) { left: 21%; animation-delay: 1.5s; }
#hero .drip:nth-of-type(2) { left: 57%; animation-delay: 4.2s; animation-duration: 9s; }
#hero .drip:nth-of-type(3) { left: 88%; animation-delay: 2.8s; animation-duration: 8s; }
@keyframes drip { 0% { height: 0; opacity: 1; } 70% { height: .34em; opacity: 1; } 100% { height: .4em; opacity: 0; } }
#hero .hero-tag { margin: 0; max-width: 30ch; font-size: clamp(20px, 1.1vw + 13px, 29px); line-height: 1.22; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
#hero .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 28px; }
#hero .hero-trailer svg { width: .62em; height: .74em; fill: currentColor; }
#hero .hero-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; }
#hero .hero-badges .tape { font-size: 15px; }
#hero .hero-badges .tape:nth-child(3) { transform: rotate(-3deg); }

/* Intro once the shutter goes up. `translate` composes with each element's own rotate. */
#hero .hero-copy > *, #hero .hero-badges > li, #hero .hero-note .paper, #hero .hero-note .tape {
  opacity: 0; translate: 0 26px; transition: opacity .45s ease-out, translate .6s cubic-bezier(.2, 1.5, .4, 1);
}
html.entered #hero .hero-copy > *, html.entered #hero .hero-badges > li, html.entered #hero .hero-note .paper, html.entered #hero .hero-note .tape { opacity: 1; translate: 0 0; }
html.entered #hero .hero-stencil { transition-delay: .25s; }
html.entered #hero .hero-logo { transition-delay: .4s; }
html.entered #hero .hero-tag { transition-delay: .6s; }
html.entered #hero .hero-cta { transition-delay: .75s; }
html.entered #hero .hero-badges { transition-delay: .85s; }
html.entered #hero .hero-badges > li:nth-child(1) { transition-delay: 1.05s; }
html.entered #hero .hero-badges > li:nth-child(2) { transition-delay: 1.2s; }
html.entered #hero .hero-badges > li:nth-child(3) { transition-delay: 1.35s; }
html.entered #hero .hero-note .paper { transition-delay: 1.5s; }
html.entered #hero .hero-note .tape { transition-delay: 1.75s; }

/* Taped techpassport note that tracks what just fell off the kart. */
#hero .hero-note { position: absolute; right: calc(var(--gutter) + 8px); top: calc(var(--tb-h) + 34px); width: 262px; transform: rotate(2.4deg); opacity: calc(1 - var(--p) * 2.6); }
#hero .hero-note .paper { padding: 24px 20px 14px; font-size: 16px; line-height: 1.25; }
#hero .hero-note .tape { position: absolute; top: -10px; left: 50%; width: 96px; height: 26px; margin-left: -48px; }
#hero .hero-note-title { margin: 0 0 10px; font: 400 21px/1 var(--font-title); text-transform: uppercase; color: #3a3530; }
#hero .hero-note ul { list-style: none; margin: 0; padding: 0; }
#hero .hero-note li { position: relative; padding: 4px 0 4px 26px; transition: color .2s; }
#hero .hero-note li::before { content: ''; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border: 2px solid #2a2622; }
#hero .hero-note li::after { /* pencil tick */
  content: ''; position: absolute; left: 4px; top: 7px; width: 6px; height: 10px; border: solid #2a2622; border-width: 0 3px 3px 0; transform: rotate(40deg);
}
#hero .hero-note li.bad { color: #b8332b; }
#hero .hero-note li.bad::after { /* red X */
  left: -3px; top: 3px; width: 22px; height: 22px; border: 0; transform: none;
  background: linear-gradient(45deg, transparent 44%, #c9362c 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #c9362c 44% 56%, transparent 56%);
}

/* Hints: a tape label hovering over the kart until the first poke, and a cursor label on hover. */
#hero .hero-poke { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity .3s; }
#hero .hero-poke .tape { display: block; translate: -50% -100%; font-size: 15px; white-space: nowrap; animation: poke-bob 1.4s ease-in-out infinite; }
#hero .hero-poke .tape::after { /* arrow pointing down at the kart */
  content: ''; position: absolute; left: 50%; bottom: -14px; margin-left: -8px; border: 8px solid transparent; border-top-color: rgba(214, 198, 152, .96);
}
#hero .hero-poke.gone { opacity: 0; }
#hero .hero-poke.below .tape { translate: -50% 16px; }
#hero .hero-poke.below .tape::after { bottom: auto; top: -14px; border-top-color: transparent; border-bottom-color: rgba(236, 222, 178, .96); }
@keyframes poke-bob { 50% { transform: translateY(-8px) rotate(-1.6deg); } }
html:not(.entered) #hero .hero-poke { opacity: 0; }
#hero .hero-cursor {
  position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .15s; white-space: nowrap;
  padding: 6px 10px; background: rgba(21, 20, 18, .85); border: 1px solid #0c0b0a; border-radius: 3px;
  font: 600 13px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em;
}
#hero .hero-cursor.on { opacity: 1; }
#hero .hero-cursor .keycap { font-size: 11px; margin-right: 6px; height: 1.8em; }

/* Punchline as the kart disappears downhill. */
#hero .hero-punch {
  position: absolute; left: 50%; top: 34%; margin: 0; pointer-events: none; white-space: nowrap;
  font: 400 clamp(34px, 5vw, 76px)/1 var(--font-title); text-transform: uppercase; color: var(--paper);
  text-shadow: 0 4px 0 #0c0b0a, 0 12px 30px rgba(0, 0, 0, .6);
  opacity: var(--pp); transform: translate(-50%, -50%) rotate(-3deg) scale(calc(.86 + var(--pp) * .14));
}

#hero .hero-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; white-space: nowrap;
  color: var(--paper); text-decoration: none; font: 600 13px/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase;
  opacity: calc(1 - var(--p) * 5); text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
}
#hero .hero-cue i { width: 18px; height: 18px; border: solid var(--hazard); border-width: 0 4px 4px 0; transform: rotate(45deg); animation: cue 1.3s ease-in-out infinite; }
@keyframes cue { 50% { translate: 0 6px; } }

@media (prefers-reduced-motion: reduce) { #hero { height: 100vh; height: 100svh; } }
@media (max-width: 760px) {
  #hero .hero-scrim { background: linear-gradient(180deg, rgba(21, 20, 18, .82) 0%, rgba(21, 20, 18, .45) 44%, rgba(21, 20, 18, 0) 60%), linear-gradient(0deg, rgba(21, 20, 18, .5), rgba(21, 20, 18, 0) 18%); }
  #hero .hero-copy { top: calc(var(--tb-h) + 14px); right: var(--gutter); width: auto; transform: translateY(calc(var(--p) * -100px)); }
  #hero .hero-stencil { letter-spacing: .28em; }
  #hero .hero-logo { font-size: clamp(56px, 18.5vw, 110px); -webkit-text-stroke-width: 3px; } /* 20vw put the S on the right edge at 390 */
  #hero .hero-tag { font-size: 18px; }
  #hero .hero-cta { gap: 10px; margin: 16px 0 14px; }
  #hero .hero-cta .btn { font-size: 15px; padding: .62em .95em .56em; }
  #hero .hero-badges .tape { font-size: 13px; }
  #hero .hero-note { display: none; }
  #hero .hero-punch { white-space: normal; width: min(88vw, 520px); text-align: center; line-height: 1.05; } /* nowrap ran off both edges at 390 */
  #hero .hero-cue { bottom: 14px; }
}

/* ---------- Round timeline. Default = vertical stack; JS adds .is-pinned for the horizontal ride. ---------- */
#loop { --card-w: clamp(280px, min(30vw, calc((100vh - 380px) * 1.25)), 460px); }
#loop .tl-head { max-width: 1280px; }
#loop.is-pinned .tl-head h2 { font-size: clamp(34px, 4.4vw, 64px); }
#loop .tl-viewport { overflow: hidden; }
#loop .tl-track { position: relative; list-style: none; margin: 0; display: flex; }
#loop .tl-card {
  position: relative; flex: none; display: grid; gap: 16px; align-content: start; padding: 22px 24px 22px;
  transform: scale(calc(1 - var(--ad, 0) * .05)); filter: brightness(calc(1 - var(--ad, 0) * .3)); transition: filter .25s;
}
#loop .tl-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 6px 0; } /* timer tape above the polaroid's corner tape */
#loop .tl-step { font: 400 46px/1 var(--font-title); color: rgba(237, 230, 214, .16); }
#loop .tl-step small { font-size: .42em; margin-left: 2px; }
#loop .tl-timer { display: grid; justify-items: center; }
#loop .tl-timer b {
  display: flex; align-items: baseline; justify-content: center; gap: 5px; min-width: 128px; padding: 8px 16px 6px; border-radius: 3px;
  background: #0f0e0c; border: 2px solid #3a3733; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 0 0 1px #000;
  font: 600 42px/1 var(--font-body); color: var(--paper); font-variant-numeric: tabular-nums; transition: color .25s, box-shadow .25s;
}
#loop .tl-timer b small { font-size: 16px; color: var(--paper-dim); }
#loop .tl-timer .tape { margin-top: -7px; font-size: 14px; }
#loop .tl-card.on .tl-timer b { color: var(--hazard); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 0 0 1px #000, 0 0 22px rgba(242, 194, 48, .22); }
#loop .tl-card.on .tl-timer .tape { background: linear-gradient(180deg, #ffd54a, #e0ab12); }
#loop .tl-photo {
  position: relative; margin: 4px 4px 0; padding: 10px 10px 32px; background: #e8e1cf; box-shadow: 0 12px 24px rgba(0, 0, 0, .5);
  transform: rotate(calc(var(--r) + var(--d, 0) * 3deg)); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
#loop .tl-photo::before, #loop .tl-photo::after { /* tape on the corners */
  content: ''; position: absolute; top: -10px; width: 70px; height: 22px; background: rgba(222, 206, 160, .88);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
#loop .tl-photo::before { left: -14px; transform: rotate(-32deg); }
#loop .tl-photo::after { right: -14px; transform: rotate(28deg); }
#loop .tl-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #2e2c28; filter: sepia(.18) contrast(1.05) saturate(.9); }
#loop .tl-photo figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 8px; font: 600 13px/1 var(--font-body); letter-spacing: .08em;
  text-transform: uppercase; color: #4a443c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#loop .tl-line { margin: 0; padding: 0 4px; font-size: clamp(17px, .45vw + 13px, 21px); line-height: 1.3; }

/* Road rail with the tiny kart (horizontal mode only). */
#loop .tl-rail { display: none; height: 76px; padding-inline: var(--gutter); }
#loop .tl-rail svg { display: block; width: 100%; height: 100%; overflow: visible; }
#loop .tl-edge, #loop .tl-asphalt, #loop .tl-dash { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#loop .tl-edge { stroke: #0e0d0c; stroke-width: 24; }
#loop .tl-asphalt { stroke: #3d3b37; stroke-width: 19; }
#loop .tl-dash { stroke: var(--hazard); stroke-width: 2; stroke-dasharray: 9 11; opacity: .75; }
#loop .tl-mark path { stroke: #6b675f; stroke-width: 2; }
#loop .tl-mark rect { fill: #2e2c28; stroke: #0c0b0a; transition: fill .2s; }
#loop .tl-mark text { fill: var(--paper-dim); font: 600 12px var(--font-body); text-anchor: middle; }
#loop .tl-mark.on rect { fill: var(--hazard); }
#loop .tl-mark.on text { fill: #151412; }

/* Pinned horizontal ride. */
#loop.is-pinned { padding-block: 0; }
#loop.is-pinned .tl-pin { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: calc(var(--tb-h) + 2.5vh) 0 2vh; }
#loop.is-pinned .tl-head { margin-bottom: 1.5vh; }
#loop.is-pinned .tl-viewport { position: relative; display: flex; align-items: center; }
#loop .tl-hint { display: none; }
#loop.is-pinned .tl-hint {
  display: block; position: absolute; left: var(--gutter); top: 42%; z-index: 1; margin: 0; font-size: clamp(16px, 1vw + 8px, 22px);
  max-width: calc(50% - var(--card-w) / 2 - 2 * var(--gutter)); transform: rotate(-2.5deg); opacity: calc(1 - var(--tp, 0) * 14); pointer-events: none;
}
#loop.is-pinned .tl-hint-end { left: auto; right: var(--gutter); transform: rotate(2deg); opacity: calc((var(--tp, 0) - .92) * 13); }
#loop.is-pinned .tl-track { width: max-content; gap: clamp(28px, 3vw, 52px); padding: 14px calc(50% - var(--card-w) / 2) 18px; }
#loop.is-pinned .tl-card { width: var(--card-w); }
#loop.is-pinned .tl-rail { display: block; }
#loop.is-pinned .tl-vkart { display: none; }

/* Vertical stack: a road down the left with the kart rolling down it. */
#loop:not(.is-pinned) .tl-track { flex-direction: column; gap: 28px; margin-inline: max(var(--gutter), calc(50% - 360px)); padding: 6px 0 6px 50px; max-width: 720px; }
#loop:not(.is-pinned) .tl-track::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 20px; border-radius: 10px;
  background: linear-gradient(var(--hazard) 0 50%, transparent 50%) center top / 2px 22px repeat-y, #3d3b37; box-shadow: 0 0 0 2px #0e0d0c;
}
#loop .tl-vkart { position: absolute; left: 20px; top: calc(var(--vp, 0) * (100% - 44px)); width: 48px; transform: translate(-50%, 0) rotate(90deg); pointer-events: none; }
#loop .tl-vkart svg { display: block; width: 100%; }
@media (max-width: 480px) {
  #loop .tl-card { padding: 18px 16px; }
  #loop .tl-timer b { font-size: 34px; min-width: 104px; }
  #loop .tl-step { font-size: 36px; }
  #loop .tl-photo figcaption { font-size: 12px; letter-spacing: .03em; }
}
