/* ==========================================================================
   tokens.css — brief.md (approved C3, 2026-10-04), family `bold-industrial`,
   archetype `pour-and-set`, signature "the form is struck". Every value below
   restates a brief value (house-tech-spec §3, §12); nothing here is
   improvised.
   ========================================================================== */

:root {

  /* --- Colour (brief §2.1). Derivation order honoured:
     (1) no real-world brand colour exists on file (dossier §4.5 — "no truck,
     uniform, or signage photo surfaced") — nothing to echo, not a departure.
     (2) local character / trade material: playbook §6.1's own finding,
     equipment yellow/orange as the trade's real accent.
     (3) family norm: bold-industrial's heavy display, high contrast.
     One deliberate mode: dark (checked against §0's "dark-luxe gloom" never —
     ground is iron-slate not near-black, display/body are heavy Anton/Barlow
     never thin light type, accent is safety yellow never metallic gold). */

  --scheme: dark;

  --color-bg:        #1E2124;  /* iron-slate — explicitly not near-black */
  --color-surface:   #2A2E33;  /* card/plate ground */
  --color-ink:       #F3EFE7;  /* warm paper white — not stark cold white */
  --color-ink-muted: #B9B2A6;  /* secondary text, Build Sequence numerals */

  --color-accent:     #F2B705; /* excavator/safety yellow — playbook §6.1's optional material accent */
  --color-accent-ink: #1E2124; /* text on accent fill (reuses bg) */

  /* Hero atmosphere gradient (brief §2.2's contrast row, §6.1 framing clause):
     the warm-glow end the radial gradient travels toward, beneath the H1 at
     375px where the layout is single-column and text sits over the hero's
     own atmosphere edge. Never used as a flat fill — gradient endpoints only. */
  --color-glow: #3A2E1A;

  /* House-required structural colours (consumed by base.css). */
  --color-border:        rgba(243, 239, 231, 0.14); /* DECORATIVE hairlines only */
  --color-border-strong: #B9B2A6;                    /* = --color-ink-muted — a control's own boundary, WCAG 1.4.11 */

  --color-focus: #F2B705; /* = --color-accent — 8.90:1 on bg, clears 3:1 UI floor on this dark ground by construction */

  --color-selection-bg:  #F2B705;
  --color-selection-ink: #1E2124;

  /* Token-contract completeness: this brief specifies no radius/shadow beyond
     a flat, rule-and-whitespace register (brief §9's signature head-rule is
     the one recurring ornament; no card elevation anywhere). Reserved steps
     resolve to the one argued radius/shadow so every required token name
     still exists. */
  --radius-md:   var(--radius-sm);
  --radius-lg:   var(--radius-sm);
  --radius-pill: var(--radius-sm);
  --shadow-sm:   var(--shadow-none);
  --shadow-md:   var(--shadow-none);
  --shadow-lg:   var(--shadow-none);

  /* Brief-specific layout constants (site.css component geometry — spec §3
     bans raw size literals outside this file, so every fixed dimension a
     component needs is named here once). */
  --hero-field-height:    290px;  /* brief §3.4: living-hero field, fixed, every width below 64em */
  --hero-gap:             3rem;   /* brief §4 hero row: 48px column gap @1440 */
  --rule-head-height:     4px;    /* brief §4/§7/§5: the settled form-line head-rule, every section */
  --rivet-size:           6px;    /* brief §3.1 row 4 / §4: trust-strip rivet marks */
  --glint-blur:           1.5px;  /* Critic r1 FIX: softens the rebar-tie glint's edge so it reads as a highlight, not a shape */
  --divider-img-width:    8rem;   /* imagery slot 4 — service-area divider, modest fixed width */

  /* Desktop composition inner-container widths, brief §4's own table, each
     named rather than left as a literal in site.css (house-tech-spec §3). */
  --hero-text-col:       44ch;   /* hero text column @64-90em */
  --hero-text-col-wide:  52ch;   /* hero text column @90em+ */
  --content-maxw-mid:    64rem;  /* Services / Build Sequence@64em / Reviews / Footer inner */
  --content-maxw-wide:   80rem;  /* Build Sequence inner @90em (1280px) */
  --area-maxw:           60rem;  /* Service area inner container */
  --prose-maxw-wide:     70ch;   /* FAQ column; review card cap */
  --cta-band-maxw:       50ch;   /* CTA band headline/body cap */
  --text-stat:  clamp(2rem, 1.7rem + 1.6vw, 2.75rem);  /* trust-strip figures — brief §2.2 requires >=32px for the 3:1 large-text threshold; sized here (house-tech-spec §3's "component size the brief doesn't cite a bare number for") so it never drops under 32px from 320px up */
  --text-index: 1.75rem;  /* Build Sequence numerals, ~28px per brief §5's ornament table */

  /* Sticky-chrome stack (brief §3.4/§4: expiry bar 44px + header, both
     sticky). MEASURED on the rendered page (design-rules §5 rule 3), not
     summed blind — 97px derived (<64em), 113px derived (>=64em); see
     README.md for the swept, confirmed figures this build shipped with. */
  --sticky-stack:      97px;
  --sticky-stack-wide: 113px;

  /* --- Typography (brief §2.3). Anton (display, 400 — its only weight) +
     Barlow (body 400/700, italic 400 for emphasis only). Two families, four
     woff2 files — design-rules §5's ceiling, met exactly. Both OFL (Google
     Fonts). Weight is set with font-weight and NOTHING else: static
     instances, so font-variation-settings never appears on this site. */

  --font-display:  'Anton',         'Anton Fallback',         'Arial Narrow', sans-serif;
  --font-body:     'Barlow',        'Barlow Fallback',        Arial, sans-serif;
  --font-emphasis: 'Barlow Italic', 'Barlow',                 sans-serif; /* brief §2.3's own value, verbatim */

  --font-weight-body:        400;  /* Barlow Regular */
  --font-weight-body-strong: 700;  /* Barlow Bold */
  --font-weight-display:     400;  /* Anton's only weight */

  /* --- Fluid type scale (brief §2.4, specified across its full range). --- */

  --text-display: clamp(2.75rem, 2.1rem + 3.6vw, 5.25rem);  /* 47.1px @375 -> 84px @1440 (ceiling reached 1400px) */
  --text-h2:       clamp(1.75rem, 1.5rem + 1vw, 2.5rem);     /* 28px @375 (floor) -> 38.4px @1440 */
  --text-h3:       var(--text-lead);  /* brief §2.4 names no h3 row — this site's section plan uses no <h3>; aliased to a real briefed value (never invented) so base.css's h3 selector still resolves */
  --text-lead:     clamp(1.0625rem, 1rem + 0.3vw, 1.3125rem);/* 17.1px @375 -> 20.3px @1440 */
  --text-body:     clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem); /* 15px @375 (floor) -> 16.6px @1440 */
  --text-eyebrow:  clamp(0.8125rem, 0.78rem + 0.1vw, 0.9375rem); /* 13px @375 (floor) -> 13.9px @1440 */
  --text-small:    0.9rem;

  --leading-tight: 0.95;   /* h1 — brief §3.4's 2-line H1 target math uses .95 */
  --leading-snug:  1.25;
  --leading-body:  1.6;

  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide:   0.08em;  /* eyebrow — uppercased via text-transform, never typed in caps */

  /* --- Space (brief §2.5) — house scale, unchanged values, brief's own
     --section-gap step. --- */

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

  /* Section rhythm — brief §2.5: var(--space-2xl) = 96px, fixed at every
     declared width. Two call sites only: .section's padding-block, and the
     hero's padding-block-end. */
  --section-gap: var(--space-2xl);

  /* --- Layout — house defaults, unchanged (brief does not override). --- */

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

  /* --- Radius / border (brief §2: flat register; one hairline, one thick
     rule for the trust-strip top border). --- */

  --radius-none: 0;
  --radius-sm:   2px;
  --shadow-none: none;

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

  /* --- Motion (brief §2.6, §7). --- */

  --ease-settle:    cubic-bezier(.16, 1, .3, 1);
  --duration-settle: 2.6s;

  --ease-ambient:        ease-in-out;
  --duration-ambient-a:  5.2s;  /* work-light pulse */
  --duration-ambient-b:  7.4s;  /* rebar-tie glint — deliberately not a multiple of 5.2s */

  --duration-reveal: 500ms;
  --ease-reveal:     ease-out;
  --stagger-reveal:  80ms;

  /* House reveal-geometry/duration names base.css consumes directly. */
  --duration-fast: 140ms;
  --duration-base: 320ms;
  --duration-slow: var(--duration-reveal);
  --ease-out: var(--ease-reveal);

  --reveal-shift:   12px;  /* brief §7: fade-up 12px -> 0 */
  --reveal-stagger: var(--stagger-reveal);

  /* Reduced-motion rest state (brief §7's reduced-motion statement): the
     form-fill renders already-settled; both ambient loops freeze at a fixed
     mid-opacity rather than invisible or mid-sweep. */
  --worklight-rest-opacity: 0.6;
  /* Critic r1 FIX: 0.4 (brief §7's reduced-motion value) drove the live loop
     too, reading as a solid block. Split: rest = live trough; reduced-motion
     keeps the brief's exact 0.4, untouched (site.css). */
  --glint-rest-opacity:            0.12;
  --glint-reduced-motion-opacity:  0.4;

  /* --- Z layers — house defaults, unchanged. --- */
  --z-base: 0;
  --z-header: 100;
  --z-nav-panel: 200;
  --z-skip-link: 300;
}

/* base.css's own reduced-motion block already collapses --duration-fast/
   -base/-slow and --reveal-shift at :root (house default, spec §8). This
   block adds only the brief-specific signature tokens base.css knows
   nothing about — the one-shot settle and the two ambient loops. */
@media (prefers-reduced-motion: reduce) {
  :root {
    /* @allow-literal: a duration token must resolve to a real time value */
    --duration-settle: 0.01ms;
    --duration-ambient-a: 0.01ms;
    --duration-ambient-b: 0.01ms;
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, static instances, latin subset. Anton: SIL
   OFL 1.1, The Anton Project Authors. Barlow: SIL OFL 1.1, The Barlow Project
   Authors. Both fetched from Google Fonts' own served static files (Anton
   ships one weight only; Barlow's 400/700/400-italic are genuine static
   files, not instanced from a variable source) and re-subset locally with
   fontTools/pyftsubset to the house declared safe range (house-tech-spec
   §8), identical on all four faces. No remote font request ships. See
   README.md.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Anton';
  src: url('../assets/fonts/anton-latin-400.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: 'Barlow';
  src: url('../assets/fonts/barlow-latin-400.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: 'Barlow';
  src: url('../assets/fonts/barlow-latin-700.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;
}

@font-face {
  font-family: 'Barlow Italic';
  src: url('../assets/fonts/barlow-latin-400italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  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 §7, §8; brief §2.3). Donor:
   Liberation Sans (Arial's metric-compatible open-source clone, installed
   locally on this build machine). Liberation Sans Bold stands in for Anton
   (a heavy condensed display face — closest available proxy weight, since
   no open Impact/Arial Narrow clone is reachable in this build environment
   to measure Anton's real first-choice fallback directly); the shipped
   stack still names 'Arial Narrow' first per brief §2.3, which is what a
   real browser carrying that face will actually resolve. Liberation Sans
   Regular/Bold stand in for Barlow 400/700. Computed with
   scripts/font-metrics.mjs (the fontaine algorithm), English-letter-
   frequency weighted. Barlow Italic's own CSS fallback is 'Barlow' itself
   (brief §2.3's literal token value) — a real, already-loaded face, not a
   synthetic placeholder, so it needs no separate override block. See
   README.md for the full derivation. Acceptance test: Lighthouse CLS
   0.000. */

@font-face {
  font-family: 'Anton Fallback';
  src: local('Arial Narrow'), local('Liberation Sans Bold'), local('Liberation Sans');
  size-adjust: 85.22%;
  ascent-override: 138.03%;
  descent-override: 38.62%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Barlow Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 400;
  size-adjust: 96.96%;
  ascent-override: 103.14%;
  descent-override: 20.63%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Barlow Fallback';
  src: local('Arial Bold'), local('Liberation Sans Bold'), local('Liberation Sans');
  font-weight: 700;
  size-adjust: 92.39%;
  ascent-override: 108.23%;
  descent-override: 21.65%;
  line-gap-override: 0%;
}
