/*
 * NexGen Secure — self-hosted type.
 *
 * Self-hosted rather than loaded from a CDN for two reasons specific to selling
 * to schools: district network filters block third-party CDNs, and a CDN font
 * request sends a student's IP address to another company, which is an awkward
 * answer in a K-12 privacy review.
 *
 * Every font here is SIL OFL, which explicitly permits bundling, redistribution
 * and sale with software. That is what lets a lab carry its own copy into the
 * nexgen-games bucket — labs are self-contained and cannot rely on a CDN.
 *
 * A font whose licence forbids self-hosting or redistribution cannot be used
 * here, however good it looks. Clash Display was the original choice and was
 * dropped for exactly that reason; see LICENSES.md.
 *
 * The stack is defined in docs/BRAND-GUIDE.md. Licences are in LICENSES.md.
 */

/* HEADINGS — Bricolage Grotesque (SIL OFL).
   Deliberately a little irregular; reads as drawn rather than generated.
   Use sparingly: headings, lab titles, short labels. Never long passages. */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('./bricolage-grotesque-variable.ttf') format('truetype-variations');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* BODY — Atkinson Hyperlegible (Braille Institute, SIL OFL).
   Drawn so I/l/1 and O/0 cannot be confused, for low-vision readers. The
   default for everything a student reads. */
@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('./atkinson-hyperlegible-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('./atkinson-hyperlegible-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('./atkinson-hyperlegible-italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('./atkinson-hyperlegible-bolditalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* TERMINALS AND CODE — Martian Mono (SIL OFL).
   One variable file covers every weight, so this is a single request. */
@font-face {
    font-family: 'Martian Mono';
    src: url('./martian-mono-variable.ttf') format('truetype-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ───────────────────────────────────────────────────────────────────────────
   THE PRODUCT'S OWN TYPE

   The three faces the shipped dashboards are built in. They are here so the
   product tour can render the real dashboards at real fidelity without any of
   them reaching for fonts.googleapis.com — which the dashboards themselves
   still do, and which is the CDN dependency WORKING-TRACKER wants removed.

   Latin subset only, woff2, variable where an axis exists: 85 KB for all four
   files, against 753 KB for the .ttf set above.

   All three are SIL OFL, same as everything else here. Refreshed with
   `node app/scripts/fetch-dashboard-fonts.js`, which records where each file
   came from.

   These are for rendering the PRODUCT inside the tour. Marketing pages keep
   the brand stack below — do not reach for these on a marketing page.
   ─────────────────────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('./plus-jakarta-sans-variable.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Sans';
    src: url('./instrument-sans-variable.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Mono';
    src: url('./dm-mono-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DM Mono';
    src: url('./dm-mono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-heading: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    --font-body:    'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
    --font-mono:    'Martian Mono', 'JetBrains Mono', 'Courier New', monospace;

    /* The product's stack, for decks inside the tour only. */
    --font-app-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --font-app-body:    'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --font-app-mono:    'DM Mono', 'JetBrains Mono', 'Courier New', monospace;
}
