/* ─────────────────────────────────────────────────────────────────────────────
   Self-hosted typefaces for trice3d.com.

   Until 2026-08-31 this site pulled four families off fonts.googleapis.com via
   a stylesheet <link> in BaseLayout.astro. That cost two extra origins (DNS +
   TLS + the CSS round-trip before a single font byte moves) on every cold
   visit, forced fonts.googleapis.com / fonts.gstatic.com into the CSP, and sent
   every visitor's IP to Google. `display=optional` papered over the latency by
   simply not using the fonts when they lost the race — so a slow first visit
   silently rendered the whole page in the fallback stack.

   Now everything is on our own origin, the same way Studio already worked (see
   model-viewer/src/fonts.css). Same-origin means the font request rides the
   connection that already fetched the HTML.

   Four families, four jobs — see --font / --mono / 'Sora' / 'Outfit' in
   src/styles/global.css and the page-level <style> blocks:
     DM Sans Variable  body     — paragraphs, nav, buttons (--font)
     Sora Variable     headings — section titles, hero copy
     Outfit Variable   display  — brand moments, large numerals
     JetBrains Mono    mono     — code, IDs, format badges (--mono)

   All four are VARIABLE (wght 100-900 sans, 100-800 mono), which is why this is
   cheaper than it looks: the old Google request asked for 9 STATIC weights
   across the four families. One variable file per family covers every weight,
   exactly, and leaves 450/650 available if a design ever wants them.

   Files are vendored into this directory from these npm packages (kept as
   devDependencies so the version is tracked and re-copying on upgrade is easy):
     @fontsource-variable/dm-sans        5.3.0  (wght-only axis — the opsz and
                                                 standard builds are bigger and
                                                 we don't drive optical size)
     @fontsource-variable/sora           5.3.0
     @fontsource-variable/outfit         5.3.0
     @fontsource-variable/jetbrains-mono 5.3.0  (same face and version Studio
                                                 uses — see
                                                 model-viewer/src/fonts.css)

   Latin-only visit = 36.1 + 32.9 + 31.5 + 39.5 ≈ 140 KB, cached for a year.
   unicode-range keeps latin-ext off the critical path: it is fetched only if
   such glyphs actually render. No package here ships Cyrillic and the site is
   English, so those stacks end at a system fallback on purpose.

   GOTCHA — these filenames are NOT content-hashed, and vercel.json serves
   /fonts/* with `max-age=31536000, immutable`. Upgrading a font package and
   overwriting the same filename would leave existing visitors on the old face
   for up to a year. When you bump a package, RENAME the file (e.g. append the
   version) and update the src below. With immutable caching, new bytes need a
   new path. (fonts.css itself is deliberately NOT in that immutable rule, so
   it can be the thing that points at the new path.)
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── DM Sans Variable — body ───────────────────────────────────────────────── */

@font-face {
  font-family: 'DM Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  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 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}

/* ─── Sora Variable — headings ──────────────────────────────────────────────── */

@font-face {
  font-family: 'Sora Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/sora-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Sora Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/sora-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}

/* ─── Outfit Variable — display ─────────────────────────────────────────────── */

@font-face {
  font-family: 'Outfit Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Outfit Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/outfit-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}

/* ─── JetBrains Mono — monospace ────────────────────────────────────────────── */

/* Deliberately the same face, version and family NAME as Studio's --font-mono.
   Embed snippets and project IDs are shown on both surfaces and must not drift.
   Chivo Mono was tried here on 2026-08-31 and rejected on looks — it reads soft
   and wide at the 12-13px this site sets mono at, where JetBrains Mono's tall
   x-height and tight advance were designed for exactly that size. */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  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: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}
