/* WORLD CUP SUPPORTERS — shared styles. Aesthetic themes are switched via data-aesthetic on root. */

:root,
[data-aesthetic="stadium"] {
  --bg: #0a0a0c;
  --bg-2: #131318;
  --surface: #1a1a20;
  --surface-2: #22222b;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.16);
  --ink: #f4f4f6;
  --ink-dim: rgba(244,244,246,0.62);
  --ink-mute: rgba(244,244,246,0.58);
  --on-accent: #0a0a0c;
  --accent: #ff5b1f;       /* signal orange */
  --accent-2: #00d4ff;     /* cyan */
  --accent-3: #d6ff3d;     /* electric lime */
  --hot: #ff3355;
  --display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --display-tight: "Anton", "Bebas Neue", Impact, sans-serif;
  --body: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 4px;
  --radius-lg: 8px;
}

[data-aesthetic="editorial"] {
  --bg: #f3ede0;
  --bg-2: #ece4d2;
  --surface: #ffffff;
  --surface-2: #f6f1e3;
  --line: rgba(20,18,14,0.12);
  --line-2: rgba(20,18,14,0.24);
  --ink: #15110b;
  --ink-dim: rgba(21,17,11,0.78);
  --ink-mute: rgba(21,17,11,0.68);
  --on-accent: #ffffff;
  --accent: #b02e15;
  --accent-2: #0e5a3a;
  --accent-3: #d9a521;
  --hot: #b02e15;
  --display: "Playfair Display", "Times New Roman", serif;
  --display-tight: "Anton", "Bebas Neue", Impact, sans-serif;
  --body: "Inter Tight", "Inter", system-ui, sans-serif;
  --radius: 2px;
  --radius-lg: 4px;
}

[data-aesthetic="brutalist"] {
  --bg: #f4e92a;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4e92a;
  --line: #0a0a0a;
  --line-2: #0a0a0a;
  --ink: #0a0a0a;
  --ink-dim: rgba(10,10,10,0.8);
  --ink-mute: rgba(10,10,10,0.72);
  --on-accent: #ffffff;
  --accent: #c8102e;
  --accent-2: #1f2dff;
  --accent-3: #0a0a0a;
  --hot: #c8102e;
  --display: "Anton", Impact, sans-serif;
  --display-tight: "Anton", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 0px;
  --radius-lg: 0px;
}

[data-aesthetic="hud"] {
  --bg: #050912;
  --bg-2: #0a1124;
  --surface: #0e1730;
  --surface-2: #142046;
  --line: rgba(125,217,255,0.18);
  --line-2: rgba(125,217,255,0.36);
  --ink: #d8ecff;
  --ink-dim: rgba(216,236,255,0.62);
  --ink-mute: rgba(216,236,255,0.58);
  --on-accent: #050912;
  --accent: #00ff9c;
  --accent-2: #8f85ff;
  --accent-3: #00d4ff;
  --hot: #ff4a8b;
  --display: "Space Grotesk", "Inter", sans-serif;
  --display-tight: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 2px;
  --radius-lg: 4px;
}

/* ===== Base ===== */
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
.cv-root {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-feature-settings: "ss01","cv11","tnum";
  line-height: 1.4;
  font-size: 14px;
  overflow-x: clip;
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.cv-root main { flex: 1; }
.cv-root * { box-sizing: border-box; }
.cv-root a { color: inherit; text-decoration: none; }
.cv-root button { font-family: inherit; cursor: pointer; color: inherit; }
.cv-root input, .cv-root textarea, .cv-root select { font-family: var(--body); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Layout ===== */
:root { --gut: clamp(16px, 2.8vw, 40px); }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.sec { padding-top: clamp(36px, 5vw, 56px); padding-bottom: clamp(36px, 5vw, 56px); }
.bb { border-bottom: 1px solid var(--line); }
.bt { border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: var(--gap, 32px); }
.cols { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--gap, 14px); }
.split > *, .cols > * { min-width: 0; }
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .cols { grid-template-columns: repeat(var(--nm, 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cols { grid-template-columns: repeat(var(--ns, 1), minmax(0, 1fr)); }
}
.span2 { grid-column: span 2; grid-row: span 2; }
@media (max-width: 600px) { .span2 { grid-column: auto; grid-row: auto; } }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mt32 { margin-top: 32px; }

/* Fluid display sizes */
.h-hero { font-size: clamp(56px, 11vw, 160px); margin: 0; }
.h-page { font-size: clamp(52px, 9vw, 120px); margin: 0; }
.h-xl { font-size: clamp(60px, 12.5vw, 180px); margin: 0; }
.h-section { font-size: clamp(36px, 5vw, 64px); margin: 0; }
.h-card { font-size: clamp(28px, 3.4vw, 44px); margin: 0; }

/* ===== Header ===== */
.cv-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.cv-header-in { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; }
.cv-nav { display: flex; gap: 24px; }
.cv-navlink { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-dim); position: relative; padding-bottom: 4px; }
.cv-navlink:hover, .cv-navlink.on { color: var(--ink); }
.cv-navlink.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.cv-header-right { display: flex; align-items: center; gap: 10px; }
.cv-burger { display: none; font-size: 16px; min-width: 40px; justify-content: center; }
.cv-mobile-nav { display: none; }
@media (max-width: 1180px) {
  .cv-nav { display: none; }
  .cv-burger { display: inline-flex; }
  .cv-mobile-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 8px var(--gut) 16px; }
  .cv-mobile-nav a { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-dim); }
  .cv-mobile-nav a.on { color: var(--accent); }
}
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ===== Footer ===== */
.cv-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.cv-footlink { display: block; font-size: 13px; color: var(--ink-dim); padding: 5px 0; }
.cv-footlink:hover { color: var(--accent); }

/* ===== Section head ===== */
.cv-sechead { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; border-top: 2px solid var(--ink); padding-top: 18px; align-items: start; }
@media (max-width: 800px) { .cv-sechead { grid-template-columns: 1fr; gap: 12px; } }

/* ===== Misc additions ===== */
.cv-countdown { display: flex; gap: clamp(10px, 2vw, 18px); align-items: baseline; flex-wrap: wrap; }
.cv-countdown > div { min-width: clamp(60px, 9vw, 90px); }
.cv-flag { display: inline-block; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); flex-shrink: 0; }
.cv-flag-ph { background: var(--surface-2); }
.cv-btn[data-on="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cv-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cv-input { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); font-size: 15px; outline: none; width: 100%; }
.cv-input:focus { border-color: var(--accent); }
.cv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cv-table th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-mute); text-align: left; font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.cv-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cv-table tr.link { cursor: pointer; }
.cv-table tr.link:hover td { background: var(--surface); }
.cv-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-tabs .cv-btn { padding: 6px 12px; }
a.cv-card { display: block; }
.cv-root .cv-hl { color: var(--accent); }
.bracket-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 24px; min-width: 860px; }

/* Display utils */
.cv-display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 0.88; text-transform: uppercase; }
.cv-display-tight { font-family: var(--display-tight); font-weight: 400; letter-spacing: -0.01em; line-height: 0.86; text-transform: uppercase; }
.cv-mono { font-family: var(--mono, ui-monospace, Menlo, monospace); letter-spacing: 0.02em; }
.cv-eyebrow { font-family: var(--mono, ui-monospace, monospace); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }

/* ===== Chip / pill ===== */
.cv-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
}
.cv-chip[data-tone="live"] {
  color: var(--hot); border-color: var(--hot);
  animation: cvPulse 1.4s ease-in-out 3;
}
.cv-chip[data-tone="accent"] { color: var(--accent); border-color: var(--accent); }
.cv-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ===== Buttons ===== */
.cv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s;
}
/* One hover language across the site: accent border (+ accent text on buttons). A solid accent fill means "selected" or "primary". */
.cv-btn:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.cv-btn[data-variant="solid"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cv-btn[data-variant="solid"]:hover, .cv-btn[data-on="true"]:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); filter: brightness(1.12); }
.cv-btn[data-variant="ghost"] { padding: 8px 12px; }

/* ===== Card ===== */
.cv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
a.cv-card:hover, .cv-card.cv-lift:hover, .trivia:hover .trivia-face:not(.trivia-back) { border-color: var(--accent); }

/* ===== Marquee ===== */
.cv-marquee {
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cv-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  animation: cvMarquee 38s linear infinite;
  padding: 14px 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cv-marquee-track[data-dir="r"] { animation-direction: reverse; animation-duration: 50s; }
.cv-marquee:hover .cv-marquee-track { animation-play-state: paused; }
.cv-marquee-track span.s { color: var(--accent); font-weight: 700; }
.cv-marquee-track em { font-style: normal; color: var(--ink-mute); }

/* ===== Spotlight backdrop (used on Home hero) ===== */
.cv-spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 30%),
    color-mix(in oklab, var(--accent) 22%, transparent),
    transparent 60%
  );
  pointer-events: none;
  transition: background 0.08s linear;
  mix-blend-mode: screen;
}
[data-aesthetic="editorial"] .cv-spotlight,
[data-aesthetic="brutalist"] .cv-spotlight { mix-blend-mode: multiply; opacity: 0.6; }

/* ===== Animations ===== */
@keyframes cvMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes cvPulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes cvCountdown {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes cvFlicker {
  0%,100% { opacity: 1; }
  47% { opacity: 1; }
  48% { opacity: 0.6; }
  49% { opacity: 1; }
}
@keyframes cvRise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Sport icon plate (the morphing tile) ===== */
.sport-tile {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background 0.3s, border-color 0.3s;
}
.sport-tile:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.sport-tile .glyph {
  position: absolute; right: -12%; bottom: -10%;
  font-family: var(--display);
  font-size: 220px;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.04);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1), color 0.4s;
  pointer-events: none;
}
.sport-tile:hover .glyph { transform: translate(-8%, -2%) rotate(-4deg); color: color-mix(in oklab, var(--accent) 22%, transparent); }
[data-aesthetic="editorial"] .sport-tile .glyph,
[data-aesthetic="brutalist"] .sport-tile .glyph { color: rgba(10,10,12,0.06); }
[data-aesthetic="editorial"] .sport-tile:hover .glyph,
[data-aesthetic="brutalist"] .sport-tile:hover .glyph { color: color-mix(in oklab, var(--accent) 22%, transparent); }

/* ===== Bracket lines ===== */
.bracket-line {
  stroke: var(--line-2);
  stroke-width: 1;
  fill: none;
}
.bracket-line.hot { stroke: var(--accent); stroke-width: 2; }

/* ===== Trivia card (flip) ===== */
.trivia {
  perspective: 1200px;
  cursor: pointer;
}
.trivia-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
  transform-style: preserve-3d;
}
.trivia:hover .trivia-inner, .trivia.flipped .trivia-inner, .trivia:focus-visible .trivia-inner { transform: rotateY(180deg); }
@media (hover: none) { .trivia:hover .trivia-inner { transform: none; } .trivia.flipped .trivia-inner { transform: rotateY(180deg); } }
.trivia-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
}
.trivia-back {
  transform: rotateY(180deg);
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

/* ===== Timeline scrubber ===== */
.scrubber-track {
  position: relative;
  height: 2px;
  background: var(--line);
}
.scrubber-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
.scrubber-node {
  position: absolute; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.2s;
}
.scrubber-node.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 28%, transparent);
  transform: translate(-50%, -50%) scale(1.2);
}
.scrubber-node:hover { border-color: var(--accent); }

/* ===== Trophy / ball 3D ===== */
.trophy-stage { perspective: 800px; }
.trophy {
  position: relative;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
  transform-style: preserve-3d;
}

/* Mobile artboard typography scale */
.cv-mobile { font-size: 13px; }
.cv-mobile .cv-display { letter-spacing: -0.02em; }

/* Subtle striped image placeholder */
.cv-img-ph {
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--ink) 6%, transparent) 0,
      color-mix(in oklab, var(--ink) 6%, transparent) 12px,
      transparent 12px, transparent 24px),
    var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: var(--radius-lg);
}

/* Number ticker */
.cv-bignum {
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.85;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Section divider */
.cv-divider {
  border: 0;
  height: 1px;
  background: var(--line);
}
.cv-divider-thick {
  border: 0;
  height: 2px;
  background: var(--ink);
}

/* Hover lift */
.cv-lift { transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s; }
.cv-lift:hover { transform: translateY(-4px); }

/* ===== Accessibility (WCAG 2.2 AA) ===== */
html { scroll-padding-top: 90px; }
a.cv-hl, .cv-inline-link { text-decoration: underline; text-underline-offset: 3px; color: var(--accent); }
.cv-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--radius); font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; border: 0; }
.cv-skip:focus { top: 12px; }
main:focus { outline: none; }
.scroll-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-ticker-wrap { position: relative; }
.cv-ticker-toggle { box-shadow: -24px 0 16px 4px var(--bg); position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; min-width: 32px; min-height: 32px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); color: var(--ink); font-size: 12px; }
.cv-ticker-wrap[data-paused="true"] .cv-marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  /* Reduced motion: no transitions or decorative animation. The tickers keep scrolling (they pause on hover and have a pause button). */
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .cv-chip[data-tone="live"], .cv-display[style*="cvFlicker"], [style*="cvRise"] { animation: none !important; }
}
@media (forced-colors: active) {
  .cv-btn[data-on="true"], .cv-btn[data-variant="solid"] { border: 2px solid ButtonText; }
}
/* Decorative sport letters: drawn as generated content so assistive tech and contrast checks ignore them */
.sport-tile .glyph::after { content: attr(data-g); }

/* Answer and option buttons share the same hover as cards */
.cv-option:hover:not(:disabled), button.cv-card:hover { border-color: var(--accent) !important; }

/* ===== Photos ===== */
.cv-photo { margin: 0; }
.cv-photo-frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.cv-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-photo figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--ink-dim); }
.cv-credit { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-mute); }
.cv-credit a { text-decoration: underline; text-underline-offset: 2px; }
.cv-credit a:hover { color: var(--accent); }
/* Background photos on tiles and cards: faded, with a solid band behind the text */
.cv-bgphoto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; transition: opacity 0.3s, transform 0.6s; pointer-events: none; }
.sport-tile .cv-bgphoto + .cv-bgfade, .cv-card .cv-bgfade { position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 22%, color-mix(in oklab, var(--surface) 55%, transparent) 60%, color-mix(in oklab, var(--surface) 20%, transparent)); pointer-events: none; }
.sport-tile > *:not(.cv-bgphoto):not(.cv-bgfade):not(.glyph) { position: relative; z-index: 1; }
.sport-tile:hover .cv-bgphoto { opacity: 0.55; transform: scale(1.04); }

/* Make room in the header at mid desktop widths: drop the small wordmark beside WCS (the footer logo keeps it) */
@media (min-width: 1181px) and (max-width: 1360px) { .cv-header .cv-logo-full { display: none; } }

/* Analytics consent banner (js/analytics.js) */
.cv-consent { font-family: var(--body); position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-left: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 16px 18px; box-shadow: 0 18px 40px rgba(0,0,0,.35); display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.cv-consent p { margin: 0; flex: 1 1 260px; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.cv-consent p b { color: var(--ink); }
.cv-consent a { color: var(--accent); }
.cv-consent-btns { display: flex; gap: 8px; }
.cv-consent button { font-family: inherit; cursor: pointer; }
