/* ============================================================
   THE FACES, SELF-HOSTED.  Norican (display) + Trocchi (text).

   Campbell, 2026-08-01: "fix the CLS, self-host the fonts then deploy."

   WHY. The render wall flagged CLS 0.197 on the homepage. Three unthrottled
   runs measured 0, but under 4x CPU and Fast 4G it reproduced exactly at
   0.2017, twice, sourced to `section.arr` and the four hero links shifting
   together. That is the webfont swap reflowing the hero: the fallback renders
   first with different metrics, the real face arrives, and everything relaid.
   Verified pre-existing on the previous live build, so it was never a
   regression, it was simply never measured under load.

   TWO THINGS FIX IT AND BOTH ARE HERE.

   1. SELF-HOSTING plus preload. The faces came from fonts.gstatic.com, which
      is a second origin: DNS, TLS and a round trip before the browser even
      learns which files it needs (the CSS has to arrive first). Same-origin
      woff2 with a preload starts immediately at high priority and usually
      lands before first paint, so no swap happens at all. This build already
      self-hosts GSAP for exactly this reasoning: a client site does not take a
      third-party runtime dependency it can carry itself.

   2. A METRIC-MATCHED FALLBACK, for the slow load where the swap still
      happens. The overrides below make the fallback occupy the SAME box as the
      real face, so when the real one arrives nothing moves. ascent, descent and
      line-gap come from the font files themselves (fontTools: both faces are
      2048 upm with USE_TYPO_METRICS set); size-adjust was MEASURED in the
      browser by rendering the same string in both faces and comparing widths,
      never estimated.

   Licence: both faces are SIL Open Font Licence 1.1, which permits hosting and
   commercial client work. Files are the Google-served latin and latin-ext
   woff2 subsets, unmodified.
   ============================================================ */

/* ---------- Norican, the display face ---------- */
@font-face{
  font-family:'Norican';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/fonts/norican-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:'Norican';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/fonts/norican-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;
}

/* ---------- Trocchi, the text face ---------- */
@font-face{
  font-family:'Trocchi';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/fonts/trocchi-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:'Trocchi';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/fonts/trocchi-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;
}

/* ---------- THE METRIC-MATCHED FALLBACKS.
     These never render as a design choice. They exist so that the few hundred
     milliseconds before the real face lands occupy exactly the same space, and
     the swap therefore moves nothing. size-adjust values are MEASURED, see the
     header. ---------- */
@font-face{
  font-family:'Trocchi Fallback';
  src:local('Georgia'), local('Times New Roman'), local('serif');
  ascent-override:101.81%;
  descent-override:28.12%;
  line-gap-override:0%;
  size-adjust:109.81%;
}
@font-face{
  font-family:'Norican Fallback';
  src:local('Georgia'), local('Times New Roman'), local('serif');
  ascent-override:102.29%;
  descent-override:38.62%;
  line-gap-override:0%;
  size-adjust:81.05%;
}
