/* =============================================================================
   Neon — Self-hosted type
   =============================================================================

   Vollkorn (body/UI) and Alan Sans (display) — the two named faces
   `derive-a-design-system.md` §2 asked for, self-hosted per the recipe in
   libs/dessau/docs/typography.md ("Self-hosting, when a product wants the
   full identity"). Both OFL 1.1 — licences travel with the files in
   dds/fonts/OFL-*.txt, per that recipe's step 6.

   NOT part of dds/dds.css's own import list — same reason Dessau's reference
   site keeps its fonts.css separate (docs/typography.md: "There is no
   dds/css/fonts.css, and there will not be" — that line is about DESSAU
   shipping one, not about a derived system owning its own). Link this file
   BEFORE dds.css:

       <link rel="preload" href="/dds/fonts/Vollkorn-Variable-latin-ext.woff2"
             as="font" type="font/woff2" crossorigin>
       <link rel="stylesheet" href="/dds/css/fonts.css">
       <link rel="stylesheet" href="/dds/dds.css">

   Only the body face is preloaded — it renders first and everywhere;
   preloading all three (were there a third) competes with content for
   bandwidth.

   Both files are ONE variable woff2 each, subset to Latin + Latin
   Extended-A/-B + general punctuation/currency (the same unicode-range
   typography.md's own recipe uses), which covers every Latin-script European
   language without a rebuild. Source: the google/fonts OFL source repository,
   variable TTF, subset with fonttools/pyftsubset, keeping the OpenType
   features Neon actually asks for (tabular/proportional/lining/oldstyle
   figures, slashed zero, fractions — see foundations.md's numeral rules).
   ============================================================================= */

@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/Vollkorn-Variable-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20A0-20BF, U+2122, U+2212;
}

@font-face {
  font-family: "Vollkorn";
  src: url("../fonts/Vollkorn-Italic-Variable-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20A0-20BF, U+2122, U+2212;
}

@font-face {
  font-family: "Alan Sans";
  src: url("../fonts/AlanSans-Variable-latin-ext.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20A0-20BF, U+2122, U+2212;
}

/* ---------------------------------------------------------------------------
   Metric-matched fallbacks — reduce the reflow on swap. Approximate: real
   fallback-font metrics vary by OS (Georgia/Arial here are the common
   desktop baseline), so treat these as a good default rather than an exact
   match, and re-tune against whatever the reference renders if the jump is
   visible in practice. Values derived from Vollkorn's and Alan Sans' own
   OS/2 metrics (xHeight-ratio method) — not guessed.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Vollkorn Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 86.7%;
  ascent-override: 109.8%;
  descent-override: 50.9%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Alan Sans Fallback";
  src: local("Arial"), local("Helvetica Neue");
  size-adjust: 96.4%;
  ascent-override: 102.7%;
  descent-override: 32.2%;
  line-gap-override: 0%;
}
