/* ==========================================================================
   Design tokens — Mr Andy Hacker
   Colours sampled directly from the approved comp (Concepts/chosen concept).
   Type: DM Serif Display (headings) + Manrope (everything else), confirmed 18/09/2026.
   Reference width: 1432px CSS (comp is 2864px at 2x).
   ========================================================================== */

/* Sticky site header (D-109). Avada's desktop header sticks above 1024px at 142px tall
   (logo plus menu row, Global Options); at 1024px and below it scrolls away. Anything
   sticky, and every anchor destination, sits --ah-sticky-gap below it. The WordPress
   admin bar (logged-in users) is fixed from 783px and adds its 32px. */
:root {
  --ah-header-sticky: 0px;
  --ah-adminbar: 0px;
  --ah-sticky-gap: 24px;
  --ah-sticky-clear: calc(var(--ah-header-sticky) + var(--ah-adminbar) + var(--ah-sticky-gap));
}
@media (min-width: 1025px) { :root { --ah-header-sticky: 142px; } }
@media (min-width: 783px) { :root:has(body.admin-bar) { --ah-adminbar: 32px; } }

:root {
  /* ---- Palette ---------------------------------------------------------- */
  --ah-navy:        #2D3E50;  /* primary: header, bands, buttons, footer, headings on light */
  --ah-navy-deep:   #24313F;  /* hover / pressed, and the footer ground */
  --ah-footer:      #222E3C;  /* a shade under navy-deep, so the footer reads as
                                 a distinct band without leaving the palette */
  --ah-green:       #114833;  /* sampled from the comp; NOT used for typography
                                 (client direction 18/09/2026: no green type) */
  --ah-bronze:      #8A5A26;  /* accent: tick icons */
  --ah-stone:       #E8E5DE;  /* background band */
  --ah-cream:       #F9F5F2;  /* page background */
  --ah-sand:        #F8F5EE;  /* background band */
  --ah-offwhite:    #F8F7F5;  /* background band */
  --ah-white:       #FFFFFF;  /* cards on navy */
  --ah-logo-blue:   #21409A;  /* logo only — NOT a UI colour. See decisions.md R-015 */

  /* Text. Body copy is navy at reduced weight, not grey — the comp has no true grey text. */
  --ah-text:        #2D3E50;
  --ah-text-muted:  #5A6672;
  --ah-text-invert: #F9F5F2;
  --ah-rule:        rgba(45, 62, 80, 0.15);
  --ah-rule-invert: rgba(249, 245, 242, 0.20);

  /* ---- Typography ------------------------------------------------------- */
  --ah-font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ah-font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Fluid scale, 375px -> 1432px. Calibrated against the comp in the Playwright pass. */
  --ah-h1:      clamp(1.625rem, 1.05rem + 2.4vw, 3rem);      /* 26 -> 48; eased down so the
                                                               headline stops dominating the hero */
  --ah-h2:      clamp(1.625rem, 1.15rem + 2.0vw, 2.75rem);   /* 26 -> 44 */
  --ah-h3:      clamp(1.375rem, 1.18rem + 0.83vw, 1.75rem);  /* 22 -> 28 */
  --ah-h4:      clamp(1.125rem, 1.04rem + 0.36vw, 1.25rem);  /* 18 -> 20 */
  --ah-body:    1.125rem;                                     /* 18 */
  --ah-body-lg: 1.25rem;                                      /* 20, lead paragraphs */
  --ah-small:   0.9375rem;                                    /* 15 */
  --ah-eyebrow: 0.8125rem;                                    /* 13 */

  --ah-lh-display: 1.15;

  /* Andy quotes, sitewide (client 03/11/2026): one size for every quote attributed to Mr Andy Hacker,
     whatever its layout. 20px at 375, ~23px at 768, ~25px at 1024, 26px from 1180px up. */
  --ah-quote-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --ah-quote-lh:   1.45;
  --ah-quote-cite: 0.8125rem;   /* attribution: 13px small caps, well under the quote */
  --ah-lh-body:    1.65;
  --ah-ls-eyebrow: 0.12em;
  --ah-ls-button:  0.08em;

  /* ---- Spacing ---------------------------------------------------------- */
  --ah-band-y:      clamp(4rem, 2.2rem + 7.6vw, 10rem);  /* 64 -> 160, vertical band padding */
  --ah-band-y-tight: clamp(3rem, 1.8rem + 5vw, 6rem);    /* 48 -> 96 */
  --ah-gutter:      clamp(1rem, 0.5rem + 2.1vw, 2.5rem); /* 16 -> 40, min 16 at 375 */
  --ah-max-width:   1200px;
  --ah-measure:     68ch;   /* long-form reading measure — the condition pages need this */

  --ah-gap-xs: 0.5rem;
  --ah-gap-sm: 1rem;
  --ah-gap-md: 1.5rem;
  --ah-gap-lg: 2.5rem;
  --ah-gap-xl: 4rem;

  /* ---- Form ------------------------------------------------------------- */
  --ah-radius:      0;      /* the comp uses square corners throughout */
  --ah-radius-pill: 0;
  --ah-shadow:      none;   /* and no drop shadows */
  --ah-focus:       3px solid var(--ah-bronze);
  --ah-focus-offset: 2px;
  --ah-transition:  180ms ease;
}

/* Band backgrounds. The comp alternates cream -> stone -> navy -> cream.
   Never place two identical bands next to each other. */
.ah-band--cream    { background-color: var(--ah-cream); }
.ah-band--stone    { background-color: var(--ah-stone); }
.ah-band--sand     { background-color: var(--ah-sand); }
.ah-band--offwhite { background-color: var(--ah-offwhite); }
.ah-band--navy     { background-color: var(--ah-navy); color: var(--ah-text-invert); }
.ah-band--navy :is(h1, h2, h3, h4) { color: var(--ah-text-invert); }

@media (prefers-reduced-motion: reduce) {
  :root { --ah-transition: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
