/* ============================================================
   Rapha Johannsen — typography
   Self-hosted variable fonts (WOFF2 with TTF fallback).

   - Fraunces:        display + emphasis (serif, with italic)
   - JetBrains Mono:  system labels, eyebrows, code-flavored UI
   - Inter:           body + UI — currently still loaded via
                      Google Fonts at the top of each HTML page.
                      When the Inter TTFs are added to /fonts/,
                      uncomment the @font-face blocks below and
                      drop the Google Fonts <link> from the HTML.

   font-display: swap → text renders immediately in the system
   fallback, then re-paints in the brand font once loaded. Avoids
   FOIT (flash of invisible text) and matches the brand's
   "exposed engineering" aesthetic — the page never hides.
============================================================ */

/* ---------- FRAUNCES (display, serif) — variable axes 9..144 opsz, 100..900 wght ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 200%;
  font-display: swap;
  src: url('/fonts/Fraunces-Variable.woff2') format('woff2-variations'),
       url('/fonts/Fraunces-Variable.ttf')   format('truetype-variations');
  /* Suppress font-features that can render unevenly at hero sizes */
  font-feature-settings: 'kern' 1, 'liga' 1;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 50% 200%;
  font-display: swap;
  src: url('/fonts/Fraunces-Italic-Variable.woff2') format('woff2-variations'),
       url('/fonts/Fraunces-Italic-Variable.ttf')   format('truetype-variations');
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ---------- JETBRAINS MONO (system labels) — variable wght 100..800 ---------- */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Variable.woff2') format('woff2-variations'),
       url('/fonts/JetBrainsMono-Variable.ttf')   format('truetype-variations');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Italic-Variable.woff2') format('woff2-variations'),
       url('/fonts/JetBrainsMono-Italic-Variable.ttf')   format('truetype-variations');
}

/* ---------- INTER (body, UI) — variable axes 14..32 opsz, 100..900 wght ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-Variable.woff2') format('woff2-variations'),
       url('/fonts/Inter-Variable.ttf')   format('truetype-variations');
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-Italic-Variable.woff2') format('woff2-variations'),
       url('/fonts/Inter-Italic-Variable.ttf')   format('truetype-variations');
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}
