/* ============================================================
   PHASE 2 — full-screen sections, side rail, circuits,
   crew reveal, partner artwork, oversized footer.
   ============================================================ */

/* ---------- Full-screen section shell ---------- */
.fs {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: clamp(3rem, 6vw, 7rem);
  position: relative;
}
.fs--tight { min-height: auto; }

/* ---------- SIDE NAV RAIL ---------- */
.sidenav {
  position: fixed;
  left: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 780;
  padding-left: clamp(0.6rem, 1.4vw, 1.4rem);
  display: none;
}
/* The rail is fixed to the left edge, so it only earns its place once the
   viewport is wide enough to hold it clear of the content. Below that it
   sat on top of body copy. When it does show, the shell gives up the width
   it occupies rather than letting the two overlap. */
@media (min-width: 1280px) {
  .sidenav { display: block; }
  .shell { padding-inline-start: calc(var(--gutter) + 5.5rem); }
}

.sidenav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.sidenav__btn {
  display: grid;
  grid-template-columns: 2.1rem auto 1.6rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  color: var(--muted);
  text-align: left;
  transition: color var(--d2) var(--ease-out);
}
.sidenav__no { opacity: 0.55; }
.sidenav__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width var(--d3) var(--ease-out), opacity var(--d2) var(--ease-out);
}
.sidenav__tick {
  height: 1px; width: 0.9rem;
  background: currentColor;
  transition: width var(--d2) var(--ease-out);
}
.sidenav:hover .sidenav__label { max-width: 11rem; opacity: 1; }
.sidenav__btn:hover { color: var(--ink); }
.sidenav__btn[aria-current="true"] { color: var(--accent); }
.sidenav__btn[aria-current="true"] .sidenav__tick { width: 1.8rem; }

.sidenav__progress {
  position: absolute;
  left: calc(clamp(0.6rem, 1.4vw, 1.4rem) - 6px);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--accent);
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0.55;
}

/* ---------- CIRCUIT RENDER ---------- */
.circuit { width: 100%; height: 100%; display: block; overflow: visible; }
.circuit__ghost { stroke: currentColor; opacity: 0.12; }
.circuit__line { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent)); }
.circuit__dot { fill: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); }
.circuit__tick { fill: var(--ink); opacity: 0.8; }

/* ---------- 09 · THE SEASON — full grid of 24 ---------- */
.season { padding-block: var(--space-section); }
.season__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.round {
  position: relative;
  background: var(--ground);
  padding: clamp(0.9rem, 1.6vw, 1.3rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  transition: background var(--d2) var(--ease-out);
  color: var(--ink);
}
.round:hover { background: var(--surface); }
.round__head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.round__no { color: var(--accent); }
.round__art {
  position: relative;
  min-height: 0; min-width: 0;
  display: grid;
  color: var(--ink);
  opacity: 0.85;
  transition: opacity var(--d2) var(--ease-out), transform var(--d3) var(--ease-out);
}
/* An <svg> with a viewBox but no width or height falls back to the
   replaced-element default, which for a tall trace like Montreal is far
   larger than its cell — the line ran straight out of the card and into
   the row below. Pinning both axes lets preserveAspectRatio do its job,
   so every circuit is framed inside its own box whatever its shape. */
.round__art .circuit {
  width: 100%; height: 100%;
  min-width: 0; min-height: 0;
}
.round:hover .round__art { opacity: 1; transform: scale(1.06); }
/* The 3D render sits on the flat circuit and replaces it once drawn.
   It never takes the pointer: the whole card is the link. */
.round__art > .round__3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0; transition: opacity var(--d4) var(--ease-out);
}
.round__art.is-3d > .round__3d { opacity: 1; }
.round__art.is-3d > .circuit { opacity: 0; }
.season__more { display: flex; justify-content: center; margin-top: clamp(1.6rem, 3vw, 2.6rem); }
.round__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.3rem); line-height: 1;
}
.round__circuit { color: var(--muted); }
.round__date {
  color: var(--muted);
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.round[data-round="next"] .round__date { color: var(--accent); }
.round--done .round__no::after { content: " ·"; color: var(--accent); }

/* ---------- 12 · THE GRID — mask hover reveal ---------- */
.crew__list { position: relative; }
.reveal {
  position: absolute; top: 0; left: 0;
  width: clamp(190px, 21vw, 320px);
  aspect-ratio: 3 / 4;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.reveal__fig {
  position: absolute; inset: 0; margin: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--d2) var(--ease-out);
  background: var(--surface);
}
.reveal__fig.on { opacity: 1; }
.reveal__fig img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.08); }
.reveal__fig--plate {
  display: grid; place-items: center;
  font-family: var(--display-face); font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--accent-ink);
  background: var(--accent);
}
.crew__row { cursor: default; transition: color var(--d2) var(--ease-out); }
.crew__list:hover .crew__row { opacity: 0.35; transition: opacity var(--d2) var(--ease-out); }
.crew__list .crew__row:hover { opacity: 1; }

/* ---------- 13 · THE APP / RACE CONTROL ---------- */
.app {
  display: grid; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (min-width: 980px) { .app { grid-template-columns: 1.05fr 0.95fr; } }

/* The handset is defined in full in sections-c.css. */

.appfeat { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.6rem; }
.appfeat__row { background: var(--ground); padding: 1rem 1.2rem; display: grid; gap: 0.3rem; }
.appfeat__row strong { font-family: var(--display-face); font-weight: 700; text-transform: uppercase; font-size: 1.05rem; }
.appfeat__row span { color: var(--muted); font-size: 0.875rem; }

/* ---------- 14 · THE GARAGE — original partner artwork ---------- */
.garage__panel { min-height: 100svh; align-content: center; }
.partner {
  display: grid; gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
@media (min-width: 980px) { .partner { grid-template-columns: 1fr 1fr; } }

.partner__art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.pixel__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.partner__art > .partner__mark { position: relative; z-index: 2; }
.partner__mark {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.6rem, 1rem + 3vw, 3.6rem); line-height: 0.92;
  text-align: center; letter-spacing: -0.01em;
  mix-blend-mode: difference; color: #fff;
}
.partner__rule { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.2rem; }
.partner__cell { background: var(--ground); padding: 0.8rem 1rem; display: flex; justify-content: space-between; gap: 1rem; }

/* Per-partner grounds, built from colour rather than borrowed assets */
.partner--monster .partner__art { background: radial-gradient(120% 90% at 30% 20%, #0f2a12, #050505 70%); }
.partner--side    .partner__art { background: radial-gradient(120% 90% at 70% 25%, #3a2410, #050505 72%); }
.partner--moose   .partner__art { background: radial-gradient(120% 90% at 50% 30%, #2a1d12, #050505 74%); }

/* ---------- 15 · OVERSIZED FOOTER ---------- */
.megafoot {
  position: relative;
  padding-block: clamp(3rem, 7vw, 8rem) 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.megafoot__grid {
  display: grid; gap: clamp(2rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
}
@media (min-width: 900px) { .megafoot__grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }

.megafoot__col { display: grid; gap: 0.75rem; align-content: start; }
.megafoot__col a { color: var(--muted); transition: color var(--d2) var(--ease-out); width: fit-content; }
.megafoot__col a:hover { color: var(--accent); }
.megafoot__head { color: var(--ink); margin-bottom: 0.3rem; }

.megafoot__cta {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 1rem + 4vw, 5rem); line-height: 0.9;
  display: inline-flex; align-items: center; gap: 0.5em;
}
.megafoot__cta .hot { color: var(--accent); }

/* The giant wordmark that anchors the bottom */
.megafoot__mark {
  width: 100%;
  display: block;
  opacity: 0.11;
  margin-bottom: -2.5%;
  pointer-events: none;
}
.megafoot__legal {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  justify-content: space-between;
  padding-block: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- 05 · SIGNATURE BAND — panel fills the frame ----------
   Previously the panel sat at ~31% of a full-height section, which read
   as dead black space around the signature. Now the middle row takes
   whatever height is left between the two marquees. */
.band.fs {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: clamp(0.8rem, 2.4vw, 2rem);
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
}
/* Edge to edge. The plate was capped at 1500px and floated in the
   middle of the section; the shot of the car under the Qatar lights
   earns the whole width. */
.band .band__panel {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
}
.band .band__panel img { height: 100%; width: 100%; object-fit: cover; transition: opacity 1.2s; }
.band__room {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s;
}
.band__panel[data-room] .band__room { opacity: 1; }
.band__panel[data-room] img { opacity: 0; }

/* ---------- Section eyebrow block, reused ---------- */
.lead { display: grid; gap: 1rem; max-width: 46ch; }
.lead p { color: var(--muted); }

/* ---------- 11 · WORLD PANELS — artwork ---------- */
.world__art {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.34;
  filter: grayscale(0.55) contrast(1.12);
  transition: opacity var(--d3) var(--ease-out), transform var(--d4) var(--ease-out);
}
.world:hover .world__art { opacity: 0.6; transform: scale(1.06); }
.world__wash { z-index: 1; }
.world > *:not(.world__art) { position: relative; z-index: 2; }

/* 14 · PARTNERS — see styles/sections-c.css (.partners / .pwall / .pmark) */


/* OFF+GRID photography is black and white, as it is on its own page. */
.world__art--mono { filter: grayscale(1) contrast(1.12); }
