/* ═══════════════════════════════════════════════════════
   BASE.CSS
   Tokens · Reset · Animations · Utilities
   (fonts → fonts.css)
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ───────────────────────────────────── */
:root {
  /* Surface */
  --coal: #111010;
  --coal-mid: #1a1816;
  --coal-card: #201e1b;
  --coal-border: #2e2a25;
  --coal-hover: #272320;

  /* Accent (default = amber, overridden per sport) */
  --accent: #f5a623;
  --accent-dim: #c4811a;
  --accent-glow: rgba(245, 166, 35, 0.12);

  /* Fixed colours */
  --red-nav: #c0182a;
  --red-live: #ff3b3b;

  /* Text */
  --white: #f2ede6;
  --grey-hi: #c8bfb0;
  --grey-mid: #7a6e60;
  --grey-lo: #3d3830;

  /* Spacing */
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 28px;
  --gap-xl: 48px;

  /* Radius */
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 6px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.22s ease;
  --t-accent: 0.35s ease; /* for sport-accent colour changes */
}

/* ── SPORT ACCENT OVERRIDES  ───────────────── 
NFL → dark blue + red (patriotic, tied to the U.S. flag)
MLB → also navy + red, but more classic and less aggressive
NBA → bright, modern: orange (the ball) + blue/red
MLS → black + neon/lime (modern, Adidas-driven aesthetic)
NHL → cold palette: black, silver, ice blue
PGA → green (grass, Augusta, tradition)
UFC → black + red (aggression, blood, the octagon)
NASCAR → yellow + red (speed, caution flag energy)
CFB → brand chaos, but generally saturated, heavy tones (burgundy, orange, purple)
CBB → similar to NBA, but more muted and traditional
*/
[data-sport="nfl"] {
  /* patriotic, broadcast feel */
  --accent: #1f3a5f; /* deep navy */
  --accent-dim: #0f172a;
  --accent-glow: rgba(59, 130, 246, 0.15);
}

[data-sport="mlb"] {
  /* classic americana */
  --accent: #b91c1c; /* deep red */
  --accent-dim: #7f1d1d;
  --accent-glow: rgba(185, 28, 28, 0.15);
}

[data-sport="nba"] {
  /* energy, offense, ball */
  --accent: #f97316; /* orange */
  --accent-dim: #c2410c;
  --accent-glow: rgba(249, 115, 22, 0.18);
}

[data-sport="mls"] {
  /* modern football, adidas era */
  --accent: #a3e635; /* neon lime */
  --accent-dim: #4d7c0f;
  --accent-glow: rgba(163, 230, 53, 0.18);
}

[data-sport="nhl"] {
  /* ice / cold / metallic */
  --accent: #94a3b8; /* slate/ice */
  --accent-dim: #334155;
  --accent-glow: rgba(148, 163, 184, 0.15);
}

[data-sport="pga"] {
  /* grass, prestige */
  --accent: #166534; /* deep green */
  --accent-dim: #052e16;
  --accent-glow: rgba(34, 197, 94, 0.12);
}

[data-sport="ufc"] {
  /* brutality, minimalism */
  --accent: #dc2626; /* blood red */
  --accent-dim: #450a0a;
  --accent-glow: rgba(220, 38, 38, 0.2);
}

[data-sport="nascar"] {
  /* speed, caution flag */
  --accent: #facc15; /* yellow */
  --accent-dim: #a16207;
  --accent-glow: rgba(250, 204, 21, 0.2);
}

[data-sport="cfb"] {
  /* saturated, emotional, regional */
  --accent: #7c3aed; /* strong purple */
  --accent-dim: #4c1d95;
  --accent-glow: rgba(124, 58, 237, 0.18);
}

[data-sport="cbb"] {
  /* similar to NBA but toned down */
  --accent: #ea580c; /* muted orange */
  --accent-dim: #9a3412;
  --accent-glow: rgba(234, 88, 12, 0.16);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--coal);
  color: var(--white);
  overflow-x: hidden;
}

/* Film-grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.65);
  }
}

/* ── LIVE DOT ─────────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-live);
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── SECTION HEADER ──────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-section);
  letter-spacing: 0.08em;
  color: var(--white);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--coal-border), transparent);
}

.section-more {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--accent-dim);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-accent),
    color var(--t-accent);
}
.section-more:hover {
  background: var(--accent);
  color: #111;
}

/* ── SPORT BADGE ─────────────────────────────────────── */
.sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #111;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  width: fit-content;
  transition: background var(--t-accent);
}

/* ── WIDGET SHELL ────────────────────────────────────── */
.widget {
  background: var(--coal-card);
  border: 1px solid var(--coal-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  line-height: 2;
}

.widget-header {
  background: var(--coal-mid);
  padding: 11px 16px;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  border-bottom: 1px solid var(--coal-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wh-accent {
  color: var(--accent);
  transition: color var(--t-accent);
}

/* ── UTILITY ─────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── RESPONSIVE HELPERS ──────────────────────────────── */
@media (max-width: 700px) {
  .section-title {
    font-size: var(--fs-heading);
  }
}
