/* ─────────────────────────────────────────────────────────────────────────
 * SportsBiff — app-wide Archivo type system.
 *
 * One typeface (Archivo Variable, 100–900 + italic), self-hosted via
 * Propshaft from app/assets/fonts/. All weights/sizes/leading/tracking
 * live on tokens — components reference vars, not literals.
 * ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/archivo-latin-wght-italic-37eb7b8d.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-italic-37eb7b8d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Legacy font ALIASES — point every previously-used family name at the Archivo glyphs.
 * Hundreds of inline `font-family: 'JetBrains Mono'` / `'Fraunces'` / `'Inter'` rules still
 * exist across views; aliasing them here guarantees the "single typeface app-wide" rule
 * holds without auditing every line. Remove an alias only after grepping the codebase clean
 * of the corresponding name. */
@font-face {
  font-family: 'Inter';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'Fraunces';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'Barlow';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}
@font-face {
  font-family: 'Space Grotesk';
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2-variations"),
       url("/assets/archivo-latin-wght-normal-51bfae9b.woff2") format("woff2");
}

:root {
  /* family */
  --font-sans: 'Archivo Variable', 'Archivo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* weights */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  /* fluid scale */
  --fs-display:  clamp(2.5rem, 6vw, 3.75rem); /* 40–60  hero H1 / big numbers */
  --fs-h1:       clamp(2rem, 4vw, 2.5rem);     /* 32–40 */
  --fs-h2:       1.875rem;                      /* 30 */
  --fs-h3:       1.375rem;                      /* 22 */
  --fs-h4:       1.125rem;                      /* 18 */
  --fs-body-lg:  1.125rem;                      /* 18 */
  --fs-body:     1rem;                          /* 16 */
  --fs-body-sm:  0.875rem;                      /* 14 */
  --fs-caption:  0.8125rem;                     /* 13 */
  --fs-label:    0.75rem;                       /* 12 */

  /* leading */
  --lh-display: 0.98;
  --lh-heading: 1.15;
  --lh-body:    1.6;

  /* tracking */
  --ls-display: -0.045em;
  --ls-heading: -0.02em;
  --ls-body:     0;
  --ls-label:    0.14em;
}

html, body { font-family: var(--font-sans); }

body {
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: var(--ls-heading); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: var(--ls-heading); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: var(--lh-heading); letter-spacing: var(--ls-heading); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); line-height: var(--lh-heading); }

.display,
.hero-title { font-weight: var(--fw-black); line-height: var(--lh-display); letter-spacing: var(--ls-display); }

small, .caption { font-size: var(--fs-caption); }

.eyebrow, .overline, .label {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
}

button, .btn, input, select, textarea { font-family: var(--font-sans); }
button, .btn { font-weight: var(--fw-semibold); letter-spacing: 0.04em; }

/* Tabular figures — critical for odds, stats, leaderboards, P/L, clocks.
 * Apply via .tabular utility or [data-numeric] attribute. */
.stat, .odds, .metric, .tabular,
table.data td, table.data th,
[data-numeric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
