/**
 * soma(som) — Self-hosted web fonts
 * visual-identity-v2 · OT-2018 · VISUAL-IDENTITY-V2-DISCOVERY §3.5
 *
 * Conventional grouping: font declarations before soma-tokens.css.
 * @font-face rules are lazy-resolved at render time; link order has no
 * cascade-precedence effect on custom properties.
 *
 * Font files live at assets/fonts/ (served at /assets/fonts/).
 * Relative src URL ../fonts/ resolves correctly from /assets/ci/fonts.css.
 *
 * font-display strategy:
 *   swap    — body/mono families (readable text during load > reflow risk)
 *   optional — display/heading family (avoid jarring heading reflow on swap;
 *              Playfair Display metrics differ significantly from Georgia fallback)
 *
 * woff2 only — all target browsers support woff2 (caniuse ≥ 96% global).
 *
 * Coverage gaps (assets/fonts/ inventory):
 *   IBM Plex Mono italic: only 400i available; 500i and 700i files absent.
 *     Impact: medium/bold italic mono uses browser-synthesized italic.
 *     Current surfaces do not use 500i/700i combinations; add woff2 files
 *     and rules here when that changes.
 *   Playfair Display italic: no italic woff2 present in assets/fonts/.
 *     Assertion: no surface uses italic Playfair Display. If that changes,
 *     add playfair-display-latin-{400,700}-italic.woff2 before using.
 */

/* ─── IBM Plex Mono ──────────────────────────────────────────────────────── */

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-700-normal.woff2') format('woff2');
}

/* ─── EB Garamond ────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'EB Garamond';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/eb-garamond-latin-700-normal.woff2') format('woff2');
}

/* ─── Playfair Display ───────────────────────────────────────────────────── */
/* font-display: optional — heading font; avoids layout shift when Playfair  */
/* and Georgia fallback differ significantly in metrics.                      */

@font-face {
  font-family: 'Playfair Display';
  font-weight: 400;
  font-style: normal;
  font-display: optional;
  src: url('fonts/playfair-display-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-weight: 700;
  font-style: normal;
  font-display: optional;
  src: url('fonts/playfair-display-latin-700-normal.woff2') format('woff2');
}
