/*!
 * -------------------------------------------------------------------------
 * Fb Industry Automation branding plugin for GLPI — web font declarations
 * -------------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of the Fb Industry Automation branding plugin.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 * -------------------------------------------------------------------------
 */

/* =========================================================================
 * WHY THIS IS A SEPARATE FILE
 * =========================================================================
 *
 * `Hooks::ADD_CSS` accepts a list and emits one <link> per entry, in order
 * (PluginExtension::getPluginsCssFiles). Putting the faces first means the
 * browser can start fetching the woff2 files while the much larger design
 * layer is still arriving. An `@import` at the top of the design layer would
 * do the opposite — it serialises the font download behind the stylesheet
 * that references it.
 *
 * FONTS ARE BUNDLED, NEVER FETCHED
 * --------------------------------
 * Every face here is served from this plugin's own `public/fonts/`. There is
 * no Google Fonts link, no Adobe Fonts kit, no CDN. A GLPI instance is
 * routinely deployed on an isolated network, and an identity that depends on
 * a third-party host is an identity that disappears behind a firewall.
 *
 * The files are subsets built by `tools/build-brand-assets.py` from the TTFs
 * in `branding/Firmenschriften/`. Both families are SIL OFL 1.1 and the
 * licence text ships beside them (`public/fonts/OFL-*.txt`); shipping the
 * fonts without it would be a licence violation.
 *
 * THE ROLES ARE THE GUIDE'S, NOT OURS
 * -----------------------------------
 * Design Guide p.9 assigns four roles. `docs/corporate-identity.md` §4 records
 * why only three weights ship and why no italic does.
 *
 *   Montserrat 400   Fliesstexte       body text
 *   Montserrat 700   Ueberschriften    headings
 *   Montserrat 900   Design & Layout   display only — never running text
 *   Rajdhani  500    Spezifikationen   technical data: numbers, identifiers
 *
 * `font-display: swap` is deliberate. GLPI is a working tool, not a landing
 * page: text that is invisible for 3 s (the `block` default) is worse for the
 * user than text that reflows once. The fallback stack below is metric-picked
 * to keep that reflow small.
 *
 * `unicode-range` here restates the ranges *requested* from the subsetter,
 * which is a superset of what two of the faces actually carry (Rajdhani's
 * released glyph set is missing six Latin Extended-A characters). That is
 * safe: `unicode-range` only decides whether the file is downloaded. Glyph
 * selection consults the font's real character map, so a character the subset
 * lacks still falls through to the next font in the stack rather than
 * rendering as a .notdef box. Run the build tool to print the exact coverage.
 * ========================================================================= */

@font-face {
    font-family: "Fb Montserrat";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/montserrat-400.woff2") format("woff2");
    unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+2010-2027,
        U+2030-205E, U+20A0-20BF, U+2122, U+2190-2193, U+25A0-25CF, U+2713-2714;
}

@font-face {
    font-family: "Fb Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/montserrat-700.woff2") format("woff2");
    unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+2010-2027,
        U+2030-205E, U+20A0-20BF, U+2122, U+2190-2193, U+25A0-25CF, U+2713-2714;
}

@font-face {
    font-family: "Fb Montserrat";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/montserrat-900.woff2") format("woff2");
    unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+2010-2027,
        U+2030-205E, U+20A0-20BF, U+2122, U+2190-2193, U+25A0-25CF, U+2713-2714;
}

@font-face {
    font-family: "Fb Rajdhani";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/rajdhani-500.woff2") format("woff2");
    unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+2010-2027,
        U+2030-205E, U+20A0-20BF, U+2122, U+25CC;
}

/* -------------------------------------------------------------------------
 * There is deliberately no italic @font-face and no `font-synthesis` opt-in.
 *
 * The guide lists "& Italic" against all four type roles, but the released
 * Rajdhani family contains no italic at all — there is nothing to ship. A
 * browser asked for an italic it does not have will shear the upright, and a
 * sheared letterform is exactly the distortion the guide forbids for the logo
 * (p.8). `--fb-font-synthesis: none` in the design layer turns that off
 * globally; see `docs/corporate-identity.md` §4.
 * ------------------------------------------------------------------------- */
