/*
 * fonts.css — self-hosted @font-face declarations for the redesigned site.
 *
 * Phase 1 (2026-05-18): file exists but is not yet linked from any template
 * (Phase 2's new base.html will <link> it). Inter and Space Grotesk files are
 * already on disk under shared/src/web_public/static/fonts/; JetBrains Mono
 * files are procurement deliverables for Phase 1 (see procurement note below).
 *
 * Naming convention matches existing files: lowercase, hyphenated, subset
 * suffix. Variable-weight axis baked into one file per subset, no per-weight
 * file split. See phase-1-foundation.md §2.1.
 *
 * Cache-busting: served from /static/public/fonts/*.woff2 with long max-age
 * (immutable via filename → no Cache-Control hash needed; we only re-deploy
 * when fonts genuinely change).
 *
 * --- JetBrains Mono procurement note (Phase 1 implementer) ---
 * Source: https://github.com/JetBrains/JetBrainsMono/releases
 * License: OFL 1.1.
 * Required subsets:
 *   - jetbrains-mono-latin.woff2          (basic Latin)
 *   - jetbrains-mono-latin-ext.woff2      (Latin Extended)
 *   - jetbrains-mono-cyrillic.woff2       (OPTIONAL — drop if >20KB, see P1.B)
 * Procedure (per phase-1-foundation.md §2.1 and PLAN.md §5.1):
 *   1. Download JetBrainsMono variable-weight TTF or static Regular+Medium.
 *   2. Subset to unicode-range using glyphhanger or pyftsubset, output woff2.
 *   3. Place files under shared/src/web_public/static/fonts/.
 *   4. Verify file sizes; drop cyrillic subset if it adds >20KB.
 *   5. curl -sI https://dev.taktext.com/static/public/fonts/jetbrains-mono-latin.woff2
 *      returns 200 after dev deploy.
 *
 * The @font-face blocks below assume the files exist. Until JetBrains Mono is
 * procured the browser will 404 on the URL; this is harmless in Phase 1
 * because no template links this stylesheet yet.
 */

/* --- Inter (variable-weight) --- */

@font-face {
  font-family: 'Inter';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

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

/* --- Space Grotesk (variable-weight, latin + latin-ext only) --- */

@font-face {
  font-family: 'Space Grotesk';
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- JetBrains Mono (variable-weight 400..500; subsets self-hosted 2026-05-18) ---
 *
 * Source: Google Fonts CSS2 v24, fetched 2026-05-18 with Chrome UA. Both
 * weight 400 and weight 500 in Google's CSS2 response point to the SAME
 * .woff2 per subset (the file is the variable-weight axis). unicode-range
 * values below are copied verbatim from Google's CSS2 v24 response so the
 * browser correctly matches glyphs to the served files.
 *
 * Procurement evidence: shared/docs/plans/web-redesign-2026-05/PHASES/
 *   phase-2-procurement-evidence.md (Phase 2 procurement record).
 *
 * Sizes: latin 31 KB, latin-ext 12 KB, cyrillic 9 KB (cyrillic kept;
 * well under the 20 KB threshold from plan §P1.B). cyrillic-ext / greek /
 * vietnamese subsets intentionally NOT procured — out of locale scope.
 */

@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/jetbrains-mono-latin.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: 'JetBrains Mono';
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  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: 'JetBrains Mono';
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  src: url('/static/public/fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
