/* ==========================================================================
   tokens.css — brief.md v1 (approved 2026-08-31 at C3), family `retro-local`,
   palette cinder-ember/parchment-cream/light, display Alfa Slab One, body
   Karla, archetype `band-rhythm`, signature "the tags swing". Every value
   below is copied from brief.md §2-§6. Builder-fill supplements are each a
   direct restatement of a brief-stated value or an unoverridden house
   default (noted inline).
   ========================================================================== */

:root {

  /* --- Colour (brief §2.1-§2.3) -------------------------------------------
     Derivation: step 1 real-world colours CONFIRMED NONE (dossier §4.5, no
     truck/uniform/signage found; brand_color correctly omitted) -> step 2
     local character (high-desert dusk/volcanic-soil register, dossier §4.5
     I-tier imagery input) -> step 3 family norms (retro-local's Americana
     register, none of the vertical's 4 existing rows green-dominant). */

  --scheme: light;

  --color-bg:          #F6EEDD;   /* parchment cream — page ground */
  --color-surface:     #EFE3C9;   /* deeper parchment — alternating bands, cards, form fields */
  --color-ink:         #2B1B14;   /* body + heading text; also --color-focus */
  --color-ink-muted:   #6B4A3A;   /* secondary text, eyebrows, captions; also --color-border-strong */
  --color-accent:      #B5482A;   /* cinder-ember — DOMINANT hue. CTA fill + large/bold display ONLY */
  --color-accent-ink:  #FFF7EE;   /* text on --color-accent fill */
  --color-accent-2:    #4B6B4F;   /* juniper — semantic-anchor carrier; secondary CTA, tag-hook dot */

  /* House-required structural colours (consumed by base.css) */
  --color-border:        #DCCBA0; /* decorative hairlines only — band dividers. NEVER load-bearing
                                      for perceiving structure or interactivity (1.10:1 vs bg). */
  --color-border-strong: var(--color-ink-muted); /* form-field / card borders that must read as
                                      interactive: 6.19-6.82:1, clears the 3:1 non-text UI floor */
  --color-focus:         var(--color-ink);       /* 14.33:1 vs bg, 13.00:1 vs surface */
  /* --color-focus-on-band: not declared — this design has no dark or inverted band anywhere */
  --color-selection-bg:  var(--color-accent);
  --color-selection-ink: var(--color-accent-ink);

  /* Brief-specific, documentation only — not a text/bg pairing token (brief §2.3) */
  --color-atmos-edge: #D9B98C;   /* hero backdrop's darkest extreme, for the one gradient-adjacent
                                     measurement in brief §2.4 */

  /* --- Typography (brief §3.1) --------------------------------------------
     2 families, 3 woff2 files — inside design-rules §5's <=4-file/<=2-family
     ceiling. Alfa Slab One: OFL 1.1, self-hosted, argued exception (brief
     §3.1 — unused anywhere in the 39-row registry). Karla: OFL 1.1. */

  --font-display: 'Alfa Slab One', 'Alfa Slab One Fallback', Georgia, serif;
  --font-body:     'Karla', 'Karla Fallback', ui-sans-serif, system-ui, Arial, sans-serif;

  --font-weight-body:        400;
  --font-weight-body-strong: 700;
  --font-weight-display:     400;  /* Alfa Slab One ships exactly one weight (brief §3.1) */

  /* --- Type scale — computed across its full range, brief §3.2 ----------- */

  --text-hero:    clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem);   /* 40.0px floor -> 72.0px ceiling @1244px */
  --text-h2:      clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);  /* 24.0px floor -> 36.0px ceiling @1120px */
  --text-h3:      clamp(1.125rem, 1rem + 0.6vw, 1.375rem); /* 18.0px floor -> 22.0px ceiling @1000px */
  --text-lead:    clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem); /* 18.0px floor -> 20.0px ceiling @800px */
  --text-body:    clamp(1rem, 0.94rem + 0.3vw, 1.125rem);  /* 16.0px floor -> 18.0px ceiling @987px */
  --text-small:   0.9375rem;   /* 15.0px fixed */
  --text-eyebrow: 0.75rem;     /* 12.0px fixed */
  --text-micro:   0.6875rem;   /* 11.0px fixed — brief-specific addition (§3.2): hero tag labels,
                                   FAQ disclosure caption only */

  --leading-tight: 1.05;  /* hero H1 */
  --leading-snug:  1.25;  /* h2/h3 */
  --leading-body:  1.6;   /* paragraphs, captions */

  --tracking-tight:  0em;     /* brief §3.2 override (house default -0.02em) — Alfa Slab One's
                                  bold slab counters are wide; negative tracking crowds them */
  --tracking-normal: 0em;
  --tracking-wide:   0.16em;  /* brief §3.2 override (house default 0.08em) — retro-local badge
                                  register for eyebrows and hero tag labels */

  /* --- Space --------------------------------------------------------------
     House scale (house-tech-spec §3), unmodified. */

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Inter-section rhythm (brief §4.5): ONE token, two call sites (.section's
     padding-block and the hero's padding-block-end). 64px FIXED — identical
     at every viewport, no clamp/vw. */
  --section-gap: var(--space-xl);

  /* --- Layout --------------------------------------------------------------
     band-rhythm: single column at every width, no grid-based multi-column
     layout anywhere (brief §4). One declared breakpoint, 48em (768px). */

  --layout-container: 72rem;
  --layout-measure: 62ch;
  --layout-gutter: clamp(1.25rem, 5vw, 3rem);
  --layout-tap-min: 44px;

  /* Sticky stack = expiry 44 + header 56 + 1px border = 101px (brief §4.4,
     design-rules §7.2 rule 3). --expiry-height lives once, in css/preview.css. */
  --header-height: 3.5rem;   /* 56px */

  /* QA round 2 FIX builder-fill: reserves a face-independent height for
     site.css's .site-header__brand (CLS) — em keeps it relative to that
     element's own font-size; --leading-body (brief §3.2) does the rest. */
  --size-header-brand-min-height: calc(2 * var(--leading-body) * 1em);

  /* --- Radius / shadow / border --------------------------------------------
     retro-local badge/sign-painter register: sharp corners throughout, no
     rounding, no drop shadow (design-rules §4 bans uniform radius/shadow
     defaults; --radius-none/--shadow-none are legitimate whole-site answers). */

  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-pill: 2px;

  --shadow-none: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --border-hairline: 1px;
  --border-thick: 3px;
  --border-style: solid;

  /* --- Motion (brief §6) ---------------------------------------------------
     House default reveal: fade + 1.25rem upward slide, --duration-base
     (320ms), var(--ease-out), staggered 90ms per item. */

  --duration-fast: 140ms;
  --duration-base: 320ms;
  --duration-slow: 640ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --reveal-shift: 1.25rem;
  --reveal-stagger: 90ms;

  /* Signature — "the tags swing" (brief §6, index.html only): four
     independently swinging tags, each its own non-synchronised period,
     continuous (not a one-shot settle). No two periods share a common
     factor inside a reasonable viewing window. */
  --duration-swing-a: 6.2s;
  --duration-swing-b: 7.8s;
  --duration-swing-c: 9.1s;
  --duration-swing-d: 6.9s;

  /* Signature element geometry (brief §4.6): each tag's width is fluid,
     clamp(56px, 18vw, 78px) — floor and ceiling stated in the brief; the
     chain-nub is a fixed 7px circle sat astride the tag's top edge (tile
     precedent, tiles/tile-b.html). --size-dot is the small juniper
     separator/marker dot reused in eyebrows and services-index headings. */
  --tag-width: clamp(3.5rem, 18vw, 4.875rem);
  --tag-chain: 0.4375rem;
  --size-dot: 0.375rem;

  /* --- Z layers ------------------------------------------------------------ */
  --z-base: 0;
  --z-header: 100;
  --z-nav-panel: 200;
  --z-skip-link: 300;
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, static instances (brief §3.1: Alfa Slab
   One 400 only; Karla 400+700). Subset to the house declared safe range,
   identical on every face (house-tech-spec §8; brief §3.1).

   MEASURED post-subset: alfa-slab-one-400 9,080 B, karla-400 10,136 B,
   karla-700 10,280 B — 29,496 B total, largest face 9,080 B (well under the
   <=100 KB total / <=60 KB per-face budget; both faces ship as static
   instances, per house-tech-spec §7's own note that this "should land far
   under" the ceiling).

   COVERAGE GAP (house-tech-spec §8), same as every prior house build on this
   declared range: U+2032-2033 (prime marks) are absent from both Alfa Slab
   One's and Karla's source files. Both faces lack the same codepoints, so
   this is a shared, disclosed gap, never a mid-sentence split.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Alfa Slab One';
  src: url('../assets/fonts/alfa-slab-one-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E,
    U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Karla';
  src: url('../assets/fonts/karla-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E,
    U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Karla';
  src: url('../assets/fonts/karla-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E,
    U+2026, U+2032-2033;
}

/* Metrics-matched fallbacks (house-tech-spec §8, brief §3.1). MEASURED with
   scripts/font-metrics.mjs (the fontaine algorithm), not invented. Proxy:
   Liberation Sans Bold for Alfa Slab One's "Arial Black" (no Arial Black on
   this build machine; Liberation Sans is the metric-compatible open clone of
   Arial, Bold its closest weight-in-reach — the shipped src list still names
   the brief's own faces first), Liberation Sans Regular for Karla's "Arial".
   Full note: README.md. */

/* house-tech-spec §7's own CLS note: "check its local() list covers Android
   and Linux, not only Georgia." Liberation Sans (Bold/Regular) is the metric-
   compatible open clone of Arial that ships on most Linux desktops and is
   the exact face scripts/font-metrics.mjs measured these overrides against
   (README.md) — added after the brief's own Arial/Arial Black names so a
   Windows/macOS visitor still resolves those first, and a Linux/Android
   visitor lands on the actual proxy the numbers below were computed from,
   rather than falling through to the stack's generic serif and wrapping the
   hero H1 differently between the fallback and the webfont. */
@font-face {
  font-family: 'Alfa Slab One Fallback';
  src: local('Arial Black'), local('Arial-Black'), local('Liberation Sans Bold'), local('Liberation Sans');
  size-adjust: 112.03%;
  ascent-override: 92.48%;
  descent-override: 29.73%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Arial'), local('Liberation Sans');
  size-adjust: 103.53%;
  ascent-override: 88.57%;
  descent-override: 24.34%;
  line-gap-override: 0%;
}
