/**
 * FONTS
 *
 * @font-face doesn't need to be first — just before you use the font-family.
 * With font-display: swap, position doesn't affect fetch timing.
 *
 * Custom fonts loaded here:
 * - PP Neue Montreal (display) — variable
 * - Monaspace Neon (mono/code) — variable
 * - Monaspace Radon (mono/comments) — variable, handwriting style
 *
 * System fonts (not loaded, expected available):
 * - Georgia (body) — safe web font, installed on virtually all systems
 *
 * Body-serif pairing decision (kept here so it's not re-litigated each session):
 *   Sticking with Georgia for now. PP doesn't have a body serif that pairs
 *   cleanly with Neue Montreal — their lineup leans display (Migra, Hatton,
 *   Eiko, Right Didone). Editorial Old is the only PP candidate designed for
 *   body work, but its x-height runs taller than Georgia's, which throws off
 *   body rhythm against Montreal at the same font-size.
 *
 *   When revisiting (the four-mode goal: sans-head/serif-body, flip, all-serif,
 *   all-sans), the strongest non-PP candidate is Fraunces (Google Fonts, free) —
 *   variable with opsz/SOFT/WONK/ital/wght axes, including a real GRAD-equivalent.
 *   Newsreader is the more workhorse alternative. A serif with GRAD would
 *   solve the light-on-dark optical correction problem on serif text the same
 *   way it would on sans — GRAD is now a meaningful font-selection criterion
 *   for any future face we add.
 *
 * Server-side only (NOT loaded by browsers, do not subset):
 * - PPNeueMontreal-Bold.otf — used for meta/share-card image generation in PHP.
 *   GD/Imagick need OTF, not woff2. Leave alone.
 *
 * $todo: Define font family tokens (--font-body, --font-display, --font-mono).
 * $todo: Subset the variable woff2 files (see Subsetting note below) once the
 *        v3 upgrade lands — no point optimizing v2.6 if v3 is incoming.
 */


/* ============================================================
 * PP Neue Montreal — Display font
 * ============================================================
 *
 * Currently loaded: Version 2.600 (variable, 742 glyphs, 145 KB woff2).
 *
 * Variable axes:
 *   wght: 200–800 (Thin → Bold)
 *   ital: 0–1
 *   No GRAD axis. (Confirmed via fvar inspection + PP product page.)
 *
 * OpenType features (22 total in v2.6 — keep what we use, drop the rest on subset):
 *   Keep:
 *     kern, mark, mkmk, ccmp, case, locl, cpsp  — baseline rendering hygiene
 *     liga                                       — standard ligatures (fi, fl, ffi, ffl)
 *     ss01                                       — alternate 'a' (single-story)
 *     ss02                                       — round dots on i, j, !, ?, ä, ë, ö
 *     tnum, pnum                                 — tabular vs proportional figures
 *   Drop on subset (unused):
 *     aalt, dlig, frac, numr, dnom, sups, subs, sinf, ordn, zero
 *
 * Stylistic alternates — opt-in:
 *   .alt-a       { font-feature-settings: 'ss01'; }
 *   .round-dots  { font-feature-settings: 'ss02'; }
 *
 *
 * Optical correction for light-on-dark (e.g. block-link hover that flips to
 * dark fill + white text):
 *
 *   The `wght` axis is NOT safe for transient state changes — it changes
 *   advance widths, so the text reflows on hover. Visible jitter.
 *
 *   Without a GRAD axis, the only metric-locking option is the smoothing flip:
 *
 *     -webkit-font-smoothing: antialiased;
 *     -moz-osx-font-smoothing: grayscale;
 *
 *   This works on macOS/iOS WebKit only (where the chunky-white-on-black
 *   problem actually exists). No effect on Linux/Windows or Firefox.
 *
 *   For PERSISTENT dark surfaces (a permanent dark mode, not a hover), a
 *   slightly lighter `wght` is fine because nothing transient is reflowing.
 *   For TRANSIENT states (:hover, :focus-visible), use the smoothing flip
 *   only — or change a non-text property (outline, underline) for focus.
 *
 *
 * Version 3.00 (released April 2026, available but NOT yet adopted here):
 *   - 1350 glyphs per style (vs 742) — adds Cyrillic, Greek, Arabic, Vietnamese
 *   - Hairline + Black weights, dedicated "Text" optical-size variant
 *   - Still no GRAD axis (Weight + Italic only)
 *   - Estimated post-upgrade woff2 size without subsetting: ~250–300 KB
 *
 *   Implication for PE: subsetting matters MORE after upgrading, not less —
 *   we'd strip Cyrillic/Greek/Arabic and any unused weights. The legal
 *   reason to upgrade (current license tied to v2.6) is what'll force it.
 *
 *
 * Subsetting plan (when we get to it — works for v2.6 or v3):
 *
 *   pyftsubset PPNeueMontreal-Variable.woff2 \
 *     --output-file=PPNeueMontreal-Variable.subset.woff2 \
 *     --flavor=woff2 \
 *     --unicodes='U+0020-007F,U+00A0-00FF,U+2000-206F,U+2190-21FF,
 *                 U+25A0-25FF,U+2776-277E,U+2B00-2BFF' \
 *     --layout-features='kern,mark,mkmk,ccmp,case,locl,cpsp,
 *                        liga,ss01,ss02,tnum,pnum'
 *
 *   Realistic target: ~80 KB (from 145 KB on v2.6).
 *   Reversible — keep the original alongside until the subset is verified.
 *   Inspect any unfamiliar font with https://wakamaifondue.com (axes,
 *   features, glyph table, all in one drop-in).
 */
@font-face {
	font-family: 'PP Neue Montreal';
	src: url('../fonts/neue-montreal/variable/PPNeueMontreal-Variable.woff2') format('woff2-variations');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

/* Monaspace Neon - Neo-grotesque (clean, modern) */
@font-face {
	font-family: 'Monaspace Neon';
	src: url('../fonts/monaspace/MonaspaceNeon-Variable.woff2') format('woff2-variations');
	font-weight: 200 800;
	font-stretch: 100% 125%;
	font-style: normal;
	font-display: swap;
}

/* Monaspace Radon - Handwriting (casual, friendly) */
@font-face {
	font-family: 'Monaspace Radon';
	src: url('../fonts/monaspace/MonaspaceRadon-Variable.woff2') format('woff2-variations');
	font-weight: 200 800;
	font-stretch: 100% 125%;
	font-style: normal;
	font-display: swap;
}
