@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProBold.woff2') format('woff2'),
        url('AsenProBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProBlack.woff2') format('woff2'),
        url('AsenProBlack.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro Extra';
    src: url('AsenProExtraBold.woff2') format('woff2'),
        url('AsenProExtraBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProLight.woff2') format('woff2'),
        url('AsenProLight.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProThin.woff2') format('woff2'),
        url('AsenProThin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProSemibold.woff2') format('woff2'),
        url('AsenProSemibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProMedium.woff2') format('woff2'),
        url('AsenProMedium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Asen Pro';
    src: url('AsenProRegular.woff2') format('woff2'),
        url('AsenProRegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/*
 * Metric-matched fallback for Asen Pro (CLS fix).
 *
 * Asen Pro renders wider than the system sans-serif, so with
 * `font-display: swap` the page first paints in the fallback (narrower) then
 * reflows when Asen Pro swaps in — real users on slow networks see this as
 * Cumulative Layout Shift, but warm-cache lab tests never catch it. These
 * faces wrap the local system sans and rescale it to occupy the *same*
 * footprint as Asen Pro, so the swap causes no reflow.
 *
 * Two faces because the width ratio is weight-dependent: Asen Pro is ~8.7%
 * wider than Arial at regular but only ~5% wider than Arial Bold — a single
 * face left bold runs (synthetically emboldened Arial at the regular ratio)
 * far too wide, which still shifted long paragraphs (e.g. the /gg-pros hero
 * intro, Lighthouse CLS 0.298 attributed to AsenProRegular + AsenProBold).
 * Ratios were measured against the live hero copy string per weight.
 *
 * Scoped to Latin via `unicode-range` so it NEVER intercepts Arabic glyphs —
 * Arabic must always fall through to 'True Arabic' (which has its own
 * metric-matched fallback below), and Arial ships Arabic glyphs that would
 * otherwise hijack /ar text.
 */
/*
 * NOTE on the override values: Chrome multiplies ascent/descent-override by
 * size-adjust (measured empirically), so each override below is the target
 * metric divided by that face's size-adjust. Targets: Asen Pro ascent 95%,
 * descent 25% (canvas fontBoundingBox at 100px). E.g. 87.4% x 1.087 = 95%.
 */
@font-face {
    font-family: 'Asen Pro Fallback';
    src: local('Arial'), local('Roboto'), local('Helvetica Neue'), local('Helvetica');
    font-weight: 100 500;
    size-adjust: 108.7%;
    ascent-override: 87.4%;
    descent-override: 23%;
    line-gap-override: 0%;
    unicode-range: U+0000-024F, U+2000-206F, U+20A0-20BF, U+2100-21FF, U+2200-22FF;
}

@font-face {
    font-family: 'Asen Pro Fallback';
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Roboto Bold'), local('Helvetica Neue Bold'),
        local('Helvetica Bold');
    font-weight: 501 900;
    size-adjust: 105%;
    ascent-override: 90.5%;
    descent-override: 23.8%;
    line-gap-override: 0%;
    unicode-range: U+0000-024F, U+2000-206F, U+20A0-20BF, U+2100-21FF, U+2200-22FF;
}

/*
 * True Arabic Variable — Arabic typeface paired with Asen Pro.
 * Single woff2 covers the full 100–900 weight range. unicode-range scoped to
 * the Arabic blocks (Arabic, Supplement, Extended-A, Presentation Forms A/B)
 * so browsers only download the file when an Arabic glyph is rendered. Latin
 * glyphs continue to use Asen Pro via the font-family stack.
 */
@font-face {
    font-family: 'True Arabic';
    src: url('TrueArabicVariable.woff2') format('woff2-variations'),
        url('TrueArabicVariable.woff') format('woff');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/*
 * Metric-matched fallback for True Arabic (CLS fix, 2026-07 audit).
 *
 * True Arabic had NO fallback face, so /ar first-painted Arabic text in the
 * system font (Geeza Pro on Apple, Noto Naskh Arabic on Android) and reflowed
 * when TrueArabicVariable.woff2 swapped in. That reflow resized the home hero,
 * whose absolutely-positioned cinemagraph iframe then moved — Lighthouse
 * attributed 0.334 of /ar's 0.336 CLS to exactly this.
 *
 * True Arabic measures ~14-18% wider than Geeza/Noto at regular weight but
 * only ~6-7% wider at bold, so — like the Asen fallback above — this is split
 * per weight. `size-adjust` is a compromise tuned against measured ratios on
 * both platform families. Ascent/descent overrides pin the line box to True
 * Arabic's real metrics (1.09em / 0.415em).
 *
 * PostScript names (GeezaPro) are listed before family names — Chrome applies
 * size-adjust reliably to the PS-name match but ignored it for the
 * space-separated family alias in testing.
 *
 * unicode-range mirrors True Arabic's, so this face never touches Latin text.
 */
/*
 * size-adjust is a compromise between the two platform bases (per-string
 * measured ideals: Geeza Pro ~114-118%, Noto Naskh Arabic ~119-120% at
 * regular; ~106-107% both at bold) — each platform lands within ~3% of exact,
 * versus 14-18% unmatched. Overrides target True Arabic's real metrics
 * (ascent 1.09em, descent 0.415em), pre-divided by size-adjust as above.
 */
@font-face {
    font-family: 'True Arabic Fallback';
    src: local('GeezaPro'), local('Geeza Pro'), local('NotoNaskhArabic'), local('Noto Naskh Arabic');
    font-weight: 100 500;
    size-adjust: 117%;
    ascent-override: 93.2%;
    descent-override: 35.5%;
    line-gap-override: 0%;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
    font-family: 'True Arabic Fallback';
    src: local('GeezaPro-Bold'), local('Geeza Pro Bold'), local('NotoNaskhArabic-Bold'),
        local('Noto Naskh Arabic Bold');
    font-weight: 501 900;
    size-adjust: 106.5%;
    ascent-override: 102.3%;
    descent-override: 39%;
    line-gap-override: 0%;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
