/**
 * Self-hosted @font-face declarations for the "versostest" font family.
 *
 * Previously this font was only registered via Elementor's Custom Fonts
 * feature, which stores the generated @font-face CSS (including absolute
 * file URLs) in the database. Those URLs get baked in with whichever
 * domain was active when the font was uploaded and the underlying files
 * live in wp-content/uploads/, so the DB record and the CSS cache can
 * silently drift out of sync across environments that don't share a
 * database/uploads folder (e.g. local dev vs. staging).
 *
 * Vendoring the font files into this plugin and declaring @font-face here
 * removes that dependency entirely: the files and this stylesheet are
 * both version-controlled and identical on every environment, and the
 * URLs are resolved relative to wherever the plugin actually is (see
 * immer.php, IMMER_PLUGIN_URL), not hardcoded to one domain.
 */

@font-face {
    font-family: 'versostest';
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url('../fonts/versostest-regular-webfont.woff2') format('woff2'),
         url('../fonts/versostest-regular-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: italic;
    font-weight: normal;
    font-display: swap;
    src: url('../fonts/versostest-italic-webfont.woff2') format('woff2'),
         url('../fonts/versostest-italic-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/versostest-light-webfont.woff2') format('woff2'),
         url('../fonts/versostest-light-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/versostest-lightitalic-webfont.woff2') format('woff2'),
         url('../fonts/versostest-lightitalic-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: normal;
    font-weight: bold;
    font-display: swap;
    src: url('../fonts/versostest-bold-webfont.woff2') format('woff2'),
         url('../fonts/versostest-bold-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: italic;
    font-weight: bold;
    font-display: swap;
    src: url('../fonts/versostest-bolditalic-webfont.woff2') format('woff2'),
         url('../fonts/versostest-bolditalic-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/versostest-extrabold-webfont.woff2') format('woff2'),
         url('../fonts/versostest-extrabold-webfont.woff') format('woff');
}

@font-face {
    font-family: 'versostest';
    font-style: italic;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/versostest-extrabolditalic-webfont.woff2') format('woff2'),
         url('../fonts/versostest-extrabolditalic-webfont.woff') format('woff');
}

/**
 * Default font for all Immer components.
 *
 * Only font-family is set here, on purpose: font-weight, font-style, size and
 * line-height must stay inheritable/overridable so Elementor controls and the
 * component styles keep working (all weights map onto the faces above:
 * 600 -> 700, 500 -> 400, 800 -> 900, 100/200 -> 300).
 *
 * - .gd-root                       : added to the outermost element of every
 *                                    immer_gd_*_html() / immer-story renderer.
 * - [class*="elementor-widget-immer"]: Elementor's own wrapper of every Immer
 *                                    widget (immer_gd_*, immer-story).
 *
 * Children that set their own font-family (e.g. Elementor typography controls)
 * win over this inherited default. Nested roots just re-apply the same value.
 */
:root {
    --gd-font-family: 'versostest', sans-serif;
}

.gd-root,
[class*="elementor-widget-immer"] {
    font-family: var(--gd-font-family, 'versostest', sans-serif);
}
