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

   Source: runs/all-seasons-lawn-maintenance-houston-tx/brief.md §§2-4, 6.
   Family: editorial-modern. Archetype: roster-index ("The Index").
   Palette: ledger-vermillion / bone-paper, light mode only (brief §3).
   ========================================================================== */

:root {

  /* --- Colour --------------------------------------------------------------
     Derivation (brief §2): provenance departure from the business's own weak-
     case CSS (dossier §4.5 — no real-world colour asset exists); editorial
     convention (ink ground + verified accent) carries the "checkable ledger"
     idea the roster-index archetype depends on. Full contrast table: brief §3. */

  --scheme: light;

  --color-bg: #F7F4EE;                /* bone paper */
  --color-surface: #EFEADF;           /* one step deeper — cards, tables, roster row ground */
  --color-ink: #1B1B18;               /* near-black warm charcoal — body text, H1 */
  --color-ink-muted: #5B5A52;         /* eyebrows, captions, muted facts */
  --color-accent: #A13B2E;            /* ledger-vermillion — numerals, rules, buttons, links */
  --color-accent-ink: #F7F4EE;        /* text ON the accent fill */

  --color-border: #DDD6C4;            /* decorative hairline — table rules, roster row dividers */
  --color-border-strong: #5B5A52;     /* = ink-muted, reused: an outlined control's own boundary, WCAG 1.4.11 */

  --color-focus: #A13B2E;             /* = accent, reused: :focus-visible ring */

  --color-selection-bg: #A13B2E;
  --color-selection-ink: #F7F4EE;

  /* Brief-specific colour: verified-moss — the anchor's carrier (brief §2/§3).
     One job only: the "verified" tick mark and the botanical line-illustration
     motif. Never a large fill, never body text, never on a dark ink ground
     (fails contrast at 2.16:1 — brief §3's discipline note). */
  --color-verify: #3B5741;            /* verified-moss */
  --color-verify-ink: #F7F4EE;        /* unused as a text-on-fill role; recorded per spec §3 contract */


  /* --- Typography ------------------------------------------------------------
     Display: Literata (variable roman, 400-600). Body: Work Sans (variable,
     400-700). Emphasis: Literata Italic — one recurring role only, the named-
     client callout (brief §2, §6.5 row 03). 3 woff2 files, inside the 4-file
     ceiling. Fallback stacks share the display face's proportions (metrics-
     matched fallback faces declared at the bottom of this file, spec §8). */

  --font-display: 'Literata', 'Literata Fallback', Georgia, 'Times New Roman', serif;
  --font-display-italic: 'Literata Italic', 'Literata Italic Fallback', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', 'Work Sans Fallback', ui-sans-serif, system-ui, Arial, sans-serif;

  --font-weight-body: 400;
  --font-weight-body-strong: 700;      /* eyebrow, CTA labels, "verified" tick labels */
  --font-weight-display: 500;          /* H1 */
  --font-weight-display-strong: 600;   /* roster-index row numerals */

  font-synthesis: none;

  /* --- Type scale (brief §4) — clamp() fluid via named breakpoints ---------- */

  --text-eyebrow: clamp(0.7rem, 0.66rem + 0.2vw, 0.8rem);
  --text-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --text-lead: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  --text-h3: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  --text-h2: clamp(1.5rem, 1.3rem + 1vw, 2.2rem);
  --text-h1: clamp(2rem, 1.55rem + 2.3vw, 3.3rem);
  --text-index-num: clamp(1.6rem, 1.3rem + 1.5vw, 2.6rem);
  --text-small: 0.85rem;               /* fixed, all breakpoints */

  --leading-tight: 1.06;
  --leading-snug: 1.25;
  --leading-body: 1.5;

  --tracking-tight: -0.01em;
  --tracking-normal: 0em;
  --tracking-wide: 0.06em;

  /* --- Space (house scale; brief §4 picks --section-gap's step) ------------- */

  --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 breakpoint (brief §4) */

  /* --- Layout ---------------------------------------------------------------
     roster-index is type-led, single editorial column at every width (brief
     §2): --measure-hero caps the hero and roster-index columns. */

  --layout-container: 72rem;
  --layout-measure: 62ch;
  --measure-hero: 42rem;               /* 672px — brief §2's geometry ruling */
  --layout-gutter: clamp(1.25rem, 5vw, 3rem);
  --layout-tap-min: 44px;

  /* --- Radius / shadow / border ---------------------------------------------
     A checkable ledger reads square, not soft — radius-none throughout,
     per the family's ink-on-paper register (brief §2). */

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

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

  --border-hairline: 1px;
  --border-thick: 3px;
  --border-style: solid;
  --divider-seam-width: 2px;          /* .divider--earth's soil/turf seam, ad-ruling--divider-webp-budget.md §4.3 */

  /* --- Motion -----------------------------------------------------------
     House reveal tokens (fade+rise, brief §8 — no new reveal values). */

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

  /* Brief-specific ambient motion (brief §6, §8) — the living-hero's two
     independent, non-synchronised loops. Slow-ambient values outside the
     house fast/base/slow reveal range; frozen entirely under reduced motion. */
  --duration-sprig-sway: 7400ms;
  --duration-tick-pulse: 4500ms;

  /* --- Living-hero field geometry (brief §6, §5.1) -----------------------
     Exact pixel boxes the brief specifies for the generated specimen overlay
     and the live verified-tick. These are brief-stated dimensions, not scale
     steps, so they live here rather than being invented in site.css. */
  --hero-field-w: 96px;                /* ≤899px */
  --hero-field-h: 132px;
  --hero-field-w-lg: 160px;            /* ≥900px */
  --hero-field-h-lg: 220px;
  --hero-field-w-floor: 64px;          /* short-viewport floor (brief §5.1) */
  --hero-field-h-floor: 88px;
  --hero-min-block-lg: 420px;          /* ≥900px hero min-block-size */
  --verify-tick-size: 14px;            /* fixed, never scales (brief §6) */

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

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, latin subset, font-display: swap.
   Literata and Work Sans: SIL Open Font License 1.1, Google Fonts (brief §2).

   Metrics-matched fallback faces declared BEFORE each real face (spec §8).
   Overrides are MEASURED, never guessed (owed-ledger A-cf): computed by
   `scripts/font-metrics.mjs` from the real font files — size-adjust from the
   English-letter-frequency-weighted average glyph advance, ascent/descent/
   line-gap ratios derived from that.

   TWO NAMED LOCAL() SOURCES, NOT ONE, per face — measured, not aspirational.
   `local('Georgia')`/`local('Arial')` are the names a Mac/Windows visitor
   actually has installed; `fc-match` on this Linux render/QA host resolves
   both to DejaVu Serif/Sans by ALIAS SUBSTITUTION, but Chromium's `local()`
   matching in an `@font-face src` does exact-name lookup and does NOT apply
   that alias — confirmed empirically: with `local('Georgia')` alone, the
   fallback period rendered whatever literal 'Georgia'/'serif' further down
   the `--font-display` stack resolved to (unadjusted DejaVu, no override
   applied at all), reproducing the H1's 70.8px-vs-106.3px wrap mismatch
   (2 lines vs 3 at 375px) despite correct override numbers. Adding
   `local('DejaVu Serif')`/`local('DejaVu Sans')` as a second named source in
   the SAME @font-face — measured against the same donor the override values
   are tuned to — makes the tuned face the one that actually matches on this
   host; Georgia/Arial still match by their own name where they are really
   installed. Verified: fallback and webfont both compute the H1 to identical
   106.27px at 375px, and `lighthouse.mjs` reads CLS 0.000. -------------- */

@font-face {
  font-family: 'Literata Fallback';
  src: local('Georgia'), local('DejaVu Serif');
  size-adjust: 92.47%;
  ascent-override: 127.28%;
  descent-override: 33.31%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Literata';
  src: url('../assets/fonts/literata-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;
}

@font-face {
  font-family: 'Literata Italic Fallback';
  src: local('Georgia'), local('DejaVu Serif');
  size-adjust: 87.12%;
  ascent-override: 135.1%;
  descent-override: 35.35%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Literata Italic';
  src: url('../assets/fonts/literata-italic-variable-latin.woff2') format('woff2');
  font-weight: 400 600;
  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: 'Work Sans Fallback';
  src: local('Arial'), local('DejaVu Sans');
  size-adjust: 98.77%;
  ascent-override: 94.16%;
  descent-override: 24.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Work Sans';
  src: url('../assets/fonts/work-sans-variable-latin.woff2') format('woff2');
  font-weight: 400 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;
}
