/* =============================================================================
 * Maplable self-hosted fonts (perf pass 2026-04-29)
 * Replaces 3 third-party stylesheet requests (fonts.googleapis.com x2 +
 * api.fontshare.com) with a single same-origin CSS file → drops 2 DNS+TLS
 * handshakes (~150-250ms cold) and one whole external origin from CSP.
 *
 * Format: VARIABLE woff2 — one file per family per unicode-range covers
 * every weight we need (Inter 100-900, JetBrains Mono 100-800, Geist 100-900).
 *
 * Subsets: latin + latin-ext only. Drops Cyrillic, Greek, Vietnamese, etc.
 * to ~1/3 the byte count of full Google Fonts payload. The landing page is
 * English; if/when we localize, add the missing subsets back as additional
 * @font-face blocks pointing at additional woff2 files.
 *
 * unicode-range strings copied verbatim from the live Google Fonts CSS so
 * the browser will only fetch the latin-ext file when a Western European
 * accented character is actually used (rare on this page).
 *
 * font-display: swap — paint with the system fallback first, swap in the
 * real font once it's downloaded. Zero FOIT, slight FOUT.
 *
 * size-adjust / ascent-override / descent-override / line-gap-override —
 * NOT applied here. We could later use Andrew Caceres's font-fallback
 * generator (npm: fontaine) to synthesize a metric-matched system fallback
 * face that eliminates the FOUT shift. Defer to a follow-up if we measure
 * a perceptible reflow.
 *
 * Files live at /css/fonts/*.woff2 and are aggressively cached by .htaccess
 * (max-age=31536000, immutable — same-origin, content-addressed by name).
 * ============================================================================= */

/* === Inter (variable, 100-900) === */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/css/fonts/inter-latin.woff2') format('woff2-variations'),
       url('/css/fonts/inter-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('/css/fonts/inter-latin-ext.woff2') format('woff2-variations'),
       url('/css/fonts/inter-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;
}

/* === JetBrains Mono (variable, 100-800) === */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/css/fonts/jetbrains-mono-latin.woff2') format('woff2-variations'),
       url('/css/fonts/jetbrains-mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/css/fonts/jetbrains-mono-latin-ext.woff2') format('woff2-variations'),
       url('/css/fonts/jetbrains-mono-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;
}

/* === Geist (variable, 100-900, sourced from vercel/geist-font) ===
   Geist Variable from Vercel covers the full Latin set including Western
   European extended characters (the file ships without separate subsets),
   so a single @font-face is enough for both latin and latin-ext use cases.
   We do NOT set unicode-range so the browser uses this face for the entire
   reachable codepoint space, falling back through font-family stack only
   for codepoints the file truly doesn't contain. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/css/fonts/geist-variable.woff2') format('woff2-variations'),
       url('/css/fonts/geist-variable.woff2') format('woff2');
}
