/* Brand typography (MLD-Typography.pdf, section 03).
   Primary: Lufga for every piece of UI and body text.
   Secondary: Griffiths, a decorative italic display serif, used only for short gold accent
   words at headline size. It is unreadable at body sizes, so it never goes on paragraphs,
   labels or buttons.

   Weight map from the guide, limited to the Lufga files we ship (200/400/500/600):
     ExtraBold headline  -> 600 (heaviest file we have; no faux bold)
     SemiBold header     -> 600
     Regular subheadline -> 400
     Regular paragraph   -> 400
     Labels, nav, buttons-> 500
   Inter stays in the stack as the fallback, so any glyph Lufga lacks still renders in a
   font the site already self-hosts. */

@font-face {
    font-family: "Lufga";
    src: url("../fonts/LufgaExtraLight.woff2") format("woff2");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lufga";
    src: url("../fonts/LufgaRegular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lufga";
    src: url("../fonts/LufgaMedium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lufga";
    src: url("../fonts/LufgaSemiBold.woff2") format("woff2");
    font-weight: 600 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Griffiths";
    src: url("../fonts/Griffiths.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* site-overrides.css applies this variable to every text element with !important,
       so redefining it is enough to switch the whole site. */
    --font-family-primary: "Lufga", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-family-accent: "Griffiths", Georgia, "Times New Roman", serif;
}

body {
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Headlines: heaviest weight, tighter tracking. Lufga is wider than Inter, so the extra
   negative tracking keeps headlines close to their old line lengths. */
body :where(h1, h2) {
    font-weight: 600;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

body :where(h3, h4, h5, h6) {
    font-weight: 600;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

body :where(p, li, dd, blockquote, figcaption, td) {
    font-weight: 400;
    text-wrap: pretty;
}

/* Uppercase labels, eyebrows, kickers and nav read better in Medium than SemiBold. */
body :where(.home-eyebrow, .home-kicker, .home-hero-brand, .site-nav-link, .site-nav-mega-label,
            .slide-menu-item, .slide-submenu-label, .site-breadcrumbs, .ap-eyebrow) {
    font-weight: 500;
}

body :where(button, .btn, .home-btn, .home-btn-ghost, .site-nav-cta, .mobile-cta-btn) {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Secondary font: the gold accent words in headlines ("Trust", "Promise"). Griffiths has a
   small x-height, so it is set larger and nudged to sit on the same baseline. */
body .highlight-gold {
    font-family: var(--font-family-accent) !important;
    font-weight: 400;
    font-size: 1.18em;
    letter-spacing: 0;
    /* Keep the larger accent glyphs from stretching the headline's line box. */
    line-height: 0.8;
    padding-right: 0.06em;
}
