:root {
  --navy: #0b1530;
  --ink: #f4f5f8;
  --muted: #aab3c7;
  --accent: #2d9cff;
  --yellow: #ffc906;
  --track: 500vh;        /* scroll length of the pinned story */
  --gutter: clamp(20px, 5vw, 84px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #06080f;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- nav ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  background: linear-gradient(rgba(5, 8, 16, .75), rgba(5, 8, 16, 0));
}
.brand { color: var(--accent); font-weight: 800; letter-spacing: .02em; text-decoration: none; font-size: 18px; }
.brand span { color: var(--ink); font-weight: 400; letter-spacing: .32em; text-transform: uppercase; font-size: 13px; margin-left: 10px; }
.nav nav a { color: var(--ink); text-decoration: none; margin-left: 30px; font-size: 14px; font-weight: 600; opacity: .9; }

/* ---- pinned stage ---- */
.track { position: relative; height: var(--track); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #06080f; }
.backplate {
  position: absolute; inset: 0;
  background: url("./assets/garage.jpg?v=3") center / cover no-repeat;
  transform-origin: center;
}
img.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
/* the path-traced can, shown while the can stands still; feathered alpha, same framing as the backplate */
img.can-rest { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  visibility: hidden; }
img.can-rest.on { visibility: visible; }   /* no fade: the shards take over with the same pixels */
body.still img.can-rest { display: none; }
#hero, #pitCanvas, #circuitCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
#hero.turnable, #pitCanvas, #circuitCanvas { cursor: grab; }
#hero.dragging { cursor: grabbing; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 6, 12, .72) 0%, rgba(4, 6, 12, .35) 38%, rgba(4, 6, 12, 0) 60%); }

.hero-copy {
  position: absolute; left: var(--gutter); bottom: 12vh; max-width: 520px; z-index: 5;
  transition: opacity .4s ease, transform .4s ease;
}
.hero-copy.away { opacity: 0; transform: translateY(-20px); pointer-events: none; }
.hero-copy h1 {
  margin: 0 0 14px; font-size: clamp(44px, 6.2vw, 96px); line-height: .92; font-weight: 900;
  font-style: italic; letter-spacing: -.02em; text-transform: uppercase;
}
.lead { margin: 0 0 26px; font-size: 18px; color: var(--muted); }
.actions { display: flex; align-items: center; gap: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #fff; border: 0;
  padding: 14px 26px; font-size: 15px; font-weight: 700; border-radius: 3px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #63b6ff; }
.link { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 3px; font-weight: 600; }
.hint { margin: 22px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }

.pause {
  position: absolute; right: var(--gutter); bottom: 24px; z-index: 6;
  background: rgba(10, 14, 24, .6); color: var(--ink); border: 1px solid rgba(255, 255, 255, .18);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; backdrop-filter: blur(6px);
}
.selector { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 6; display: grid; gap: 14px; }
.selector button { background: none; border: 0; border-left: 3px solid transparent; color: var(--muted); padding: 4px 12px; font-weight: 700; cursor: pointer; text-align: left; }
.selector button[aria-current="true"] { color: var(--ink); border-color: var(--accent); }

.pit .backplate { background-image: url("./assets/pitlane.jpg"); }
.circuit .backplate { background-image: url("./assets/circuit.jpg"); }
.circuit .shade { display: none; }
.pit .shade { display: none; }
.pit-copy { position: absolute; left: var(--gutter); top: 16vh; max-width: 460px; z-index: 5; }
.pit-copy h2 { margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 48px); font-weight: 900; font-style: italic; text-transform: uppercase; }
.pit-copy p { margin: 0; color: var(--muted); }
/* ---- drivers: helmet on; the pointer opens a window in it, a click takes it off ---- */
.drivers { padding: 14vh var(--gutter) 10vh; background: #06080f; }
.drivers-copy { text-align: center; margin-bottom: 5vh; }
.drivers-copy h2 { margin: 0 0 8px; font-size: clamp(32px, 4vw, 56px); font-weight: 900; font-style: italic; text-transform: uppercase; }
.drivers-copy p { margin: 0; color: var(--muted); }
.drivers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 64px); justify-items: center; align-items: start; }
.driver { position: relative; margin: 0; width: min(100%, 72vh * 1122 / 1402); aspect-ratio: 1122 / 1402; overflow: hidden; border-radius: 6px; cursor: pointer; }
.driver img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.driver .helmet {
  /* --mx/--my: pointer in %, --r: the window's radius in %; both are driven from drivers.js */
  --mx: 50%; --my: 40%; --r: 0%;
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), transparent calc(var(--r) * .72), #000 var(--r));
  mask-image: radial-gradient(circle at var(--mx) var(--my), transparent calc(var(--r) * .72), #000 var(--r));
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.driver.off .helmet { opacity: 0; transform: translateY(-6%) scale(1.04); }
.driver figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 22px 18px; display: grid; gap: 4px; pointer-events: none;
  background: linear-gradient(rgba(6, 8, 15, 0), rgba(6, 8, 15, .9)); }
.driver figcaption strong { font-size: clamp(20px, 2vw, 28px); font-weight: 900; font-style: italic; text-transform: uppercase; }
.driver figcaption span { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 760px) {
  .drivers-grid { grid-template-columns: 1fr; }
  .driver { width: min(100%, 48vh * 1122 / 1402); }
}

/* ---- still-image fallback (coarse pointers, narrow, reduced motion, no WebGL) ---- */
body.still #hero, body.still #pitCanvas, body.still #circuitCanvas, body.still .pause { display: none; }
body.still .still-car { display: block; }
body.still .hint { display: none; }
@media (max-width: 900px) {
  .hero-copy { bottom: 8vh; max-width: 90vw; }
  .block { max-width: 80vw; }
}


/* ================= layout round: hero rail, sections after the hero ================= */
:root { --panel: #0a0f1c; --line: rgba(255, 255, 255, .12); --ease: cubic-bezier(.16, 1, .3, 1); }
html { scroll-behavior: smooth; }
h2, h3 { text-wrap: balance; }
.kicker { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.btn span, .link span { transition: transform .3s var(--ease); display: inline-block; }
.btn:hover span { transform: translateX(4px); }
.btn:focus-visible, .link:focus-visible, .rail button:focus-visible, .circuits a:focus-visible, .foot a:focus-visible, .nav a:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 3px;
}

/* the hero keeps its first text for the whole transformation */
.hero-copy.away { opacity: 1; transform: none; pointer-events: auto; }
.hero-copy .hint, .hero-copy .actions { transition: opacity .4s ease; }
.hero-copy.moving .hint { opacity: 0; }

/* ---- scroll progress bar, right edge of the hero ---- */
.rail { position: absolute; right: var(--gutter); top: 50%; height: min(46vh, 380px); width: 3px; transform: translateY(-50%); z-index: 6;
  background: rgba(255, 255, 255, .2); border-radius: 3px; overflow: hidden; pointer-events: none; }
.rail-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(var(--p, 0)); }
.pause { bottom: 24px; }

/* ---- section heads ---- */
.steps, .calendar, .gallery { background: var(--panel); padding: clamp(72px, 11vh, 132px) var(--gutter); border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 32px; margin-bottom: clamp(28px, 5vh, 56px); }
.section-head .kicker { grid-column: 1 / -1; }
.steps h2, .calendar h2, .gallery h2, .closing h2 {
  margin: 0; font-size: clamp(34px, 4.6vw, 68px); line-height: .94; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em;
}
.aside { margin: 0; text-align: right; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.6; }

/* ---- 01-04: one strip of four frames, the active one opens up ---- */
.steps-row { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; height: clamp(380px, 62vh, 620px); }
.step { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 4px; background: #05070d; transition: flex-grow .7s var(--ease); }
.step:hover, .step:focus-within { flex-grow: 1.9; }
.step img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s ease; filter: saturate(.9) brightness(.82); }
.step:hover img { transform: scale(1.04); filter: none; }
.step::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(5, 7, 13, .78) 0%, rgba(5, 7, 13, 0) 42%, rgba(5, 7, 13, 0) 70%, rgba(5, 7, 13, .55) 100%); pointer-events: none; }
.step-copy { position: absolute; left: 22px; right: 22px; top: 20px; z-index: 1; }
.num { display: block; color: var(--accent); font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: -.01em; margin-bottom: 6px; }
.step h3 { margin: 0 0 8px; font-size: clamp(17px, 1.5vw, 22px); font-weight: 900; font-style: italic; text-transform: uppercase; }
.step p { margin: 0; color: #c8cfdd; font-size: 14px; line-height: 1.5; max-width: 26ch; }
.step:not(:last-child)::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: var(--line); z-index: 2; }
@media (max-width: 860px) {
  .steps-row { flex-direction: column; height: auto; }
  .step { flex: none; height: 46vh; }
  .section-head { grid-template-columns: 1fr; }
  .aside { text-align: left; margin-top: 14px; }
}

/* ---- pit lane and circuit bands (the 3D drive stages) ---- */
.band-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 6, 12, .78) 0%, rgba(4, 6, 12, .3) 40%, rgba(4, 6, 12, 0) 62%), linear-gradient(0deg, rgba(4, 6, 12, .85) 0%, rgba(4, 6, 12, 0) 34%); }
.pit-copy { top: auto; bottom: 16vh; max-width: 560px; pointer-events: none; }
.pit-copy .btn { pointer-events: auto; margin-top: 22px; }
.pit-copy h2 { font-size: clamp(34px, 4.6vw, 68px); line-height: .94; letter-spacing: -.02em; margin-bottom: 14px; }
.pit-copy p:not(.kicker) { color: #c8cfdd; font-size: 16px; }
.circuit .pit-copy { bottom: auto; top: 18vh; }
.specs { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 7vh; z-index: 5; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.specs div { padding: 4px 24px 4px 20px; border-left: 1px solid rgba(45, 156, 255, .85); }
.specs dt { font-size: 15px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 4px; }
.specs dd { margin: 0; color: #c8cfdd; font-size: 14px; }
@media (max-width: 760px) { .specs { grid-template-columns: repeat(2, 1fr); row-gap: 18px; } }

/* ---- drivers: one cold, one warm ---- */
.drivers { background: radial-gradient(60% 55% at 26% 52%, rgba(30, 70, 190, .3), transparent 70%), radial-gradient(60% 55% at 74% 52%, rgba(45, 156, 255, .26), transparent 70%), #06080f; }
.drivers-copy h2 { font-size: clamp(34px, 4.6vw, 68px); line-height: .94; letter-spacing: -.02em; }

/* ---- gallery ---- */
.gallery { display: grid; grid-template-columns: minmax(220px, .8fr) 3fr; gap: clamp(24px, 4vw, 64px); align-items: center; background: #06080f; }
.mosaic { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; grid-template-rows: repeat(3, clamp(120px, 19vh, 190px)); gap: 8px;
  grid-template-areas: "a b c" "a e d" "f f d"; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; filter: saturate(.92); transition: filter .4s ease; }
.mosaic img:hover { filter: saturate(1.1) brightness(1.08); }
.m-a { grid-area: a; object-position: 62% 60%; }
.m-b { grid-area: b; object-position: 50% 52%; }
.m-c { grid-area: c; object-position: 78% 40%; }
.m-d { grid-area: d; object-position: 50% 58%; }
.m-e { grid-area: e; object-position: 30% 62%; }
.m-f { grid-area: f; object-position: 50% 22%; }
@media (max-width: 860px) {
  .calendar, .gallery { grid-template-columns: 1fr; }
  .circuits { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 22vh; grid-template-areas: "a a" "b c" "e d" "f f"; }
}

/* ---- closing band and footer ---- */
.closing { min-height: 72vh; display: grid; place-content: center start; text-align: left; padding: 96px var(--gutter); gap: 0;
  background: linear-gradient(90deg, rgba(4, 6, 12, .9) 0%, rgba(4, 6, 12, .45) 45%, rgba(4, 6, 12, .1) 100%), url("./assets/photos/sunset.jpg") 70% 55% / cover no-repeat; }
.closing p { margin: 16px 0 28px; color: #c8cfdd; font-size: 17px; max-width: 46ch; }
.foot { background: #04060b; border-top: 1px solid var(--line); padding: 56px var(--gutter) 28px; display: grid; grid-template-columns: 1.2fr 2fr; row-gap: 40px; }
.foot nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot h3 { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.foot nav a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.foot nav a:hover { color: var(--ink); }
.fine { grid-column: 1 / -1; margin: 0; padding-top: 22px; border-top: 1px solid var(--line); color: #8f98ad; font-size: 12px; }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; } }

/* the can, a little dimmer than the raw render (same factor in stage.js: CAN_DIM) */
img.can-rest { filter: brightness(.84); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .step img, .circuits a, .btn span { transition: none; }
  .circuits a:hover path { animation: none; }
}
@media (max-width: 600px) {
  .nav { padding: 16px var(--gutter); }
  .nav nav a { margin-left: 14px; font-size: 13px; }
  .brand span { display: none; }
}

/* the team logo in the menu */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: clamp(46px, 5.2vw, 68px); width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(4, 6, 12, .6)); }
.nav { align-items: flex-start; padding-top: 16px; }
.nav nav { padding-top: 14px; }

/* ---- calendar: all races of the season in one carousel ---- */
.calendar { display: block; padding-right: 0; }
.calendar-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-right: var(--gutter); margin-bottom: clamp(24px, 4vh, 44px); }
.carousel-ui { display: flex; align-items: center; gap: 10px; }
.carousel-count { margin: 0 14px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.carousel-count b { color: var(--ink); font-size: 22px; font-style: italic; font-weight: 900; letter-spacing: 0; }
.carousel-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: none; color: var(--ink); font-size: 18px; cursor: pointer;
  transition: background .25s ease, border-color .25s ease, opacity .25s ease; }
.carousel-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.carousel-btn:disabled { opacity: .3; cursor: default; }
.carousel-btn:focus-visible, .carousel:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.carousel { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 0; scrollbar-width: none; cursor: grab; }
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.races { list-style: none; margin: 0; padding: 0 var(--gutter) 0 0; display: flex; gap: 12px; width: max-content; }
.race { scroll-snap-align: start; width: clamp(240px, 23vw, 320px); display: grid; grid-template-rows: auto 1fr auto auto auto; padding: 20px 22px 22px;
  background: #070b15; border: 1px solid var(--line); border-radius: 4px; transition: border-color .3s ease, background .3s ease; user-select: none; }
.race:hover { border-color: rgba(255, 255, 255, .34); background: #0b1120; }
.race-round { margin: 0 0 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.race-round time { color: var(--ink); letter-spacing: .04em; }
.race img { width: 100%; height: clamp(120px, 15vh, 160px); object-fit: contain; align-self: center; margin-bottom: 20px; opacity: .92; -webkit-user-drag: none; pointer-events: none;
  transition: transform .6s var(--ease), opacity .3s ease; }
.race:hover img { transform: scale(1.05); opacity: 1; }
.race h3 { margin: 0 0 6px; font-size: clamp(18px, 1.6vw, 23px); font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.05; }
.race-track { margin: 0 0 12px; color: #c8cfdd; font-size: 14px; }
.race-facts { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.race.past { opacity: .55; }
.race.past:hover { opacity: 1; }
.race.next { border-color: var(--accent); background: linear-gradient(rgba(45, 156, 255, .14), rgba(45, 156, 255, 0) 55%), #0b1120; }
.race.next .race-round span { color: var(--accent); }
.race.next .race-round span::after { content: " \00b7  next race"; }
.carousel-bar { height: 2px; margin: 26px var(--gutter) 0 0; background: rgba(255, 255, 255, .14); border-radius: 2px; overflow: hidden; }
.carousel-bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, .1)); }
@media (max-width: 700px) {
  .calendar-head { flex-direction: column; align-items: flex-start; }
  .race { width: 74vw; }
}
@media (prefers-reduced-motion: reduce) { .race img { transition: none; } }

/* ---- photos from the supplied set ---- */
.mosaic { grid-template-columns: 1.35fr 1fr 1fr; grid-template-rows: repeat(3, clamp(130px, 20vh, 200px)); grid-template-areas: "a a b" "a a c" "e d f"; }
.m-a { object-position: 50% 45%; } .m-b { object-position: 50% 50%; } .m-c { object-position: 40% 40%; }
.m-d { object-position: 40% 55%; } .m-e { object-position: 30% 60%; } .m-f { object-position: 50% 45%; }
@media (max-width: 860px) { .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 24vh; grid-template-areas: "a a" "b c" "e d" "f f"; } }
.step:nth-child(2) img { object-position: 50% 40%; }
.step:nth-child(3) img { object-position: 45% 50%; }
.step:nth-child(4) img { object-position: 50% 62%; }

.wear { position: relative; min-height: 78vh; display: grid; align-items: center; padding: 96px var(--gutter); overflow: hidden; border-top: 1px solid var(--line); background: #06080f; }
.wear > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
.wear::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 6, 12, .92) 0%, rgba(4, 6, 12, .6) 34%, rgba(4, 6, 12, 0) 62%); }
.wear-copy { position: relative; z-index: 1; max-width: 520px; }
.wear h2 { margin: 0; font-size: clamp(34px, 4.6vw, 68px); line-height: .94; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }
.wear-copy p:not(.kicker) { margin: 16px 0 28px; color: #c8cfdd; font-size: 17px; }
@media (max-width: 700px) { .wear { align-items: end; min-height: 86vh; } .wear > img { object-position: 58% 40%; }
  .wear::after { background: linear-gradient(0deg, rgba(4, 6, 12, .95) 0%, rgba(4, 6, 12, .6) 42%, rgba(4, 6, 12, .1) 70%); } }

/* ---- drivers: start number and record on the card ---- */
.driver-no { position: absolute; top: 20px; right: 22px; z-index: 2; pointer-events: none; display: grid; place-items: center;
  min-width: clamp(54px, 5.4vw, 78px); height: clamp(48px, 4.8vw, 68px); padding: 0 10px; background: var(--accent); border: 3px solid #fff;
  transform: skewX(-16deg); box-shadow: 0 8px 22px rgba(4, 6, 12, .45); }
.driver-no i { transform: skewX(16deg); font-style: italic; font-weight: 900; font-size: clamp(30px, 3.2vw, 46px); line-height: 1; color: #fff; letter-spacing: -.04em; }
.driver figcaption { padding: 90px 22px 20px; background: linear-gradient(rgba(6, 8, 15, 0), rgba(6, 8, 15, .78) 45%, rgba(6, 8, 15, .94)); }
.driver-stats { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .22); display: grid; gap: 4px; }
.driver-stats li { font-size: clamp(14px, 1.25vw, 17px); font-weight: 700; color: var(--ink); }
.driver-stats b { font-weight: 400; color: #c8cfdd; font-variant-numeric: tabular-nums; margin-right: 4px; }

/* smaller logo in the menu, the same mark in the footer */
.brand-logo img { height: clamp(34px, 3.6vw, 46px); }
.nav nav { padding-top: 8px; }
.foot-logo { align-self: start; }
.foot-logo img { height: 64px; filter: none; }

/* race numbers: the supplied artwork instead of the drawn badge */
.driver img.driver-no { position: absolute; inset: 18px 18px auto auto; width: clamp(64px, 6.4vw, 96px); height: auto; min-width: 0; padding: 0; background: none; border: 0; transform: none; box-shadow: none; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(4, 6, 12, .5)); z-index: 2; pointer-events: none; }

/* ---- every RB: one car on stage, the line-up underneath ---- */
.lineup { background: var(--panel); border-top: 1px solid var(--line); padding: clamp(72px, 11vh, 132px) 0 clamp(56px, 8vh, 96px); overflow: hidden; }
.lineup-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 var(--gutter); }
.lineup h2 { margin: 0; font-size: clamp(34px, 4.6vw, 68px); line-height: .94; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }
.lineup-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, 1fr); grid-template-areas: "car info" "car stats"; column-gap: clamp(24px, 4vw, 72px);
  align-items: center; padding: clamp(20px, 4vh, 48px) var(--gutter) 0; min-height: clamp(360px, 52vh, 560px); }
.lineup-ghost { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-58%); z-index: 0; pointer-events: none; white-space: nowrap;
  font-size: clamp(120px, 23vw, 380px); line-height: .8; font-weight: 900; font-style: italic; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .11); }
.lineup-car { grid-area: car; position: relative; z-index: 1; width: 100%; height: auto; max-height: 46vh; object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)); }
.lineup-info { grid-area: info; position: relative; z-index: 1; align-self: end; }
.lineup-title { margin: 0; display: flex; align-items: baseline; gap: 16px; }
.lineup-name { font-size: clamp(44px, 5.4vw, 84px); line-height: .9; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.lineup-year { color: var(--accent); font-size: clamp(18px, 1.7vw, 24px); font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.lineup-titles { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.lineup-titles li { padding: 5px 10px; background: var(--yellow); color: #0b1020; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lineup-drivers { margin: 14px 0 0; color: #c8cfdd; font-size: 15px; line-height: 1.5; max-width: 36ch; }
.lineup-stats { grid-area: stats; position: relative; z-index: 1; align-self: start; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 6px clamp(18px, 2.4vw, 40px); }
.lineup-stats dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.lineup-stats dd { margin: 0; font-size: clamp(22px, 2.3vw, 34px); font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; line-height: 1; }
.lineup-stats div:nth-child(n+3) dd { font-size: clamp(15px, 1.3vw, 19px); line-height: 1.25; font-style: normal; font-weight: 700; padding-top: .35em; }
/* the incoming car slides in from the side it was picked from */
.lineup.swap .lineup-car { animation: carIn .7s var(--ease) both; }
.lineup.swap .lineup-info, .lineup.swap .lineup-stats { animation: infoIn .5s var(--ease) both; }
.lineup.swap .lineup-ghost { animation: ghostIn .9s var(--ease) both; }
@keyframes carIn { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 9%)); filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)) blur(6px); } to { opacity: 1; transform: none; } }
@keyframes infoIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ghostIn { from { opacity: 0; transform: translateY(-58%) translateX(calc(var(--dir, 1) * -3%)); } to { opacity: 1; transform: translateY(-58%); } }

.lineup-strip { display: flex; gap: 2px; margin-top: clamp(28px, 5vh, 56px); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.lineup-strip::-webkit-scrollbar { display: none; }
.lineup-strip button { position: relative; flex: 1 0 auto; min-width: 62px; padding: 16px 8px 6px; background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit; display: grid; gap: 3px; justify-items: center;
  transition: color .25s ease; }
.lineup-strip button::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform .4s var(--ease); }
.lineup-strip b { font-size: 14px; font-weight: 900; font-style: italic; }
.lineup-strip span { font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.lineup-strip button.champ b::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: var(--yellow); vertical-align: 2px; }
.lineup-strip button:hover { color: var(--ink); }
.lineup-strip button[aria-selected="true"] { color: var(--ink); }
.lineup-strip button[aria-selected="true"]::before { transform: scaleX(1); }
.lineup-strip button:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
@media (max-width: 900px) {
  .lineup-stage { grid-template-columns: 1fr; grid-template-areas: "car" "info" "stats"; min-height: 0; }
  .lineup-car { max-height: 30vh; }
  .lineup-ghost { top: 16%; transform: none; font-size: 34vw; }
  .lineup.swap .lineup-ghost { animation: none; }
  .lineup-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .lineup.swap .lineup-car, .lineup.swap .lineup-info, .lineup.swap .lineup-stats, .lineup.swap .lineup-ghost { animation: none; } }
/* all 22 fit in one row on a wide screen; the strip only scrolls on narrow ones */
@media (min-width: 1100px) { .lineup-strip { overflow: visible; margin-left: var(--gutter); margin-right: var(--gutter); padding: 0; } .lineup-strip button { flex: 1 1 0; min-width: 0; padding-left: 0; padding-right: 0; } }
.lineup-strip b { white-space: nowrap; }
@media (min-width: 1100px) { .lineup-strip b { font-size: clamp(11px, .92vw, 14px); } .lineup-strip button.champ b::after { width: 5px; height: 5px; margin-left: 2px; } }

/* ---- red line work in the section head (as in the mock-up) ---- */
.steps .section-head { position: relative; }
.head-lines { position: absolute; right: 14%; top: -40%; height: 190%; width: min(46vw, 620px); pointer-events: none; z-index: 0; }
.head-lines path { fill: none; stroke: var(--accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .85; }
.head-lines path:nth-child(2), .head-lines path:nth-child(4) { opacity: .45; }
.steps .section-head > :not(.head-lines) { position: relative; z-index: 1; }
@media (max-width: 860px) { .head-lines { right: -10%; top: -20%; height: 120%; width: 80vw; opacity: .6; } }

/* ---- live season cards ---- */
.lv-status { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.lv-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5d667c; }
.lv.ready .lv-status::before { background: var(--accent); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
.lv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.lv-card { background: #070b15; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 4px; padding: 20px 0 14px; min-width: 0; }
.lv-card header { padding: 0 20px 14px; border-bottom: 1px solid rgba(255, 255, 255, .22); }
.lv-kicker { margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lv-card h3 { margin: 0; font-size: clamp(22px, 2.1vw, 32px); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; }
.lv-sub { margin: 8px 0 0; color: #c8cfdd; font-size: 13px; min-height: 1.3em; }
.lv-list, .lv-sessions { list-style: none; margin: 0; padding: 0; }
.lv-row { display: grid; grid-template-columns: 30px 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 20px 9px 17px; border-left: 3px solid transparent; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lv-pos { color: #8f98ad; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lv-slash { width: 8px; height: 18px; transform: skewX(-16deg); border-radius: 1px; }
.lv-name { min-width: 0; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-name small { display: block; color: #8f98ad; font-size: 11px; font-weight: 600; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; }
.lv-val { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.lv-row.ours { background: linear-gradient(90deg, rgba(45, 156, 255, .26), rgba(45, 156, 255, .08)); border-left-color: var(--accent); }
.lv-row.extra { display: none; }
.lv-card.all .lv-row.extra { display: grid; }
[data-card="last"] .lv-val { font-size: 13px; font-weight: 700; color: #c8cfdd; }
.lv-more { margin: 12px 20px 0; padding: 8px 0; background: none; border: 0; border-bottom: 2px solid var(--accent); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lv-more:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.lv-race { margin: 18px 20px 2px; font-size: clamp(19px, 1.7vw, 24px); font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1.05; }
.lv-track { margin: 0 20px; color: #c8cfdd; font-size: 14px; }
.lv-count { margin: 18px 20px 6px; padding: 14px 16px; background: linear-gradient(90deg, rgba(45, 156, 255, .26), rgba(45, 156, 255, .06)); border-left: 3px solid var(--accent); display: grid; gap: 4px; }
.lv-count span { color: #c8cfdd; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lv-count b { font-size: clamp(20px, 1.9vw, 27px); font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.lv-session { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; padding: 11px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.lv-s-name { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.lv-s-day { color: #8f98ad; font-size: 13px; }
.lv-session time { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.lv-session.race .lv-s-name, .lv-session.race time { color: var(--accent); }
.lv-session.done { opacity: .45; }
.lv-zone { margin: 12px 20px 0; color: #8f98ad; font-size: 12px; }
.lv-source { margin: 16px 0 0; color: #8f98ad; font-size: 12px; }
.lv.failed .lv-grid { opacity: .35; }
.lv:not(.ready):not(.failed) .lv-card { min-height: 420px; background: linear-gradient(100deg, #070b15 40%, #0d1424 50%, #070b15 60%) 0 0 / 300% 100%; animation: lvLoad 1.6s linear infinite; }
@keyframes lvLoad { to { background-position: -150% 0; } }
@media (max-width: 1180px) { .lv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lv-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .lv.ready .lv-status::before, .lv:not(.ready):not(.failed) .lv-card { animation: none; } }

.lv-session.main .lv-s-name, .lv-session.main time { color: var(--accent); }
.lv-count b { white-space: nowrap; font-size: clamp(17px, 1.55vw, 23px); }
.steps.live { overflow: hidden; }
.head-lines { right: 15%; width: min(32vw, 470px); top: -30%; height: 170%; }
@media (max-width: 860px) { .head-lines { right: -6%; width: 70vw; } }

/* ---- live cards, closer to the standings mock-up ---- */
.lv-card { --num: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif; position: relative; overflow: hidden; border: 0; border-radius: 0; padding: 26px 22px 20px;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 9px), #080b14; }
.lv-card::before { content: ""; position: absolute; top: -14px; right: -6px; width: 74px; height: 86px; transform: skewX(-32deg);
  background: repeating-linear-gradient(90deg, var(--accent) 0 9px, transparent 9px 17px); }
.lv-card::after { content: ""; display: block; height: 3px; margin-top: 18px; background: var(--accent); }
.lv-card header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 12px; padding: 0 0 12px; border-bottom: 3px solid var(--accent); }
.lv-card h3 { font-size: clamp(26px, 2.6vw, 42px); letter-spacing: -.02em; line-height: .9; padding-right: 60px; grid-column: 1 / -1; }
.lv-kicker { grid-column: 2; grid-row: 2; margin: 0; color: #c8cfdd; font-family: var(--num); font-style: italic; font-size: 11px; font-weight: 600; letter-spacing: .34em; }
.lv-sub { grid-column: 1; grid-row: 2; margin: 8px 0 0; font-family: var(--num); font-size: 13px; letter-spacing: .04em; }
.lv-cols { display: grid; grid-template-columns: 34px 14px minmax(0, 1fr) auto; gap: 10px; margin: 0; padding: 10px 6px 9px; border-bottom: 1px solid rgba(255, 255, 255, .34);
  color: #a9b2c6; font-family: var(--num); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lv-cols span:nth-child(2) { grid-column: 3; }
.lv-row { grid-template-columns: 34px 14px minmax(0, 1fr) auto; padding: 11px 6px 11px 3px; border-bottom: 1px solid rgba(255, 255, 255, .12); font-family: var(--num); }
.lv-pos { color: #9aa3b8; font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.lv-slash { width: 9px; height: 22px; transform: skewX(-18deg); border-radius: 0; }
.lv-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: .05em; }
.lv-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lv-name small { display: none; }
.lv-bull { height: 18px; width: auto; flex: none; }
.lv-val { font-size: 18px; font-weight: 700; letter-spacing: .03em; }
.lv-row.ours { background: linear-gradient(90deg, rgba(14, 62, 128, .62), rgba(8, 34, 78, .5)); border-left: 4px solid var(--accent); padding-left: 0; margin: 0 -8px 0 -6px; padding-right: 14px; }
.lv-row.ours .lv-pos { color: var(--ink); padding-left: 5px; }
[data-card="last"] .lv-val { font-size: 14px; }
.lv-more { margin: 12px 0 0; font-family: var(--num); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.lv-race { margin: 18px 0 2px; }
.lv-track, .lv-zone { margin-left: 0; margin-right: 0; font-family: var(--num); }
.lv-count { margin: 16px 0 4px; background: linear-gradient(90deg, rgba(14, 62, 128, .62), rgba(8, 34, 78, .4)); border-left: 4px solid var(--accent); font-family: var(--num); }
.lv-count b { font-style: normal; letter-spacing: .04em; }
.lv-session { padding: 12px 6px; border-bottom: 1px solid rgba(255, 255, 255, .12); font-family: var(--num); font-size: 15px; }
.lv-s-name { letter-spacing: .05em; font-weight: 700; }
.lv-session time { font-size: 17px; font-weight: 700; }
.lv-grid { gap: 14px; }
/* two wide cards per row: the rows need the width the mock-up gives them */
.lv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .lv-grid { grid-template-columns: 1fr; } }
.lv-card { padding: 30px 30px 22px; }
.lv-card::before { top: -16px; right: 4px; width: 64px; height: 78px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 15px); }
.lv-card h3 { font-size: clamp(34px, 4vw, 58px); padding-right: 84px; overflow-wrap: anywhere; }
.lv-card header { padding-bottom: 14px; }
.lv-kicker { font-size: 12px; }
.lv-row { grid-template-columns: 44px 16px minmax(0, 1fr) auto; padding: 13px 8px 13px 4px; }
.lv-cols { grid-template-columns: 44px 16px minmax(0, 1fr) auto; padding: 12px 8px 10px 4px; }
.lv-pos { font-size: 21px; }
.lv-name { font-size: 19px; gap: 14px; }
.lv-val { font-size: 21px; }
.lv-bull { height: 20px; }
[data-card="last"] .lv-val { font-size: 17px; }
.lv-row.ours { margin: 0 -10px 0 -8px; padding-right: 18px; }
.lv-session { padding: 14px 8px; font-size: 18px; }
.lv-session time { font-size: 20px; }
.lv-s-day { font-size: 15px; }
.lv-race { font-size: clamp(24px, 2.6vw, 36px); }
.lv-track { font-size: 16px; }
.lv-count b { font-size: clamp(22px, 2.4vw, 32px); }
@media (max-width: 520px) { .lv-card { padding: 24px 18px 18px; } .lv-name { font-size: 16px; } .lv-pos, .lv-val { font-size: 18px; } .lv-row, .lv-cols { grid-template-columns: 34px 12px minmax(0, 1fr) auto; } .lv-session { grid-template-columns: minmax(0, 1fr) auto; } .lv-s-day { display: none; } }
.lv-card h3 { font-size: clamp(25px, 3.3vw, 46px); overflow-wrap: normal; white-space: nowrap; padding-right: 76px; }
@media (max-width: 520px) { .lv-card h3 { font-size: 7.4vw; padding-right: 58px; } .lv-card::before { width: 48px; height: 60px; right: 0; } .lv-bull { height: 15px; } .lv-name { gap: 8px; } }

/* champion cars: Red Bull's laurel marks instead of the yellow labels */
.lineup-titles { gap: 22px; min-height: 0; margin-top: 18px; }
.lineup-titles li { padding: 0; background: none; color: #c8cfdd; display: grid; justify-items: center; gap: 8px; font-size: 10px; letter-spacing: .14em; text-align: center; }
.lineup-titles img { height: clamp(62px, 6.4vw, 92px); width: auto; display: block; }
.lineup-strip button.champ b::after { width: 13px; height: 11px; margin-left: 4px; border-radius: 0; background: url("./assets/laurel-constructors.svg") center / contain no-repeat; vertical-align: -1px; }
@media (min-width: 1100px) { .lineup-strip button.champ b::after { width: 11px; height: 10px; margin-left: 2px; } }
.lineup-titles img { aspect-ratio: auto; }
/* the champion mark in the strip: a small gold dot again (the laurel is unreadable at this size) */
.lineup-strip button.champ b::after, .lineup-strip button.champ b::after { width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: #b48c52; vertical-align: 2px; }

/* ---- live cards: compact, four in a row ---- */
.lv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .lv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lv-grid { grid-template-columns: 1fr; } }
.lv-card { padding: 20px 18px 16px; }
.lv-card::before { top: -12px; right: 2px; width: 40px; height: 52px; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 10px); }
.lv-card::after { height: 2px; margin-top: 14px; }
.lv-card header { padding-bottom: 10px; border-bottom-width: 2px; }
.lv-card h3 { font-size: clamp(19px, 1.75vw, 26px); padding-right: 44px; }
.lv-kicker { font-size: 10px; letter-spacing: .28em; }
.lv-sub { font-size: 12px; margin-top: 6px; }
.lv-cols { grid-template-columns: 26px 8px minmax(0, 1fr) auto; gap: 8px; padding: 8px 4px 7px 2px; font-size: 10px; }
.lv-row { grid-template-columns: 26px 8px minmax(0, 1fr) auto; gap: 8px; padding: 8px 4px 8px 2px; }
.lv-pos { font-size: 14px; }
.lv-slash { width: 6px; height: 15px; }
.lv-name { font-size: 13.5px; gap: 7px; letter-spacing: .03em; }
.lv-bull { height: 12px; }
.lv-val { font-size: 14.5px; }
[data-card="last"] .lv-val { font-size: 12.5px; }
.lv-row.ours { margin: 0 -6px 0 -5px; padding-right: 10px; border-left-width: 3px; }
.lv-row.ours .lv-pos { padding-left: 4px; }
.lv-more { font-size: 11px; margin-top: 10px; padding: 6px 0; }
.lv-race { font-size: clamp(17px, 1.5vw, 22px); margin-top: 14px; }
.lv-track { font-size: 13px; }
.lv-count { margin: 12px 0 2px; padding: 10px 12px; border-left-width: 3px; }
.lv-count span { font-size: 10px; }
.lv-count b { font-size: clamp(16px, 1.5vw, 21px); }
.lv-session { padding: 9px 4px; font-size: 13.5px; gap: 8px; }
.lv-session time { font-size: 14.5px; min-width: 2.9em; }
.lv-s-day { font-size: 12px; }
.lv-zone { font-size: 11px; margin-top: 10px; }
@media (max-width: 520px) { .lv-card h3 { font-size: 24px; } .lv-name { font-size: 15px; } .lv-pos, .lv-val { font-size: 16px; } .lv-row, .lv-cols { grid-template-columns: 30px 9px minmax(0, 1fr) auto; } .lv-bull { height: 14px; } }
@media (min-width: 1181px) { [data-card="last"] .lv-bull { display: none; } .lv-grid { align-items: stretch; } .lv-card { display: flex; flex-direction: column; } .lv-card::after { margin-top: auto; } .lv-card > :nth-last-child(1) { margin-bottom: 14px; } }
.lv-more { align-self: flex-start; }

/* line work: from the top edge of the section (the hero) down behind the cards */
.steps.live { position: relative; }
.steps.live > .head-lines { position: absolute; top: 0; right: 9%; left: auto; width: min(60vw, 860px); height: auto; aspect-ratio: 860 / 460; z-index: 0; pointer-events: none; }
.steps.live > .head-lines path:nth-child(2), .steps.live > .head-lines path:nth-child(4), .steps.live > .head-lines path:nth-child(6) { opacity: .42; }
.steps.live > .section-head, .steps.live > .lv { position: relative; z-index: 1; }
@media (max-width: 860px) { .steps.live > .head-lines { right: -18%; width: 120vw; opacity: .55; } }
.steps.live > .head-lines { right: 17%; }
.lv-bull { height: 13px; } @media (max-width: 520px) { .lv-bull { height: 14px; } }
.gallery-copy .btn { margin-top: 28px; }
/* menu: a translucent black bar once the page has scrolled */
.nav { transition: background-color .3s ease, padding .3s ease, backdrop-filter .3s ease; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); opacity: 0; transition: opacity .3s ease; }
.nav.scrolled { background: none; padding-top: 10px; padding-bottom: 10px; align-items: center; }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled nav { padding-top: 0; }
.nav.scrolled .brand-logo img { height: clamp(30px, 3vw, 38px); }
.brand-logo img { transition: height .3s ease; }
@media (prefers-reduced-motion: reduce) { .nav, .nav::before, .brand-logo img { transition: none; } }

/* ---- Vorteca Energy Racing: brand-free version ---- */
.btn { color: #04101f; }
.btn:hover { color: #04101f; }
.wordmark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark b { font-size: 21px; font-weight: 900; font-style: italic; letter-spacing: -.01em; text-transform: uppercase; }
.wordmark span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; }
.nav { align-items: center; padding-top: 22px; }
.nav nav { padding-top: 0; }
.closing { background: linear-gradient(90deg, rgba(4, 6, 12, .92) 0%, rgba(4, 6, 12, .6) 50%, rgba(4, 6, 12, .25) 100%), url("./assets/circuit.jpg") 60% 60% / cover no-repeat; }
.closing p:not(.kicker) { max-width: 52ch; }
.race { grid-template-rows: auto auto auto auto auto; }
.race-no { margin: 6px 0 22px; font-size: clamp(64px, 7vw, 104px); line-height: .82; font-weight: 900; font-style: italic; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .34); }
.race.next .race-no { -webkit-text-stroke-color: var(--accent); }
.race.next .race-round span::after { content: " \00b7  next race"; }
.race-empty { width: auto; color: var(--muted); }
.lv-row.ours { background: none; border-left: 3px solid transparent; }
@media (max-width: 600px) { .nav nav a { white-space: nowrap; margin-left: 11px; font-size: 12px; } .wordmark b { font-size: 17px; } .nav nav a[href='#pit'] { display: none; } }

/* ---- every VC ---- */
.lineup-missing { grid-area: car; position: relative; z-index: 1; margin: 0; aspect-ratio: 1100 / 458; display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .28); border-radius: 4px;
  color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lineup-car[hidden], .lineup-missing[hidden] { display: none; }
.lineup-titles { gap: 8px; margin-top: 14px; }
.lineup-titles li { padding: 5px 10px; background: none; border: 1px solid #b48c52; color: #d9b77c; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; display: block; }
@media (min-width: 1100px) { .lineup-strip { justify-content: flex-start; } .lineup-strip button { flex: 0 1 96px; } .lineup-strip b { font-size: 14px; } }
.nav nav a[href='#lineup'] { }
@media (max-width: 600px) { .nav nav a[href='#lineup'] { display: none; } }

/* champion badges: own wreath artwork */
.lineup-titles { gap: 18px; margin-top: 16px; }
.lineup-titles li.vc-badge { padding: 0; border: 0; color: #c9a465; }
.vc-badge svg { display: block; height: clamp(84px, 8.6vw, 124px); width: auto; }

.lineup-titles li.vc-badge { display: grid; justify-items: center; gap: 4px; color: #d9b77c; font-size: 10px; letter-spacing: .14em; text-align: center; }
.vc-badge img { display: block; height: clamp(96px, 9.6vw, 140px); width: auto; }

/* the supplied logo in the menu and the footer */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: clamp(38px, 3.9vw, 52px); width: auto; display: block; filter: none; transition: height .3s ease; }
.nav.scrolled .brand-logo img { height: clamp(32px, 3.2vw, 42px); }
.nav { padding-top: 14px; }
.foot-logo img { height: 66px; }
@media (max-width: 600px) { .brand-logo img { height: 34px; } }

/* ---- calendar: real circuit layouts, a blue pulse laps the selected one ---- */
.race { cursor: pointer; }
.race:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.race-map { width: 100%; height: clamp(120px, 15vh, 160px); margin: 4px 0 18px; overflow: visible; }
.race-map path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.race-map .line { stroke: rgba(233, 238, 247, .82); stroke-width: 2; transition: stroke .3s ease; }
.race-map .pulse { stroke: var(--accent); stroke-width: 3.5; stroke-dasharray: 7 93; stroke-dashoffset: 0; opacity: 0; filter: drop-shadow(0 0 5px var(--accent)); }
.race.selected { border-color: var(--accent); background: linear-gradient(rgba(45, 156, 255, .14), rgba(45, 156, 255, 0) 55%), #0b1120; opacity: 1; }
.race.selected .race-map .line { stroke: #fff; }
.race.selected .race-map .pulse { opacity: 1; animation: lapPulse 3.6s linear infinite; }
@keyframes lapPulse { to { stroke-dashoffset: -100; } }
.race.next:not(.selected) { border-color: var(--line); background: #070b15; }
@media (prefers-reduced-motion: reduce) { .race.selected .race-map .pulse { animation: none; } }
@media (min-width: 1100px) { .lineup-strip button { flex: 1 1 0; min-width: 0; } .lineup-strip b { font-size: clamp(11px, .92vw, 14px); } }

/* drivers, back in the brand-free version */
.driver { aspect-ratio: 1122 / 1369; width: min(100%, 72vh * 1122 / 1369); }
.driver span.driver-no { background: var(--accent); border-color: #fff; }
.driver span.driver-no i { color: #04101f; }
.drivers { background: radial-gradient(60% 55% at 26% 52%, rgba(45, 156, 255, .22), transparent 70%), radial-gradient(60% 55% at 74% 52%, rgba(200, 210, 230, .12), transparent 70%), #06080f; }
@media (max-width: 600px) { .nav nav a[href='#drivers'] { display: none; } }

/* our own team in the standings */
.lv-row.ours { background: linear-gradient(90deg, rgba(14, 62, 128, .7), rgba(8, 34, 78, .5)); border-left: 3px solid var(--accent); }
.lv.ready .lv-status::before { animation: none; }

/* race numbers: the supplied artwork */
.driver img.driver-no { position: absolute; inset: 18px 18px auto auto; width: auto; height: clamp(46px, 4.6vw, 68px); min-width: 0; padding: 0; background: none; border: 0; transform: none; box-shadow: none; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(4, 6, 12, .55)); z-index: 2; pointer-events: none; }

/* gallery, teamwear and the closing band with the supplied photos */
.closing { background: linear-gradient(90deg, rgba(4, 6, 12, .93) 0%, rgba(4, 6, 12, .62) 46%, rgba(4, 6, 12, .12) 100%), url("./assets/photos/sunset.jpg") 60% 58% / cover no-repeat; }
.m-a { object-position: 50% 50%; } .m-d { object-position: 50% 50%; } .m-e { object-position: 35% 60%; } .m-f { object-position: 50% 45%; } .m-c { object-position: 45% 45%; }
.wear > img { object-position: 70% 55%; }
@media (max-width: 760px) { .nav nav a[href='#store'] { display: none; } }

/* ---- hero without WebGL (phones, reduced motion): whole can, then whole car ---- */
.m-hero { display: none; }
body.still #track .still-car, body.still #track .still-can { display: none; }
body.still #track .backplate { background-position: 38% 50%; }
body.still .m-hero { display: block; position: absolute; left: 50%; height: auto; pointer-events: none; will-change: opacity, transform; }
body.still .m-can { top: 13svh; width: auto; height: min(52svh, 130vw); aspect-ratio: 1 / 2;
  opacity: clamp(0, calc(1 - var(--t, 0) * 3.2), 1);
  transform: translateX(-50%) scale(calc(1 + var(--t, 0) * .5)) rotate(calc(var(--t, 0) * -10deg)); }
body.still .m-car { top: 24svh; width: min(128vw, 880px); max-width: none;
  opacity: clamp(0, calc(var(--t, 0) * 3.2 - .9), 1);
  transform: translateX(-47%) scale(calc(.82 + min(var(--t, 0), .6) * .3)); }
body.still #track .shade { background: linear-gradient(0deg, rgba(4, 6, 12, .92) 0%, rgba(4, 6, 12, .55) 34%, rgba(4, 6, 12, 0) 60%); }
@media (max-width: 900px) { body.still .hero-copy { bottom: 6svh; } body.still .hero-copy h1 { font-size: clamp(36px, 11vw, 60px); } }
@media (min-width: 901px) { body.still .m-can { left: 68%; } body.still .m-car { left: 66%; top: 30svh; width: min(62vw, 1100px); } }
@media (max-width: 900px) {
  body.still .m-car { top: auto; bottom: 36svh; width: min(108vw, 820px); transform: translateX(-49%) scale(calc(.86 + min(var(--t, 0), .6) * .22)); transform-origin: 50% 80%; }
  body.still .m-can { top: auto; bottom: 37svh; height: min(48svh, 120vw); transform-origin: 50% 80%; }
}

/* phone hero: wheels and can base stand on the floor line (the cut-outs carry their reflection below it) */
@media (max-width: 900px) {
  body.still #track { --floor: 35svh; }                       /* contact line, measured from the bottom of the stage */
  body.still .m-car { --w: min(108vw, 820px); width: var(--w); bottom: calc(var(--floor) - var(--w) * .145); transform-origin: 50% 67%; }
  body.still .m-can { --h: min(46svh, 120vw); height: var(--h); bottom: calc(var(--floor) - var(--h) * .165); transform-origin: 50% 83%; }
  body.still .m-ground { display: block; bottom: calc(var(--floor) - 3.2vw); width: 96vw; height: 7vw; transform: translateX(-50%); border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)); opacity: clamp(.35, calc(.35 + var(--t, 0) * 2), 1); }
}
@media (min-width: 901px) { body.still .m-ground { display: none; } }
@media (max-width: 900px) and (max-height: 700px) { body.still #track { --floor: 43svh; } body.still .hero-copy h1 { font-size: clamp(30px, 9vw, 44px); } body.still .lead { margin-bottom: 16px; } }
/* menu links turn blue on hover and keyboard focus */
.nav nav a { transition: color .2s ease, opacity .2s ease; }
.nav nav a:hover, .nav nav a:focus-visible { color: var(--accent); opacity: 1; }

@media (max-width: 900px) and (max-height: 700px) { body.still #track { --floor: 39svh; } body.still .hero-copy { bottom: 4svh; } }

/* ---- phone menu: burger that folds into a cross, full-screen panel with staggered links ---- */
.burger { display: none; }
@media (max-width: 760px) {
  .burger { display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; margin-right: -10px; padding: 0; background: none; border: 0; cursor: pointer; position: relative; z-index: 2; }
  .burger span { display: block; width: 26px; height: 2px; border-radius: 2px; background: var(--ink); transform-origin: center;
    transition: transform .45s var(--ease), opacity .2s ease, width .45s var(--ease), background-color .3s ease; }
  .burger span:nth-child(2) { width: 18px; justify-self: end; }
  .nav.open .burger span { background: var(--accent); }
  .nav.open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.open .burger span:nth-child(2) { opacity: 0; transform: translateX(12px); }
  .nav.open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .burger:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
  .brand-logo { position: relative; z-index: 2; }
  .nav nav { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 96px var(--gutter) 48px;
    background: rgba(4, 6, 12, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    clip-path: circle(0 at calc(100% - 44px) 38px); visibility: hidden; transition: clip-path .6s var(--ease), visibility 0s .6s; }
  .nav.open nav { clip-path: circle(150% at calc(100% - 44px) 38px); visibility: visible; transition: clip-path .6s var(--ease), visibility 0s; }
  .nav nav a, .nav nav a[href] { display: block !important; margin: 0; padding: 12px 0; font-size: clamp(30px, 9vw, 44px); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap;
    border-bottom: 1px solid var(--line); opacity: 0; transform: translateX(26px); transition: opacity .3s ease, transform .5s var(--ease), color .2s ease; }
  .nav.open nav a { opacity: 1; transform: none; }
  .nav.open nav a:nth-child(1) { transition-delay: .12s; } .nav.open nav a:nth-child(2) { transition-delay: .17s; } .nav.open nav a:nth-child(3) { transition-delay: .22s; }
  .nav.open nav a:nth-child(4) { transition-delay: .27s; } .nav.open nav a:nth-child(5) { transition-delay: .32s; } .nav.open nav a:nth-child(6) { transition-delay: .37s; }
  html.menu-open { overflow: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .nav nav, .nav nav a, .burger span { transition: none !important; } }

/* ---- splash: logo and a line while the can and the shards arrive ---- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 26px; background: #05070d;
  transition: opacity .6s ease, visibility 0s .6s; }
.splash img { width: min(62vw, 420px); height: auto; animation: splashIn .9s var(--ease) both; }
.splash-line { width: min(46vw, 300px); height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; position: relative; }
.splash-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: splashLine 1.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashIn { from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes splashLine { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); transform-origin: left; } 56% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
@media (prefers-reduced-motion: reduce) { .splash img, .splash-line::after { animation: none; } }

/* ---- hero in 3D on a tall screen: the whole picture as a band, aligned with the camera window ---- */
.stage[data-framed] .backplate { inset: auto; left: var(--fx); top: var(--fy); width: var(--fw); height: var(--fh); background-size: 100% 100%; background-position: 0 0; transform: none !important;
  -webkit-mask-image: linear-gradient(transparent 0, #000 14%, #000 82%, transparent 100%); mask-image: linear-gradient(transparent 0, #000 14%, #000 82%, transparent 100%); }
.stage[data-framed] img.can-rest { inset: auto; left: var(--fx); top: var(--fy); width: var(--fw); height: var(--fh); object-fit: fill; max-width: none; }
.stage[data-framed] .shade { background: linear-gradient(0deg, rgba(4, 6, 12, .96) 0%, rgba(4, 6, 12, .7) 30%, rgba(4, 6, 12, 0) 52%); }
.stage[data-framed] .hero-copy { bottom: 6svh; max-width: 90vw; }
.stage[data-framed] .hero-copy h1 { font-size: clamp(34px, 10.5vw, 60px); }
.stage[data-framed] .pause { display: none; }

/* ---- pit lane and circuit without their own 3D scene: the car as a cut-out, driven by the scroll ---- */
.m-drive { display: none; }
body.lite .pit, body.lite .circuit, body.still .pit, body.still .circuit { --track: 190vh !important; height: 190vh; }
body.lite #pitCanvas, body.lite #circuitCanvas { display: none; }
body.lite .m-drive, body.still .m-drive { display: block; position: absolute; height: auto; max-width: none; pointer-events: none; z-index: 2; will-change: transform; }
/* pit lane: the car rolls toward the viewer, from the far end of the lane */
.m-pit { left: 50%; bottom: 30svh; width: min(118vw, 900px); transform-origin: 50% 66%;
  transform: translate(-50%, calc((1 - var(--t, 0)) * -14svh)) scale(calc(.12 + var(--t, 0) * var(--t, 0) * .88)); opacity: clamp(0, calc(var(--t, 0) * 6), 1); }
/* circuit: the car crosses the straight, left to right */
.m-side { left: 0; bottom: 27svh; width: min(92vw, 760px); transform: translateX(calc(-110% + var(--t, 0) * (100vw + 120%))); }
body.lite .pit-copy, body.still .pit-copy { bottom: auto; top: 14svh; }
body.lite .specs, body.still .specs { bottom: 4svh; }
body.still .track:first-of-type, body.still #track { --track: 280vh; height: 280vh; }
body.still .m-car { translate: calc(var(--d, 0) * 130vw) 0; }

/* ---- the note for devices that get no 3D at all ---- */
.lite-note { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; margin: 0; padding: 14px 16px; display: flex; gap: 14px; align-items: center;
  background: rgba(8, 12, 22, .94); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px; color: #c8cfdd; font-size: 13px; line-height: 1.45;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lite-note[hidden] { display: none; }
.lite-note button { flex: none; padding: 8px 14px; background: var(--accent); color: #04101f; border: 0; border-radius: 3px; font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 901px) { .m-side { bottom: 16svh; } .m-pit { bottom: 20svh; width: min(70vw, 900px); } }

/* pit lane on phones and tablets: the car comes straight at the viewer, head-on, down the middle of the lane */
.m-pit { --w: min(84vw, 600px); left: 50%; width: var(--w); bottom: calc(27svh - var(--w) * .4); transform-origin: 50% 52%;
  transform: translate(-50%, calc((1 - var(--t, 0)) * -19svh)) scale(calc(.07 + var(--t, 0) * var(--t, 0) * .93)); opacity: clamp(0, calc(var(--t, 0) * 8), 1); }
@media (min-width: 901px) { .m-pit { --w: min(46vw, 640px); bottom: calc(20svh - var(--w) * .4); } }
/* the cut-outs are scenery: they cannot be dragged or turned */
.m-drive { -webkit-user-drag: none; user-select: none; touch-action: pan-y; }

/* phones and tablets run the pit lane and the circuit in 3D too: the cut-outs are for the no-WebGL fallback only */
body.lite #pitCanvas, body.lite #circuitCanvas { display: block; touch-action: pan-y; cursor: default; }
body.lite .m-drive { display: none; }
body.lite .pit, body.lite .circuit { --track: 230vh !important; height: 230vh; }

/* wording that only fits a mouse, or only a touch screen */
.only-touch { display: none; }
@media (pointer: coarse) { .only-mouse { display: none; } .only-touch { display: inline; } }

#pitCanvas, #circuitCanvas { cursor: default; pointer-events: none; }

/* every VC: swipe across the car */
.lineup-stage { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.lineup.swiping .lineup-stage { cursor: grabbing; }
.lineup-car { -webkit-user-drag: none; transition: transform .35s var(--ease), opacity .25s ease; }
.lineup.swiping .lineup-car { transition: none; }
