/* =============================================================================
   VB ATTORNEYS — SELF-HOSTED WEBFONTS
   Latin-subset variable faces, served from this theme. No third-party requests.
   Replaces the Google Fonts stylesheet (16 files / 595 KB) with 3 files / 151 KB.

   DM Sans covers 300–700 in one variable file, so font-weight: 700 now renders
   the real bold instead of a browser-synthesised faux bold (it was requested in
   15 rules but never actually loaded).

   font-display: swap keeps text visible during load rather than blocking paint.
============================================================================= */

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/dm-sans-latin.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  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: 'EB Garamond';
  src: url('../fonts/eb-garamond-latin.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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: 'EB Garamond';
  src: url('../fonts/eb-garamond-latin-italic.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  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;
}

/* ── METRIC-MATCHED FALLBACKS (2026-09-12) ─────────────────────────────────────
   Why: with font-display: swap the hero renders first in a system font and
   re-flows when EB Garamond / DM Sans arrive. Georgia sets the same words
   ~17% WIDER than EB Garamond, so the 52px hero H1 wrapped to more lines in
   the fallback: measured on the live homepage at 412px, hero H1 270px tall in
   Georgia vs 162px in EB Garamond, and the vertically-centred hero block moved
   19px. Lighthouse mobile scored that as CLS 0.126 (field CLS stayed 0 because
   most visitors have the fonts cached). Lighthouse blamed the nav logo; the nav
   is position:fixed and cannot move the hero -- the fonts are the cause.

   Each face below is a system font scaled so the same text takes the same
   space, one face per metric family, listed in --serif / --sans (style.css
   :root) AFTER the real web font so it is used only while the woff2 is in
   flight. The browser takes the first face whose local() exists:
     macOS / Windows  -> Georgia, Arial
     Windows / Linux  -> Times New Roman = Liberation Serif = Tinos (identical
                         metrics); Arial = Liberation Sans = Arimo
     Android          -> Noto Serif, Roboto
     other Linux      -> DejaVu
   size-adjust = EB Garamond (or DM Sans at opsz 17) advance width / fallback
   advance width over the hero copy, computed from the font files with fontTools
   (Georgia/Arial also measured live in Chrome: 85.2% / 103.2%, within 1% of
   the computed 86.2% / 102.5% -- kerning). ascent/descent-override = the web
   font's typo metrics divided by size-adjust (Chrome scales overrides by
   size-adjust). Re-run the measurement if either web font is ever replaced. */

@font-face {
  font-family: 'EB Garamond Fallback Georgia';
  src: local('Georgia');
  size-adjust: 85.2%; ascent-override: 118.2%; descent-override: 35%; line-gap-override: 0%;
}
@font-face {
  font-family: 'EB Garamond Fallback Times';
  src: local('Times New Roman'), local('Liberation Serif'), local('Tinos');
  size-adjust: 93.7%; ascent-override: 107.4%; descent-override: 31.8%; line-gap-override: 0%;
}
@font-face {
  font-family: 'EB Garamond Fallback Noto';
  src: local('Noto Serif');
  size-adjust: 79.8%; ascent-override: 126.2%; descent-override: 37.3%; line-gap-override: 0%;
}
@font-face {
  font-family: 'EB Garamond Fallback DejaVu';
  src: local('DejaVu Serif');
  size-adjust: 74.4%; ascent-override: 135.4%; descent-override: 40.1%; line-gap-override: 0%;
}

@font-face {
  font-family: 'DM Sans Fallback Arial';
  src: local('Arial'), local('Liberation Sans'), local('Arimo'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 103.2%; ascent-override: 96%; descent-override: 30%; line-gap-override: 0%;
}
@font-face {
  font-family: 'DM Sans Fallback Roboto';
  src: local('Roboto');
  size-adjust: 104.6%; ascent-override: 94.9%; descent-override: 29.6%; line-gap-override: 0%;
}
@font-face {
  font-family: 'DM Sans Fallback Noto';
  src: local('Noto Sans');
  size-adjust: 99%; ascent-override: 100.2%; descent-override: 31.3%; line-gap-override: 0%;
}
@font-face {
  font-family: 'DM Sans Fallback DejaVu';
  src: local('DejaVu Sans');
  size-adjust: 91.5%; ascent-override: 108.4%; descent-override: 33.9%; line-gap-override: 0%;
}
