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

   all-pro-lawn-service-boise-id — brief.md v1 (C3 PASS), family `retro-local`,
   archetype `editorial-stack`, signature "the painted shadow". Every value
   below is copied from brief.md §3.3's literal token block, §2.6/§2.7's type
   tokens, §5's layout/ornament tokens and §8's motion tokens. Two supplements
   are Builder fills, both interpolations of brief-stated outcomes rather than
   new choices, flagged where they sit:
     --text-wordmark (15px, brief §6.1 "Wordmark left in --font-display at
       15px") and --text-control (14px, brief §6 §I slot ③ "--font-body-strong
       14px --tracking-caps uppercase").
   ========================================================================== */

:root {

  /* --- Colour (brief §3.3). Derivation: brief §3.1's echo/departure argument
     → §3.2's local-character step (russet umber = valley silt/timber) →
     §6.1 semantic anchor (earth support, green carried only in imagery, R1). */

  --scheme: light;

  --color-bg:               #F7F1E4;   /* hsl(38.7, 55.6%, 93.1%)  warm cream — the one ground */
  --color-surface:          #FFFBF2;   /* hsl(40.0, 100%, 97.1%)   reserved-slot plates, form fields */
  --color-ink:               #241A11;  /* hsl(26.8, 35.8%, 10.8%)  bark ink */
  --color-ink-muted:         #5B4A3A;  /* hsl(28.4, 22.4%, 29.2%) */

  --color-accent:            #7C4A15;  /* hsl(30.9, 71.0%, 28.4%)  DOMINANT — russet umber */
  --color-accent-ink:        #FFFBF2;
  --color-echo:              #C0141C;  /* hsl(357.7, 80.5%, 41.2%) brand scarlet, re-pitched for AA */
  --color-echo-ink:          #FFF6EC;

  --color-band:              #2B1D12;  /* hsl(26.5, 41.4%, 12.0%)  the ONE dark band */
  --color-band-ink:          #F2E7D6;
  --color-accent-onband:     #EBC98F;  /* on-dark sibling ONLY — never on cream */

  --color-border:            #9A7C52;  /* hsl(35.0, 30.5%, 46.3%)  1.4.11-bound: form-field
                                           borders, reserved-slot frames, the expiry bar's
                                           control edge */
  --color-rule:               #E0D3BC; /* DECORATIVE separators only — R3 */

  --color-focus:              #7C4A15;
  --color-focus-on-band:      #EBC98F;
  --color-selection-bg:       #7C4A15;
  --color-selection-ink:      #FFFBF2;

  /* Hero atmosphere stops — named so §4.4's contrast table is computed
     against the ground's actual extremes, never a flat token (brief §4.4). */
  --color-atmos-hi:           #FFFBF2;
  --color-atmos-mid:          #F6EEDD;
  --color-atmos-lo:           #EFE2CB;

  /* Token-contract completeness: radius is --radius-none everywhere (R7),
     so the sm/md/lg/pill steps base.css reads resolve to it rather than
     being left undefined. Same for shadow. */
  --radius-sm:  var(--radius-none);
  --radius-md:  var(--radius-none);
  --radius-lg:  var(--radius-none);
  --radius-pill: var(--radius-none);
  --shadow-sm:  var(--shadow-none);
  --shadow-md:  var(--shadow-none);
  --shadow-lg:  var(--shadow-none);


  /* --- Typography (brief §2). Two families, three static woff2 instances —
     under design-rules §5's ceiling of four. Both SIL OFL 1.1 as declared by
     the brief; Karla's is confirmed (assets/fonts/OFL.txt). Ultra's own
     Google Fonts source repo files it under Apache License 2.0, not OFL —
     assets/fonts/LICENSE-ultra-apache-2.0.txt carries the correct text and
     README.md flags the correction. R16: no font-variation-settings anywhere
     — three static instances, no variable axes. */

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

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

  --text-hero:    clamp(2.125rem, 8.8vw, 4rem);
  --text-h2:      clamp(1.5rem, 4.2vw, 2.25rem);
  --text-lead:    clamp(1.0625rem, 1.8vw, 1.25rem);
  --text-body:    clamp(0.9375rem, 1.2vw, 1.0625rem);
  --text-small:   0.8125rem;
  --text-eyebrow: 0.6875rem;

  /* Builder fills, both flagged in the file banner above and in README.md:
     interpolations of a brief-stated exact px outcome, not a new choice. */
  --text-wordmark: 0.9375rem;  /* 15px — brief §6.1 header wordmark */
  --text-control:  0.875rem;   /* 14px — brief §6 §I slot ③ primary control label */

  --leading-tight: 1.08;  --leading-snug: 1.22;  --leading-body: 1.60;  --leading-caps: 1.45;

  --tracking-display: -0.005em;  --tracking-normal: 0em;  --tracking-caps: 0.16em;
  /* base.css's shared h1–h4 rule reads --tracking-tight; every element that
     rule reaches on this site (h1, h2 — no h3/h4 exist here) IS display type,
     so this is a direct alias rather than a repurposed role (contrast the
     anderson-landscape precedent, which had to reset it back). */
  --tracking-tight: var(--tracking-display);

  /* --- Space — house scale, brief §3.3 (no --space-3xl on this site; the
     one skeleton rule that referenced it — the textarea's min-height — is
     driven by its `rows` attribute instead, so nothing needs it). */

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

  --section-gap:      var(--space-xl);   /* 64px FIXED at every width — brief §5.5 */
  --layout-container: 72rem;             /* the OUTER box */
  --layout-gutter:    1rem;              /* → 2.5rem at ≥48rem, applied INSIDE the container */
  --layout-measure:   38rem;             /* prose cap */
  --h1-max:           46rem;             /* the display column — brief §5.1 point 4 */
  --layout-tap-min:   44px;
  --hero-field-ratio: 25 / 16;           /* → 11 / 4 at ≥48rem */

  /* Sticky stack = expiry 44 + header 56 + 1px = 101px (brief §5.6). */
  --header-height: 3.5rem;               /* 56px, fixed at every width — brief §6.1 */
  --control-height: 3.25rem;             /* 52px — brief §6 §I slot ③ "52px tall" */
  --control-min-width: 16.25rem;         /* 260px — brief §5.1 point 3, inline-block floor at ≥48rem */
  --reserved-height: 8.25rem;            /* 132px @375 — brief §6 §VI reserved-slot plate */
  --btn-buy-min-width: 11rem;            /* preview Buy control, CLS fix — README.md */

  --rule-section:    3px;                /* the section rule — never thins */
  --shadow-offset:   3px;                /* THE SIGNATURE — → 5px at ≥45.5rem. px at every stop */
  --border-hairline: 1px;  --border-style: solid;
  --border-thick: var(--rule-section); /* house focus-ring weight; reused for the FAQ marker's stroke */
  --radius-none:     0;                  /* the only radius on this site */
  --shadow-none:     none;               /* the only shadow token */

  --duration-fast: 160ms;  --duration-base: 300ms;  --duration-slow: 520ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-shift: 0.75rem;  --reveal-stagger: 70ms;  --press-delay: 240ms;
  --rm-haze-opacity: 0.36;

  /* Ambient satellite motion, hero field only (brief §8.3): four loops, no
     two durations shared, 17/23/29/31 pairwise coprime so the set never
     re-synchronises. */
  --duration-haze:  31s;
  --duration-mote-1: 17s;
  --duration-mote-2: 23s;
  --duration-mote-3: 29s;
  --mote-2-delay: -8s;
  --mote-3-delay: -17s;

  /* The shared four-point path every mote animates through — brief §8.3:
     "(0,0) → (9px, −11px) → (−5px, −19px) → (−11px, −8px) → (0,0)". Each
     mote runs the same path at its own duration/delay (above). */
  --mote-path-a: 9px, -11px;
  --mote-path-b: -5px, -19px;
  --mote-path-c: -11px, -8px;

  /* Reduced-motion rest offsets — three DIFFERENT composed positions so the
     sky still reads as air in motion rather than three dots in a row
     (brief §8.4). */
  --mote-rest-1: 6px, -8px;
  --mote-rest-2: -8px, -4px;
  --mote-rest-3: 3px, -14px;

  --z-base: 0; --z-header: 100; --z-nav-panel: 200; --z-skip-link: 300;
}

/* Declared breakpoints — brief §2.7: 45.5rem (728px, the ornament step) and
   48rem (768px, layout). No other breakpoint appears in this file or in
   site.css (brief §5.2's table). */

@media (min-width: 45.5rem) {
  :root {
    --shadow-offset: 5px;
  }
}

@media (min-width: 48rem) {
  :root {
    --layout-gutter:    2.5rem;
    --hero-field-ratio: 11 / 4;
    --reserved-height:  9.25rem;   /* 148px @≥48rem */
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, latin subset, static instances only.
   Ultra: Apache License 2.0, Astigmatic/Brian J. Bonislawsky — the brief
   states SIL OFL 1.1, but Google's own font source repo
   (github.com/google/fonts/apache/ultra) files Ultra under Apache 2.0; the
   correct text ships at assets/fonts/LICENSE-ultra-apache-2.0.txt (a
   mechanical licence-text correction, not a font-choice change — Ultra stays
   the display face the brief specifies, and Apache 2.0 is a strict superset
   of OFL's embedding/self-hosting permissions). Karla: SIL OFL 1.1, Jonathan
   Pinhorn — assets/fonts/OFL.txt. Subset to the house declared range,
   identical on all three faces (house-tech-spec §8; brief §2.5). Coverage
   gap, all three faces alike: U+2010, U+2011, U+2012, U+2015, U+2032, U+2033
   are declared and absent from all three source faces — none render in this
   site's copy (U+2013 and U+00B7, the two non-ASCII characters this copy
   uses, are carried by every face).
   -------------------------------------------------------------------------- */

@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: '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-600-latin.woff2') format('woff2');
  font-weight: 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 (house-tech-spec §8, brief §2.4). Donors:
   Georgia (Ultra — nearest-mass serif slab in the system stack), Arial
   (both Karla instances). size-adjust / ascent-override / descent-override /
   line-gap-override computed from the real shipped instances' own OS/2 +
   hhea metrics against Georgia/Arial reference metrics (the `fontaine`
   algorithm — xAvgCharWidth ratio drives size-adjust; ascent/descent scale
   with it). Verified against Lighthouse CLS — see README.md. */

@font-face {
  font-family: 'Ultra Fallback';
  src: local('Georgia');
  font-weight: 400;
  font-style: normal;
  size-adjust: 159.91%;
  ascent-override: 63.08%;
  descent-override: 17.13%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Arial');
  font-weight: 400;
  font-style: normal;
  size-adjust: 117.88%;
  ascent-override: 77.79%;
  descent-override: 21.38%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Bold Fallback';
  src: local('Arial Bold'), local('Arial');
  font-weight: 600;
  font-style: normal;
  /* Retuned from the algorithmic 122.14%/75.08%/20.63% start: measured
     against the rendered button strings, which ran ~9–10% wide and cost
     0.029 CLS (README.md). Re-solved empirically. */
  size-adjust: 110.58%;
  ascent-override: 82.93%;
  descent-override: 22.79%;
  line-gap-override: 0%;
}
