/*
 * Self-hosted type. Roadmap 5.1 — removing Google as a data processor.
 *
 * Every public page used to load these faces from fonts.googleapis.com, which sent
 * each visitor's IP address and user agent to Google on first paint, before they had
 * agreed to anything, in exchange for two typefaces. Serving them ourselves removes
 * Google from LeadYard's processor register entirely — the cheapest privacy win
 * available, and the only one that deletes a row from that table rather than
 * explaining it.
 *
 * Files are vendored into the repo from the @fontsource-variable packages (SIL Open
 * Font License), latin subset only. They are committed rather than installed at build
 * time deliberately: a font that arrives via `npm ci` makes rendering text depend on a
 * registry being up, and the failure mode is a site that loads without its typography.
 *
 * VARIABLE fonts, so one file covers a whole weight range instead of one file per
 * weight. Five files, ~200KB total — and a browser downloads a file only when a rule
 * actually uses that family, which is why Open Sans costs nothing until something
 * asks for it.
 *
 * `font-display: swap` matches what the Google URL requested, so first paint behaves
 * as it did before rather than blocking on the font.
 */

/* Space Grotesk — headings and the wordmark. 114 declarations across the site. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/brand/fonts/space-grotesk-latin-wght-normal.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;
}

/*
 * DM Sans — body copy. 23 declarations.
 *
 * These are the `opsz` cuts, carrying BOTH the optical-size (9–40) and weight
 * (100–1000) axes, because that is what Kirko's font request asked for
 * (`DM+Sans:ital,opsz,wght@0,9..40,100..1000`). The alternative `wght` files are the
 * 9pt optical size frozen, which would render body text at a display cut's
 * proportions and look subtly wrong at large sizes without anything obviously being
 * broken. Browsers apply `opsz` automatically from font-size (`font-optical-sizing`
 * defaults to `auto`), so this needs no extra CSS — it just has to be the right file.
 */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('/brand/fonts/dm-sans-latin-opsz-normal.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: 'DM Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 100 1000;
  src: url('/brand/fonts/dm-sans-latin-opsz-italic.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;
}

/*
 * Open Sans — declared and available, used by nothing yet (Kirko, 10 Aug 2026:
 * include it, no typography changes).
 *
 * Because this is a self-hosted @font-face rather than a Google stylesheet link, the
 * browser fetches these two files only once a CSS rule actually names the family.
 * Until then they cost a visitor nothing at all. That would NOT have been true of the
 * Google URL, which downloads whatever the link asks for whether or not anything uses
 * it — so self-hosting is what makes "include it, change nothing yet" free.
 */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url('/brand/fonts/open-sans-latin-wght-normal.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: 'Open Sans';
  font-style: italic;
  font-display: swap;
  font-weight: 300 800;
  src: url('/brand/fonts/open-sans-latin-wght-italic.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;
}
