/* ─────────────────────────────────────────────────────────────────────────────
   Self-hosted UI typefaces.

   Everything here is served from our own origin — no fonts.googleapis.com, no
   third-party connection on the critical path, and no reliance on whatever the
   OS happens to ship. The whole point is that Studio renders identically on
   macOS and Windows; system font stacks (SF Pro vs Segoe UI, SF Mono vs
   Consolas) are exactly what we're getting away from.

   Three families, three jobs — see --font-display / --font-ui / --font-mono in
   style.scss:
     Outfit Variable    display  — panel titles, buttons, brand moments
     Inter Variable     UI       — 11-12px labels, values, lists, tables (body)
     JetBrains Mono     mono     — IDs, hashes, coordinates, embed code

   Both sans faces are VARIABLE (wght 100-900), so any weight is free — reach
   for 450 or 650 when the design wants it instead of rounding to 400/500/600/700.

   Files are vendored into static/fonts/ui/ from these npm packages (kept as
   devDependencies so the version is tracked and re-copying on upgrade is easy):
     @fontsource-variable/outfit  5.3.0
     @fontsource-variable/inter   5.3.0   (wght-only axis — the opsz/standard
                                           builds are ~71KB vs 47KB and we don't
                                           drive optical size)
     @fontsource-variable/jetbrains-mono 5.3.0

   unicode-range keeps the non-latin subsets off the critical path entirely:
   they are fetched only if such glyphs actually get rendered (e.g. a Cyrillic
   entity name out of a GLB). Latin-only session = 31.5 + 47.1 + 39.5 ≈ 118 KB.

   NOTE: Outfit has no Cyrillic — upstream ships latin + latin-ext only. Cyrillic
   inside a --font-display element falls through to Inter via the stack below.

   GOTCHA — these filenames are NOT content-hashed, and vercel.json serves
   /static/fonts/* with `max-age=31536000, immutable`. Upgrading a font package
   and overwriting the same filename would leave existing users 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. Same lesson as the R2 cache-header note in
   CLAUDE.md: with immutable caching, new bytes need a new path.
   ───────────────────────────────────────────────────────────────────────────── */

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

@font-face {
    font-family: 'Outfit Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('static/fonts/ui/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('static/fonts/ui/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;
}

/* ─── Inter Variable — UI / body ────────────────────────────────────────────── */

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('static/fonts/ui/inter-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: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('static/fonts/ui/inter-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;
}

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('static/fonts/ui/inter-cyrillic-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('static/fonts/ui/inter-cyrillic-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

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

/* Variable (wght 100-800), not the static weights. Measured: Studio renders mono
   at 400 (slider values, texture readouts) AND at 600 (.onboarding-chip), while
   the dashboard uses 700 for its usage figures. Shipping statics to cover that
   meant two files, 20.7 + 21.4 = 42.1 KB, and 600 would round up to the 700 face
   anyway. The variable latin file is 39.5 KB — cheaper than the pair and it hits
   every weight exactly. Without a real face at these weights the browser
   synthesises a fake bold, which visibly smears monospaced digits. */

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url('static/fonts/ui/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('static/fonts/ui/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;
}
