/* ==========================================================================
   tokens.css — the design brief, compiled (house-tech-spec §3).
   Source: runs/apex-trees-and-turf-logan-ut/brief.md §2 (palette/contrast),
   §3 (typography), §4/§6 (layout + desktop composition), §5 (living-hero),
   §8 (motion). Every value below traces to one of this brief's sections;
   nothing here was chosen at build time.
   ========================================================================== */

:root {

  /* --- Colour — brief §2. Derivation order (design-rules §6): step 1 (real-
     world colour) is EMPTY — dossier §4.5, no sampleable truck/uniform/
     signage/logo colour, brand_color unset. Step 2 (local character) and
     step 3 (family norms) carry the palette: Cache Valley canyon/conifer
     cover + sap/resin as literal trade material, inside editorial-modern's
     one-restrained-accent register. One deliberate mode, light. --- */

  --scheme: light;

  --color-bg:          #F5F2ED;  /* bone-paper ground */
  --color-surface:     #FAF7F2;  /* card / band, one step lighter */
  --color-ink:         #231F1C;  /* ink-charcoal — body + heading text */
  --color-ink-muted:   #6E655C;  /* secondary text, 5.11:1 vs bg / 5.30:1 vs surface */

  /* Brief §2's two-depth accent split (registry precedent: patriot-plumbing-
     prescott-az, leos-towing-louisville-ky). accent-bright is DECORATIVE
     ONLY — 2.63:1 vs bg, fails AA even at large text — and never carries a
     glyph on any ground, at any size: hairlines, the ledger's row-divider
     rule, and the hero SVG overlay's annotation/tick/leaf stroke only.
     accent-ink is the ONLY accent variant that carries text (5.30:1 vs bg,
     5.53:1 vs surface): eyebrow, ledger numerals, accent links. */
  --color-accent-bright: #C98A1F;  /* resin-amber — DECORATIVE ONLY, never text */
  --color-accent-ink:    #8A5A0F;  /* deepened amber — the ONLY accent variant that carries text */

  /* Required house slot (spec §3). Brief §2 never populates a bare
     --color-accent — every CTA reuses the ink/bg reversed pair instead
     (§2/§6). base.css's skip-link is the one consumer of this generic pair,
     so it points at --color-bg: paired with accent-ink, that is the brief's
     own validated 5.30:1 (§2), read in reverse. Full reasoning: README.md. */
  --color-accent: var(--color-bg);

  /* House-required structural colours (consumed by base.css) */
  --color-border: #DDD5C6;            /* DECORATIVE hairlines only — ledger row
                                          dividers, header/footer rules. No
                                          contrast floor: a divider is not a
                                          control. */

  --color-border-strong: #6E655C;     /* = --color-ink-muted — control boundaries
                                          (nav-toggle, .btn--quiet), >=3:1 both
                                          grounds (brief §2) */

  --color-focus: #231F1C;             /* = --color-ink — :focus-visible ring,
                                          >=3:1 both grounds (brief §2) */

  /* The one dark band on this site is the "Get a Quote" CTA band (brief §6:
     inverted ink/bg pair). --color-focus is --color-ink and would be
     invisible there, so the band scopes its focus ring to this token —
     tokens.css's own documented exception. Governs the phone CTA AND the
     form's inputs/textarea/submit inside the band (brief §6). */
  --color-focus-on-band: #F5F2ED;     /* = --color-bg */

  --color-selection-bg:   #231F1C;
  --color-selection-ink:  #F5F2ED;


  /* --- Typography — brief §3. Two families, both SIL OFL 1.1, both self-
     hosted (assets/fonts/OFL.txt carries the notices). Instrument Serif
     ships ONLY weight 400 — italic for the H1/hero lead emphasis, upright
     (regular) for section h2 headings, a deliberate register split (brief
     §3). Work Sans is the single variable body/UI face, wght 400/500/600 via
     font-weight only — no font-variation-settings is declared anywhere on
     this site (house-tech-spec §8's `wght`-trap rule). --- */

  --font-display: 'Instrument Serif', 'Instrument Serif Fallback', 'Instrument Serif Fallback 2', Georgia, serif;
  --font-body:    'Work Sans', 'Work Sans Fallback', Arial, sans-serif;

  --font-weight-display:      400;  /* Instrument Serif's only weight — brief §3 correction, NOT 700 */
  --font-weight-body:         400;
  --font-weight-body-medium:  500;  /* brief §3 — CTA button labels */
  --font-weight-body-strong:  600;  /* eyebrow, ledger titles, nav */

  /* --- Fluid type scale — brief §3, computed fresh at 375 and 1440, both
     ends exact by construction (brief §3's own verification table). --- */

  --text-eyebrow: clamp(0.6875rem, 0.6435rem + 0.1878vw, 0.8125rem);  /* 11px -> 13px */
  --text-small:   0.9375rem;                                          /* 15px, fixed — house structural unit (field labels, footer, nav), not restated by the brief */
  --text-lead:    clamp(1.0625rem, 1.0185rem + 0.1878vw, 1.1875rem);  /* 17px -> 19px */
  --text-body:    clamp(1rem,     0.978rem  + 0.0939vw, 1.0625rem);   /* 16px -> 17px */
  --text-h2:      clamp(1.25rem,  1.118rem  + 0.5634vw, 1.625rem);    /* 20px -> 26px */
  --text-h1:      clamp(2.375rem, 1.7148rem + 2.8169vw, 4.25rem);     /* 38px -> 68px */

  /* Brief §6 — Reviews pull-quote, between --text-h2 and --text-h1. */
  --text-pullquote: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);           /* 24px -> 36px */

  --leading-tight: 1.05;   /* h1 / h2 */
  --leading-snug:  1.25;   /* CTA labels, eyebrow */
  --leading-body:  1.6;    /* running text */

  /* No brief instruction — same resolution as the registry's other
     Instrument Serif/Work Sans site (triple-c-repair-texarkana-ar): neutral
     tight, house default wide for eyebrows/CTA labels. */
  --tracking-tight:  0em;
  --tracking-normal: 0em;
  --tracking-wide:   0.08em;

  /* --- Space — house default scale, unmodified. Brief §4a/§6 reference
     --space-sm/md/lg/xl/2xl directly at their house values (16/24/40/64/96px)
     with no redefinition. --- */

  --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 §6: "inside the --section-gap (64px) rhythm
     ceiling" = --space-xl, the house default. */
  --section-gap: var(--space-xl);

  /* --- Layout — brief §4a/§6. House container/measure/gutter/tap-min are
     unchanged (brief cites each at its house value). --- */

  --layout-container: 72rem;          /* 1152px — brief §6 */
  --layout-measure: 62ch;             /* house default — brief §6 Reviews attributed lines sit at this measure unchanged */
  --layout-gutter: clamp(1.25rem, 5vw, 3rem);   /* ceiling 3rem=48px at >=1440 — brief §6 */
  --layout-tap-min: 44px;

  /* Brief §6's per-section centred-column widths (each stated as an exact
     rem value, with an approximate ch reading alongside it — these are
     CONTAINER widths, not a redefinition of --layout-measure, which stays
     62ch and is used unchanged for the Reviews section's attributed lines). */
  --measure-ledger:        45rem;  /* 720px, "What the Visit Covers" — brief §6 */
  --measure-reviews-quote: 40rem;  /* 640px, Reviews pull-quote column — brief §6 */
  --measure-about:         38rem;  /* 608px, About — brief §6 */
  --measure-cta:           32rem;  /* 512px, "Get a Quote" band — brief §6 */

  /* Hero text column (brief §6: "max-width: 38ch", desktop two-column grid). */
  --measure-hero-text: 38ch;

  /* Living-hero field — brief §5/§6. Two aspect ratios (mobile fold-math box
     §4a, desktop drawn box §6); object-fit:cover on one master carries both,
     switching at the same 48em breakpoint the grid and nav already use. */
  --hero-field-ratio: 375 / 300;
  --hero-field-ratio-wide: 600 / 560;
  --hero-field-width: 37.5rem;   /* 600px at the house 16px root — brief §6's drawn width */

  /* --- Radius / shadow / border — editorial-modern family register (brief
     §0's "grid-confident typography-led" family norm, carried identically by
     this family's other two shipped sites, auto-evolution-north-logan-ut and
     triple-c-repair-texarkana-ar: flat, hairline-separated, no drop shadow
     anywhere). Brief states no departure from this norm. --- */

  --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: 2px;
  --border-style: solid;

  /* --- Motion — brief §8. base.css's reveal engine consumes --duration-slow/
     --ease-out directly (house default values, unchanged — brief does not
     restate the reveal duration). --- */

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

  /* The signature — "the crown is measured" (brief §5/§8/§9). One-shot
     annotation draw on load, then two independent, non-synced ambient loops. */
  --duration-signature-draw: 1.8s;
  --duration-tick-float: 6.2s;
  --duration-leaf-sway: 7.8s;

  /* Loop travel — brief §5's own stated magnitudes ("±6px vertical",
     "rotating ±2°"), so the keyframes in site.css carry no raw literal. */
  --hero-tick-drift: 6px;
  --hero-leaf-rotate: 2deg;

  /* Ledger section-header strip (brief §7 slot 2: "~120px tall at any
     width"), fluid so it never overshoots that figure at wide viewports. */
  --ledger-strip-height: clamp(2.5rem, 6vw, 7.5rem);

  /* About backdrop watermark opacity ceiling (brief §7 slot 3). */
  --about-backdrop-opacity: 0.12;

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

/* Brief §8: the three signature motion tokens collapse at their source under
   prefers-reduced-motion, same mechanism as base.css's own three durations.
   The settled visual state (line fully drawn, tick/leaf at rest) is set in
   site.css at matching specificity — no !important (house-tech-spec §12). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-signature-draw: 0.01ms;
    --duration-tick-float: 0.01ms;
    --duration-leaf-sway: 0.01ms;
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, SIL OFL 1.1 (assets/fonts/OFL.txt), subset
   to the house declared safe range (house-tech-spec §8), byte-identical on
   every face (brief §3).

   COVERAGE GAP (house-tech-spec §8's "found on first use" clause), checked by
   a fontTools cmap read against the shipped, post-subset woff2 files: all
   three faces (Instrument Serif italic AND regular, Work Sans) lack
   U+2010-2012/2015 and U+2032-2033 identically — the documented, all-lack-it
   case, inert by construction (both Instrument Serif instances come from the
   same type family and share the same glyph set gap; Work Sans was checked
   separately and carries the same absence). No prime mark or non-hyphen dash
   appears anywhere in this site's shipped copy, so the gap is never hit.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-italic-latin.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;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-regular-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: 'Work Sans';
  src: url('../assets/fonts/work-sans-variable-latin.woff2') format('woff2');
  font-weight: 400 600;
  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 (spec §7/§8) — MEASURED with scripts/font-
   metrics.mjs (the fontaine method) against each donor's real font file,
   never guessed. Italic + Work Sans 400/600 carried verbatim from
   triple-c-repair-texarkana-ar (byte-identical subset files, so the same
   measurement applies); Instrument Serif Regular and Work Sans 500 are new
   measurements this build. Two tiers for Instrument Serif: Gelasio (Georgia's
   open metric clone — Georgia itself isn't inspectable on this Linux build
   host) then DejaVu Serif (genuinely installed; its upright file donates the
   italic override too, same precedent as auto-evolution-north-logan-ut).
   Work Sans measured against Liberation Sans (`fc-match Arial`'s result on
   this host). Full derivation: README.md. -------------------------------- */

@font-face {
  font-family: 'Instrument Serif Fallback';
  src: local('Georgia');
  font-style: italic;
  font-weight: 400;
  size-adjust: 79.35%;
  ascent-override: 124.76%;
  descent-override: 39.07%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Instrument Serif Fallback 2';
  src: local('DejaVu Serif');
  font-style: italic;
  font-weight: 400;
  size-adjust: 69.42%;
  ascent-override: 142.62%;
  descent-override: 44.66%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Instrument Serif Fallback';
  src: local('Georgia');
  font-style: normal;
  font-weight: 400;
  size-adjust: 76.66%;
  ascent-override: 129.13%;
  descent-override: 40.44%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Instrument Serif Fallback 2';
  src: local('DejaVu Serif');
  font-style: normal;
  font-weight: 400;
  size-adjust: 65.69%;
  ascent-override: 150.70%;
  descent-override: 47.19%;
  line-gap-override: 0%;
}

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

@font-face {
  font-family: 'Work Sans Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 500;
  font-style: normal;
  size-adjust: 113.37%;
  ascent-override: 82.03%;
  descent-override: 21.43%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Work Sans Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 600;
  font-style: normal;
  size-adjust: 113.25%;
  ascent-override: 82.12%;
  descent-override: 21.46%;
  line-gap-override: 0%;
}
