/* ===========================
   Benfica.co — Design Tokens
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;500;600;700&family=Anton&family=Archivo+Black&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,900&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&family=Playfair+Display:wght@400;500;600;700;900&family=JetBrains+Mono:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  /* Brand reds — Benfica crimson family */
  --red-900: #4a0a12;
  --red-800: #6b0e1a;
  --red-700: #8a1322;
  --red-600: #a8172a;
  --red-500: #c8102e;   /* primary */
  --red-400: #e11d3a;
  --red-300: #ef4458;
  --red-200: #f8aab3;
  --red-100: #fde4e7;

  /* Cream / paper */
  --cream-50: #faf6ee;
  --cream-100: #f4ecdc;
  --cream-200: #e8dcc4;

  /* Ink */
  --ink-950: #0a0807;
  --ink-900: #14110f;
  --ink-800: #1f1b18;
  --ink-700: #2a2522;
  --ink-600: #3d3530;
  --ink-500: #5a4f48;
  --ink-400: #8a7f77;
  --ink-300: #b5aca4;
  --ink-200: #d8d2cb;
  --ink-100: #ece7e0;

  /* Gold accent (trophies, honours) */
  --gold: #c8a24c;
  --gold-soft: #d9b76a;

  /* Pitch green */
  --pitch: #1a4d2e;
  --pitch-line: #2d6b46;

  /* Semantic — DARK is default */
  --bg: var(--ink-950);
  --bg-raised: var(--ink-900);
  --bg-card: var(--ink-800);
  --bg-inset: #050403;
  --fg: var(--cream-50);
  --fg-muted: var(--ink-300);
  --fg-dim: var(--ink-400);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: var(--red-500);
  --accent-fg: #ffffff;
  --grid-line: rgba(255, 255, 255, 0.04);

  /* Type families */
  --font-display: 'Anton', 'Bebas Neue', 'Oswald', sans-serif;
  --font-headline: 'Playfair Display', 'Fraunces', Georgia, serif;
  --font-body: 'Newsreader', 'Fraunces', Georgia, serif;
  --font-ui: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* Spacing — density adjustable */
  --density: 1;
  --space-1: calc(4px * var(--density));
  --space-2: calc(8px * var(--density));
  --space-3: calc(12px * var(--density));
  --space-4: calc(16px * var(--density));
  --space-5: calc(24px * var(--density));
  --space-6: calc(32px * var(--density));
  --space-7: calc(48px * var(--density));
  --space-8: calc(64px * var(--density));
  --space-9: calc(96px * var(--density));

  /* Radii */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;

  /* Red intensity multiplier (0–1, default .6) */
  --red-intensity: 0.6;
}

[data-theme="light"] {
  --bg: var(--cream-50);
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --bg-inset: var(--cream-100);
  --fg: var(--ink-950);
  --fg-muted: var(--ink-600);
  --fg-dim: var(--ink-500);
  --border: rgba(20, 17, 15, 0.08);
  --border-strong: rgba(20, 17, 15, 0.18);
  --accent: var(--red-600);
  --grid-line: rgba(20, 17, 15, 0.04);
}

/* Type pairings */
[data-typeset="editorial"] {
  --font-display: 'Playfair Display', serif;
  --font-headline: 'Playfair Display', serif;
  --font-body: 'Newsreader', Georgia, serif;
}
[data-typeset="sport"] {
  --font-display: 'Anton', 'Bebas Neue', sans-serif;
  --font-headline: 'Oswald', sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
}
[data-typeset="display"] {
  --font-display: 'Archivo Black', sans-serif;
  --font-headline: 'Archivo Black', sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
}

/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
  transition: background 0.3s ease, color 0.3s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

/* ============ Utility ============ */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow--accent { color: var(--accent); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Headline scale */
.h-display {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}
.h-headline {
  font-family: var(--font-headline);
  font-size: clamp(32px, 4vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0;
}
.h-section {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0;
}
.h-card {
  font-family: var(--font-headline);
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--fg);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--red-700);
  border-color: var(--red-700);
  color: #fff;
}
.btn--ghost { border-color: transparent; padding-left: 0; padding-right: 0; }
.btn--ghost:hover { background: transparent; color: var(--accent); }

/* Tag / chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--fg-muted);
}
.tag--live {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Grain texture for hero */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Red intensity utility — applied to large red surfaces */
.red-surface {
  background: color-mix(in oklab, var(--accent) calc(var(--red-intensity) * 100%), var(--bg));
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-inset); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--fg-dim); }
