/*
 * Roboto, self-hosted, served from this plugin -- and NOT LOADED ON A CLIENT'S
 * SITE.
 *
 * WHO THIS FILE IS FOR. It is the blueprint's typeface. Under `minimal` chrome
 * the ordering layer owns the site's chrome, so it owns the type as well, and
 * this is what oobase, clonetest and dryrun wear. Under `theme` chrome the site
 * belongs to somebody else and `inc/assets.php` does not enqueue this file at
 * all: the body font is the client's, read from GeneratePress and printed as
 * the `--oo-font` token by `inc/font-token.php`, and the faces are the client's
 * to load. The one exception, also in `fk_order_wants_own_fonts()`, is a client
 * who chose Roboto in GeneratePress and never arranged to load it.
 *
 * Ryan, 12 September 2026: "the ordering plugin shouldn't use roboto
 * necessarily it should use the main font for the site it's integrating into."
 * Before that this file was enqueued on every page the layer owns, and on
 * Sonora's `/order/` that meant downloading a second copy of the same family
 * the client was already serving. `PERFORMANCE.md` section 7 measured it: one
 * family, three files, 126 KB.
 *
 * WHEN BOTH ARE PRESENT the token wins, and that is the right way round. In the
 * exception case above this file declares `--oo-font` and `inc/font-token.php`
 * prints it too; the inline style is attached to `oo-order`, which is printed
 * after this stylesheet, so the value that reaches the page is the one read
 * from the site's own setting rather than the fallback chain written here.
 *
 * WHY THE FACES ARE HERE AND NOT IN THE CHILD THEME'S theme.json.
 *
 * theme.json is the tidier place to register a font face, and it is where these
 * lived while this was a Twenty Twenty-Five child theme. It cannot work here:
 * theme.json resolves a `file:./` source relative to the THEME directory, and
 * these two files live in the plugin, with the rest of the ordering layer's
 * assets. The alternatives were both worse -- duplicating the woff2 files into
 * every client's child theme, or writing an absolute https:// URL into
 * theme.json, which hardcodes one site's domain into a file that ships to
 * twenty.
 *
 * So `oo-base/theme.json` declares the FAMILY, which is what gives the editor
 * its font picker and the site its `--wp--preset--font-family--roboto`
 * variable, and this file supplies the FACES. Checked on GeneratePress 3.6.1:
 * GP ships no theme.json of its own, so the child's is the site's, and WordPress
 * emits the preset for a family declared with no `fontFace` without trying to
 * print an @font-face rule for it.
 *
 * The latin / latin-ext split and the unicode ranges are Google's own, kept so
 * a page of plain English never downloads the extended file.
 */

@font-face {
	font-family: Roboto;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/roboto-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: Roboto;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/roboto-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/*
 * The blueprint's own type. Twenty Twenty-Five applied this through theme.json's
 * `styles.typography.fontFamily`; GeneratePress sets its own font stack from the
 * customizer, at a specificity `body` cannot beat from a child theme.json alone.
 * Declaring it here keeps the DEMO on Roboto whatever GP's default is.
 *
 * It is not how a client site gets its typeface. That is GeneratePress's body
 * font, printed as `--oo-font` by `inc/font-token.php`, with this file absent
 * from the page entirely -- because a fallback chain written here can only ever
 * end in a face this plugin picked.
 */
:root {
	--oo-font: var(--wp--preset--font-family--roboto, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
}

body {
	font-family: var(--oo-font);
}
