/* ==========================================================================
   tokens.css — the design brief, compiled.

   Every value below is `runs/brads-chimney-sweep-service-londonderry-nh/brief.md`,
   compiled into CSS custom properties. Nothing here is improvised
   (house-tech-spec §3, §12); every group cites the brief section it comes from.
   ========================================================================== */

:root {

  /* --- Colour --------------------------------------------------------------
     Brief §3.2. Derivation order (§3.1): real-world colour kept literal
     (dossier §4.5, brand_color #C2281B — two independent sightings, logo +
     truck-door decal), local character carried through the kraft/parchment
     ground and register restraint (no flag/firehouse civic motif), family
     norms supply the Americana barn/sign-red-on-parchment pairing. */

  --scheme: light;

  --color-bg:              #F1E4C9;  /* kraft parchment — the one ground */
  --color-surface:         #E6D3AC;  /* raised panels, form fields, the field's own local ground */
  --color-ink:              #2A1F17; /* sign-paint-ink brown-black */
  --color-ink-muted:        #6B4F35; /* warm muted brown */

  --color-accent:           #C2281B; /* DOMINANT — the literal, unretouched brand red (dossier §4.5) */
  --color-accent-ink:       #FFF3E0; /* warm cream — text ON accent fills */

  --color-brass:            #9C7A2E; /* ORNAMENT ONLY — badge ring, tag rule. Never carries text (R3) */

  --color-band:              #2A1F17; /* the ONE dark band, if used — reuses --color-ink */
  --color-band-ink:          #FFF3E0; /* reuses --color-accent-ink */

  --color-border:            #DCC9A0; /* DECORATIVE hairlines only — index rows, footer rule (R2) */
  --color-border-strong:     #6B4F35; /* WCAG 1.4.11-bound — form-field borders, control edges */

  --color-focus:             #C2281B; /* == accent; AA vs bg AND surface, brief §4 */
  --color-focus-on-band:     #FFF3E0; /* == accent-ink; measured vs the band, brief §4 */
  --color-selection-bg:      #C2281B;
  --color-selection-ink:     #FFF3E0;

  /* Hero atmosphere gradient stops (brief §4.3, R1) — the ask zone's own
     radial-gradient(120% 90% at 50% 0%, glow 0%, surface 55%, shade 100%).
     The 55% stop is --color-surface itself (#E6D3AC, exact match); these
     two are the gradient's own light/dark extremes and appear nowhere else. */
  --color-hero-glow:         #F9EFD8; /* 0% stop — the gradient's lightest point */
  --color-hero-shade:        #D9C08A; /* 100% stop — hidden behind the field's opaque local ground */

  /* --radius-lg/--radius-pill and --shadow-sm/md/lg are deliberately absent —
     see the Radius/Shadow block below. Brief §3.2's own note. */


  /* --- Typography ------------------------------------------------------
     Brief §2. Ultra (display, 400 only) + Barlow (body, 400/700). Both named
     in design-rules §5's retro-local pool; neither hard-banned nor
     watch-listed. emphasis_font: null. */

  --font-display:     'Ultra', 'Ultra Fallback', Georgia, 'Times New Roman', serif;
  --font-body:        'Barlow', 'Barlow Fallback', 'Segoe UI', Arial, sans-serif;
  --font-body-strong: 'Barlow', 'Barlow Bold Fallback', 'Segoe UI', Arial, sans-serif;

  --font-weight-display: 400;
  --font-weight-body: 400;
  --font-weight-body-strong: 700;

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

  --text-hero:    clamp(2rem, 1.5rem + 3.5vw, 3.5rem);
  --text-h2:      clamp(1.4rem, 1.1rem + 1.6vw, 2rem);
  --text-lead:    clamp(1rem, 0.94rem + 0.4vw, 1.15rem);
  --text-body:    clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  --text-small:   0.8125rem;
  --text-eyebrow: 0.75rem;

  --leading-tight: 1.05; --leading-snug: 1.25; --leading-body: 1.6; --leading-caps: 1.40;
  --tracking-display: 0em; --tracking-normal: 0em; --tracking-caps: 0.12em;

  /* --- Space -------------------------------------------------------------- */

  --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;

  --section-gap: var(--space-xl);   /* = 64px FIXED at every width — brief §5.5 */

  /* --- Layout — brief §3.2 / §5.1-§5.2 ------------------------------------ */

  --layout-container: 72rem;             /* the OUTER box, 1152px */
  --layout-gutter:    1rem;              /* → 2.5rem at ≥48rem, applied INSIDE the container */
  --layout-measure:   38rem;             /* prose cap, 608px */
  --h1-max:           40rem;             /* the display column, 640px */
  --layout-tap-min:   44px;
  --hero-field-ratio: 5 / 2;             /* SAME at every width — brief §5.2 */
  --hero-field-max:   40rem;             /* 640px — the field's contained max-width at ≥48rem */
  --hero-pad-top:     var(--space-sm);   /* 16px <48rem → 64px (--space-xl) ≥48rem — brief §5.2 */
  --hero-cta-min-width: 16.25rem;        /* 260px — brief §6.2's primary control inline-block min at ≥48rem */
  --figure-max-width: 20rem;             /* 320px — contained width of the three section-foot images (slots 2-4, brief §7.2) */

  /* --- Ornament, radius, shadow -------------------------------------------
     R9: no drop shadow on any card or control; radius varies deliberately
     (0 / 2px / 4px), never uniform — the honest answer to design-rules §4's
     banned uniform-radius default. */

  --ring-mark-size:   28px;              /* the badge corner-mark — never shrinks below this, brief §5.4 */
  --border-hairline:  1px; --border-style: solid;
  --border-thick: 3px;                   /* base.css's :focus-visible ring width */
  --radius-sm:        2px;               /* buttons, form fields — a sign-painted board's square-ish edge */
  --radius-md:        4px;               /* cards, the badge's containing tag */
  --radius-none:      0;                 /* the ring mark itself — an SVG circle, not a CSS radius */
  --shadow-none:      none;              /* the only shadow token — no card on this site carries a drop shadow */

  /* --- Motion — brief §8 --------------------------------------------------- */

  --duration-fast: 140ms; --duration-base: 320ms; --duration-slow: 620ms; --duration-badge: 760ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-shift: 0.9rem; --reveal-stagger: 80ms;

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

/* Declared breakpoint — brief §5.2's table: the gutter is 16px below 48rem
   and 40px at 48rem and above; the hero's own top padding is 16px
   (--space-sm) below 48rem and 64px (--space-xl) at 48rem and above. No
   other breakpoint appears in this file or in site.css. */
@media (min-width: 48rem) {
  :root {
    --layout-gutter: 2.5rem;
    --hero-pad-top:  var(--space-xl);
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, latin subset, static instances only.
   Ultra: Apache License 2.0, Astigmatic/Brian J. Bonislawsky (Google's own
   font source repo files Ultra under Apache 2.0 rather than the brief's
   stated SIL OFL 1.1 — a mechanical licence-text correction, not a
   font-choice change, carried over from this house's own note on the same
   face at all-pro-lawn-service-boise-id, poop-busters-clarksville-tn and
   lbs-junk-removal-lawton-ok). Barlow: SIL OFL 1.1, The Barlow Project
   Authors — assets/fonts/OFL.txt.

   Subset to the house declared range (house-tech-spec §8; brief §2.5),
   identical on all three faces (pyftsubset, --unicodes matching the range
   below exactly). Measured post-subset: Ultra 11,020 B, Barlow 400 17,816 B,
   Barlow 700 18,340 B — 47,176 B total, largest face 18,340 B, both inside
   brief §2.3's ≤60 KB/face and ≤100 KB total (no instance exceeds the
   24,000 B escalation threshold).

   ONE codepoint is load-bearing on this site: U+00B7 (`·`), the separator in
   the hero eyebrow and the footer NAP line (brief §2.5). Confirmed present
   in all three shipped subsets (fontTools cmap read). */

@font-face {
  font-family: 'Ultra';
  src: url('../assets/fonts/ultra-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: 'Barlow';
  src: url('../assets/fonts/barlow-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: 'Barlow';
  src: url('../assets/fonts/barlow-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 §2.4). Donors are
   Georgia (Ultra) and Arial (both Barlow instances), exactly as the brief's
   own font-face sketch names. size-adjust / ascent-override / descent-override
   / line-gap-override computed with the house's own scripts/font-metrics.mjs
   (the fontaine algorithm: an English-letter-frequency-weighted average
   glyph-advance ratio, never OS/2.xAvgCharWidth) against the real shipped
   Ultra/Barlow woff2 files on the webfont side and @capsizecss/metrics'
   published Georgia/Arial reference data on the fallback side — the same
   donor-metric source this house used for Ultra/Georgia on
   all-pro-lawn-service-boise-id, poop-busters-clarksville-tn and
   lbs-junk-removal-lawton-ok (whose Ultra-vs-Georgia figures this build
   reproduces exactly: 140.34% / 71.88% / 19.52%, since it is the same face).

   Each fallback also lists Liberation Serif / Liberation Sans as a further
   local() candidate — real metric-compatible clones of Times New
   Roman/Arial — so the override still engages on a host lacking Georgia or
   Arial themselves (this build environment has neither installed, so
   without the Liberation chain the override would never engage at all
   here). The override VALUES stay tuned to the named Georgia/Arial donors;
   Liberation is an engagement fallback, not a second tuning target. */

@font-face {
  font-family: 'Ultra Fallback';
  src: local('Georgia'), local('Liberation Serif');
  font-weight: 400;
  font-style: normal;
  size-adjust: 140.34%;
  ascent-override: 71.88%;
  descent-override: 19.52%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Barlow Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 400;
  font-style: normal;
  size-adjust: 95.23%;
  ascent-override: 105.01%;
  descent-override: 21.00%;
  line-gap-override: 0%;
}

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