/* ============================================================
   FONTS — Fraunces, self-hosted variable font (roman + italic)
   Files live in assets/fonts/. Licence: SIL Open Font License
   (free to self-host commercially). Source: Google Fonts v38.

   Self-hosted rather than loaded from the Google Fonts CDN: it's
   faster (no third-party DNS + TLS handshake), and it keeps our
   visitors' IP addresses away from Google.

   VARIABLE FONT — each file covers weights 300–700 AND the optical-
   size axis (opsz). With `font-optical-sizing: auto` on the body,
   the browser picks the right optical size for each font-size on its
   own — finer detail for big display type, sturdier shapes for small
   text. Roman and italic are separate files so italics render as
   TRUE Fraunces italics, not mechanically slanted romans.

   Split by character coverage, not weight:
     fraunces-latin.woff2      66KB — English and most Western European
     fraunces-latin-ext.woff2  58KB — extended Latin (accents, currency)
     (+ italic counterparts)

   The `unicode-range` descriptors mean the browser downloads the
   -ext and italic files ONLY when the page actually uses them.
   ============================================================ */

/* --- Roman, Latin (loaded by nearly everyone) --- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  /* A weight RANGE, not a single value — this is what makes it variable */
  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;
}

/* --- Roman, Latin Extended (fetched only when needed) --- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  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;
}

/* --- Italic, Latin --- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 700;
  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;
}

/* --- Italic, Latin Extended --- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
  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;
}
