/*
 * Self-hosted web fonts — the WEB faces only.
 *
 * LOADED ASYNCHRONOUSLY from index.html (media="print" → onload), exactly as
 * the third-party stylesheets it replaces were, so no font download competes
 * with the CSS and JavaScript the first paint needs. A first attempt bundled
 * these rules into the main stylesheet: Chrome then fetched five font files
 * (~500 KB) at high priority alongside the critical path and first paint on a
 * throttled phone went from 2.4s to 4.2s. The metric-matched fallback faces
 * live in src/styles/font-fallbacks.css, which IS bundled, so text paints in
 * the adjusted fallback and swaps to the web font with no shift.
 *
 * Served from public/ as a static file. The name carries a version because
 * .htaccess caches *.css for a year as immutable — bump it when this changes.
 *
 * Satoshi came from Fontshare and Inter / Newsreader from Google Fonts, each
 * as an async stylesheet from a third-party host. That kept them off the
 * critical path, at a price: the browser only learned the font URLs after the
 * third-party CSS arrived, so on a phone the fonts landed seconds after first
 * paint and re-flowed the hero. In the Lighthouse trace "Web font loaded" was
 * the sole cause of the homepage's layout shift (CLS 0.071) and of most of the
 * gap between the hero image loading and being counted as painted.
 *
 * The files now live in public/assets/fonts/ (immutable-cached by
 * .htaccess), so a <link rel="preload"> can name them in the document head
 * and they download alongside the CSS. Latin and Latin Extended only — the
 * site is English, and Latin Extended is what carries ₹ (U+20B9). The
 * unicode-range values are Google's own for those subsets, so the browser
 * fetches the extended file only when a page actually uses one of its
 * characters.
 *
 * Satoshi (homepage) and Inter (body elsewhere) are `swap`: the design's
 * typefaces are worth one re-flow when they trail the first paint, and that
 * re-flow measures ~0.07 CLS on the homepage, inside the "good" band. Newsreader is `optional`: it sets one or two accent lines per
 * page, and a late-arriving serif re-flowing a line the visitor is reading
 * is worse than that line staying in Georgia for this one page view. With
 * `optional` the browser uses it when it is already cached (every visit
 * after the first) and never swaps mid-read.
 *
 * Licences: Satoshi — Fontshare / Indian Type Foundry, free for commercial
 * use and permitted to self-host. Inter and Newsreader — SIL Open Font
 * License.
 */

/* ── Satoshi (homepage typeface; variable 300–900) ─────────────────────── */
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  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;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: 'Newsreader';
  src: url('/assets/fonts/newsreader-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: optional;
  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: 'Newsreader';
  src: url('/assets/fonts/newsreader-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: optional;
  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: 'Newsreader';
  src: url('/assets/fonts/newsreader-italic-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: optional;
  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: 'Newsreader';
  src: url('/assets/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: optional;
  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;
}
