/* ================================================================
   typography.css  –  Compliance Checker
   Reusable text scale (Figma node 6:71).
   Apply these as utility classes on any element; pair with .muted /
   .uppercase helpers when the design calls for it.

   Order matters: the scale classes set colour to var(--ae-black),
   the helpers below them override colour / transform on top.
   ================================================================ */


/* === HEADINGS (NexaBold) ======================================
   Each rung targets both the semantic tag AND a matching class, so
   a plain <h2> styles itself while a span or a mis-levelled heading
   (e.g. a <h3> that should look like an h4) can opt into a rung via
   class="h4". Class selectors outrank element selectors, so the
   class wins when both are present. */

.display,
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
    font-family: var(--font-heading);
    color: var(--ae-black);
    margin: 0;
}

.display {
    font-size: var(--fs-display);
    line-height: 1.05;
    letter-spacing: -6px;
}
h1, .h1 {
    font-size: var(--fs-h1);
    line-height: 1;
    letter-spacing: -2px;
}
h2, .h2 {
    font-size: var(--fs-h2);
    line-height: 1.05;
    letter-spacing: -0.5px;
}
h3, .h3 {
    font-size: var(--fs-h3);
    line-height: 1.05;
    letter-spacing: -0.3px;
}
h4, .h4 {
    font-size: var(--fs-h4);
    line-height: 1.05;
    letter-spacing: -0.2px;
}
h5, .h5 {
    font-size: var(--fs-h5);
    line-height: 1.05;
    letter-spacing: -0.1px;
}
h6, .h6 {
    font-size: var(--fs-h6);
    line-height: 1.2;
    letter-spacing: -0.05px;
}


/* === BODY TEXT (Work Sans) ==================================== */

.quote,
.body,
.label,
.label-lg {
    font-family: var(--font-body);
    color: var(--ae-black);
    margin: 0;
}

/* Large emphasised paragraph — About / callouts */
.quote {
    font-weight: 400;
    font-size: clamp(1.125rem, 1.9vw, 1.875rem);
    line-height: 1.1;
    letter-spacing: -1.35px;
}

/* Default paragraph */
.body {
    font-weight: 400;
    font-size: clamp(0.875rem, 1vw, 1rem);
    line-height: 1.1;
    letter-spacing: -0.72px;
}

/* Small uppercase-friendly label */
.label {
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.1;
    letter-spacing: -0.54px;
}

/* Medium label — nav links, button captions */
.label-lg {
    font-weight: 500;
    font-size: clamp(0.8125rem, 1vw, 0.9375rem);
    line-height: 1;
    letter-spacing: -0.3px;
}


/* === HELPERS ================================================== */

/* Muted text — use alongside any scale class */
.muted { color: var(--ae-black-50); }

/* Uppercase — use alongside .label on marketing bullets, tags */
.uppercase { text-transform: uppercase; }


/* === TEXT LINKS =============================================== */
/* Default styling for inline prose links — i.e. anchors inside a
   paragraph. Chrome links (nav, footer, breadcrumbs, dropdowns,
   table cells) are scoped via their own component CSS and reach
   `a { color: inherit }` from reset.css, so they are unaffected. */

p a {
    color: var(--ae-darkblue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

p a:hover {
    color: var(--ae-lightgreen);
}

/* Dark-surface theme — apply `.on-dark` to a wrapper (e.g. a hero
   section, a callout band) and prose links inside flip to white
   bold for legibility against the dark background. */
.on-dark p a {
    color: var(--white);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.on-dark p a:hover {
    color: var(--ae-aqua-lite);
}
