/* ============================================================
   FONTS — Balto. SELF-HOSTED. (rewritten 2026-09-09)

   Roboto Slab (Bold, headings) + Inter (body & UI) — the brand's two
   typefaces per the guidelines.

   WHY SELF-HOSTED: this file used to be a single remote `@import` of
   fonts.googleapis.com, nested inside styles.css's own @import chain.
   That is the most fragile way to load a face — it needs the network,
   it is blocked outright in artifact/preview sandboxes, and when it
   fails it fails SILENTLY: headings quietly render in Georgia, which
   looks plausible enough that nobody notices until it ships. That was
   the root cause of "the wrong font got used".

   Now every glyph is served from assets/fonts/ alongside this file, so
   the brand faces render for ANYONE — offline, in a sandbox, behind a
   corporate proxy that blocks Google, or on a plane. Zero external
   requests. Don't reintroduce the @import.

   Coverage: latin + latin-ext (English plus all Western/Central
   European accents). If a page ever needs Cyrillic, Greek or
   Vietnamese, those subsets exist upstream and can be added the same
   way — ask rather than falling back to the CDN.

   Licenses ship beside the fonts, as both licenses require:
     · Roboto Slab — Apache License 2.0  (assets/fonts/RobotoSlab-LICENSE.txt)
     · Inter       — SIL Open Font License 1.1  (assets/fonts/OFL-Inter.txt)

   TIP for consuming pages: preload the one face above the fold —
     <link rel="preload" as="font" type="font/woff2" crossorigin
           href="assets/fonts/roboto-slab-700-latin.woff2">
   ============================================================ */

/* ---------- Roboto Slab · Bold 700 · headings & display ---------- */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/hostgrotesk-700.woff2') format('woff2'); /* OLD-BRAND: headings use Host Grotesk, not Roboto Slab (family name kept so all refs pick it up) */
  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: 'Roboto Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/hostgrotesk-700.woff2') format('woff2'); /* OLD-BRAND: Host Grotesk (latin covers Western/Central European accents) */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Inter · variable 100–900 · body & UI ----------
   Google serves Inter as a single VARIABLE font. Requesting 400/500/600/700
   returns the same file four times, so it is stored once per subset and
   declared across the full weight range — 157KB total instead of 558KB. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-var-latin.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+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Metric-matched fallbacks ----------
   Referenced by --font-display / --font-sans in typography.css. These make the
   split-second before the webfont paints (and the rare case where a local font
   is genuinely unavailable) land at the same width as the real face, so text
   doesn't visibly reflow.

   size-adjust values are MEASURED, not guessed — same pangram rendered at 200px
   in each face and the widths divided (2026-09-09):
     Roboto Slab 700 : Georgia bold = 7165.9 / 7724.8 = 92.77%
     Inter 400       : Arial        = 7169.4 / 6689.2 = 107.18%
   Re-measure if either face is ever updated. */
@font-face {
  font-family: 'Roboto Slab Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('sans-serif'); /* OLD-BRAND: Host Grotesk is sans, so fall back to a sans, not Georgia */
  size-adjust: 100%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('sans-serif');
  size-adjust: 107.18%;
}
