/*
 * FATE typography system: the ONLY place font families are declared.
 *
 *   Geist        interface (nav, buttons, labels, body)         OFL 1.1
 *   Geist Mono   data (prices, %, addresses, IDs, axes, times)  OFL 1.1
 *   Bodoni Moda  brand (wordmark + rare editorial moments)      OFL 1.1
 *
 * All files are self-hosted from /fonts (no remote font CSS at runtime).
 * See /fonts/LICENSES.md.
 */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks: text laid out in these boxes does not move when the
   web font swaps in (values measured from the real font files). */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 99.2%;
  ascent-override: 101.8%;
  descent-override: 29.2%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local("Courier New"), local("Menlo"), local("Consolas");
  size-adjust: 100%;
  ascent-override: 101%;
  descent-override: 29%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Bodoni Moda Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 104.7%;
  ascent-override: 107.9%;
  descent-override: 38.2%;
  line-gap-override: 0%;
}

:root {
  /* families */
  --font-ui: "Geist", "Geist Fallback", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "Geist Mono", "Geist Mono Fallback", "SFMono-Regular", Consolas, monospace;
  --font-brand: "Bodoni Moda", "Bodoni Moda Fallback", "Bodoni 72", Georgia, serif;

  /* weights: nothing heavier than 600 anywhere */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* tracking */
  --tracking-ui: -0.006em;
  --tracking-data: -0.01em;
  --tracking-label: 0.08em;
  --tracking-button: 0.04em;
  --tracking-display: -0.03em;
  --tracking-brand: 0.2em;

  /* leading */
  --leading-tight: 1.1;
  --leading-ui: 1.35;
  --leading-body: 1.55;

  /* scale. Large numbers use clamp() so they stay dominant but never overflow. */
  --fs-label: 11px;
  --fs-tiny: 11.5px;
  --fs-small: 12px;
  --fs-body: 13px;
  --fs-lead: 14px;
  --fs-metric: clamp(21px, 0.4vw + 18px, 26px);
  --fs-title: clamp(21px, 0.9vw + 13px, 26px);
  --fs-display: clamp(38px, 1.3vw + 30px, 54px);
  --fs-hero: clamp(44px, 6vw + 14px, 96px);
}

html { font-synthesis: none; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-ui);
  letter-spacing: var(--tracking-ui);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; letter-spacing: inherit; }
/* Numerals never jiggle when values update. The `font:` shorthand resets
   font-variant-numeric, so this is enforced for every element. */
*, *::before, *::after { font-variant-numeric: tabular-nums !important; }
/* browser-default bold (700) is too heavy for this system: cap it at semibold */
b, strong, th, h1, h2, h3, h4, h5, h6 { font-weight: var(--weight-semibold); }

/* ---- reusable roles ---------------------------------------------------- */

/* numbers, addresses, ids, timestamps, axis values, technical metadata */
.mono, .num, code, kbd, time {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 0;
  letter-spacing: var(--tracking-data);
}

/* large figures: precise, tight, never decorative */
.display-num {
  font-family: var(--font-data);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
}

/* small uppercase terminal label (Geist, subdued) */
.t-label {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: var(--leading-ui);
  color: var(--text-2);
}

/* brand / editorial: the wordmark and genuine brand moments only */
.brand-serif {
  font-family: var(--font-brand);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-brand);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  font-feature-settings: "kern" 1, "liga" 1;
}
