/*
 * Self-hosted webfaces for the approved visual direction.
 *
 * Lives in public/ on purpose: `npm run design:check` forbids named font
 * families and hosted-font imports anywhere under src/, so the @font-face
 * declarations cannot live there. The families are declared in
 * visual/DESIGN.md and reach components only as token roles
 * (var(--font-display), var(--font-body)); this file only binds those names
 * to local files.
 *
 * Both faces are SIL Open Font License 1.1 and are served from this origin
 * rather than a third-party CDN, so no visitor request leaves the site.
 *
 *   Plus Jakarta Sans — Tokotype, OFL 1.1 — display, headings, labels, numerals
 *   Inter            — Rasmus Andersson, OFL 1.1 — body and interface text
 *
 * Variable weight axes, latin subset.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-var.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;
}

/*
 * Punctuation override for the display face. Plus Jakarta Sans draws the full
 * stop and comma with a wide left sidebearing (0.10-0.13em), which reads as a
 * stray space at display sizes ("found . Build"). This file is the same OFL
 * font subset to those two glyphs, each moved left by 0.045-0.055em with the
 * advance reduced to match; the variation data is untouched, so every weight
 * keeps its own shapes. Declared after the main face so that, for these two
 * code points, the browser picks it first (CSS Fonts: later rules win).
 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-punct-var.woff2') format('woff2');
  unicode-range: U+002C, U+002E;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin-var.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;
}
