/* ---------------------------------------------------------------------------
 * @loanos-ai/design — font loading for non-Next.js consumers
 *
 * Provides DM Sans (weights 400/500/600/700) and Noto Serif (weight 400) via
 * self-hosted .woff2 files, and sets --font-sans-loaded / --font-heading-loaded
 * so the cascade in globals.css resolves correctly.
 *
 * DM Sans v17 from Google Fonts is a variable font; one .woff2 per subset
 * covers all four weights (400/500/600/700). Noto Serif is shipped at 400
 * only per the brand rule.
 *
 * font-display: swap — fallback text renders instantly, swap occurs in one
 * frame once the .woff2 finishes loading. Prevents FOIT.
 * ------------------------------------------------------------------------- */

/* DM Sans — latin (variable font, 400–700) */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/dm-sans-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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans — latin-ext (variable font, 400–700) */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Noto Serif — latin, weight 400 */
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/noto-serif-400-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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Noto Serif — latin-ext, weight 400 */
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/noto-serif-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Feed the globals.css cascade. The line in globals.css is
 *   --font-sans: var(--font-sans-loaded), "DM Sans", ...
 * so setting these here makes the cascade resolve the correct family name
 * without touching globals.css. */
:root {
  --font-sans-loaded: "DM Sans";
  --font-heading-loaded: "Noto Serif";
}
