/*
 * Devanagari for the Hindi version of the site.
 *
 * The theme's faces - Meticula for display, Noto Sans and AvenirNext LT Pro for text -
 * carry no Devanagari glyphs. Rather than overriding font-family on the hundreds of
 * selectors that set one, each of those family names is given an additional @font-face
 * here, restricted by unicode-range to the Devanagari block and pointing at Noto Sans
 * Devanagari.
 *
 * Browsers resolve fonts per glyph, so every existing rule keeps rendering Latin from the
 * brand faces - PA Global, IFRS, firm names, the English titles of cited papers - and
 * takes Devanagari from this file. No selector in the theme has to change, and nothing
 * here affects the English, French or Spanish pages: it is only enqueued on /hi/.
 *
 * Self-hosted on purpose: no visitor request reaches Google, and the files cannot move.
 *
 * Generated by hi/build-devanagari.py - regenerate rather than hand-editing.
 */

@font-face {
	font-family: 'Meticula';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/noto-sans-devanagari.woff2') format('woff2-variations');
	unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}
@font-face {
	font-family: 'Noto Sans';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/noto-sans-devanagari.woff2') format('woff2-variations');
	unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}
@font-face {
	font-family: 'AvenirNext LT Pro';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/noto-sans-devanagari.woff2') format('woff2-variations');
	unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}
@font-face {
	font-family: 'Noto Sans Devanagari';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('fonts/noto-sans-devanagari.woff2') format('woff2-variations');
	unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

/*
 * Devanagari needs more vertical room than Latin: matras sit above the headline and
 * conjuncts below the baseline, and at the theme's tight heading leading they collide.
 * These are deliberately small nudges - enough to stop the clipping without making the
 * Hindi pages look like a different site.
 */
html[lang="hi"] body {
	line-height: 1.75;
}

html[lang="hi"] h1,
html[lang="hi"] h2,
html[lang="hi"] h3,
html[lang="hi"] h4,
html[lang="hi"] h5,
html[lang="hi"] .h1,
html[lang="hi"] .h2,
html[lang="hi"] .h3 {
	line-height: 1.45;
}

/* The brand's tight letter-spacing is meaningless in Devanagari and hurts legibility. */
html[lang="hi"] h1,
html[lang="hi"] h2,
html[lang="hi"] h3,
html[lang="hi"] .btn,
html[lang="hi"] .nav-link {
	letter-spacing: normal;
}

/*
 * Small print in Devanagari at the Latin size is hard to read, the matras being the
 * first thing to disappear.
 */
html[lang="hi"] small,
html[lang="hi"] .small,
html[lang="hi"] figcaption,
html[lang="hi"] .form-text {
	font-size: 0.9375rem;
}

/*
 * Buttons and nav items are sized for English words. Hindi equivalents run longer, so
 * let them wrap rather than overflow a fixed-width button.
 */
html[lang="hi"] .btn {
	white-space: normal;
}
