/* =============================================================================
   fonts.css  ·  SELF-HOSTED BRAND TYPEFACES                       (2026-07-28)
   =============================================================================
   WHY THIS FILE EXISTS
   --------------------
   The public site used to pull Clash Display + General Sans from
   `api.fontshare.com` and JetBrains Mono from `fonts.googleapis.com`.

   On 2026-07-28 the Fontshare API began answering the site's exact request
   (`?f[]=clash-display@500,600&f[]=general-sans@400,500,600`) with HTTP 200 and
   a body consisting of nothing but a CSS comment reading

       "Access to the Fontshare API has been temporarily restricted."

   i.e. no @font-face rules at all. Both brand families silently vanished and
   every surface fell back down `--font-ui` / `--font-display` to a system face
   (Times New Roman on any surface whose chain bottomed out). The entire
   typographic identity of the product sat behind a third-party CDN with no
   contractual uptime — see clause 06 of the Fontshare EULA, which explicitly
   disclaims any liability for API downtime.

   So the faces are now served from our own origin. No third-party font request
   remains on any public page.

   LICENSING
   ---------
   Clash Display + General Sans · Indian Type Foundry, "Fontshare Free Font
   EULA" (ITF FFL). Full text shipped alongside the binaries at
   `static/fonts/LICENSE-Fontshare-FFL.txt`.
     · Clause 01 grants free personal AND commercial use "in any media
       (including Print, Web, Mobile, Digital, Apps...)" for an unlimited term.
     · The .woff2 files here come straight out of the foundry's own official
       download package (`api.fontshare.com/v2/fonts/download/<family>`), from
       its `Fonts/WEB/fonts/` folder. That package ships a `Fonts/WEB/README.md`
       whose entire content is step-by-step instructions to copy the woff2s into
       your own `fonts/` folder and point your own CSS `url()`s at them — i.e.
       self-hosting is the foundry's documented, intended delivery path, not a
       workaround. (Clause 02's "font serving / font replacement" prohibition is
       the standard ITF anti-EOT/Cufon/sIFR clause about re-serving the font
       software to third parties, not about hosting your own site's webfonts.)
     · We ship only unmodified originals, at the weights the design uses.

   JetBrains Mono · SIL Open Font License 1.1 (github.com/JetBrains/JetBrainsMono).
   OFL explicitly permits bundling, self-hosting and redistribution. The file
   here is the latin-subset variable instance Google Fonts itself serves
   (`fonts.gstatic.com/s/jetbrainsmono/v24/...PxDcwg.woff2`), carried over
   verbatim so rendering is byte-identical to what the site shipped before.

   LOAD ORDER
   ----------
   Link this BEFORE site-tokens.css (which defines --font-display / --font-ui /
   --font-mono) on every public page, and before disclaimer.css anywhere the
   T&C modal renders (/ and /try).

   PATHS
   -----
   `url()` is relative to THIS file (static/css/), so `../fonts/*.woff2`
   resolves under any Flask static prefix without needing url_for().
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Clash Display  ·  DISPLAY ONLY (headlines + the two wordmarks)
   Only the two weights the token contract actually paints: 500, 600.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Clash Display';
  src: url('../fonts/ClashDisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('../fonts/ClashDisplay-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   General Sans  ·  everything UI / body.  Weights 400, 500, 600.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'General Sans';
  src: url('../fonts/GeneralSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('../fonts/GeneralSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('../fonts/GeneralSans-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   JetBrains Mono  ·  eyebrows, data, numerals, captions.
   ONE variable file (verified: fvar/gvar/avar/STAT present, wght 100-800), so a
   single face covers 400/500/600 instead of three static downloads.
   `unicode-range` is Google's own latin subset definition, carried over verbatim
   — anything outside it falls through to ui-monospace exactly as it did before,
   and the file is only fetched when latin glyphs are actually painted.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Latin-VF.woff2') format('woff2');
  font-weight: 100 800;
  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;
}
