/* ==========================================================================
   fonts.css — Local font loading (self-hosted, privacy-first, zero 3rd-party)
   Levii Portal · Design System / Phase 1

   Strategy
   --------
   • Fonts are self-hosted under /assets/fonts (no Google Fonts request → better
     privacy + no render-blocking third-party origin).
   • `font-display: swap` avoids invisible text (FOIT); the system-ui fallback in
     --font-sans renders instantly, then Inter swaps in.
   • Variable fonts keep weight range 100–900 in a single file each.
   • If the woff2 files are absent, the system stack (declared in variables.css)
     is a deliberate, high-quality fallback — the site never depends on a
     network font to look correct.

   Drop these files to enable Inter (download from rsms.me/inter, licensed OFL):
     assets/fonts/Inter-roman.var.woff2
     assets/fonts/Inter-italic.var.woff2
     assets/fonts/InterDisplay-roman.var.woff2
   …then run `python3 tools/subset_fonts.py`, which cuts each file down to exactly
   the unicode-range declared below. That step is not optional: unicode-range only
   tells the browser WHETHER to fetch a file, never what is inside it, so the full
   Inter (683 KB across the three faces — Cyrillic, Greek, Vietnamese and all) would
   otherwise be downloaded to render latin text.

   The range below is not a guess: it is every character that actually appears in
   the portal's HTML and in the six locale dictionaries, minus the ones Inter has
   no glyph for anyway (✦ U+2726 and the emoji, which fall back to the system font
   by design). Keep the two in sync — add a character to the content, re-check.
   ========================================================================== */

/* Latin-1 + latin-ext (PT/EN/ES/FR/DE/IT), the German capital ß (U+1E9E),
   punctuation, currency, the arrows and star used in the copy, and the math signs.
   Deliberately NOT latin-extended-additional (U+1E00-1EFF): it is ~250 glyphs of
   mostly Vietnamese, which none of our locales need. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/Inter-roman.var.6f0e8030b6.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+1E9E, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191-2193, U+2212, U+2215, U+2605, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/Inter-italic.var.fc1dbb5edc.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+1E9E, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191-2193, U+2212, U+2215, U+2605, U+FEFF, U+FFFD;
}

/* Optical-size display cut for large headlines (tighter, more expressive). */
@font-face {
  font-family: 'InterDisplay';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/InterDisplay-roman.var.a24a250e12.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0100-024F, U+0259, U+1E9E, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191-2193, U+2212, U+2215, U+2605, U+FEFF, U+FFFD;
}
