/**
 * Jost for the Russian and English versions.
 *
 * The site is set in Alef, a Hebrew face whose Latin and Cyrillic are an
 * afterthought - it has no Cyrillic at all, so Russian was falling back to
 * whatever the browser chose and looked different on every machine.
 *
 * Loaded from the plugin rather than from Google's CDN: no third-party request
 * on a memorial site, and nothing breaks if fonts.gstatic.com is unreachable.
 * One variable file per script covers every weight, 54 KB in total, and the
 * unicode-range means a Russian reader never downloads the Latin file.
 *
 * Enqueued only on translated pages - see YLD_I18N_Fonts. Hebrew and Arabic
 * keep Alef, which is what they are designed for.
 */

/* cyrillic */
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/jost-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* latin-ext */
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/jost-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;
}

/* latin */
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/jost-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;
}

/* Bricks names the family on each of these in its inline CSS, and the nav
   selectors carry an id, so they have to be answered one for one rather than
   left to inherit. */
body,
#main-nav .brx-nav-nested-items > li > a,
#main-nav .brx-nav-nested-items > li > .brxe-text-link:not(a),
#main-nav .brx-nav-nested-items > li > .brxe-icon,
#main-nav .brx-nav-nested-items > li:has( > .brxe-svg),
#main-nav .brx-nav-nested-items > li > .brx-submenu-toggle > * {
	font-family: 'Jost', 'Alef', system-ui, sans-serif;
}

/* Headings are qualified with body on purpose. A WPCodeBox snippet sets
   `h1..h6 { font-family: var(--font-sans) }` further down the page, and that
   variable is defined nowhere: an unresolved var makes the declaration invalid
   at computed-value time, which for an inherited property means the heading
   falls back to whatever body has rather than to the previous rule. It happens
   to land on Jost today, but only by luck. One extra element in the selector
   settles it. */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
	font-family: 'Jost', 'Alef', system-ui, sans-serif;
	font-weight: 600;
}

/* Jost runs light for its size; keep the body text as solid as Alef read. */
body {
	font-weight: 400;
}
