/* Obsidian Crown — brand webfaces (docs/design/STYLE_GUIDE.md §Typography).
 *
 * SELF-HOSTED ON PURPOSE. No Google Fonts, no CDN, no runtime third-party
 * request. A CDN link would make first paint depend on someone else's uptime,
 * leak every visitor's IP to a third party, and render differently the day the
 * CDN reslices its subsets. These files ship from our own origin instead.
 *
 * Serve this directory with a long immutable cache header — the filenames are
 * version-stable, and upstream versions are pinned in ../README.md.
 *
 * woff2 only: supported by every browser we target (Chrome/Edge 36+, Firefox
 * 39+, Safari 12+, all current mobile). There is no .ttf fallback here by
 * design — a browser too old for woff2 cannot run the rest of the app either.
 * The .ttf siblings in each directory exist ONLY for the headless-Chromium
 * mockup renderer, which resolves fonts through fontconfig and cannot read
 * woff2. They are never served to a user.
 *
 * Geist, Geist Mono, and Inter are variable (weight 100–900 from one file, so
 * the whole scale costs one request). Instrument Serif is single-weight by
 * upstream design.
 */

/* --- Geist Sans — product UI ------------------------------------------- */
@font-face {
  font-family: "Geist";
  src: url("./geist/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("./geist/Geist-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --- Geist Mono — numerals, timers, currency, aligned metrics ----------- */
@font-face {
  font-family: "Geist Mono";
  src: url("./geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("./geist-mono/GeistMono-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --- Inter — declared fallback for Geist ------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("./inter/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./inter/Inter-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --- Instrument Serif — marketing display accent ONLY -------------------
 * Never in controls, forms, tables, navigation, or dense product UI
 * (STYLE_GUIDE.md §Typography). Load it only on pages that actually set it;
 * font-display: swap keeps it off the critical path either way.
 */
@font-face {
  font-family: "Instrument Serif";
  src: url("./instrument-serif/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./instrument-serif/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- Semantic stacks ---------------------------------------------------
 * Reference these, not raw family names, so a face swap is a one-line change.
 * system-ui is the last resort and is metrically close enough to Geist/Inter
 * that a swap does not reflow the page.
 */
:root {
  --oc-font-ui: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --oc-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --oc-font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
}
