/**
 * polotno/fonts.css — optional IBM Plex font bundle (SPEC §4 / §6).
 *
 * OPT-IN ONLY. This file is NEVER auto-imported by any Polotno JS module —
 * `ui.css` ships font-free and `--pn-font-sans` falls back to a system stack.
 * Import this file explicitly to give the editor the IBM Plex look:
 *
 *   import 'polotno/ui.css';
 *   import 'polotno/fonts.css';
 *
 * It defines the `@font-face` rules and points the public `--pn-font-sans`
 * override hook (read by the scoped roots in `ui.css`) at IBM Plex Sans.
 * Fonts are loaded from the jsDelivr Fontsource CDN so the file is
 * self-contained (no bundled binaries, no extra install).
 */

/* IBM Plex Sans — 400 / 500 / 600 / 700 (latin) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-400-normal.woff2')
    format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-500-normal.woff2')
    format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-600-normal.woff2')
    format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-700-normal.woff2')
    format('woff2');
}

/* IBM Plex Mono — 400 / 500 (latin) */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-mono@latest/latin-400-normal.woff2')
    format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-mono@latest/latin-500-normal.woff2')
    format('woff2');
}

/* Wire the IBM Plex families into Polotno's public override hooks. Setting them
   on :root keeps this an opt-in, app-level choice; the editor reads
   var(--pn-font-sans, <system stack>) on its scoped roots. */
:root {
  --pn-font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --pn-font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
