/* ────────────────────────────────────────────────────────────────────────
   Camden Medicals — self-hosted fonts (latin subset, woff2)
   Fusion wave W0b (2026-07-17). Replaces the Google Fonts remote load.

   WHY THIS EXISTS
   Mobile CLS was 0.378 — the worst Core Web Vital (3.8× the 0.10 "good"
   line). Root cause: a late webfont swap with NO metric-compatible fallback.
   Text painted in the system fallback, then reflowed when the webfonts
   arrived. Self-hosting + the metric-matched fallback @font-face rules below
   collapse that swap reflow toward ~0. See design language spec §2.3
   (docs/design-system.md → fonts) and the W0b PR body.

   FILES
   Static single-weight instances, subset to latin, produced from the Google
   Fonts variable woff2 (fonts.gstatic.com) with the fontTools instancer.
   Weights hosted = the weights actually used on live surfaces (grep-verified
   against critical.css + custom.css):
     DM Sans 400 / 500 / 600            (300 dropped — 0 call-sites)
     Cormorant Garamond 400 / 500 / 600 (400 KEPT — 26 live blocks default to it)
     Cormorant Garamond 400 italic      (500-italic dropped — 0 call-sites)

   FALLBACK OVERRIDES
   Computed with @capsizecss/unpack v4 + @capsizecss/metrics (Arial, Georgia)
   and independently reproduced with fontTools. size-adjust matches the
   weighted-average glyph advance (x-width); ascent/descent-override match the
   webfont's hhea metrics; line-gap-override:0% because both webfonts ship
   lineGap 0. Do NOT hand-edit these numbers — wrong overrides make CLS worse.
   Recompute via the method documented in the PR body if the faces change.
   ──────────────────────────────────────────────────────────────────────── */

/* ── DM Sans — workhorse sans ─────────────────────────────────────────── */
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/dm-sans-400.woff2') format('woff2')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/dm-sans-500.woff2') format('woff2')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/dm-sans-600.woff2') format('woff2')}

/* ── Cormorant Garamond — display serif ───────────────────────────────── */
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/cormorant-garamond-400.woff2') format('woff2')}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/cormorant-garamond-500.woff2') format('woff2')}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/cormorant-garamond-600.woff2') format('woff2')}
@font-face{font-family:'Cormorant Garamond';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/cormorant-garamond-400i.woff2') format('woff2')}

/* ── Metric-compatible fallbacks (the CLS-critical part) ──────────────────
   Each fallback is a real local face (Arial / Georgia) re-shaped so its line
   box matches the webfont's → swapping in the webfont causes ~0 layout shift.
   Used across every weight of its family; the browser applies these overrides
   during the font-display:swap window. Font stacks put these families
   immediately after the primary, e.g.
     'DM Sans', 'DM Sans Fallback', system-ui, sans-serif
     'Cormorant Garamond', 'Cormorant Fallback', Georgia, serif
   ──────────────────────────────────────────────────────────────────────── */
@font-face{
  font-family:'DM Sans Fallback';
  src:local('Arial');
  size-adjust:104.531%;
  ascent-override:94.90008%;
  descent-override:29.65628%;
  line-gap-override:0%;
}
@font-face{
  font-family:'Cormorant Fallback';
  src:local('Georgia');
  size-adjust:88.38028%;
  ascent-override:104.5482%;
  descent-override:32.47331%;
  line-gap-override:0%;
}
