/* ═══════════════════════════════════════════════════════════
   NP78 — Design System
   Palette derived from logo: plum, gold, ice, paper, ink
   Typography: Space Grotesk (display) + Inter (body)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Palette (brand) ─────────────────────────────────────── */
  --plum: #541945;          /* Wine Berry — brand manual v02 */
  --gold: #C38C1D;          /* Autumn Gold — brand manual v02 */
  --ice: #B7C6CD;           /* Silver Strand — brand manual v02 */
  --paper: #f5f0e8;
  --ink: #160f13;
  --ink-deep: #0c0809;       /* canvas / modal ground (was hardcoded in 4 places) */
  --white: #ffffff;
  --card-bg: #f0ebe3;
  --gold-bright: #E9B43C;    /* accent within gold family (was hardcoded 2×) */
  --brand-spotify: #1ed760;  /* Spotify green (was hardcoded 4×) */

  /* ── Semantic tokens (use these in components) ───────────── */
  --text-primary: var(--ink);
  --text-muted: rgba(22, 15, 19, 0.7);
  --text-on-dark: var(--paper);
  --text-on-dark-muted: rgba(245, 240, 232, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-divider: rgba(255, 255, 255, 0.12);
  --surface-elevated: var(--card-bg);
  --surface-dark: var(--ink-deep);
  --state-error: #e03030;    /* canonical red — was 5 different variants */
  --scrim-dark: rgba(10, 7, 9, 0.78);

  /* ── Typography ──────────────────────────────────────────── */
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-condensed: 'Rajdhani', sans-serif;
  --menu-bg: #160f13;   /* ink — matches racing-fund menu + brand */

  --text-hero: clamp(3rem, 1.3rem + 6.2vw, 6.4rem);
  --text-h2: clamp(2rem, 1rem + 4vw, 4.5rem);
  --text-h3: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  --text-body: clamp(0.95rem, 0.88rem + 0.35vw, 1.125rem);
  --text-small: 0.8125rem;
  --text-eyebrow: 0.6875rem;
  --text-number: clamp(4rem, 2rem + 8vw, 9rem);

  --leading-tight: 1.15;     /* hero / display */
  --leading-snug:  1.3;      /* h2, h3 */
  --leading-normal: 1.55;    /* body */
  --leading-loose:  1.7;     /* long-form paragraphs */

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* ── Spacing scale (4 / 8 / 12 / 16 / 24 / 40 / 64 px) ──── */
  --space-2xs: 0.25rem;       /* 4px */
  --space-xs:  0.5rem;        /* 8px */
  --space-sm:  0.75rem;       /* 12px */
  --space-md:  1rem;          /* 16px */
  --space-lg:  1.5rem;        /* 24px */
  --space-xl:  2.5rem;        /* 40px */
  --space-2xl: 4rem;          /* 64px */

  /* Macro-spacing (kept from the original system) */
  --space-section: clamp(5rem, 3rem + 6vw, 12rem);
  --space-grid: clamp(1rem, 0.5rem + 2vw, 2.5rem);

  /* ── Radius scale ─────────────────────────────────────────── */
  --radius-sm:   4px;         /* inputs, small chips */
  --radius-md:   0.8rem;      /* default — alias for --radius below */
  --radius-lg:   1.25rem;     /* large surfaces, banners */
  --radius-pill: 999px;       /* pills, badges, slider hint */
  --radius-full: 50%;         /* avatars, dots, circular icons */

  /* ── Motion ───────────────────────────────────────────────── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-power3: cubic-bezier(0.77, 0, 0.175, 1);

  --duration-fast:   0.18s;   /* hover, micro-interactions */
  --duration-normal: 0.3s;    /* modal open, expand */
  --duration-slow:   0.6s;    /* page transitions, hero reveals */

  /* ── Layout ───────────────────────────────────────────────── */
  --header-h: 5rem;
  --radius: 0.8rem;           /* legacy alias — kept for back-compat */
  --touch-min: 44px;          /* WCAG 2.5.5 AAA touch target */
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Explicit font-family on root so no element falls back to the
     user-agent default (Times). Body still re-declares for clarity. */
  font-family: var(--font-body);
  /* Fixed design-width lock — layout never collapses below 1280px.
     Browser shows a horizontal scrollbar on narrower windows, but
     every section keeps its desktop proportions exactly. */
  min-width: 1280px;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-width: 1280px;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

/* ─── Header ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 3vw, 3rem);
  height: var(--header-h);
  transition: color 0.6s var(--ease-power3);
}

.site-header[data-tone="dark"] { color: var(--paper); }
.site-header[data-tone="light"] { color: var(--ink); }

/* Two stacked logos cross-fade based on header tone — no brightness-filter
   bleach hack, real art for each surface. The .brand link gives them a
   shared box; the white variant is absolutely positioned on top of the
   colored one. */
.brand { position: relative; display: inline-flex; align-items: center; }
.brand-logo {
  height: 2.2rem;
  width: auto;
  display: block;
  transition: opacity 0.45s var(--ease-power3);
}
.brand-logo--white {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}
.site-header[data-tone="dark"] .brand-logo--color { opacity: 0; }
.site-header[data-tone="dark"] .brand-logo--white { opacity: 1; }
.site-header[data-tone="light"] .brand-logo--color { opacity: 1; }
.site-header[data-tone="light"] .brand-logo--white { opacity: 0; }

/* ─── Header actions ─── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.chapters-btn {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.3s;
  padding: 0.5rem 0;
}
.chapters-btn:hover { opacity: 1; }

.hamburger-btn {
  color: inherit;
  width: 2.6rem;
  height: 2.6rem;
  position: relative;
  z-index: 200;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: currentColor;
  position: absolute;
  left: 0;
  transition: transform 0.5s var(--ease-out-expo), opacity 0.3s;
}
.hamburger-btn span:first-child { top: 13px; }
.hamburger-btn span:last-child { top: 27px; }

.hamburger-btn.is-active { color: var(--paper); }
.hamburger-btn.is-active span:first-child {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-active span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Chapters side-panel ─── */
.chapters-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: clamp(320px, 28vw, 440px);
  z-index: 150;
  background: var(--menu-bg);
  color: var(--white);
  padding: clamp(1.5rem, 3vw, 3rem);
  padding-top: calc(var(--header-h) + 1rem);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-out-expo);
}
.chapters-panel.is-open { transform: translateX(0); }

.chapters-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.chapters-panel-label {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: 0.03em;
  opacity: 0.6;
}
.chapters-panel-close {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: border-color 0.3s;
}
.chapters-panel-close:hover { border-color: var(--white); }

.chapters-panel-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 2.5rem;
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.chapters-list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s var(--ease-out-expo);
}
.chapters-list a:hover {
  opacity: 1;
  transform: translateX(6px);
}
.ch-num {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.4;
  min-width: 1.4rem;
}
.ch-title {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: clamp(1.8rem, 1rem + 2.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Backdrop for chapters panel */
.chapters-backdrop {
  position: fixed;
  inset: 0;
  z-index: 149;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.chapters-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Full-screen menu ─── */
/* Reveal: a circular clip-path bursts outward from the top-right
   corner (where the hamburger button lives), expanding to cover the
   whole viewport. pointer-events keeps the closed menu click-through
   without using `visibility` (which blocks the transition). */
.fs-menu {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: var(--menu-bg);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  clip-path: circle(0% at 100% 0%);
  -webkit-clip-path: circle(0% at 100% 0%);
  transition:
    opacity 0.35s ease-out,
    clip-path 0.65s cubic-bezier(0.77, 0, 0.18, 1),
    -webkit-clip-path 0.65s cubic-bezier(0.77, 0, 0.18, 1);
  overflow-y: auto;
  will-change: clip-path, opacity;
}
.fs-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  clip-path: circle(150% at 100% 0%);
  -webkit-clip-path: circle(150% at 100% 0%);
}

/* Inner content cascades in after the menu surface has finished
   expanding (~200ms delay) — burst, then content lifts into place. */
.fs-menu .fs-menu-inner {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.35s ease-out,
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.fs-menu.is-open .fs-menu-inner {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.4s 0.2s ease-out,
    transform 0.5s 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.fs-menu-close {
  position: absolute;
  top: 1.2rem;
  right: clamp(1.5rem, 3vw, 3rem);
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 5;
}
.fs-menu-close:hover { opacity: 1; }

/* ── Language toggle (top-left of fs-menu) ── */
.fs-menu-langs {
  position: absolute;
  top: 1.2rem;
  left: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 5;
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}
.fs-menu-langs button {
  appearance: none;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0.4rem 0.65rem;
  margin: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  opacity: 0.45;
  transition:
    opacity 0.25s ease-out,
    color 0.25s ease-out;
}
.fs-menu-langs button:hover { opacity: 0.85; }
.fs-menu-langs button.is-active {
  opacity: 1;
  color: var(--white);
}
.fs-menu-langs button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
  border-radius: 2px;
}
.fs-menu-langs .fs-menu-langs-sep {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  background: currentColor;
  opacity: 0.35;
  vertical-align: middle;
}

.fs-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding: calc(var(--header-h) + 2rem) clamp(1.5rem, 4vw, 4rem) 3rem;
  gap: 4rem;
}

/* Left column — cards */
.fs-menu-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  max-width: 380px;
}

.fs-menu-card {
  display: block;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.3s;
}
.fs-menu-card:hover { background: rgba(255,255,255,0.1); }

/* === NEXT RACE widget (compact horizontal) === */
.next-race-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--white, #f5f0e8);
  text-decoration: none;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  overflow: hidden;
}
.next-race-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(195, 140, 29, 0.4);
  transform: translateY(-1px);
}

.next-race-track {
  position: relative;
  width: 64px;
  height: 64px;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.next-race-track model-viewer {
  width: 100%;
  height: 100%;
  background-color: transparent;
  --poster-color: transparent;
}

.next-race-label {
  display: block;
  font-family: var(--font-display, var(--font-display));
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.2rem;
  line-height: 1;
}

.next-race-name {
  display: block;
  font-family: var(--font-display, var(--font-display));
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white, #f5f0e8);
  line-height: 1.15;
}

.fs-menu-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.fs-menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fs-menu-card--sm .fs-menu-card-img { height: 100px; }
.fs-menu-card--sm {
  display: grid;
  grid-template-columns: 100px 1fr;
}
.fs-menu-card--sm .fs-menu-card-img { height: 100%; }

.fs-menu-card-body {
  padding: 1rem 1.2rem;
  position: relative;
}
.fs-menu-card-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 0.4rem;
}
/* Spotify "Now Playing" card — inline label with the wordmark SVG and
   a little pulsing dot when a track is actively playing right now.
   Hidden by default in the HTML; menu-spotify.js removes the hidden
   attr once a payload arrives so the menu never flashes a placeholder. */
.fs-menu-card--spotify .fs-menu-card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-spotify);
  opacity: 0.9;
}
.fs-menu-card--spotify .fs-menu-card-label svg { flex-shrink: 0; }
.fs-menu-card--spotify[data-spotify-state="playing"] .fs-menu-card-label::after,
.fs-menu-card--spotify[data-spotify-state="recent"] .fs-menu-card-label::after,
.fs-menu-card--spotify[data-spotify-state="idle"] .fs-menu-card-label::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  margin-left: 0.15rem;
}
.fs-menu-card--spotify[data-spotify-state="playing"] .fs-menu-card-label::after {
  background: var(--brand-spotify);
  animation: spotify-pulse 1.6s ease-in-out infinite;
}
.fs-menu-card--spotify[data-spotify-state="recent"] .fs-menu-card-label::after {
  background: rgba(255, 255, 255, 0.35);
}
.fs-menu-card--spotify[data-spotify-state="idle"] .fs-menu-card-label::after {
  background: rgba(255, 255, 255, 0.18);
}
/* Fallback Spotify wordmark behind the album-art slot — visible when
   the <img> has no src yet (initial render, idle state, no album art).
   Once an album art URL loads, the <img> sits on top and covers it. */
.fs-menu-card--spotify .fs-menu-card-img {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}
.fs-menu-card-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-spotify);
  opacity: 0.4;
}
.fs-menu-card-img-fallback svg { width: 38%; height: auto; }
.fs-menu-card--spotify [data-spotify-art] {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* When no src is set the <img> renders as a 0×0 ghost — keep it that
     way so the fallback shows through. As soon as JS assigns a src,
     the layout flips back to full coverage. */
}
.fs-menu-card--spotify [data-spotify-art]:not([src]) { display: none; }

/* Progress bar — thin, brand green, with a soft track. Hidden via the
   [hidden] attribute when there's no duration data (recently-played
   shows 0 progress, idle shows no bar). */
.spotify-progress {
  margin-top: 0.55rem;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.spotify-progress[hidden] { display: none; }
.spotify-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-spotify);
  border-radius: inherit;
  transition: width 0.95s linear;
}
@keyframes spotify-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}
@media (prefers-reduced-motion: reduce) {
  .fs-menu-card--spotify[data-spotify-state="playing"] .fs-menu-card-label::after {
    animation: none;
  }
  .spotify-progress-fill { transition: none; }
}

/* "Listen along" — a toggle under the now-playing card that reveals an
   official Spotify embed for the CURRENT track (full track for visitors
   signed into Spotify, 30s preview otherwise). Shown / track-swapped by
   menu-spotify.js; the iframe is created lazily on first open. */
.spotify-listen { margin-top: 0.5rem; }
.spotify-listen[hidden] { display: none; }
.spotify-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.spotify-listen-btn:hover,
.spotify-listen-btn:focus-visible {
  background: rgba(29, 185, 84, 0.14);
  border-color: var(--brand-spotify);
  outline: none;
}
.spotify-listen-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  color: var(--brand-spotify);
  transition: transform 250ms ease;
}
.spotify-listen-ico::before { content: '\25B6'; font-size: 0.7em; line-height: 1; }
.spotify-listen-btn[aria-expanded="true"] .spotify-listen-ico { transform: rotate(90deg); }
.spotify-listen-label { font-weight: 600; }
.spotify-listen-embed { margin-top: 0.5rem; }
.spotify-listen-embed[hidden] { display: none; }
.spotify-listen-embed iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .spotify-listen-ico { transition: none; }
}
.fs-menu-card-body p {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.85;
}
.fs-menu-card-arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 1.2rem;
  opacity: 0.5;
}

/* Right column — large links */
.fs-menu-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fs-menu-links-lg {
  display: flex;
  flex-direction: column;
  margin-bottom: 2.5rem;
}
.fs-menu-links-lg a {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: clamp(5rem, 3rem + 8vw, 11rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
  /* Non-current pages dim down so the current page reads as the "active"
     button. Hover lights them up — clear affordance that they're clickable. */
  opacity: 0.28;
  transition: opacity 0.35s var(--ease-out-expo, ease);
  white-space: nowrap;
}
.fs-menu-links-lg a:hover,
.fs-menu-links-lg a:focus-visible,
.fs-menu-links-lg a.is-current {
  opacity: 1;
}

.fs-menu-links-sm {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.fs-menu-links-sm a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
  opacity: 0.42;
  transition: opacity 0.3s var(--ease-out-expo, ease);
}
.fs-menu-links-sm a:hover,
.fs-menu-links-sm a:focus-visible,
.fs-menu-links-sm a.is-current {
  opacity: 1;
}

.fs-menu-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-xl);
}
/* WCAG 2.5.5 AAA: anchors are 44×44 even though the visible SVG stays
   ~20px. The icon centers in the larger hit area so touch / cursor
   targets are easy to grab. */
.fs-menu-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: var(--radius-full);
  color: var(--white);
  opacity: 0.7;
  transition: opacity var(--duration-normal), background var(--duration-normal);
}
/* Larger, more present icons — the previous ~20px at 0.45 opacity read
   as too small/faint next to the big menu nav. */
.fs-menu-social a svg { width: 26px; height: 26px; }
.fs-menu-social a:hover { opacity: 1; }
.fs-menu-social a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  opacity: 1;
}

/* ─── Mobile: stack menu columns ─── */
@media (min-width: 99999px) and (max-width: 768px) {
  .chapters-panel { width: 100%; }
  .fs-menu-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .fs-menu-left { display: none; }
  .fs-menu-links-lg a { font-size: clamp(3.5rem, 12vw, 6rem); }
}

/* ─── Eyebrow ─── */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.5rem;
}

/* ─── Buttons ─── */
.btn-primary, .btn-ghost {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border-radius: 0;
  transition: all 0.4s var(--ease-out-expo);
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid currentColor;
  color: inherit;
}
.btn-ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--header-h) clamp(1.5rem, 3vw, 3rem) 4rem;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22, 15, 19, 0.85) 0%,
    rgba(22, 15, 19, 0.4) 40%,
    rgba(22, 15, 19, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Widened so longer hero titles ("Del karting de Lampa", "From
     Lampa karting") fit on a single line — preserves the intended
     2-line title structure across EN/ES. */
  max-width: 62rem;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: var(--text-body);
  max-width: 32rem;
  opacity: 0.8;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stats span {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ─── Hero background video ─── */
.hero-bg-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

/* Native <video> covers the hero exactly like an object-fit:cover image —
   simpler than the iframe overscan math we needed for YouTube. */
.hero-bg-video__el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  /* Subtle zoom matches the still poster (.hero-bg img) so the handoff
     when the video starts playing is seamless. */
  transform: scale(1.04);
  will-change: transform;
}

/* ─── Full-bleed video section ─── */
.video-fullbleed {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.video-fullbleed-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-fullbleed-frame iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: 177.78vh;
  height: 56.25vw;
  transform: translate(-50%, -50%);
  border: none;
}

.video-fullbleed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22, 15, 19, 0.7) 0%,
    rgba(22, 15, 19, 0.1) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

.video-fullbleed-content {
  position: absolute;
  bottom: clamp(3rem, 6vh, 6rem);
  left: clamp(1.5rem, 3vw, 3rem);
  z-index: 3;
}

.video-fullbleed-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════════════════════════ */
.marquee-strip {
  padding: 1.8rem 0;
  background: var(--paper);
  border-top: 1px solid rgba(22, 15, 19, 0.08);
  border-bottom: 1px solid rgba(22, 15, 19, 0.08);
  overflow: hidden;
}

.marquee { position: relative; display: flex; width: max-content; }

.marquee-track {
  display: flex;
  gap: 3rem;
  padding-right: 3rem;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 0.7rem + 0.6vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.5;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ═══════════════════════════════════════════════════════════
   STORY — Editorial magazine scroll
   Light background, card-based layouts, info fields,
   flowing L-shaped transitions between sections.
   ═══════════════════════════════════════════════════════════ */
.story {
  background: var(--paper);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.story-header {
  text-align: center;
  padding: var(--space-section) 0 clamp(2rem, 4vw, 4rem);
  position: relative;
  z-index: 2;
}

.story-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Pinned scroll viewport ── */
.story-scroll {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  background: var(--paper);
}

.story-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  /* Viewport is transparent so the .story-symbols layer behind it shows
     through. The .story-scroll parent still carries the paper colour. */
  background: transparent;
}

/* ── Rapa Nui symbol layer — scattered ink glyphs behind the slides ── */
/* Each <img> reads its placement from inline custom properties so the
   markup carries the chaos and the CSS stays tidy. */
.story-symbols {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.story-symbols img {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: var(--ss, 60px);
  height: auto;
  opacity: var(--so, 0.07);
  transform: translate(-50%, -50%) rotate(var(--sr, 0deg));
  /* Lock the glyph colour to the ink so it reads like a stamp/print
     on paper. The PNGs are black on transparent; we still tint via
     a subtle filter so it sits as paper detail not a hard logo. */
  filter: saturate(0) contrast(0.9);
  /* Multiply blends the ink with the paper grain underneath. */
  mix-blend-mode: multiply;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .story-symbols { opacity: 0.7; }
}

/* ── Each editorial slide — FULL VIEWPORT (per-slide full-bleed pattern) ── */
/* All slides stacked absolute at (0,0). Backgrounds are TRANSPARENT —
   the shared paper backdrop lives on .story-scroll / .story-viewport.
   This prevents the "block-edge" overlap during section transitions. */
.story-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
  overflow: hidden;
  background: transparent;
}

/* ── Inner container — content fills viewport (no empty bottom edge) ── */
/* Padding reduced ~10% from prior 8vh/5rem so content has more breathing room */
.slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(3rem, 6.5vh, 6.5rem) clamp(1.5rem, 3.5vw, 4.25rem);
}

.slide-inner--center {
  text-align: center;
}

/* ── Shared label — dot + section name ── */
.slide-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* ── Shared quote ── */
.slide-quote {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-style: italic;
  line-height: 1.7;
  opacity: 0.6;
  padding-left: 1.5rem;
  border-left: 2px solid var(--gold);
  margin-top: 2rem;
}

.slide-quote--large {
  font-size: clamp(1rem, 0.8rem + 0.8vw, 1.25rem);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════
   SLIDE 1: Introduction
   ════════════════════════════════════════════ */
.slide-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 3.5vw, 4.25rem);
  align-items: stretch;
  max-width: 74rem;
  width: 100%;
  height: 100%;
}

.slide-intro-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-intro-photo {
  overflow: hidden;
  border-radius: var(--radius);
}

.slide-intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;   /* favour the upper portion so the face/torso stays in frame */
  border-radius: var(--radius);
}

.slide-name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.slide-role {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.slide-body {
  opacity: 0.65;
  line-height: 1.75;
  max-width: 28rem;
}

/* ════════════════════════════════════════════
   SLIDE 2: Info Cards (editorial info-card pattern)
   ════════════════════════════════════════════ */
.info-cards {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  max-width: 72rem;
  align-items: flex-start;
}

.info-card {
  flex: 1;
  min-width: 0;
}

/* Skewed tab label (motorsport editorial cue) */
.info-card-tab {
  display: flex;
  justify-content: flex-end;
}

.info-card-tab > span {
  display: inline-block;
  position: relative;
  padding: 0.6rem 1rem 0.6rem 1.5rem;
  background: var(--card-bg);
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
}

.info-card-tab > span::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1.2rem;
  width: 2.5rem;
  height: 100%;
  background: var(--card-bg);
  transform: skewX(-12deg);
  border-radius: var(--radius) 0 0 0;
  z-index: -1;
}

/* Card body */
.info-card-body {
  background: var(--card-bg);
  padding: 1.2rem 1.2rem 2.5rem;
  border-radius: var(--radius);
  border-top-right-radius: 0;
}

.info-card-body--compact {
  padding: 1rem 1.2rem 1.8rem;
}

/* Photo inside card */
.info-card-photo {
  margin-bottom: 0.5rem;
}

.info-card-photo img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: calc(var(--radius) * 0.8);
}

/* ── Info field — border-top + small label + large value ── */
.info-field {
  border-top: 1px solid var(--ink);
  padding-top: 0.3rem;
  margin-top: 0.85rem;
}

.info-field:first-child {
  margin-top: 0;
}

.info-field-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
}

.info-field-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.85rem + 0.65vw, 1.35rem);
  font-weight: 700;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.info-field-value--large {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  letter-spacing: -0.02em;
}

/* ════════════════════════════════════════════
   SLIDE 3: Editorial (Origins, etc.)
   ════════════════════════════════════════════ */
.slide-editorial {
  width: 100%;
  max-width: 66rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-editorial h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.4rem);   /* ~7% smaller than var(--text-h3) defaults */
  font-weight: 700;
  margin-bottom: 0.85rem;
  line-height: 1.15;
}

.slide-editorial-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 3vw, 3.25rem);
  align-items: start;
}

.slide-editorial-text p {
  opacity: 0.6;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.slide-editorial-photo {
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.slide-editorial-photo img {
  width: 100%;
  aspect-ratio: 5/4;        /* shorter than 4/3 so the info card has room below */
  object-fit: cover;
  border-radius: var(--radius);
}

.slide-editorial-detail {
  background: var(--card-bg);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
}

/* ════════════════════════════════════════════
   SLIDE 4: Timeline
   Rows stretch to fill slide height so there's
   no empty band exposed during slide transitions.
   ════════════════════════════════════════════ */
.slide-timeline {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-top: 1rem;
  flex: 1;
  min-height: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  flex: 1;
  min-height: 0;
}

.timeline-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.timeline-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 0.7rem + 0.4vw, 1rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.timeline-item p {
  font-size: var(--text-small);
  opacity: 0.55;
  line-height: 1.6;
}

/* ════════════════════════════════════════════
   SLIDE 9: 2023 Breakthrough — 2-pillar layout
   Left:  three stacked timeline-item blocks
   Right: portrait Le Mans champagne video, kept
          at natural aspect (no crop, no stretch).
   ════════════════════════════════════════════ */
.breakthrough-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  align-items: stretch;
  margin-top: 1rem;
  flex: 1;
  min-height: 0;
}

.breakthrough-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1vw, 1rem);
  min-height: 0;
}

.breakthrough-blocks .timeline-item {
  flex: 1;
}

.breakthrough-video {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Transparent — no dark letterbox. The video brings its own
     rounded edges; the slide paper shows where the portrait
     video doesn't reach the container's width. */
  background: transparent;
  min-height: 0;
}

.breakthrough-video video {
  /* Keep native aspect ratio — no crop, no stretch. */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  /* Rounded corners on the video itself so we don't need an
     opaque container behind it. */
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline-item--wide {
  grid-column: 1 / -1;
}

/* ════════════════════════════════════════════
   SLIDE 5: Feature (Le Mans)
   ════════════════════════════════════════════ */
.slide-feature {
  width: 100%;
  max-width: 72rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-feature-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.slide-feature-photo {
  overflow: hidden;
  border-radius: var(--radius);
}

.slide-feature-photo img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
}

.slide-feature-text h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 3vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.slide-feature-text p {
  opacity: 0.6;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.slide-feature-layout--reverse {
  grid-template-columns: 1fr 1.3fr;
}

.slide-feature-stats {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
}

.slide-feature-stats .info-field {
  flex: 1;
}

/* ════════════════════════════════════════════
   SLIDE 6: Season
   ════════════════════════════════════════════ */
.slide-season {
  width: 100%;
}

.slide-season-hero {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.slide-season-hero h3 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.slide-season-sub {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.slide-season-hero > p:last-child {
  opacity: 0.6;
  max-width: 36rem;
  line-height: 1.7;
}

.slide-season-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.slide-season-col {
  min-width: 0;
}

/* ════════════════════════════════════════════
   SLIDE 12: Philosophy (closing)
   Dark "end credits" feel — ink background, white
   text. Sits behind the slide-train rectangles so
   it wipes in as the final slide of the sequence.
   ════════════════════════════════════════════ */
.story-slide--closing {
  background: var(--ink);
  color: var(--white);
}

.slide-philosophy {
  max-width: 40rem;
}

.slide-philosophy-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 4vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.slide-philosophy-body {
  opacity: 0.6;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.story-slide--closing .slide-quote {
  border-left-color: rgba(255,255,255,0.25);
  color: var(--white);
  opacity: 0.6;
}

.story-slide--closing .slide-label {
  color: var(--gold);
}

.story-slide--closing .info-card-tab > span {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.story-slide--closing .info-card-tab > span::before {
  background: rgba(255,255,255,0.08);
}

.story-slide--closing .info-card-body {
  background: rgba(255,255,255,0.04);
}

.story-slide--closing .info-field {
  border-top-color: rgba(255,255,255,0.15);
}

.story-slide--closing .info-field-label {
  color: rgba(255,255,255,0.55);
}

/* ── Progress counter ── */
.story-progress {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(22,15,19,0.25);
  z-index: 3;
}

.story-slide--closing.is-active ~ .story-progress {
  color: rgba(255,255,255,0.35);
}

/* ═══════════════════════════════════════════════════════════
   CHAPTER WIPE
   ═══════════════════════════════════════════════════════════ */
.chapter-wipe {
  position: relative;
  height: 12vh;
  background: var(--ink);
  overflow: hidden;
  z-index: 1;
  /* Sub-pixel kill: overlap the neighbouring section by 1px on each
     side so fractional layout positioning can't expose the body's
     paper background as a hairline between two same-coloured blocks. */
  margin-top: -1px;
  margin-bottom: -1px;
}

.wipe-skew {
  position: absolute;
  inset: 0;
  background: var(--paper);
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  transform: skewY(-3deg);
  transform-origin: bottom right;
  will-change: clip-path, transform;
}

/* Inverted variant: paper section above, ink section below.
   Wrapper is paper-colored so it blends into the section above;
   the inner ink slab grows up on scroll and seams with the dark
   section below via the same skewY diagonal. */
.chapter-wipe--invert {
  background: var(--paper);
}

.wipe-skew--invert {
  background: var(--ink);
}

/* ═══════════════════════════════════════════════════════════
   CAREER
   ═══════════════════════════════════════════════════════════ */
.career {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  background: var(--paper);
}

.career-header {
  max-width: 40rem;
  margin-bottom: 4rem;
}

.career-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-grid);
}

.career-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  clip-path: ellipse(100% 0% at 50% 0);
  will-change: clip-path;
  transition: transform 0.5s var(--ease-out-expo);
}

.career-card:hover { transform: translateY(-4px); }

.career-card .card-label {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.75rem;
}

.career-card strong {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.career-card p {
  font-size: var(--text-small);
  opacity: 0.6;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   NUMBERS
   ═══════════════════════════════════════════════════════════ */
.numbers {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  background: var(--ink);
  color: var(--white);
}

.numbers-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.number-block {
  text-align: center;
  padding: 2rem 0;
}

.number-value {
  font-family: var(--font-display);
  font-size: var(--text-number);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.number-value--accent {
  color: var(--white);
  -webkit-text-stroke: 1px var(--gold);
}

.number-label {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.4;
}

.number-sub {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.72;
  margin-top: 0.35rem;
}

.number-line {
  display: block;
  width: 3rem;
  height: 2px;
  margin: 1rem auto 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  will-change: transform;
}

/* ═══════════════════════════════════════════════════════════
   SEASON 2025
   ═══════════════════════════════════════════════════════════ */
.season {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  background: var(--ink);
  color: var(--white);
}

.season-header {
  max-width: 40rem;
  margin-bottom: 4rem;
}

.season-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
}

.season-series {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.season-sub {
  font-size: var(--text-small);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.race-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.race-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-body);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.race-list li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.08); }

.race-flag {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  min-width: 2rem;
}

.season-quotes {
  margin-top: 4rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.season-quote {
  max-width: 26rem;
  padding: 1.5rem 2rem;
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-style: italic;
  line-height: 1.7;
  opacity: 0.5;
}

.season-quote p { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════════════════════ */
/* === Featured-shows section (gallery card + marquee duo) === */
.section-shows {
  position: relative;
  z-index: 2;
  /* ink → black → ink: the gallery keeps its pure-black stage for the video
     cards, but both seams melt into the surrounding quote sections */
  background: linear-gradient(180deg, var(--ink) 0%, #000 16%, #000 84%, var(--ink) 100%);
  margin: 0;
  overflow: clip;
  --shows-progress: 0;
}

/* Sticky runway — no overlap with the section above (calendar must stay visible) */
.section-shows .featured-show-gallery .sticky-wrapper {
  height: 180vh;
  margin-top: 0;
  position: relative;
  width: 100%;
}

.section-shows .featured-show-gallery .sticky-wrapper > .inner {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  min-height: 506px;
  width: 100%;
}

/* Centered featured carousel — fixed 506px height, centered, scales on scroll */
.section-shows .slide-gallery {
  top: 50%;
  left: 0;
  width: 100%;
  position: absolute;
  height: 506px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  font-size: 0;
  --pan: 0px;
  --origin-x: 50%;
  translate: var(--pan, 0px) -50%;
  transform:
    translateY(calc(var(--shows-progress, 0) * -12vh))
    scale(calc(1 - var(--shows-progress, 0) * 0.18));
  transform-origin: var(--origin-x, 50%) 50%;
  transition: translate 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: translate, transform;
}

/* Each big feature card — 900x506 fixed aspect */
.section-shows .feature {
  width: 900px;
  height: 506px;
  margin: 0 10px;
  position: relative;
  display: inline-block;
  z-index: 1;
  transform-origin: center center;
  color: var(--paper);
  background-color: initial;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 18px;
  flex: 0 0 auto;
  opacity: 0.45;
  transform: scale(0.9);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-shows .feature.is-active {
  opacity: 1;
  transform: scale(1);
}

.section-shows .feature .art {
  background-size: cover;
  background-position: center;
  position: absolute;
  inset: 0;
  margin: 0;
  background-color: #111;
}

/* Video version of the .art surface (same shape, fill the card) */
.section-shows .feature video.art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #000;
}

.section-shows .feature .gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(0,0,0,0) 50%, rgba(0,0,0,0.78));
}

.section-shows .feature .info {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  z-index: 2;
}

.section-shows .feature .info .eyebrow {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 3px 10px;
  border: 1px solid rgba(245,240,232,0.55);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}

.section-shows .feature .info .title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
  white-space: normal;
}

.section-shows .feature .info-bottom {
  position: absolute;
  bottom: 30px;
  left: 40px;
  right: 40px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.section-shows .feature .info-bottom .genre {
  margin: 0;
  color: rgba(245,240,232,0.86);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: normal;
}

.section-shows .feature .custom-button {
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
}

.section-shows .feature .custom-button:hover { opacity: 0.9; }

/* Paddle nav (prev/next arrows) */
.section-shows .paddlenav {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.section-shows .paddlenav ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
  margin: 0;
  list-style: none;
}

.section-shows .paddlenav-arrow {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  transition: background 0.2s, transform 0.2s;
}

.section-shows .paddlenav-arrow:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.section-shows .paddlenav-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.section-shows .paddlenav-arrow-previous::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.section-shows .paddlenav-arrow-next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

/* Show-marquee — sibling of sticky-wrapper, JS sets marginTop */
.section-shows .show-marquee {
  width: 100%;
  overflow: hidden;
  margin-top: 20px;  /* JS overrides with -(vh - featureH)/2 + 20 */
  position: relative;
  transition: transform 0.6s ease-out, opacity 0.6s;
  z-index: 1;
}

.section-shows .show-marquee .transform-wrapper {
  white-space: nowrap;
  font-size: 0;
  line-height: 0;
  display: block;
  width: max-content;
}

.section-shows .show-marquee .transform-wrapper:nth-of-type(2) {
  margin-left: -210px;
  margin-top: -2px;
}

.section-shows .show-marquee ul {
  display: inline-block;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-size: 0;
}

.section-shows .show-marquee li {
  width: 378px;
  height: 212px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #111;
  display: inline-block;
  position: relative;
  margin: 0 6px 4px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Video reel tiles — same shape as image tiles, cover-fit the video */
.section-shows .show-marquee li.marquee-video {
  background-color: #000;
}

.section-shows .show-marquee li.marquee-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}


@media (min-width: 99999px) and (max-width: 1068px) {
  .section-shows .feature { width: 555px; height: 312px; margin: 0 7px; border-radius: 14px; }
  .section-shows .slide-gallery { height: 312px; }
  .section-shows .featured-show-gallery .sticky-wrapper > .inner { min-height: 312px; }
  .section-shows .show-marquee li { width: 210px; height: 118px; margin: 0 7px 12px; }
  .section-shows .show-marquee .transform-wrapper:nth-of-type(2) { margin-left: -120px; }
}

@media (min-width: 99999px) and (max-width: 734px) {
  .section-shows .featured-show-gallery .sticky-wrapper { height: 150vh; }
}

@media (prefers-reduced-motion: reduce) {
  .section-shows .show-marquee .transform-wrapper,
  .section-shows .show-marquee .transform-wrapper:nth-of-type(2) { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   QUOTE
   ═══════════════════════════════════════════════════════════ */
.quote-section {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  background: var(--ink);
  color: var(--white);
}

.quote-inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1rem + 5vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-style: italic;
}

.quote-attr {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-top: 2rem;
}

.quote-section--mid {
  background: var(--plum);
}

/* ═══════════════════════════════════════════════════════════
   PARTNERS CTA
   ═══════════════════════════════════════════════════════════ */
.partners-cta {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.partners-cta-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.partners-cta-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.partners-cta-sub {
  opacity: 0.6;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.partners-cta-logos {
  display: flex;
  gap: clamp(2rem, 4vw, 4rem);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.partner-logo-name {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.25;
  transition: opacity 0.4s;
}

.partner-logo-name:hover { opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════════ */
.contact {
  padding: var(--space-section) clamp(1.5rem, 3vw, 3rem);
  /* Emerge bright, dissolve dark: the statement glows on paper in the middle,
     while both edges fade to ink — blending up into Partners and down into
     the footer so the whole tail reads as one bright→dark breath. */
  background: linear-gradient(180deg,
    var(--ink) 0%,
    var(--paper) 14%,
    var(--paper) 86%,
    var(--ink) 100%);
  color: var(--ink);
  text-align: center;
}

.contact-inner { max-width: 40rem; margin: 0 auto; }

.contact-inner h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.contact-sub {
  opacity: 0.6;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-quote {
  max-width: 30rem;
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-style: italic;
  line-height: 1.7;
  text-align: left;
  opacity: 0.5;
}

.contact-quote p { opacity: 1; }

.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* 3D robot mount — small desk-bot pinned to the contact section's bottom-left
   corner (the "Nothing has been easy" section). Transparent canvas over the
   ink bg; purely decorative so it never intercepts clicks. */
.np78-robot {
  position: absolute;
  right: clamp(1.25rem, 3vw, 3rem);
  bottom: clamp(1.25rem, 3vw, 2.5rem);
  width: clamp(106px, 10.4vw, 144px);
  height: clamp(117px, 11.2vw, 157px);
  margin: 0;
  z-index: 1;
  pointer-events: none;
}
.np78-robot canvas { display: block; }

/* ─── 8-bit F1 punch scene — full-width bar across bottom of #contact ─── */
.contact { position: relative; }
.pit-scuffle {
  position: absolute;
  /* Lives in the <footer>. bottom:162px lands the cars' dashed ground line
     exactly on .footer-grid bottom (= top of the "Backed by" sponsor row),
     where the user marked it with the ruler (was 186px / ~24px higher).
     bottom is relative to the footer, so this offset holds across viewports.
     Spans the footer's full inner width; max-width:none overrides the
     `.site-footer > *` centering cap. */
  left: clamp(1.5rem, 3vw, 3rem);
  right: clamp(1.5rem, 3vw, 3rem);
  bottom: 162px;
  max-width: none;
  margin-inline: 0;
  height: 108px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  overflow: hidden;
}
.pit-scuffle.is-armed { opacity: 1; }

/* Ground line beneath the action so the cars sit on something. */
.ps-ground {
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1px;
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0.32) 0 6px,
      transparent 6px 12px);
}

.pit-scuffle canvas {
  position: absolute;
  left: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Cars: 68×20 sprite drawn at 1.8x. Side view, facing right.
   Anchored to stage left edge; GSAP translateX positions them.
   bottom: 1px so the wheel's ground-contact pixels sit on the
   dashed ground line below them. */
.ps-car {
  width: 122px;
  height: 36px;
  left: 0;
  /* Sprite has 2 empty padding rows = 3.6 px at the canvas bottom. With
     bottom: 2 px the wheel pixels land at ~5.6 px ≈ the dashed ground
     line at bottom: 6 px — wheels rest directly on the line. */
  bottom: 2px;
  transform: translateX(-160px);
  will-change: transform;
}
.ps-car--yellow { z-index: 2; }
.ps-car--blue   { z-index: 3; }

/* Drivers: 16×24 sprite drawn at 1.8x. Off-screen until they eject. */
.ps-driver {
  width: 29px;
  height: 43px;
  left: 0;
  bottom: 4px;
  opacity: 0;
  transform: translate(-200px, 0);
  will-change: transform, opacity;
  z-index: 4;
}

/* Helmet that flies off when the punch lands. 8×8 sprite drawn at 2x. */
.ps-helmet {
  width: 16px;
  height: 16px;
  left: 0;
  bottom: -6px;
  opacity: 0;
  transform: translate(-300px, 0) rotate(0deg);
  will-change: transform, opacity;
  z-index: 6;
}

/* Crash effects — anchored to the CAR mid-height. Cars now sit at
   bottom: 1 px (height 36 px → mid-car at bottom ≈ 19 px). All effects
   shifted down by ~7 px to match the new car position. */
.ps-smoke,
.ps-smoke2,
.ps-smoke3 {
  position: absolute;
  left: 0;
  bottom: 18px;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transform: translate(-200px, 0) scale(0.7);
  filter: grayscale(0.2);
}
.ps-smoke2 { font-size: 22px; filter: grayscale(0.4); }
.ps-smoke3 { font-size: 24px; filter: grayscale(0.3); }

/* Gear / wrench / bolt debris flying out of the wreck. */
.ps-debris {
  position: absolute;
  left: 0;
  bottom: 16px;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transform: translate(-200px, 0) rotate(0deg);
  will-change: transform, opacity;
}
.ps-debris--2 { font-size: 13px; }
.ps-debris--3 { font-size: 14px; }
.ps-debris--4 { font-size: 15px; }

/* Tiny spark bursts at the impact point. */
.ps-spark {
  position: absolute;
  left: 0;
  bottom: 16px;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 7;
  transform: translate(-200px, 0) scale(0.5);
}


/* Comic-style POW! label flashing on the punch frame. */
.ps-impact {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, 0) rotate(-8deg) scale(0.6);
  font-family: var(--font-display, 'Inter'), system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #ffd23a;
  text-shadow:
    -1px -1px 0 #160f13, 1px -1px 0 #160f13,
    -1px  1px 0 #160f13, 1px  1px 0 #160f13,
    0 4px 0 rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

/* Little starburst that follows the yellow driver as he falls. */
.ps-stars {
  position: absolute;
  font-size: 11px;
  color: #ffd23a;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  text-shadow: 0 0 2px rgba(0,0,0,0.6);
}

@media (prefers-reduced-motion: reduce) {
  .pit-scuffle { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   FOOTER — two-tier layout
   • TOP TIER: subscribe block far-left, nav links centered.
   • BOTTOM TIER: a rounded badge in the bottom-left holds the
     copyright text; the badge carves a curve into the dark
     band above it. Because the parent footer is already dark,
     the badge uses a deeper rgba(0,0,0,...) shade so the
     curve reads.
   ═══════════════════════════════════════════════════════════ */
/* ─── "Pit Lane" footer — type-led ───────────────────────────────────
   Brand + tagline on the left, the two primary CTAs on the right.
   Gold is reserved for hover states + the column hairlines only. */
.site-footer {
  background: var(--ink);
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(3.5rem, 5vw, 5.5rem) clamp(1.5rem, 3vw, 3.5rem) 0;
  position: relative;
  overflow: hidden;
}
.site-footer > * { max-width: 86rem; margin-inline: auto; position: relative; z-index: 2; }

/* Suminagashi ink-glow canvas — fills the footer behind its content. */
.footer-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  z-index: 0;
  pointer-events: none;
}
/* Soft scrim keeps footer copy legible over the drifting ink. */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(120% 100% at 50% 42%, rgba(22, 15, 19, 0.34) 0%, rgba(22, 15, 19, 0.56) 55%, rgba(22, 15, 19, 0.8) 100%);
  pointer-events: none;
}

/* HERO BAND — lead (logo + tagline) left, CTAs right. */
.footer-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  /* Tightened (was clamp(2.5rem,3.5vw,3.5rem)) — closes ~80px of empty space
     between the logo band and the link row so the footer reads more compact. */
  padding-bottom: clamp(0.6rem, 1vw, 0.85rem);
}
.footer-hero-lead {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}
.footer-logo {
  width: clamp(118px, 11vw, 150px);
  height: auto;
  margin-bottom: 1.25rem;
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: rgba(245, 240, 232, 0.9);
  margin: 0 0 1.6rem;
}
/* CTA block: small context label stacked above the two buttons.
   Left-aligned so the label sits directly over the SUBSCRIBE button
   (the first/left button), which is what it describes — not over
   "Partner with NP78". */
.footer-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.footer-cta-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.55);
  padding-left: 0.2rem;
}
.footer-cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--duration-normal, 0.3s) var(--ease-out-expo),
              color var(--duration-normal, 0.3s) var(--ease-out-expo),
              border-color var(--duration-normal, 0.3s) var(--ease-out-expo),
              transform var(--duration-fast, 0.15s) var(--ease-out-expo);
}
.footer-cta--solid {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--white);
}
.footer-cta--solid:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.footer-cta--ghost {
  background: transparent;
  color: rgba(245, 240, 232, 0.85);
  border: 1px solid rgba(245, 240, 232, 0.28);
}
.footer-cta--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.footer-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* LINK GRID */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  /* Top trimmed (was clamp(2rem,3.5vw,3rem)) to pull the link row up toward
     the logo band; bottom kept for breathing room before the sponsor strip. */
  padding: clamp(0.5rem, 1vw, 0.75rem) 0 clamp(2rem, 3.5vw, 3rem);
}
.footer-col { display: flex; flex-direction: column; gap: 0.85rem; }
.footer-col-head {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.footer-col a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.6);
  width: fit-content;
  transition: color var(--duration-normal, 0.3s) var(--ease-out-expo);
}
.footer-col a:hover { color: var(--gold); }

/* Merged "More" nav: spans the left columns; its links sit in one horizontal
   row (Home · Partners · Store · Racing Fund · Contact) instead of a stack. */
.footer-col--links { grid-column: 1 / 3; }
.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1.7rem;
}

/* Social icons — 44×44 hit areas (matches DS#5 a11y target). */
.footer-social { display: flex; gap: 0.4rem; margin-top: 0.15rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: rgba(245, 240, 232, 0.55);
  transition: color var(--duration-normal, 0.3s) var(--ease-out-expo),
              transform var(--duration-fast, 0.15s) var(--ease-out-expo);
}
.footer-social a:hover { color: var(--gold); transform: translateY(-2px); }

/* SPONSOR STRIP */
.footer-sponsors {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  padding: clamp(1.5rem, 2.5vw, 2.25rem) 0;
  border-top: 1px solid rgba(245, 240, 232, 0.1);
}
.footer-sponsors-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.4);
  white-space: nowrap;
}
.footer-sponsors-list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-sponsors-list li {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(245, 240, 232, 0.78);
}

/* META ROW */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 1.6rem;
  border-top: 1px solid rgba(245, 240, 232, 0.1);
}
.footer-copy {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.08em;
  color: rgba(245, 240, 232, 0.5);
  margin: 0;
  cursor: default;
}
.footer-meta-right { display: flex; align-items: center; gap: 1.5rem; }
.footer-totop {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  transition: color var(--duration-normal, 0.3s) var(--ease-out-expo);
}
.footer-totop::after { content: " ↑"; }
.footer-totop:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   PARTNERS PAGE (editorial layout)
   ═══════════════════════════════════════════════════════════ */

/* ─── Hero ─── */
.pp-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 3rem) clamp(1.5rem, 5vw, 4rem) 5rem;
  background: var(--paper);
  color: var(--ink);
}

/* ── Scroll cue — animated double-chevron + label, anchored to the
   bottom of the hero. Fades out after a tiny scroll so it acts as an
   initial affordance only. */
.pp-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: rgba(22, 15, 19, 0.55);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}

.pp-scroll-cue.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.pp-scroll-cue-arrows {
  position: relative;
  width: 26px;
  height: 30px;
}

.pp-scroll-cue-arrows svg {
  position: absolute;
  left: 0;
  width: 26px;
  height: 26px;
  display: block;
  color: inherit;
  animation: pp-scroll-cue-bob 1.6s var(--ease-out-expo, ease-in-out) infinite;
}

/* Two chevrons, the lower one delayed so it reads like a wave. */
.pp-scroll-cue-arrows svg:nth-child(1) {
  top: -6px;
  opacity: 0.45;
  animation-delay: 0s;
}
.pp-scroll-cue-arrows svg:nth-child(2) {
  top: 4px;
  opacity: 0.9;
  animation-delay: 0.18s;
}

@keyframes pp-scroll-cue-bob {
  0%   { transform: translateY(-4px); opacity: 0; }
  35%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}

.pp-scroll-cue-label {
  font-family: var(--font-display, var(--font-body));
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(22, 15, 19, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .pp-scroll-cue-arrows svg { animation: none; }
}

.pp-hero-title {
  font-family: var(--font-condensed);
  font-size: clamp(5rem, 3rem + 10vw, 14rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.pp-hero-body {
  max-width: 36rem;
  font-size: var(--text-body);
  line-height: 1.7;
  opacity: 0.65;
  margin-bottom: 3rem;
}

.pp-hero-logos {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 4vw, 5rem);
  margin-bottom: 3rem;
}

.pp-hero-logos span {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 0.6rem + 0.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.45;
}

.pp-hero-cta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.3s, background 0.3s, color 0.3s;
}
.pp-hero-cta:hover { opacity: 0.8; }

/* Ghost variant — same shape, inverted (outline only) */
.pp-hero-cta--ghost {
  background: transparent;
  color: var(--ink);
}
.pp-hero-cta--ghost:hover {
  background: var(--ink);
  color: var(--white);
  opacity: 1;
}

.pp-bottom-cta-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ─── Cards section ─── */
.pp-cards {
  padding: var(--space-section) 0;
  padding-left: clamp(1.5rem, 3vw, 3rem);
  padding-right: clamp(1.5rem, 3vw, 3rem);
  background: var(--paper);
  position: relative;
}

.pp-cards-label {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2rem;
  z-index: 5;
  width: fit-content;
}

.pp-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--ink);
}

.pp-cards-list {
  max-width: 56rem;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* ─── Individual card ─── */
.pp-card {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  overflow: hidden;
  min-height: 20rem;
}

.pp-card-info {
  padding: clamp(2rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
}

.pp-card-name {
  font-family: var(--font-condensed);
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.pp-card-desc {
  font-size: var(--text-small);
  line-height: 1.75;
  opacity: 0.6;
  flex: 1;
  margin-bottom: 2rem;
}

.pp-card-meta {
  display: flex;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: auto;
}

.pp-meta-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 0.3rem;
}

.pp-meta-value {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
}

.pp-meta-link {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink);
  transition: opacity 0.3s;
}
.pp-meta-link:hover { opacity: 0.6; }

.pp-card-photo {
  position: relative;
  overflow: hidden;
}

.pp-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Variant for partners that supply a logo instead of an action photo.
   Centers + contains the mark on a clean white surface so the logo
   doesn't get cover-cropped like a photograph would. */
.pp-card-photo--logo {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-card-photo--logo img {
  width: auto;
  height: auto;
  max-width: 62%;
  max-height: 62%;
  object-fit: contain;
}

/* When the "logo" is actually a video clip with its own background
   (e.g. the WISE animated mark on its smoke/light field), let it
   cover the photo slot edge-to-edge. The white surface from the
   .pp-card-photo--logo base rule is overridden to black so any
   sub-pixel seam blends with the dark frame instead of flashing
   white. */
.pp-card-photo--video {
  background: #000;
  position: relative;
}

.pp-card-photo--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Static logo layered on top of the animated video — stays still
   while the background animates. The source PNG is already white
   (wise-logo-white.png), so no filter is needed. */
.pp-card-photo--video .pp-card-photo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 58%;
  max-height: 58%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

/* ─── Bottom CTA ─── */
.pp-bottom-cta {
  max-width: 56rem;
  margin-left: auto;
  padding-top: 4rem;
}

.pp-bottom-cta p {
  font-size: var(--text-body);
  line-height: 1.7;
  opacity: 0.6;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

/* ─── Partners page responsive ─── */
@media (min-width: 99999px) and (max-width: 768px) {
  .pp-hero { min-height: 70vh; }
  .pp-hero-logos { flex-direction: column; gap: 1rem; }

  .pp-cards-label {
    position: relative;
    top: auto;
    margin-bottom: 1.5rem;
  }

  .pp-cards-list { margin-left: 0; }
  .pp-card { grid-template-columns: 1fr; }

  .pp-card-photo {
    height: 220px;
    order: -1;
  }

  .pp-bottom-cta { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════
   REVEAL INITIAL STATES
   ═══════════════════════════════════════════════════════════ */
.js-ready [data-reveal="fade"] {
  opacity: 0;
  transform: translateY(1.5rem);
}

.js-ready [data-reveal="stagger"] {
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 99999px) and (max-width: 768px) {
  .site-header nav { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }

  /* Story editorial slides — stack on mobile */
  .slide-intro { grid-template-columns: 1fr; }
  .slide-intro-photo { max-height: 35vh; }
  .slide-intro-photo img { aspect-ratio: auto; max-height: 35vh; }
  .info-cards { flex-direction: column; gap: 1rem; }
  .slide-editorial-grid { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 1fr; }
  .slide-feature-layout { grid-template-columns: 1fr; }
  .slide-feature-layout--reverse { grid-template-columns: 1fr; }
  .slide-season-cols { grid-template-columns: 1fr; }
  .story-progress { right: 1rem; bottom: 1rem; }
  .slide-name { font-size: 2.5rem; }

  .career-grid { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .season-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (min-width: 99999px) and (max-width: 480px) {
  .hero-content h1 { font-size: 2.5rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary, .hero-cta .btn-ghost { width: 100%; text-align: center; }

  .numbers-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .number-value { font-size: 3.5rem; }
}

/* ─── Pixel Kart Crash Animation ─── */
.kart-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: visible;
}

.kart-sprite {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

.kart-wreck {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  height: 60px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

/* Pixel smoke clouds at crash point */
.crash-smoke {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: #999;
  opacity: 0;
  image-rendering: pixelated;
}
.crash-smoke--1 { width: 24px; height: 16px; background: #aaa; }
.crash-smoke--2 { width: 16px; height: 16px; background: #888; }
.crash-smoke--3 { width: 20px; height: 14px; background: #bbb; }
.crash-smoke--4 { width: 12px; height: 12px; background: #999; }
.crash-smoke--5 { width: 14px; height: 14px; background: #aaa; }

.kart-sparks {
  position: absolute;
  width: 6px;
  height: 6px;
  opacity: 0;
}

.kart-sparks::before {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: var(--gold);
  image-rendering: pixelated;
  box-shadow:
    16px -12px 0 var(--gold),
    -10px -20px 0 #d32,
    24px 8px 0 var(--gold),
    -16px 4px 0 #d32,
    12px -28px 0 var(--gold),
    -24px -8px 0 #d32,
    30px -16px 0 var(--gold),
    -6px 16px 0 #d32;
}

.kart-wheel-lost {
  position: absolute;
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

/* Ambulance group — positions siren relative to ambulance body */
.ambulance-group {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.ambulance-sprite {
  width: 140px;
  height: 77px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Siren lights — positioned on top of ambulance */
.ambulance-siren {
  position: absolute;
  width: 10px;
  height: 6px;
  top: -4px;
  border-radius: 0;
  image-rendering: pixelated;
  opacity: 0;
}
.ambulance-siren--red { left: 68px; background: #e22; }
.ambulance-siren--blue { left: 54px; background: #44f; }

.ambulance-siren.is-flashing {
  opacity: 1;
  animation: siren-flash 0.25s step-end infinite;
}
.ambulance-siren--blue.is-flashing {
  animation-delay: 0.125s;
}

@keyframes siren-flash {
  0%, 50% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* Pixel driver that gets picked up */
.crash-driver {
  position: absolute;
  width: 66px;
  height: 40px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

/* Debris fragments */
.kart-debris {
  position: absolute;
  image-rendering: pixelated;
  opacity: 0;
}
.kart-debris--1 { width: 14px; height: 10px; background: #cc2222; }
.kart-debris--2 { width: 10px; height: 14px; background: #991818; }
.kart-debris--3 { width: 12px; height: 8px; background: #888; }
.kart-debris--4 { width: 8px; height: 12px; background: #cc2222; }
.kart-debris--5 { width: 10px; height: 10px; background: #e03030; }
.kart-debris--6 { width: 12px; height: 12px; background: #444; }

/* Stars circling knocked-out driver */
.driver-stars {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.star {
  position: absolute;
  color: #ddb833;
  font-size: 18px;
  line-height: 1;
  animation: star-orbit 1.2s linear infinite;
}
.star--1 { top: -22px; left: 0px; animation-delay: 0s; }
.star--2 { top: -22px; left: 30px; animation-delay: -0.4s; }
.star--3 { top: -22px; left: 60px; animation-delay: -0.8s; }

@keyframes star-orbit {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  50%  { transform: translateY(-4px) scale(1.3); opacity: 0.6; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Paramedics */
.paramedic {
  position: absolute;
  width: 33px;
  height: 60px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

/* Stretcher */
.stretcher-sprite {
  position: absolute;
  width: 82px;
  height: 33px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   CAPABILITIES SHOWCASE — full-page partner-deck takeover.
   Hidden by default ([hidden] attribute). Pressing "See what we
   can do" un-hides it AND fixes it to the viewport, locking the
   background page so the deck owns the entire screen until the
   user presses "Take me back".
   ═══════════════════════════════════════════════════════════ */
.capabilities-showcase {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #050505;
  color: var(--white);
  padding: clamp(4rem, 8vh, 8rem) clamp(1.5rem, 5vw, 6rem) clamp(4rem, 10vh, 10rem);
  overflow-y: auto;
  overflow-x: hidden;
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
}

/* Body class set by JS while overlay is open — blocks underlying scroll */
.showcase-open,
.showcase-open body {
  overflow: hidden !important;
}

.capabilities-showcase[hidden] {
  display: none;
}

/* Subtle radial vignette to make it feel like a presentation deck */
.capabilities-showcase::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center top, rgba(195, 140, 29, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at center bottom, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* "Take me back" button — pill-shaped, fixed top-left of the overlay */
.cap-close {
  position: fixed;
  top: clamp(1rem, 2vh, 1.75rem);
  left: clamp(1rem, 2vw, 1.75rem);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  z-index: 10;
}
.cap-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(195, 140, 29, 0.5);
  transform: translateX(-2px);
}
.cap-close-arrow {
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.25s;
}
.cap-close:hover .cap-close-arrow {
  transform: translateX(-3px);
}
.cap-close-label {
  display: inline-block;
}

/* Work-in-progress banner — sits above the cap hero. Pixel-art SVG of
   a mechanic finishing the front-wheel swap; arm + sparks animated via
   CSS keyframes. Matches the retro 8-bit vibe of the pit-scuffle
   easter-egg on the index footer. */
.cap-wip {
  max-width: 72rem;
  margin: 0 auto 2.4rem;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background:
    linear-gradient(180deg, rgba(233, 180, 60, 0.07) 0%, rgba(233, 180, 60, 0.02) 100%);
  border: 1px solid rgba(233, 180, 60, 0.28);
  border-radius: 1.1rem;
}
.cap-wip-art {
  flex: 0 0 192px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cap-wip-svg {
  width: 192px;
  height: 96px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}
.cap-wip-text { flex: 1; min-width: 0; }
.cap-wip-eyebrow {
  display: inline-block;
  font: 600 0.7rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.55rem;
}
.cap-wip-title {
  font: 700 1.35rem/1.2 var(--font-display, 'Inter'), 'Inter', sans-serif;
  letter-spacing: -0.01em;
  color: var(--paper, #f5f0e8);
  margin: 0 0 0.45rem;
}
.cap-wip-sub {
  font: 400 0.92rem/1.5 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.7);
  margin: 0;
  max-width: 48ch;
}

/* Mechanic arm + wrench rotation — pivot at the shoulder, snap-step
   keyframes to keep the pixel-art look (no smooth interpolation). */
.cap-wip-svg .cap-wip-arm {
  transform-origin: 45px 18px;
  animation: cap-wip-wrench 0.6s steps(4) infinite;
}
@keyframes cap-wip-wrench {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-14deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* Sparks blink in/out staggered so the engine bay looks alive. */
.cap-wip-svg .cap-wip-sparks rect {
  animation: cap-wip-spark 0.6s steps(2) infinite;
}
.cap-wip-svg .cap-wip-sparks rect:nth-child(2) { animation-delay: 0.15s; }
.cap-wip-svg .cap-wip-sparks rect:nth-child(3) { animation-delay: 0.3s; }
.cap-wip-svg .cap-wip-sparks rect:nth-child(4) { animation-delay: 0.45s; }
@keyframes cap-wip-spark {
  0%, 49.999% { opacity: 0; }
  50%, 100%   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cap-wip-svg .cap-wip-arm,
  .cap-wip-svg .cap-wip-sparks rect { animation: none; }
}

@media (max-width: 720px) {
  .cap-wip {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .cap-wip-sub { margin-inline: auto; }
}

/* Hero */
.cap-hero {
  max-width: 72rem;
  margin: 0 auto 5rem;
  padding-top: 2rem;
}
.cap-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.cap-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.cap-lede {
  font-size: var(--text-body);
  line-height: 1.7;
  opacity: 0.7;
  max-width: 44rem;
}

/* Grid of blocks */
.cap-grid {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 7vh, 6rem);
}

/* Generic block */
.cap-block {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.cap-block--media-left,
.cap-block--media-right {
  grid-template-columns: 1.2fr 1fr;
}
.cap-block--media-right { direction: rtl; }
.cap-block--media-right > * { direction: ltr; }

/* Copy column */
.cap-copy { padding: 0.5rem 0; }
.cap-block-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 1rem;
}
.cap-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 1.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.cap-copy p {
  font-size: var(--text-body);
  line-height: 1.7;
  opacity: 0.7;
  max-width: 32rem;
}

/* Stats row inside a copy column */
.cap-stats {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.cap-stats li {
  display: flex;
  flex-direction: column;
}
.cap-stats strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.cap-stats span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Media placeholder slots — where you replace with real assets */
.cap-media-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #0e0e0e 0%, #161616 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.cap-media-placeholder:hover {
  border-color: rgba(195, 140, 29, 0.4);
  background: linear-gradient(135deg, #0e0e0e 0%, #1a1612 100%);
}
.cap-media-placeholder--video {
  aspect-ratio: 16/9;
}
.cap-media-placeholder--wide {
  aspect-ratio: 21/9;
}

.cap-slot-tag {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}
.cap-slot-id {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 2vw, 4rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
}
.cap-slot-hint {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  padding: 0 1.5rem;
  max-width: 28rem;
}

/* Gallery variant — 3-up */
.cap-block--gallery {
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.cap-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.cap-gallery .cap-media-placeholder {
  aspect-ratio: 4/5;
}

/* Wide variant — full-bleed media + caption below */
.cap-block--wide {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.cap-media--wide { width: 100%; }
.cap-copy--wide { max-width: 56rem; }

/* Metrics block */
.cap-block--metrics {
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: clamp(2.5rem, 5vh, 4rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cap-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.cap-metric {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cap-metric strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 1.6vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.cap-metric span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* Final CTA block */
.cap-block--cta {
  grid-template-columns: 1fr;
  text-align: center;
  padding: clamp(3rem, 6vh, 5rem) 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(195, 140, 29, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.cap-block--cta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.cap-block--cta p {
  font-size: var(--text-body);
  opacity: 0.6;
  margin: 0 auto 2rem;
  max-width: 28rem;
  line-height: 1.6;
}
.cap-cta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
  transition: opacity 0.3s, transform 0.3s;
}
.cap-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Responsive */
@media (min-width: 99999px) and (max-width: 900px) {
  .cap-block--media-left,
  .cap-block--media-right { grid-template-columns: 1fr; }
  .cap-block--media-right { direction: ltr; }
  .cap-gallery { grid-template-columns: 1fr; gap: 1rem; }
  .cap-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .cap-stats { gap: 1.5rem; }
}
@media (min-width: 99999px) and (max-width: 520px) {
  .cap-metrics-grid { grid-template-columns: 1fr; }
}

/* ─── Footer newsletter signup ──────────────────────────────────────
   Compact single-row in .site-footer: just a label + Subscribe button.
   Clicking the button opens .subscribe-modal which contains the actual
   form (first name + last name + email). Same pattern as the partners
   investor gate. ───────────────────────────────────────────────────── */
.footer-subscribe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem auto 0.25rem;
}
.footer-subscribe-label {
  font-family: var(--font-display), 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.62);
}
.footer-subscribe-btn {
  background: transparent;
  color: var(--paper, #f5f0e8);
  border: 1px solid rgba(245, 240, 232, 0.45);
  border-radius: 999px;
  padding: 0.62rem 1.4rem;
  font: 600 0.74rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.footer-subscribe-btn:hover {
  background: var(--paper, #f5f0e8);
  color: var(--ink, #160f13);
  border-color: var(--paper, #f5f0e8);
  transform: translateY(-1px);
}
.footer-subscribe-btn:focus-visible {
  outline: 2px solid rgba(214, 194, 143, 0.7);
  outline-offset: 3px;
}

/* ─── Investor / Partner gate modal ─────────────────────────────────
   Opens when the "See what we can do" / "Mira lo que podemos hacer"
   button is clicked on partners.html (and on index.html if it ever
   gets the same trigger). Blocks visitors who use a free-provider
   email or a disposable address. On success, sets a session flag and
   opens the showcase section behind it. ────────────────────────────── */
.pp-gate {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-power3);
}
.pp-gate[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.pp-gate-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 9, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pp-gate-card {
  position: relative;
  width: min(34rem, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: var(--ink, #160f13);
  color: var(--paper, #f5f0e8);
  border: 1px solid rgba(214, 194, 143, 0.22);
  border-radius: 1.05rem;
  padding: 2rem 1.85rem 1.85rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.3s var(--ease-power3);
}
.pp-gate[aria-hidden="false"] .pp-gate-card { transform: translateY(0) scale(1); }

.pp-gate-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  border: 0;
  color: rgba(245, 240, 232, 0.55);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: color 150ms ease, background 150ms ease;
}
.pp-gate-close:hover { color: var(--paper); background: rgba(255, 255, 255, 0.06); }

.pp-gate-eyebrow {
  font: 600 0.66rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(214, 194, 143, 0.85);
  margin: 0 0 0.6rem;
}
.pp-gate-title {
  font-family: var(--font-display), 'Inter', sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.15;
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
}
.pp-gate-sub {
  font: 400 0.92rem/1.5 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.7);
  margin: 0 0 1.5rem;
}

.pp-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.pp-gate-field { display: block; }
.pp-gate-field-label {
  display: block;
  font: 600 0.7rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 0.4rem;
}
.pp-gate-optional {
  color: rgba(245, 240, 232, 0.4);
  letter-spacing: 0.05em;
  text-transform: none;
  font-weight: 400;
}
.pp-gate-field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  padding: 0.8rem 0.95rem;
  color: var(--paper);
  font: 400 1rem/1.35 'Inter', system-ui, sans-serif;
  transition: border-color 180ms ease, background 180ms ease;
}
.pp-gate-field input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(214, 194, 143, 0.7);
}
.pp-gate-field input::placeholder { color: rgba(245, 240, 232, 0.32); }
.pp-gate-field input[aria-invalid="true"] { border-color: var(--state-error); }

.pp-gate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 520px) {
  .pp-gate-row { grid-template-columns: 1fr; }
}

.pp-gate-status {
  min-height: 1.4em;
  margin: 0.2rem 0 0;
  font: 400 0.82rem/1.4 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.65);
}
.pp-gate-status[data-state="error"]   { color: rgba(248, 113, 113, 0.92); }
.pp-gate-status[data-state="success"] { color: rgba(122, 220, 130, 0.92); }

.pp-gate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.pp-gate-cancel {
  background: transparent;
  border: 1px solid rgba(245, 240, 232, 0.25);
  color: var(--paper);
  border-radius: 0.45rem;
  padding: 0.7rem 1.15rem;
  font: 600 0.78rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}
.pp-gate-cancel:hover { border-color: rgba(245, 240, 232, 0.5); }
.pp-gate-submit {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 0.45rem;
  padding: 0.7rem 1.35rem;
  font: 600 0.78rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}
.pp-gate-submit:hover { transform: translateY(-1px); }
.pp-gate-submit:disabled { opacity: 0.5; cursor: progress; transform: none; }

/* Lock the page behind the gate while open. */
body.pp-gate-open { overflow: hidden; }

/* ─── Subscribe modal ──────────────────────────────────────────────
   Triggered from the footer Subscribe button on index.html and
   partners.html. Captures first name + last name + email and routes
   the submission through hubspot-subscribe.js as signup_source=news.
   Visually mirrors .pp-gate so both modals feel like one system. ─── */
.subscribe-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-power3);
}
/* CRITICAL: without this, [hidden]'s default display:none gets
   overridden by .subscribe-modal { display: flex } (same specificity
   but author rule wins). Result: the modal stays in the layout at
   z-index 260 even when "closed", and its WebGPU canvas (which has
   default pointer-events: auto) intercepts ALL clicks across the
   whole viewport. That breaks the mega-menu links, contact-section
   CTAs, and basically any clickable thing on the page. */
.subscribe-modal[hidden] {
  display: none !important;
}
.subscribe-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.subscribe-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 9, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.subscribe-modal-card {
  position: relative;
  width: min(40rem, 100%);
  /* Restored to the height the user previewed and loved (silver-grey
     lit-ground background filling the whole card). The jelly is pushed
     into the lower portion via camera target-Y in the WebGPU bundle
     (see /workspace/jelly-slider/src/jelly-slider/index.ts), NOT via
     card resize — resizing the canvas shifts the slider's projected
     screen position because of how the projection responds to aspect. */
  min-height: 36rem;
  /* Fallback for browsers without dvh support (older Safari < 15.4
     and older Chromium). Use dynamic viewport height when available
     so the modal doesn't get clipped by mobile Safari's collapsing
     address bar. */
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100dvh - 2.5rem);
  overflow: hidden;             /* clip canvas to rounded corners */
  background: var(--ink-deep);  /* identical to canvas-rendered ground */
  color: var(--paper, #f5f0e8);
  border: 1px solid rgba(214, 194, 143, 0.22);
  border-radius: 1.25rem;
  padding: 2.6rem 2.5rem 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.3s var(--ease-power3);
}
/* All modal children sit ABOVE the absolute-positioned jelly canvas. */
.subscribe-modal-card > *:not(.subscribe-jelly) {
  position: relative;
  z-index: 1;
}
.subscribe-modal[aria-hidden="false"] .subscribe-modal-card { transform: translateY(0) scale(1); }

/* High specificity to override the .subscribe-modal-card >
   *:not(.subscribe-jelly) rule that forces position:relative on all
   overlay children. Without this the X gets dropped into the normal
   flow at the top-left of the card instead of pinning to the corner. */
.subscribe-modal-card > .subscribe-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  border: 0;
  color: rgba(245, 240, 232, 0.55);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: color 150ms ease, background 150ms ease;
}
.subscribe-modal-close:hover { color: var(--paper); background: rgba(255, 255, 255, 0.06); }

.subscribe-modal-eyebrow {
  font: 600 0.66rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(214, 194, 143, 0.85);
  margin: 0 0 0.6rem;
}
.subscribe-modal-title {
  font-family: var(--font-display), 'Inter', sans-serif;
  font-size: clamp(1.85rem, 2.8vw, 2.3rem);
  line-height: 1.1;
  margin: 0 0 0.7rem;
  letter-spacing: -0.015em;
}
.subscribe-modal-sub {
  font: 400 1rem/1.5 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.7);
  margin: 0 0 1.8rem;
}

.subscribe-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.subscribe-modal-field { display: block; }
.subscribe-modal-field-label {
  display: block;
  font: 600 0.74rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 0.5rem;
}
.subscribe-modal-field input {
  width: 100%;
  /* Fully opaque to mask the WebGPU canvas painted behind. */
  background: var(--ink-deep);
  border: 1px solid rgba(245, 240, 232, 0.14);
  border-radius: 0.6rem;
  padding: 0.95rem 1.1rem;
  color: var(--paper);
  font: 400 1.05rem/1.35 'Inter', system-ui, sans-serif;
  transition: border-color 180ms ease, background 180ms ease;
  /* Suppress Safari's native input styling (inset shadow + faint
     gradient that creates a visible difference between Safari and
     Chrome on the dark modal). */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.subscribe-modal-field input:focus {
  outline: none;
  /* On focus the background drops to 20% opacity so the WebGPU
     canvas reads through — gives the input a "press to interact"
     transparency. Border highlights gold so it still reads as the
     active field. Earlier this used rgba(255,255,255,0.08) which
     looked different in Safari vs Chrome; rgba on the dark ink with
     alpha is consistent across both. */
  background: rgba(12, 8, 9, 0.2);
  border-color: rgba(214, 194, 143, 0.7);
}
.subscribe-modal-field input::placeholder { color: rgba(245, 240, 232, 0.32); }
.subscribe-modal-field input[aria-invalid="true"] { border-color: var(--state-error); }
/* Autofill: Safari (-webkit-autofill) paints a sickly yellow/blue
   over the input that ignores our dark theme. The 9999s inset-shadow
   trick is the standard way to repaint the autofill background. */
.subscribe-modal-field input:-webkit-autofill,
.subscribe-modal-field input:-webkit-autofill:hover,
.subscribe-modal-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper);
  -webkit-box-shadow: 0 0 0 9999px var(--ink-deep) inset;
  caret-color: var(--paper);
  transition: background-color 9999s ease 0s;
}

.subscribe-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 520px) {
  .subscribe-modal-row { grid-template-columns: 1fr; }
}

.subscribe-modal-status {
  min-height: 1.4em;
  margin: 0.2rem 0 0;
  font: 400 0.82rem/1.4 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.65);
}
.subscribe-modal-status[data-state="error"]   { color: rgba(248, 113, 113, 0.92); }
.subscribe-modal-status[data-state="success"] { color: rgba(122, 220, 130, 0.92); }

/* ─── WebGPU jelly-slider: full-modal background canvas ────────────
   The canvas is positioned ABSOLUTELY to fill the entire modal card.
   All other modal children (close X, eyebrow, title, sub, form, hint)
   sit on top with z-index 1, in document flow. There is no separate
   "slider section" — the canvas IS the modal background, and the
   slider is rendered in the lower portion by tilting the camera.
   This is what the user asked for in "Option 3" — one section, no
   visible seam, no clip-out at the canvas boundary. ─────────────── */
.subscribe-jelly {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 1.25rem;       /* clip canvas to modal's rounded corners */
  background: transparent;
  pointer-events: auto;          /* canvas catches its own drag events */
}
.subscribe-jelly-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  touch-action: none;            /* let the slider claim pointer drags */
  /* Safari mobile flashes a gray rectangle on tap by default — turn
     that off so the WebGPU drag feels native. */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
.subscribe-jelly-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  font: 400 0.92rem/1.5 'Inter', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.7);
  background: var(--ink-deep);
}
.subscribe-jelly-fallback p {
  margin: 0;
  max-width: 32ch;
}
/* Plain submit button shown to visitors whose browser can't run the
   WebGPU jelly slider (Firefox, older Safari, locked-down Chromium).
   Matches the modal's cream-on-ink palette so the fallback doesn't
   feel like a downgrade. */
.subscribe-jelly-fallback-submit {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(214, 194, 143, 0.92);
  color: #160f13;
  font: 600 0.88rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: background 0.18s var(--ease-power3), transform 0.18s var(--ease-power3);
}
.subscribe-jelly-fallback-submit:hover {
  background: rgba(232, 213, 165, 1);
  transform: translateY(-1px);
}
.subscribe-jelly-fallback-submit:focus-visible {
  outline: 2px solid rgba(214, 194, 143, 0.92);
  outline-offset: 3px;
}
/* The `hidden` HTML attribute is overridden by `display: flex` above, so
   we re-assert hiding explicitly. Only shown when JS removes [hidden]
   because WebGPU isn't supported on the visitor's browser. */
.subscribe-jelly-fallback[hidden] {
  display: none;
}
/* High specificity to win over the `.subscribe-modal-card > *:not(.subscribe-jelly)`
   rule that forces relative positioning on all overlay children. */
.subscribe-modal-card > .subscribe-jelly-hint {
  display: block;
  /* Pin to the bottom of the card so the jelly slider sits ABOVE this
     caption (form → silver background → slider pill → "slide to
     subscribe" label). Sitting in document flow right after the form
     would put the label above the slider, which reads wrong. */
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.2rem;
  z-index: 1;
  margin: 0;
  text-align: center;
  font: 600 0.72rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
  pointer-events: none;           /* don't block canvas drag below */
}

/* Lock the page behind the modal while open. */
body.subscribe-modal-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   HEADER LANGUAGE TOGGLE
   Small EN | ES switch in the top-right header chrome.
   Mirrors the .fs-menu-langs styling but tuned for header scale.
   Wired via i18n.js [data-lang] selectors.
   ═══════════════════════════════════════════════════════════ */
.header-langs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.header-langs button {
  background: none;
  border: 0;
  padding: 6px 3px;
  font: inherit;
  letter-spacing: inherit;
  color: currentColor;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--duration-fast, 0.18s), color var(--duration-fast, 0.18s);
}
.header-langs button:hover { opacity: 0.85; }
.header-langs button[aria-pressed="true"],
.header-langs button.is-active {
  opacity: 1;
  color: var(--gold);
}
.header-langs button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-header[data-tone="light"] .header-langs button:focus-visible {
  outline-color: rgba(22, 15, 19, 0.4);
}
/* Suppress focus ring after mouse click — keyboard nav still gets it via :focus-visible */
.header-langs button:focus:not(:focus-visible) { outline: none; }
.header-langs-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: 0.3;
  pointer-events: none;
}
/* Header tone awareness — inherit text color from data-tone */
.site-header[data-tone="dark"] .header-langs { color: var(--paper); }
.site-header[data-tone="light"] .header-langs { color: var(--ink); }

/* ─── Glass pill wrapping ALL header actions — HERO ONLY ────────────
   When the user is reading the hero section, the EN/ES toggle, CHAPTERS
   button, and hamburger all sit inside ONE glass capsule so they read
   against the busy video. The `.is-over-hero` class is toggled on the
   header by an IntersectionObserver in main.js — it leaves the pill on
   while the hero is intersecting the viewport and drops it the moment
   we scroll past. Constant glass, no hover state, no tone swap. */
.site-header.is-over-hero .header-actions {
  background: rgba(12, 8, 9, 0.22);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(245, 240, 232, 0.16);
  border-radius: var(--radius-pill, 999px);
  padding: 8px 22px;
  gap: 1.75rem;
  transition: background 0.5s var(--ease-power3),
              border-color 0.5s var(--ease-power3),
              padding 0.5s var(--ease-power3);
}
/* Tiny bit of inner spacing so the hamburger button's lines don't
   sit flush against the pill edge */
.site-header.is-over-hero .hamburger-btn {
  margin-right: 0;
  padding: 0 6px;
}
.site-header.is-over-hero .hamburger-btn span {
  width: calc(100% - 12px);
  left: 6px;
}

/* ── Always-on adaptive glass behind the header clusters ──
   The logo and the actions cluster (EN/ES · CHAPTERS · menu) each ride a
   subtle tone-matched glass pill, so they stay legible over ANY background —
   including the gradient/transition zones where the section tone no longer
   matches the pixels directly under the header. Contrast becomes
   item-vs-pill (always reliable) instead of item-vs-live-background. */
.brand,
.header-actions {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  transition: background 0.5s var(--ease-power3), border-color 0.5s var(--ease-power3);
}
.brand { padding: 5px 15px; }
.header-actions { padding: 8px 20px; }

.site-header[data-tone="dark"] .brand,
.site-header[data-tone="dark"] .header-actions {
  background: rgba(12, 8, 9, 0.32);
  border-color: rgba(245, 240, 232, 0.16);
}
.site-header[data-tone="light"] .brand,
.site-header[data-tone="light"] .header-actions {
  background: rgba(245, 240, 232, 0.6);
  border-color: rgba(22, 15, 19, 0.12);
}

/* ═══════════════════════════════════════════════════════════
   BRAND GRAPHIC ELEMENTS — Manual de Normas Gráficas v02
   .brand-lines — the logo's speed-line structure as a section
   divider (gold / silver / wine / silver / gold). Bars wipe in
   left→right on scroll via [data-reveal="lines"].
   ═══════════════════════════════════════════════════════════ */
.brand-lines {
  display: grid;
  gap: 7px;
  width: min(520px, 60%);
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}
.brand-lines span {
  display: block;
  height: 3px;
  border-radius: 0;
}
.brand-lines span:nth-child(1),
.brand-lines span:nth-child(5) { background: var(--gold); }
.brand-lines span:nth-child(2),
.brand-lines span:nth-child(4) { background: var(--ice); }
.brand-lines span:nth-child(3) { background: var(--plum); height: 8px; }
.brand-lines--left { margin: 0; }
/* Full-bleed dark band behind the index divider so it sits flush in the
   continuous dark tail (Partners → Contact), no paper strip between them. */
.brand-lines-band { background: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .brand-lines span { transform: none !important; }
}

