/* =============================================================
   SD DRIFT — South Dakota Drift
   Design system synthesized from Refero references:
   Ferrari (mono palette, single red, 0 radius, tracked labels)
   Champions4good (massive condensed display, italic emphasis)
   Freshman / Riptype / GT Planar (hairlines, mono metadata, boxed tags)
   ============================================================= */

:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --bg-3: #161616;
  --bg-4: #1e1e1e;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f4f4f4;
  --text-2: #c9c9c9;
  --muted: #8f8f8f;
  --dim: #8a8a8a;
  --accent: #ff2d95;
  --accent-deep: #b8106a;
  --violet: #7b2fff;
  --violet-deep: #4c1d95;
  --teal: #22e5d6;
  --livery: linear-gradient(100deg, #ff2d95 0%, #7b2fff 55%, #22e5d6 100%);
  --accent-ink: #0a0a0a;
  --white: #ffffff;
  /* Color theme hooks (the editor's Color theme setting overrides these; see cms/lib/themes.js) */
  --accent-rgb: 255, 45, 149;
  --violet-rgb: 123, 47, 255;
  --on-accent: #ffffff;
  --on-livery: #ffffff;
  --on-brand: #ffffff;
  --cta-em: #22e5d6;
  --logo-filter: none;

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --section: clamp(80px, 10vw, 150px);
  --section-sm: clamp(48px, 6vw, 88px);

  --display-xl: clamp(64px, 12.5vw, 190px);
  --display-lg: clamp(52px, 8vw, 128px);
  --display-md: clamp(36px, 4.6vw, 68px);
  --display-sm: clamp(26px, 2.6vw, 36px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, picture, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The pink ring vanishes on the pink call-to-action band and the pink sponsor tile, so those get a white ring with a dark edge around it. */
.cta-band :focus-visible, .sponsor--cta:focus-visible { outline-color: var(--white); box-shadow: 0 0 0 5px var(--accent-ink); }
[hidden] { display: none !important; }

/* Film grain overlay — subtle, sits above everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section--sm { padding: var(--section-sm) 0; }
.section--tight { padding-top: 0; }
.section--line { border-top: 1px solid var(--line); }
.section--surface { background: var(--bg-2); }
.section--ink { background: var(--white); color: var(--bg); }
.section--ink .label, .section--ink .muted { color: #6b6b6b; }
.section--ink .section-head { border-color: rgba(0, 0, 0, 0.14); }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
  padding-bottom: 28px;
  margin-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.section-head__aside { max-width: 420px; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.012em;
  margin: 0;
}
.display em { font-style: italic; color: var(--accent); font-weight: 800; }
.display--xl { font-size: var(--display-xl); letter-spacing: -0.02em; }
.display--lg { font-size: var(--display-lg); }
.display--md { font-size: var(--display-md); line-height: 0.92; }
.display--sm { font-size: var(--display-sm); line-height: 0.95; letter-spacing: 0; }
.display--outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: 0 0 auto; transform: skewX(-15deg); }
.label--plain::before { display: none; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.muted { color: var(--muted); }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.prose { max-width: 66ch; color: var(--text-2); }
.prose p + p { margin-top: 1.2em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); border-bottom: 1px solid var(--accent); }
.prose a:hover { color: var(--accent); }

.tag {
  display: inline-block;
  padding: 5px 8px 4px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  color: var(--accent);
  white-space: nowrap;
}
.tag--neutral { border-color: var(--line-strong); color: var(--muted); }
.tag--solid { background: var(--accent); color: var(--on-accent); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 30px;
  margin: 0 5px;
  font: 700 16px/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 0;
  color: var(--text);
  background: transparent;
  transition: transform 0.25s var(--ease), color 0.25s;
  white-space: nowrap;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--text);
  background: transparent;
  transform: skewX(-12deg);
  transition: box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn .btn__arrow { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover { transform: translate(-3px, -3px); }
.btn:hover::before { box-shadow: 4px 4px 0 var(--accent); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:active { transform: none; }
.btn:active::before { box-shadow: none; }
.btn--primary { color: var(--on-accent); }
.btn--primary::before { background: var(--accent); border-color: var(--accent); }
.btn--primary:hover::before { box-shadow: 4px 4px 0 var(--teal); }
.btn--ghost { color: var(--text-2); }
.btn--ghost::before { border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--text); }
.btn--ghost:hover::before { border-color: var(--text); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.section--ink .btn { color: var(--bg); }
.section--ink .btn::before { border-color: var(--bg); }
.section--ink .btn:hover::before { box-shadow: 4px 4px 0 var(--accent); }
.section--ink .btn--primary { color: var(--on-accent); }
.section--ink .btn--primary::before { border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 15px/1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s, color 0.2s, gap 0.25s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); color: var(--accent); gap: 16px; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled, body.menu-open .header {
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: 14px; position: relative; z-index: 210; }
.brand__logo { height: 45px; width: auto; display: block; filter: var(--logo-filter); }
.brand__mark {
  font: 900 30px/1 var(--font-display);
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  display: inline-flex;
  align-items: baseline;
}
.brand__mark i { font-style: italic; color: var(--accent); }
.brand__sub {
  font: 500 10px/1.1 var(--font-mono);
  white-space: nowrap;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 12px;
}
@media (max-width: 560px) { .brand__sub { display: none; } }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.nav__link {
  position: relative;
  white-space: nowrap;
  font: 600 14px/1 var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 0;
  transition: color 0.2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--white); }
.nav__link:hover::after, .nav__link.is-active::after { right: 0; }
.nav .btn { margin-left: 8px; }
/* The header links only give way to the pop-open menu when JavaScript is running to open it. */
@media (max-width: 1180px) { .js .nav { display: none; } }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 210;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line-strong);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); transition: transform 0.3s var(--ease), opacity 0.2s; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 1180px) {
  .js .nav-toggle { display: flex; }
  /* No JavaScript: the pop-open menu can never open, so the header keeps its own links and lets them wrap. */
  html:not(.js) .header { position: static; height: auto; padding: 10px 0 14px; background: var(--bg); border-bottom-color: var(--line); }
  html:not(.js) .header__inner { flex-wrap: wrap; gap: 10px 20px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 10px 18px; }
  html:not(.js) .menu { display: none; }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.55s var(--ease-out), visibility 0s linear 0.55s;
}
body.menu-open .menu { transform: none; visibility: visible; transition: transform 0.55s var(--ease-out); }
body.menu-open { overflow: hidden; }
.menu__list { display: grid; gap: 4px; }
.menu__link {
  display: flex; align-items: baseline; gap: 18px;
  font: 800 clamp(44px, 10vw, 84px)/0.95 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.3s var(--ease);
}
.menu__link small { font: 500 12px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--muted); }
.menu__link:hover, .menu__link.is-active { color: var(--accent); padding-left: 12px; }
.menu__foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 24px 40px; color: var(--muted); font-size: 13px; }
.menu__foot a { color: var(--text-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 40px) 0 0;
  overflow: hidden;
  isolation: isolate;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 55%;
  z-index: -2;
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease-out) forwards;
  filter: saturate(0.92) contrast(1.06);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.15) 35%, rgba(10,10,10,0.55) 70%, rgba(10,10,10,0.96) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0) 60%);
}
.hero__content { position: relative; padding-bottom: clamp(48px, 7vw, 96px); }
.hero__eyebrow { margin-bottom: clamp(20px, 3vw, 36px); }
.hero__title { max-width: 12ch; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 40px 64px;
  align-items: end;
  margin-top: clamp(28px, 4vw, 48px);
}
.hero__lede { max-width: 48ch; }
.hero__actions { margin-top: 28px; }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(6px);
}
.hero__stat { padding: 18px 16px; border-right: 1px solid var(--line); }
.hero__stat:last-child { border-right: 0; }
.hero__stat b { display: block; font: 800 40px/1 var(--font-display); letter-spacing: -0.01em; }
.hero__stat span { display: block; margin-top: 8px; font: 500 10px/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stats { max-width: 520px; }
}
.hero__credit {
  position: absolute; right: var(--gutter); top: calc(var(--header-h) + 18px);
  font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.45);
  writing-mode: vertical-rl;
}
@media (max-width: 760px) { .hero__credit { display: none; } }

/* Page hero (interior pages) */
.page-hero {
  padding: calc(var(--header-h) + clamp(56px, 9vw, 120px)) 0 clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 32px 64px; align-items: end; }
.page-hero__lede { color: var(--text-2); font-size: 17px; }
.page-hero .display--xl { font-size: clamp(56px, 10vw, 150px); }
@media (max-width: 900px) { .page-hero__grid { grid-template-columns: 1fr; } }
.page-hero--media { min-height: 62vh; display: flex; align-items: flex-end; }
.page-hero--media .page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(0.85) contrast(1.05); }
.page-hero--media .page-hero__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,10,10,0.6), rgba(10,10,10,0.35) 40%, rgba(10,10,10,0.95)); }

/* ---------- Ticker ---------- */
.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 14px 0;
}
.ticker--accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 22px;
  padding-right: 22px;
  font: 700 15px/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker__item::after { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.ticker--accent .ticker__item::after { background: var(--on-accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

.stripe {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, transparent 14px 28px);
  opacity: 0.9;
}

/* ---------- Next event / countdown ---------- */
.next-event {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.next-event__main { padding: clamp(28px, 4vw, 48px); border-right: 1px solid var(--line); }
.next-event__side { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.next-event__date { margin-top: 16px; }
.next-event__where { margin-top: 18px; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.next-event__where strong { color: var(--text); font-weight: 500; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.count__cell { background: var(--bg-2); padding: 18px 10px; text-align: center; }
.count__cell b { display: block; font: 800 clamp(36px, 4.4vw, 64px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.count__cell span { display: block; margin-top: 8px; font: 500 10px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.next-event__note { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .next-event { grid-template-columns: 1fr; }
  .next-event__main { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Schedule list ---------- */
.sched { border-top: 1px solid var(--line); }
.sched__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: center;
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.25s, padding-left 0.3s var(--ease);
}
.sched__row:hover { background: rgba(255,255,255,0.025); padding-left: 12px; }
.sched__date { display: flex; align-items: baseline; gap: 10px; }
.sched__month { font: 500 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.sched__days { font: 800 clamp(44px, 5vw, 72px)/0.9 var(--font-display); letter-spacing: -0.02em; }
.sched__days i { font-style: normal; color: var(--accent); font-size: 0.55em; margin: 0 4px; }
.sched__round { font: 500 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sched__title { font: 800 clamp(26px, 2.6vw, 38px)/1 var(--font-display); text-transform: uppercase; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sched__meta { margin-top: 10px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sched__status { position: absolute; left: 0; top: 0; transform: translateY(-50%); display: none; }
.sched__row.is-next .sched__status, .sched__row.is-past .sched__status { display: inline-block; }
/* Rounds that are over step back with a readable grey rather than fading out, so they stay legible all season. */
.sched__row.is-past { color: var(--muted); }
.sched__row.is-past:hover { color: var(--text-2); }
.sched__row.is-past .sched__days { color: var(--muted); }
.sched__row.is-past .sched__days i { color: var(--dim); }
.sched__row.is-past .btn { color: var(--muted); }
.sched__row.is-past .btn::before { border-color: var(--line); }
.sched__cta { justify-self: end; }
@media (max-width: 760px) {
  .sched__row { grid-template-columns: 1fr; gap: 14px; }
  .sched__cta { justify-self: start; }
}

/* ---------- Day timeline ---------- */
/* Steps wrap and stretch so every row fills edge to edge; divider lines are shadows clipped at the outer border. */
.timeline {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  overflow: hidden;
  counter-reset: step;
}
.timeline__step { position: relative; padding: 28px 22px 26px; counter-increment: step; flex: 1 1 200px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.timeline__step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 14px; right: 14px;
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--dim);
}
.timeline__step::after {
  content: ""; position: absolute; left: 22px; top: 0; width: 28px; height: 3px; background: var(--accent);
}
.timeline__time { display: block; font: 800 clamp(24px, 2.2vw, 34px)/1 var(--font-display); letter-spacing: -0.01em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.timeline__label { display: block; margin-top: 10px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.timeline__desc { margin-top: 12px; font-size: 14px; color: var(--muted); }
.timeline__step--hot { background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), transparent); }
@media (max-width: 560px) { .timeline__step { flex-basis: 150px; } }

/* ---------- Split (text + media) ---------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split--reverse > :first-child { order: 2; }
/* "Text and photo" with no photo yet: the words use the whole row instead of leaving half of it blank. */
.split--solo { grid-template-columns: minmax(0, 1fr); }
.split__media { position: relative; overflow: hidden; border: 1px solid var(--line); }
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; filter: saturate(0.85) contrast(1.05); transition: transform 1.2s var(--ease-out), filter 0.6s; }
.split__media:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.split__caption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 14px 18px;
  background: linear-gradient(0deg, rgba(10,10,10,0.9), transparent);
  font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
  display: flex; justify-content: space-between; gap: 12px;
}
.split__text .display { margin: 18px 0 22px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }

.fact-list { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 28px; }
.fact-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fact-list dt { font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fact-list dd { color: var(--text); overflow-wrap: anywhere; }

/* ---------- Driver cards ---------- */
.driver-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.driver-card { background: var(--bg); position: relative; display: flex; flex-direction: column; }
.driver-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; display: block; background: var(--bg-3); }
.driver-card__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) contrast(1.05); transition: transform 1s var(--ease-out), filter 0.5s; }
.driver-card:hover .driver-card__media img { transform: scale(1.05); filter: saturate(1) contrast(1.05); }
.driver-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,10,0.85) 0%, transparent 45%); }
.driver-card__idx {
  position: absolute; top: 18px; left: 18px; z-index: 1;
  font: 800 56px/1 var(--font-display); letter-spacing: -0.02em; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.7);
}
.driver-card__team { position: absolute; top: 22px; right: 18px; z-index: 1; }
.driver-card__name {
  position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 1;
  font: 800 clamp(30px, 3vw, 44px)/0.9 var(--font-display); text-transform: uppercase; letter-spacing: -0.01em;
}
.driver-card__name em { font-style: italic; color: var(--accent); }
.driver-card__body { padding: 20px 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.driver-card__body div { min-width: 0; }
.driver-card__body dt { font: 500 10px/1.5 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.driver-card__body dd { font: 700 17px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; margin-top: 2px; }
.driver-card__foot { padding: 0 22px 22px; margin-top: auto; }

/* Driver profile (full) */
.profile { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); padding: var(--section-sm) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.profile__sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.profile__media { border: 1px solid var(--line); overflow: hidden; aspect-ratio: 4 / 5; }
.profile__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); }
.profile__num { font: 800 clamp(60px, 8vw, 120px)/0.85 var(--font-display); color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.5); margin-bottom: 16px; }
.profile__name { margin: 12px 0 8px; }
.profile__name em { font-style: italic; color: var(--accent); }
.spec { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); margin: 28px 0; }
.spec > div { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec > div:nth-child(2n) { border-right: 0; }
.spec > div:nth-last-child(-n+2) { border-bottom: 0; }
.spec dt { font: 500 10px/1.5 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.spec dd { font: 800 clamp(20px, 1.8vw, 26px)/1.05 var(--font-display); text-transform: uppercase; margin-top: 6px; }
.qa { display: grid; gap: 28px; }
.qa__q { font: 800 clamp(20px, 1.8vw, 26px)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 10px; display: flex; gap: 12px; align-items: baseline; }
.qa__q::before { content: "Q"; font: 500 11px/1 var(--font-mono); color: var(--accent); letter-spacing: 0.1em; border: 1px solid var(--accent); padding: 4px 5px; }
.qa__a { color: var(--text-2); max-width: 66ch; }
.mods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mods li { font: 500 12px/1 var(--font-mono); letter-spacing: 0.04em; padding: 8px 10px; border: 1px solid var(--line-strong); color: var(--text-2); }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } .profile__sticky { position: static; } }

/* ---------- Sponsors ---------- */
/* Tiles wrap and stretch so every row fills edge to edge (no empty cells). */
.sponsor-grid { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sponsor { flex: 1 1 260px; background: var(--bg); padding: 28px 24px; min-height: 176px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 22px; position: relative; transition: background 0.25s; }
/* Names and details stop at two lines so every tile is the same height. */
.sponsor__name, .sponsor__meta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sponsor:hover { background: var(--bg-3); }
.sponsor::before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 3px; background: var(--accent); transition: width 0.35s var(--ease); }
.sponsor:hover::before { width: 100%; }
.sponsor__name { font: 800 clamp(22px, 2vw, 28px)/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; }
.sponsor__meta { font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sponsor--cta { background: linear-gradient(120deg, var(--accent), var(--violet)); color: var(--on-brand); }
.sponsor--cta:hover { background: var(--accent-deep); }
.sponsor--cta .sponsor__meta { color: var(--on-brand); opacity: 0.78; }
.sponsor--cta::before { display: none; }

/* ---------- Gallery strip ---------- */
.strip { border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); padding: 22px 0; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip__row { display: flex; gap: 0; width: max-content; padding: 0 var(--gutter); }
.strip__item { display: flex; align-items: center; gap: 18px; padding: 0 32px 0 0; margin-right: 32px; border-right: 1px solid var(--line); }
.strip__item:last-child { border-right: 0; }
.strip__item img { width: 150px; height: 92px; object-fit: cover; filter: saturate(0.8) contrast(1.05); transition: filter 0.4s; }
.strip__item:hover img { filter: saturate(1) contrast(1.05); }
.strip__item b { display: block; font: 700 15px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; }
.strip__item span { display: block; margin-top: 6px; font: 500 10px/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.photo-grid figure { position: relative; overflow: hidden; background: var(--bg); aspect-ratio: 3 / 2; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); transition: transform 1s var(--ease-out), filter 0.5s; }
.photo-grid figure:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.photo-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: linear-gradient(0deg, rgba(10,10,10,0.9), transparent); font: 500 10px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.photo-grid .span-7 { grid-column: span 7; }
.photo-grid .span-5 { grid-column: span 5; }
.photo-grid .span-4 { grid-column: span 4; }
.photo-grid .span-8 { grid-column: span 8; }
.photo-grid .span-6 { grid-column: span 6; }
@media (max-width: 760px) { .photo-grid > * { grid-column: span 12 !important; } }

/* ---------- Rules / numbered list ---------- */
.rules { counter-reset: rule; border-top: 1px solid var(--line); }
.rule { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px 40px; padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); counter-increment: rule; }
.rule::before { content: counter(rule, decimal-leading-zero); font: 800 clamp(48px, 6vw, 88px)/0.85 var(--font-display); color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.45); }
.rule__title { font: 800 clamp(26px, 2.8vw, 40px)/1 var(--font-display); text-transform: uppercase; }
.rule__title em { font-style: italic; color: var(--accent); }
.rule__body { margin-top: 12px; color: var(--text-2); max-width: 66ch; }
.rule__body p + p { margin-top: 0.8em; }
@media (max-width: 640px) { .rule { grid-template-columns: 1fr; gap: 8px; } }

/* Boxes wrap and stretch so every row fills edge to edge, whether there are 2 boxes or 3. */
.tier-grid { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 20px; }
.tier { background: var(--bg-2); padding: 24px 22px; flex: 1 1 200px; }
.tier b { display: block; font: 800 clamp(30px, 3vw, 44px)/0.9 var(--font-display); letter-spacing: -0.01em; }
.tier span { display: block; margin-top: 10px; font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.tier p { margin-top: 10px; font-size: 14px; color: var(--text-2); }
@media (max-width: 720px) { .tier { flex-basis: 100%; } }

.checklist { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.checklist li { background: var(--bg); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; font-size: 15px; color: var(--text-2); flex: 1 1 300px; }
.checklist li::before { content: ""; flex: 0 0 auto; width: 14px; height: 14px; margin-top: 4px; border: 1px solid var(--accent); background: linear-gradient(135deg, var(--accent) 50%, transparent 50%); }
.checklist li strong { color: var(--text); font-weight: 600; }

.tech-sheet { border: 1px solid var(--line); background: var(--white); }
.tech-sheet img { width: 100%; height: auto; }

details.faq { border-bottom: 1px solid var(--line); }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font: 800 clamp(20px, 1.9vw, 26px)/1.05 var(--font-display); text-transform: uppercase; transition: color 0.2s; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font: 400 28px/1 var(--font-display); color: var(--accent); transition: transform 0.3s var(--ease); }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq summary:hover { color: var(--accent); }
details.faq .faq__body { padding: 0 0 24px; color: var(--text-2); max-width: 70ch; }
details.faq .faq__body a { color: var(--text); border-bottom: 1px solid var(--accent); }

/* ---------- Store / passes ---------- */
.pass-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pass { background: var(--bg-2); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 22px; position: relative; overflow: hidden; }
.pass--hot { background: var(--bg); }
.pass--hot::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.pass__name { font: 800 clamp(30px, 3vw, 44px)/0.95 var(--font-display); text-transform: uppercase; }
.pass__price { font: 800 clamp(56px, 6vw, 88px)/0.9 var(--font-display); letter-spacing: -0.02em; display: flex; align-items: flex-start; gap: 4px; }
.pass__price sup { font-size: 0.4em; margin-top: 0.3em; color: var(--accent); }
.pass__list { display: grid; gap: 10px; color: var(--text-2); font-size: 15px; }
.pass__list li { display: flex; gap: 12px; }
.pass__list li::before { content: ""; width: 8px; height: 8px; background: var(--accent); margin-top: 8px; flex: 0 0 auto; }
.pass__foot { margin-top: auto; }

.notice { border: 1px solid var(--line-strong); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; background: var(--bg-2); font-size: 15px; color: var(--text-2); }
.notice::before { content: "!"; font: 800 22px/1 var(--font-display); color: var(--accent); border: 1px solid var(--accent); width: 32px; height: 32px; display: grid; place-items: center; }
.notice strong { color: var(--text); font-weight: 600; }
.notice a { color: var(--text); border-bottom: 1px solid var(--accent); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.contact-list { display: grid; border-top: 1px solid var(--line); }
.contact-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 500 11px/1.8 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { overflow-wrap: anywhere; }
.contact-list dd a { font: 800 clamp(20px, 2vw, 28px)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.contact-list dd a:hover { color: var(--accent); border-color: var(--accent); }
.contact-list dd p { color: var(--text-2); font-size: 15px; }
/* On a narrow phone a long email or address needs the whole width, so the label moves above it. */
@media (max-width: 560px) {
  .contact-list > div, .fact-list > div { grid-template-columns: 1fr; gap: 8px; }
}
.map { border: 1px solid var(--line); aspect-ratio: 4 / 3; filter: grayscale(1) invert(0.92) contrast(1.1); background: var(--bg-3); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.form { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.field { background: var(--bg-2); padding: 16px 18px 14px; display: grid; gap: 8px; }
.field label { font: 500 10px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  color: var(--text); font: 400 16px/1.4 var(--font-body); padding: 6px 0 8px; outline: 0; border-radius: 0;
  transition: border-color 0.2s;
}
.field select { appearance: none; -webkit-appearance: none; }
.field select option { background: var(--bg-2); color: var(--text); }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.form__foot { background: var(--bg-2); padding: 18px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; }
.form__hint { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form__row { grid-template-columns: 1fr; } }

/* ---------- History timeline ---------- */
.history { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.history__item { background: var(--bg); padding: 28px 24px 30px; position: relative; flex: 1 1 240px; }
.history__item::before { content: ""; position: absolute; top: 0; left: 24px; width: 32px; height: 3px; background: var(--accent); }
.history__year { font: 800 clamp(48px, 5vw, 80px)/0.9 var(--font-display); letter-spacing: -0.02em; }
.history__title { margin-top: 12px; font: 700 14px/1.3 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; }
.history__desc { margin-top: 10px; font-size: 14px; color: var(--muted); }

.values { display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 48px); }
.value { border-top: 2px solid var(--accent); padding-top: 18px; flex: 1 1 240px; }
.value h3 { font: 800 clamp(24px, 2.2vw, 32px)/1 var(--font-display); text-transform: uppercase; }
.value p { margin-top: 12px; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .value { flex-basis: 100%; } }

/* ---------- Big statement / CTA band ---------- */
.statement { padding: var(--section) 0; text-align: left; position: relative; overflow: hidden; }
.statement .display--xl { max-width: 10ch; }
.statement__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; }
@media (max-width: 860px) { .statement__grid { grid-template-columns: 1fr; } }
.statement__bg {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 80% 50%, rgba(var(--violet-rgb), 0.22), transparent 70%);
}

.cta-band { background: linear-gradient(100deg, var(--accent) 0%, var(--violet) 100%); color: var(--on-brand); padding: var(--section-sm) 0; position: relative; overflow: hidden; }
.cta-band > .container { position: relative; z-index: 1; }
.cta-band .display { color: var(--on-brand); font-style: italic; }
.cta-band .display em { color: var(--cta-em); background: none; -webkit-text-fill-color: var(--cta-em); }
.cta-band .label { color: var(--on-brand) !important; opacity: 0.85; }
.cta-band .label::before { background: var(--cta-em); }
.cta-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.cta-band .btn { color: var(--on-brand); }
.cta-band .btn::before { border-color: var(--on-brand); }
.cta-band .btn.btn--primary { color: var(--white); }
.cta-band .btn:hover::before { box-shadow: 4px 4px 0 var(--teal); }
.cta-band .btn--primary::before { background: var(--accent-ink); border-color: var(--accent-ink); }
.cta-band .btn--primary:hover::before { box-shadow: 4px 4px 0 var(--white); }
.cta-band .muted { color: var(--on-brand); opacity: 0.85; }
.cta-band .livery--bg { position: absolute; right: -4%; bottom: -35%; width: 62%; height: auto; opacity: 0.55; z-index: 0; }
.cta-band .livery--bg .livery__a { fill: var(--on-brand); opacity: 0.22; }
.cta-band .livery--bg .livery__b { fill: var(--accent-ink); opacity: 0.35; }
.cta-band .livery--bg .livery__c { fill: var(--teal); }
@media (max-width: 760px) { .cta-band__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg); padding: clamp(48px, 6vw, 88px) 0 32px; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__brand .brand__mark { font-size: 44px; }
.footer__tag { margin-top: 12px; color: var(--muted); max-width: 36ch; font-size: 14px; }
.footer__logo { width: 300px; max-width: 100%; height: auto; filter: var(--logo-filter); }
.footer__head { font: 500 11px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer__list { display: grid; gap: 10px; }
.footer__list a { font: 700 16px/1.2 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); transition: color 0.2s, padding-left 0.25s var(--ease); }
.footer__list a:hover, .footer__list a.is-active { color: var(--accent); padding-left: 6px; }
.footer__list p { font-size: 14px; color: var(--text-2); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 22px; font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.footer__bottom a { color: var(--muted); }
.footer__bottom a:hover { color: var(--accent); }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
/* Only hidden while the script that reveals them is running: without JavaScript every section shows straight away. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* Hero entrance */
.hero .hero__eyebrow, .hero .hero__title, .hero .hero__grid { opacity: 0; transform: translateY(30px); animation: rise 1s var(--ease-out) forwards; }
.hero .hero__title { animation-delay: 0.15s; }
.hero .hero__grid { animation-delay: 0.35s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero .hero__eyebrow, .hero .hero__title, .hero .hero__grid { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}

/* ---------- Utilities ---------- */
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; } .mt-4 { margin-top: 48px; } .mt-5 { margin-top: 72px; }
.mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 14px; background: var(--accent); color: var(--on-accent); font: 700 13px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; transition: top 0.2s; }
.skip-link:focus { top: 12px; }

/* Timeline AM/PM suffix */
.timeline__time small { font-size: 0.45em; font-weight: 700; letter-spacing: 0.08em; margin-left: 4px; color: var(--muted); }


/* =============================================================
   LIVERY / SPEED - Drift Riot FC RX-7 palette (magenta / violet / teal)
   ============================================================= */
.livery { display: block; pointer-events: none; }
.livery__a { fill: var(--accent); }
.livery__b { fill: var(--violet); }
.livery__c { fill: var(--teal); }

/* Italic, forward-leaning display type on the home page */
.home .display { font-style: italic; }
.home .display em {
  background: var(--livery);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}
.home .hero__stat b, .home .count__cell b, .home .sched__days, .home .timeline__time { font-style: italic; }

/* Hero: livery tint over the photo, focus-pull entrance, speed streaks, slash graphic */
.hero__tint {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, var(--accent) 0%, var(--violet) 52%, var(--teal) 100%);
  mix-blend-mode: color;
  opacity: 0.82;
}
.home .hero__img { animation: heroIn 1.6s var(--ease-out) both, heroDrift 16s var(--ease-out) 1.6s forwards; }
@keyframes heroIn {
  from { transform: scale(1.16) translateX(-3%); filter: blur(12px) saturate(0.9) contrast(1.06); }
  to   { transform: scale(1.06) translateX(0); filter: blur(0) saturate(0.92) contrast(1.06); }
}
@keyframes heroDrift { to { transform: scale(1); } }
.hero__content { z-index: 2; }

.hero__streaks { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hero__streaks i {
  position: absolute; left: 100%;
  width: 38vw; height: 3px;
  color: var(--teal);
  background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 60%, transparent);
  opacity: 0.9;
  filter: drop-shadow(0 0 8px currentColor);
  animation: streak 2.2s linear infinite;
}
.hero__streaks i:nth-child(1) { top: 16%; width: 30vw; animation-duration: 2.6s; }
.hero__streaks i:nth-child(2) { top: 26%; color: var(--accent); animation-delay: -1.1s; }
.hero__streaks i:nth-child(3) { top: 40%; color: #fff; height: 2px; opacity: 0.6; width: 50vw; animation-duration: 1.7s; animation-delay: -0.4s; }
.hero__streaks i:nth-child(4) { top: 52%; color: var(--violet); height: 3px; animation-duration: 2.9s; animation-delay: -2s; }
.hero__streaks i:nth-child(5) { top: 62%; width: 24vw; animation-duration: 1.9s; animation-delay: -0.9s; }
.hero__streaks i:nth-child(6) { top: 71%; color: var(--accent); height: 1px; width: 46vw; opacity: 0.6; animation-duration: 2.4s; animation-delay: -1.6s; }
.hero__streaks i:nth-child(7) { top: 81%; color: #fff; height: 2px; opacity: 0.45; animation-duration: 1.5s; animation-delay: -0.2s; }
.hero__streaks i:nth-child(8) { top: 90%; width: 34vw; animation-duration: 2.1s; animation-delay: -1.3s; }
@keyframes streak { to { transform: translateX(calc(-100vw - 100%)); } }

.hero__livery {
  position: absolute; right: -6vw; bottom: -2vw; z-index: 1;
  width: min(78vw, 1100px); height: auto;
  opacity: 0.85;
  mix-blend-mode: screen;
  animation: slashIn 1.2s var(--ease-out) 0.3s both;
}
@keyframes slashIn { from { transform: translateX(18%) skewX(-8deg); opacity: 0; } to { transform: none; opacity: 0.85; } }
@media (max-width: 760px) { .hero__livery { width: 130vw; right: -40vw; opacity: 0.6; } }

.home .hero__stats, .home .next-event { position: relative; }
.home .hero__stats::before, .home .next-event::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px;
  background: var(--livery); z-index: 1;
}
.home .hero .btn--primary::before { background: linear-gradient(100deg, var(--accent), var(--violet)); border-color: transparent; }

/* Tilted livery stripe ticker */
.ticker--tilt {
  transform: skewY(-1.5deg);
  background: var(--livery);
  border: 0;
  color: var(--on-livery);
  padding: 16px 0;
  margin: 8px 0 28px;
}
.ticker--tilt .ticker__item { transform: skewY(1.5deg); }
.ticker--tilt .ticker__item::after { background: var(--on-livery); }
.ticker--tilt .ticker__track { animation-duration: 26s; }

/* Faint slash graphics behind sections */
.section--livery { overflow: hidden; }
.section--livery > .container { position: relative; z-index: 1; }
.section--livery .livery--bg { position: absolute; right: -8%; top: -8%; width: 70%; height: auto; opacity: 0.10; z-index: 0; }
.section--livery .livery--bg .livery__a { fill: var(--violet); }
.section--livery .livery--bg .livery__b { fill: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hero__streaks { display: none; }
  .hero__livery { animation: none; opacity: 0.85; }
  .home .hero__img { animation: none; transform: none; filter: saturate(0.92) contrast(1.06); }
}

/* ---------- Proof capture mode (?proof=1): static, everything visible, canvas keyed green for auto-crop ---------- */
html.proof { background: #00ff00; }
html.proof body { background: var(--bg); }
html.proof body::after { display: none; }
html.proof .hero { min-height: 900px; }
html.proof .page-hero--media { min-height: 560px; }
html.proof .reveal { opacity: 1; transform: none; transition: none; }
html.proof .hero .hero__eyebrow, html.proof .hero .hero__title, html.proof .hero .hero__grid { opacity: 1; transform: none; animation: none; }
html.proof .hero__img { animation: none; transform: none; filter: saturate(0.92) contrast(1.06); }
html.proof .hero__livery { animation: none; opacity: 0.85; }
html.proof .hero__streaks i { animation: none; transform: translateX(-60vw); }
html.proof .ticker__track { animation: none; }

/* ---------- Editable-site additions ---------- */
/* Sponsor logos sit on a small white chip so any logo reads on the dark tiles */
/* Sponsor logos: a logo takes the place of the sponsor's name. Logo and text sit centered in equal-height tiles. */
.sponsor-grid--logos .sponsor { min-height: 220px; gap: 18px; }
.sponsor__logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; height: 96px; width: 100%; }
.sponsor__logo img { display: block; max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.sponsor__logo--mono img { filter: brightness(0) invert(1); opacity: 0.86; transition: opacity 0.25s; }
.sponsor:hover .sponsor__logo--mono img { opacity: 1; }
.sponsor__logo--color { width: auto; max-width: 100%; background: #fff; border-radius: 4px; padding: 10px 14px; }
.sponsor--cta .sponsor__logo { display: none; }
/* Links typed into step and info-box text */
.rule__body a, .tier p a, .qa__a a, .timeline__desc a, .next-event__note a { color: var(--text); border-bottom: 1px solid var(--accent); }
.rule__body a:hover, .tier p a:hover, .qa__a a:hover { color: var(--accent); }
.strip__item { color: inherit; }

/* ---------- Gallery: fixed row heights so every row fills edge to edge (no empty corners) ---------- */
.photo-grid { grid-auto-rows: clamp(200px, 26vw, 400px); }
.photo-grid figure { aspect-ratio: auto; height: 100%; margin: 0; }
.photo-grid figure > a { display: block; height: 100%; cursor: zoom-in; }
.photo-grid figcaption { pointer-events: none; }
.photo-grid .span-12 { grid-column: span 12; }
@media (max-width: 760px) {
  .photo-grid { grid-auto-rows: auto; }
  .photo-grid figure { aspect-ratio: 3 / 2; height: auto; }
}

/* ---------- Photo drops ---------- */
.drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.drop-card { background: var(--bg); display: flex; flex-direction: column; }
.drop-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-3); }
.drop-card__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); transition: transform 1s var(--ease-out), filter 0.5s; }
.drop-card:hover .drop-card__media img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }
.drop-card__count { position: absolute; left: 16px; bottom: 16px; }
.drop-card__body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.drop-card__meta, .drop-meta { font: 500 11px/1.5 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.drop-card__title { font: 800 clamp(26px, 2.4vw, 34px)/0.95 var(--font-display); text-transform: uppercase; letter-spacing: -0.005em; }
.drop-card__title a:hover { color: var(--accent); }
/* Justified rows: each photo keeps roughly its own shape, and every row (including the last) fills edge to edge. */
.drop-gallery { --row: clamp(150px, 19vw, 280px); display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.drop-gallery__item { flex: var(--ar, 1.5) 1 calc(var(--ar, 1.5) * var(--row)); height: var(--row); min-width: 0; display: block; overflow: hidden; background: var(--bg-3); cursor: zoom-in; }
.drop-gallery__item img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.05); transition: transform 0.8s var(--ease-out), filter 0.4s; }
.drop-gallery__item:hover img, .drop-gallery__item:focus-visible img { transform: scale(1.05); filter: saturate(1) contrast(1.05); }
.drop-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: clamp(32px, 4vw, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.drop-nav > :last-child { justify-self: end; text-align: right; }
@media (max-width: 760px) {
  /* Taller rows so a phone shows one or two real photos per row instead of a stack of thin bands. */
  .drop-gallery { --row: clamp(180px, 26vw, 240px); }
  /* A photo left on its own in a row keeps its own shape instead of being sliced into a wide band. */
  .drop-gallery__item { height: auto; aspect-ratio: var(--ar, 1.5); }
  .drop-nav { grid-template-columns: 1fr; justify-items: start; }
  .drop-nav > :last-child { justify-self: start; text-align: left; }
  .drop-nav > span:empty { display: none; }
}

/* ---------- Lightbox (tap a photo to see it full size) ---------- */
.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 9600; background: rgba(5, 5, 5, 0.96); display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; }
.lightbox__figure { grid-column: 2; margin: 0; display: grid; justify-items: center; align-content: center; gap: 14px; height: 100svh; padding: 64px 0 28px; }
.lightbox__figure img { max-width: 100%; max-height: calc(100svh - 132px); object-fit: contain; }
.lightbox__figure figcaption { font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); text-align: center; min-height: 1.4em; }
.lightbox button { width: 52px; height: 52px; display: grid; place-items: center; color: var(--text); border: 1px solid var(--line-strong); background: rgba(10, 10, 10, 0.7); font: 500 22px/1 var(--font-body); transition: border-color 0.2s, color 0.2s; }
.lightbox button:hover { border-color: var(--accent); color: var(--accent); }
.lightbox__prev { grid-column: 1; grid-row: 1; justify-self: center; }
.lightbox__next { grid-column: 3; grid-row: 1; justify-self: center; }
.lightbox__close { position: absolute; top: 14px; right: 14px; }
.lightbox__count { position: absolute; top: 32px; left: 24px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--muted); }
@media (max-width: 760px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); }
  .lightbox__figure { grid-column: 1; grid-row: 1; padding: 72px 8px 96px; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 22px; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
}
