/* OVERDRIVE 009 — shared design language for the landing page, Overdrive Scout and the legal pages.
   The palette is taken from the field: graphite from the arena walls, the grey of the foam tiles, the warm paper of the
   venue's late-afternoon light, and one accent, the Red squad's red (Overdrive 009 drives Red 1). Big Shoulders
   Display, a condensed industrial grotesque, sets display type and figures; Schibsted Grotesk sets everything you
   read and tap, small uppercase labels included. Both are self-hosted (assets/fonts, SIL OFL). Frosted glass is kept
   for chrome that floats over the 3D venue (the nav, sheets, toasts); everything in the flow of a page is a solid
   surface with a hairline edge and a one-pixel top light. A fine film grain sits over every page. Motion is slow
   and weighted (ease-out, no overshoot).
   Layout: mobile-first. Stacked below 768 px and on portrait tablets; split (copy beside the 3D stage) from 768 px
   landscape up; the content measure caps at 1180 px from 1280 px. Spacing comes from the --s-* scale. */
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../assets/fonts/big-shoulders-display.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/schibsted-grotesk.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400; font-display: swap; src: url('../assets/fonts/schibsted-grotesk-italic.woff2') format('woff2'); }
:root {
  color-scheme: dark;
  --ink: #14171b;             /* arena wall graphite, a shade deeper */
  --ink-2: #1b1e23;           /* the wall itself (COLORS.wall) */
  --ink-3: #24282e;
  --cream: #ede6da;           /* paper in late-afternoon light */
  --cream-2: #d9d0c1;
  --text: #ede6da;            /* 14.6:1 on ink */
  --muted: #a3a8af;           /* the foam tiles, lifted: 7.6:1 on ink */
  --faint: #878d95;           /* 5.4:1 on ink, 4.9:1 on the raised surface: the floor for small print */
  --line: rgba(237, 230, 218, 0.12);
  --line-2: rgba(237, 230, 218, 0.21);
  --od: #e4483f;              /* the one accent: the Red squad's red, lifted for dark ground (4.6:1 on ink) */
  --od-2: #f2786d;            /* accent as text and focus (6.8:1 on ink) */
  --od-soft: rgba(228, 72, 63, 0.14);
  --od-fill: #c4202b;         /* the squad red itself as a button fill: cream text on it passes AA (5.0:1) */
  --od-fill-hi: #ab1b25;
  --red: #d23a40; --blue: #3d64d8; --gold: #d9a441; --green: #4fb58a; --danger: #e5564d;
  --serif: 'Big Shoulders Display', sans-serif;
  --font: 'Schibsted Grotesk', sans-serif;
  --mono: 'Schibsted Grotesk', sans-serif;
  --display: var(--serif);
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* entrances: fast start, long settle, no overshoot */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);        /* exits and swaps */
  --slow: 0.6s;
  --r: 16px; --r-sm: 10px; --pill: 999px;
  /* spacing: a 4 px base, doubling at the large end */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: 20px; --wrap: 1180px;
  /* solid surfaces for anything in the page flow, with a one-pixel top light for depth */
  --surface: rgba(24, 27, 32, 0.94);
  --surface-2: rgba(31, 35, 41, 0.96);
  --top-light: inset 0 1px 0 rgba(237, 230, 218, 0.05);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --pane: rgba(20, 23, 27, 0.72);
  --pane-strong: rgba(20, 23, 27, 0.9);
  --frost: blur(22px) saturate(1.15);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; }
body { margin: 0; background: var(--ink); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* film grain over everything: one tiled noise image, plain alpha (no blend mode, so it costs nothing per frame) */
body::after { content: ''; position: fixed; inset: 0; z-index: 150; pointer-events: none; background: var(--grain); opacity: 0.045; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.skip { position: fixed; z-index: 200; left: var(--s-4); top: calc(var(--s-4) + var(--safe-t)); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--cream); color: var(--ink); font-weight: 600; text-decoration: none; transform: translateY(-120px); transition: transform 0.3s var(--ease); }
.skip:focus { transform: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--od-2); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(228, 72, 63, 0.35); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.mono { font-family: var(--mono); }
.eyebrow { margin: 0; font: 600 11.5px/1.55 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.od-text { color: var(--od-2); }
em, .it { font-style: italic; }
/* in display type the second voice is a change of tone, not a slant (the display face has no italic) */
:is(h1, h2, h3) em { font-style: normal; color: var(--muted); }

/* ------------------------------------------------------------------ surfaces
   Floating chrome (nav, sheets, toasts) is frosted; everything in the page flow is a solid surface. */
.glass, .nav, .sheet, .toast {
  position: relative;
  background: var(--pane);
  border: 1px solid var(--line);
  backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
}
.glass.strong, .sheet, .toast { background: var(--pane-strong); }
.b-glass, .chip, .seg, .field, .card, .stepper, .tile { position: relative; background: var(--surface); border: 1px solid var(--line); }
.card, .stepper, .seg { box-shadow: var(--top-light); }
.card.strong { background: var(--surface-2); }
.card { border-radius: var(--r); padding: var(--s-5); }
.tile { border-radius: var(--r-sm); }

/* ------------------------------------------------------------------ buttons */
.b { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px; border: 1px solid transparent;
  border-radius: var(--r-sm); font-weight: 500; font-size: 15px; letter-spacing: 0.005em; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease), opacity 0.2s; -webkit-tap-highlight-color: transparent; }
.b:active { transform: scale(0.98); transition-duration: 0.12s; }
.b:disabled, .b[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.b-primary { background: var(--cream); color: var(--ink); }
.b-primary:hover { background: #f7f2e9; }
.b-od { background: var(--od-fill); color: var(--cream); }
.b-od:hover { background: var(--od-fill-hi); }
.b-glass { color: var(--text); border-color: var(--line-2); }
.b-glass:hover { background: var(--surface-2); border-color: rgba(237, 230, 218, 0.32); }
.b-ghost { background: transparent; color: var(--muted); }
.b-ghost:hover { color: var(--text); background: rgba(237, 230, 218, 0.06); }
.b-danger { background: transparent; color: #f0a39c; border-color: rgba(224, 88, 79, 0.45); }
.b-danger:hover { background: rgba(224, 88, 79, 0.12); }
.b.lg { height: 54px; padding: 0 28px; font-size: 16px; }
.b.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.b.icon { width: 46px; padding: 0; }
.b.sm.icon { width: 36px; }
.b.block { display: flex; }
.b .arrow { transition: transform 0.4s var(--ease); }
.b:hover .arrow { transform: translateX(3px); }
.b-google { background: #fff; color: #1f1f1f; gap: 12px; }
.b-google:hover { background: #f1f1f1; }
.b-google svg { width: 20px; height: 20px; }
.lnk-u { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color 0.3s var(--ease); }
.lnk-u:hover { text-decoration-color: var(--od-2); }

/* ------------------------------------------------------------------ top navigation */
.nav { position: fixed; z-index: 50; top: calc(14px + var(--safe-t)); left: 14px; right: 14px; max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px 0 18px; border-radius: 14px; view-transition-name: od-nav; }
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--serif); letter-spacing: 0.02em; text-transform: uppercase; margin-right: auto; }
.nav .brand .num { font: 600 11.5px/1 var(--mono); letter-spacing: 0.1em; color: var(--od-2); padding: 0; background: none; }
.nav a.lnk { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; transition: color 0.3s var(--ease); }
.nav a.lnk:hover, .nav a.lnk[aria-current="page"] { color: var(--text); }
.nav a.lnk { position: relative; }
.nav a.lnk::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 1px; background: var(--od-2); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
.nav a.lnk:hover::after, .nav a.lnk[aria-current="page"]::after { transform: none; }
.mark { width: 26px; height: 26px; flex: none; }

/* ------------------------------------------------------------------ form controls */
label.lab, .lab { display: block; margin: 0 0 8px 2px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field { display: flex; align-items: center; min-height: 50px; border-radius: var(--r-sm); padding: 0 16px; gap: 10px; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.field:focus-within { border-color: var(--od-2); box-shadow: 0 0 0 3px rgba(242, 120, 109, 0.2); }
.field input, .field select, .field textarea { flex: 1 1 0; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 14px 0; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field select option { background: var(--ink-2); color: var(--text); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.field .suf { color: var(--faint); font: 500 11px var(--mono); }
.chev { pointer-events: none; color: var(--faint); }
.help { margin: 8px 2px 0; color: var(--faint); font-size: 13px; line-height: 1.5; }
.err { margin: 10px 2px 0; color: #f0a39c; font-size: 14px; min-height: 1em; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 12px; }
.seg button { height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; transition: background-color 0.35s var(--ease), color 0.35s var(--ease); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.seg.red button[aria-pressed="true"] { background: var(--red); color: #f7f2e9; }
.seg.blue button[aria-pressed="true"] { background: var(--blue); color: #f7f2e9; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: var(--pill); color: var(--cream-2); font-weight: 500; font-size: 13.5px; background: transparent; transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
.chip[aria-pressed="true"] { background: var(--od-soft); color: #f9bcb5; border-color: rgba(228, 72, 63, 0.6); }

.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 0 8px 0 16px; border-radius: var(--r-sm); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 46px; height: 28px; flex: none; border-radius: var(--pill); background: rgba(237, 230, 218, 0.14); transition: background-color 0.35s var(--ease); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: var(--pill); background: var(--cream); transition: transform 0.35s var(--ease); }
.switch input:checked + .track { background: var(--od); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--od-2); outline-offset: 2px; }

/* match counter: minus on the left, the number on the right is the big tap target */
.stepper { display: grid; grid-template-columns: 54px 1fr 76px; align-items: stretch; min-height: 72px; border-radius: 14px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.stepper .dec, .stepper .inc { border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); transition: background-color 0.2s var(--ease), color 0.2s; touch-action: manipulation; }
.stepper .dec:hover { color: var(--text); background: rgba(237, 230, 218, 0.05); }
.stepper .inc { color: var(--text); border-left: 1px solid var(--line); background: rgba(237, 230, 218, 0.04); }
.stepper .inc:hover { background: rgba(237, 230, 218, 0.08); }
.stepper .dec:active, .stepper .inc:active { background: rgba(237, 230, 218, 0.12); }
.stepper .mid { display: flex; flex-direction: column; justify-content: center; padding: 0 6px; min-width: 0; }
.stepper .mid b { font: 600 15px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .mid small { color: var(--faint); font: 400 12.5px/1.35 var(--font); }
.stepper .val { font: 600 36px/1 var(--serif); font-variant-numeric: tabular-nums; }
.stepper.bump .inc { background: rgba(228, 72, 63, 0.16); }
.stepper.od .inc .val { color: #f7a39a; }
.stepper.gold .inc .val { color: #e8c37a; }
.stepper.bad .inc .val { color: #ef9b93; }

.rate { display: flex; gap: 6px; }
.rate button { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font: 400 18px var(--serif); transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.rate button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ------------------------------------------------------------------ sheets, toasts */
.scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(12, 14, 17, 0.6); animation: odFade 0.4s var(--ease); }
.sheet { width: min(520px, calc(100vw - 36px)); max-height: min(86vh, 860px); overflow: auto; border-radius: 18px; padding: 28px; animation: odRise 0.55s var(--ease); }
.sheet h2 { margin: 0 0 6px; font: 700 34px/1.05 var(--serif); }
.sheet .sub { margin: 0 0 20px; color: var(--muted); }
.sheet .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 90; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(22px + var(--safe-b)); transform: translateY(12px); max-width: calc(100vw - 32px); padding: 13px 18px; border-radius: 12px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.toast.show { opacity: 1; transform: none; }
@keyframes odFade { from { opacity: 0; } }
@keyframes odRise { from { opacity: 0; transform: translateY(14px); } }
@keyframes odSpin { to { transform: rotate(360deg); } }
.spin { width: 18px; height: 18px; border-radius: var(--pill); border: 1.5px solid rgba(237, 230, 218, 0.2); border-top-color: var(--cream); animation: odSpin 0.9s linear infinite; }

/* ------------------------------------------------------------------ long-form text */
.prose { margin: 0 var(--gutter); padding: calc(var(--s-10) + var(--safe-t)) 0 var(--s-9); }
.prose h1 { font: 800 clamp(52px, 8vw, 96px)/0.95 var(--serif); letter-spacing: -0.01em; text-transform: uppercase; margin: var(--s-4) 0 var(--s-3); }
.prose .updated { color: var(--faint); font: 400 12px var(--mono); letter-spacing: 0.06em; }
.prose h2 { font: 700 30px/1.15 var(--serif); margin: 52px 0 12px; }
.prose p, .prose li { color: #d5cec2; line-height: 1.8; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--text); text-decoration-color: var(--od); text-underline-offset: 3px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 var(--gutter); padding: 32px 0 calc(36px + var(--safe-b)); border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; transition: color 0.3s var(--ease); }
.foot a:hover { color: var(--text); }
/* the long-form column and the footer keep their gutters until the measure fits, then centre */
@media (min-width: 784px) { .prose { max-width: 720px; margin: 0 auto; } }
@media (min-width: 1280px) { .foot { max-width: var(--wrap); margin: 0 auto; } }

/* page-to-page: a calm cross-fade, the nav stays put */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.5s; animation-timing-function: var(--ease); }

@media (prefers-reduced-transparency: reduce) { :root { --pane: rgba(20, 21, 24, 0.97); --pane-strong: rgba(14, 15, 17, 0.99); --frost: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { :root { --pane: rgba(20, 21, 24, 0.96); --pane-strong: rgba(14, 15, 17, 0.98); } }
/* touch screens: every control at least 44 px tall */
@media (pointer: coarse) {
  .b.sm { height: 44px; }
  .b.sm.icon { width: 44px; }
  .chip { height: 40px; }
  .nav a.lnk { height: 44px; }
}
@media (max-width: 767px) {
  .nav { height: 52px; padding: 0 6px 0 14px; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; }
  .nav a.lnk.opt { display: none; }
  .sheet { padding: 24px 20px; }
}

/* ------------------------------------------------------------------ review pass: states and motion */
.b-primary:disabled, .b-primary[aria-disabled="true"] { opacity: 1; background: rgba(237, 230, 218, 0.08); color: var(--faint); transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out); }
.foot a { position: relative; }
.foot a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--od-2); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
.foot a:hover::after { transform: none; }
/* sheets leave as deliberately as they arrive */
@keyframes odSink { to { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes odOut { to { opacity: 0; } }
.scrim.closing { animation: odOut 0.22s var(--ease-io) forwards; pointer-events: none; }
.scrim.closing .sheet { animation: odSink 0.22s var(--ease-io) forwards; }
/* sheets are opaque and only move: fading a sheet in shows the page through it for a few frames */
.sheet { background: #121316; backdrop-filter: none; -webkit-backdrop-filter: none; animation: odSheetIn 0.5s var(--ease-out); }
@keyframes odSheetIn { from { transform: translateY(16px) scale(0.985); } }
@media (max-width: 767px) {
  /* phones: sheets come up from the bottom edge */
  .scrim { align-items: end; padding: 0; }
  .sheet { width: auto; justify-self: stretch; max-height: 88vh; border-radius: 18px 18px 0 0; padding-bottom: calc(24px + var(--safe-b)); animation: odSheetUp 0.5s var(--ease-out); }
  .scrim.closing .sheet { animation: odSheetDown 0.26s var(--ease-io) forwards; }
}
@keyframes odSheetUp { from { transform: translateY(100vh); } }
@keyframes odSheetDown { to { transform: translateY(100vh); } }
/* legal pages: dates read like every other label */
.prose .updated { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }
.prose > * { animation: odRise 0.8s var(--ease-out) backwards; }
.prose > :nth-child(2) { animation-delay: 0.08s; } .prose > :nth-child(3) { animation-delay: 0.16s; } .prose > :nth-child(n+4) { animation-delay: 0.24s; }
/* touch screens keep no sticky hover state */
@media (hover: none) {
  .b-primary:hover { background: var(--cream); } .b-od:hover { background: var(--od-fill); }
  .b-glass:hover { background: var(--surface); border-color: var(--line-2); } .b-ghost:hover { background: transparent; color: var(--muted); }
  .b:hover .arrow { transform: none; }
}
