/* =========================================================================
   Typography system — loaded LAST, single source of truth for every page.

   Families : Plus Jakarta Sans (headings + body) · Geist Mono (labels only)
              No serif, no italic accents anywhere.
   Weights  : headings 600 · body 400 · UI/labels 500 · big numerals 700
   Colours  : headings --ink · body --text · secondary --muted
              on dark: --on-dark (body) / #fff (headings)
   Scale    : H1 hero · H2 section · H3 card · body · small · label
   ========================================================================= */

:root {
  --font-serif: var(--font-display);

  /* colour roles */
  --text: #555555;
  --muted: #636363;
  --on-dark: rgba(255, 255, 255, 0.72);
  --on-dark-muted: rgba(255, 255, 255, 0.5);
  /* amber used as TEXT on light surfaces: darkened to pass 4.5:1 (plain amber is only 2:1 on white) */
  --amber-deep: #956700;

  /* size roles */
  --t-h1: clamp(2.5rem, 1.3rem + 4.8vw, 5.5rem);
  --t-h2: clamp(2rem, 1.3rem + 2.8vw, 3.75rem);
  --t-h3: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  --t-lead: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-label: 0.72rem;
}

/* ---------- Body ---------- */
body { font-size: var(--t-body); line-height: 1.7; color: var(--text); font-weight: 400; }
.lead, .prose.lead p { font-size: var(--t-lead); line-height: 1.75; }
strong { color: var(--ink); font-weight: 600; }
small, .small { font-size: var(--t-small); }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 600; line-height: 1.12; }

/* H1 / hero */
.display, .h1, .xhero__title, .hx__title, .page-hero h1, .page-hero h1.is-long {
  font-size: var(--t-h1); font-weight: 600; letter-spacing: -0.045em; line-height: 1.02;
}
.page-hero h1 { max-width: 18ch; }

/* H2 / section titles */
.h2, .xh2, .ab-h2, .sec-head .h2, .statement__quote, .xt__title, .jf__cta-title {
  font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.04em; line-height: 1.06;
}

/* H3 / card + row titles */
.h3, .xcard h3, .xdiff__item h3, .benefit h3, .row__title, .product__body h2, .hq__title,
.news-card h3, .news-row h3, .xnews__card h3, .t-card__who strong, .shop-card p, .prose h3 {
  font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.025em; line-height: 1.25;
}
.h4, .logo-card h4 { font-weight: 600; letter-spacing: -0.015em; }

/* emphasis words inside headings: same family, upright, accent colour only */
.xh2 em, .xhero__title em, .xcalc em, .hx__title em, .h2 em, .h3 em, .sec-head em, .ab-h2 em,
.gallery-group__head em, .page-hero h1 em, .xt__title em, .xquote__text em {
  font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; color: var(--amber-deep);
}
.page-hero h1 em, .hx__title em, .xh2--light em { color: var(--amber); }

/* ---------- Quotes & former serif text ---------- */
.big-quote, .philo .big-quote, .ab-philo .big-quote, .xquote__text, .xt__quote, .t-quote, .xcard__sub,
.person blockquote, .t-card blockquote, .ab-vm__big, .ab-philo__alts p, .prose blockquote {
  font-family: var(--font-display); font-style: normal; font-weight: 500; letter-spacing: -0.03em;
}
.ab-philo .big-quote, .philo .big-quote { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem); line-height: 1.12; font-weight: 600; }
.ab-vm__big { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.15; font-weight: 600; }
.ab-philo__alts p { font-size: 1.05rem; line-height: 1.55; letter-spacing: -0.01em; font-weight: 400; }
.xquote__text, .xt__quote, .t-quote, .person blockquote, .t-card blockquote { line-height: 1.5; }
.xcard__sub { font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem) !important; }
.ab-intro__photo figcaption, .ab-t__year { font-family: var(--font-display); font-style: normal; font-weight: 700; letter-spacing: -0.05em; }
.ab-t__year { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); }

/* ---------- Big numerals ---------- */
.xcard__num, .xdiff__num, .clip-num, .t-year, .xcount, .cx__result output, .calc__result output {
  font-family: var(--font-display); font-weight: 700; font-style: normal;
}
.marquee__track span, .xmarquee__track span { font-weight: 600; letter-spacing: -0.035em; }

/* ---------- Labels (mono, one style) ---------- */
.eyebrow, .xlabel, .ab-label, .nx__eyebrow, .breadcrumb, .tile__tag, .attachment__meta, .xt__meta {
  font-family: var(--font-mono); font-size: var(--t-label); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.nx__eyebrow { font-size: var(--t-label); letter-spacing: 0.12em; }
.eyebrow--light, .ab-label--light, .xlabel--light { color: var(--white); }

/* ---------- Text on dark surfaces ---------- */
.philo, .ab-philo, .vm__card--dark, .jf, .page-hero { color: var(--on-dark); }
.philo p, .ab-philo p, .jf p, .jf li, .jf a { color: var(--on-dark); }
.philo h2, .philo h3, .ab-philo h2, .jf h2, .jf h3, .page-hero h1, .page-hero h2 { color: var(--white); }
.ab-philo .big-quote, .ab-philo__alts p { color: var(--white); }
.ab-philo__alts span { color: var(--on-dark-muted); }

/* ---------- Secondary text ---------- */
.ab-t__text p, .ab-intro .prose p, .ab-vm__list li { color: var(--text); }
.ab-intro .prose p:first-child, .ab-vm__list li { color: var(--ink); }
.ab-intro .prose p:first-child { font-size: var(--t-lead); line-height: 1.7; font-weight: 500; }
.ab-intro .prose p:first-child::first-line { font-weight: inherit; }
.ab-vm__list li { font-size: var(--t-body); font-weight: 400; }
.ab-brands .logo-card h4 { color: var(--muted); }
.t-card__who span, .xt__who span, .t-person span { color: var(--muted); }

/* =========================================================================
   Consistency pass (measured on every page at 1440px)
   ========================================================================= */
:root { --t-h2s: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem); }

/* every H3 inside page content = card/row title size (was 14–38px depending on page) */
main h3:not(.calc h3):not(.ab-t__year):not(.article-aside h3), .xprod__foot h3, .nx__meta h3 {
  font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.025em; line-height: 1.25;
}
.nx__meta h3 { font-weight: 500; }

/* page-level section titles = H2; in-content sub-sections (product, gallery, contact…) = H2 small */
main h2:not([class]):not(.article-aside h2), main h2.h3, main .gallery-group__head h2 {
  font-size: var(--t-h2s); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15;
}
.empty-state h2, .nx__title { font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.04em; line-height: 1.06; }
.nx__title { max-width: 18ch; }

/* inner-page hero slightly smaller than the home hero */
.page-hero h1, .page-hero h1.is-long { font-size: clamp(2.5rem, 1.3rem + 4vw, 4.5rem); }

/* brand / vendor names use the same H4 as every other page */
.ab-brands .logo-card h4, .logo-card h4 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; text-transform: none; color: var(--ink);
}
.gallery-group__head .h3 { font-size: var(--t-h2s); letter-spacing: -0.035em; }
.row__body, .value p, .benefit p, .xcard p { font-size: var(--t-body); line-height: 1.7; }
.row__body, .value p, .benefit p { color: var(--text); }
.cx__lead { font-size: var(--t-lead); line-height: 1.75; color: var(--text); }

.xcard--red p { color: var(--white); }
/* text over photos always gets a dark scrim so it stays readable */
.ab-intro__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 55%); pointer-events: none; }
.ab-intro__photo figcaption { z-index: 1; }
