/*
 * UFC Analytics — Story Kit design tokens
 * Every generated story page imports this file. Layouts are free-form;
 * these tokens are what make wildly different pages feel like one site.
 */

/* Archivo variable font (OFL) — axes: wght 100-900, wdth 62-125.
 * The display voice of stories: animate wght/wdth for kinetic headlines. */
@font-face {
  font-family: "Archivo Variable";
  src: url("/story-kit/archivo-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Enable cross-document view transitions (story ↔ story ↔ index) */
@view-transition {
  navigation: auto;
}

:root {
  /* Palette (mirrors the main app's globals.css) */
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card: #171717;
  --card-foreground: #fafafa;
  --primary: #e11d48;
  --primary-soft: #fb7185;
  --primary-glow: rgba(225, 29, 72, 0.35);
  --secondary: #262626;
  --muted: #262626;
  --muted-foreground: #a3a3a3;
  --border: #262626;
  --gold: #eab308;

  /* Data-viz series colors */
  --viz-1: #e11d48;
  --viz-2: #f59e0b;
  --viz-3: #3b82f6;
  --viz-4: #10b981;
  --viz-5: #a855f7;
  --viz-6: #ec4899;
  --viz-7: #38bdf8;
  --viz-8: #f97316;
  --viz-grid: #262626;

  /* Extended accent library — stories may re-theme --primary/-soft/-glow to any
   * of these (the masthead keeps the brand red regardless). Pair each accent
   * with its -soft tint for text on dark. */
  --ember: #f97316;      --ember-soft: #fdba74;
  --ice: #38bdf8;        --ice-soft: #7dd3fc;
  --royal: #6366f1;      --royal-soft: #a5b4fc;
  --violet: #a855f7;     --violet-soft: #d8b4fe;
  --venom: #22c55e;      --venom-soft: #86efac;
  --magenta: #ec4899;    --magenta-soft: #f9a8d4;
  --bone: #e7e5e4;       --bone-soft: #f5f5f4;
  --blood: #7f1d1d;      /* deep field color, backgrounds only */

  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Archivo Variable", var(--font-sans);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-hero: clamp(2.5rem, 8vw, 6rem);

  /* Spacing & shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;

  --content-width: 42rem;
  --wide-width: 72rem;
}

/* ── Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}

a {
  color: var(--primary-soft);
  text-decoration-color: var(--primary-glow);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--foreground);
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Prose helpers (opt-in classes) ── */
.prose {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.prose p {
  margin: 0 0 var(--space-4);
  color: #d4d4d4;
}
.prose .lede {
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--foreground);
}

.wide {
  max-width: var(--wide-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-soft);
}

.big-number {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

::selection {
  background: var(--primary);
  color: #fff;
}
