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

   Honest A's Pool Cleaning (Las Vegas, NV). Values from the approved brief
   (runs/honest-as-pool-cleaning-las-vegas-nv/brief.md §2-§8). Family:
   retro-local. Archetype: sidebar-anchor. Palette: adobe-sienna /
   parchment-cream, one light mode, no dark band. Signature: the hung
   neighborhood board swings on its own slow arc beside an independently-
   swaying Joshua tree and a traveling sun-glint (brief §6, §11).
   ========================================================================== */

:root {

  /* --- Colour ---------------------------------------------------------------
     Derivation (brief §2): no real-world colour asset exists (dossier §4.5),
     so the departure from "echo the brand colour" is provenance. Desert-
     suburb NW Las Vegas character read through retro-local family norms:
     sign-painter register, warm parchment ground, two-depth accent
     (precedent: patriot-plumbing, leos-towing, victors-pool-service-mesa-az).
     Ratios are brief §3's own table, independently re-verified. */

  --scheme: light;

  --color-bg: #F5E8D4;                /* warm parchment-cream — page ground */
  --color-surface: #ECDBBC;           /* deeper cream — cards/board/footer panels */
  --color-ink: #2B1B12;               /* deep umber-black — all body text */
  --color-ink-muted: #6B4A34;         /* muted brown — eyebrows, secondary copy */

  /* Two-depth adobe-sienna (brief §3, hard rule): --color-accent is
     DECORATIVE/RULE-WORK only (3.88:1, fails 4.5:1 body floor).
     --color-accent-deep is the TEXT-BEARING role. */
  --color-accent: #C1512B;            /* adobe-sienna — decorative/rule-work ONLY */
  --color-accent-deep: #953C1F;       /* text-bearing role: links, buttons, numerals-as-text */
  --color-accent-ink: #FFF3E9;        /* text ON --color-accent-deep fills */

  /* Waterline/coping motif accent — illustration only, never CSS text/fill. */
  --color-water-echo: #3E6E77;

  /* House-required structural colours. Not in the brief's palette table —
     resolved from retro-local precedent (victors-pool-service-mesa-az): a
     decorative hairline needs no contrast floor. */
  --color-border: #D8C39C;

  /* CONTROL'S OWN BOUNDARY, WCAG 1.4.11: >= 3:1 vs bg AND surface. Reuses
     --color-ink-muted (brief §3: 6.55:1 bg / 5.81:1 surface). */
  --color-border-strong: #6B4A34;

  /* :focus-visible ring = --color-accent-deep, 5.91:1 bg / 5.24:1 surface.
     No dark band anywhere on this site (brief §3) — no on-band ring needed. */
  --color-focus: #953C1F;

  --color-selection-bg: #953C1F;
  --color-selection-ink: #FFF3E9;

  /* Living-hero atmosphere gradient (brief §6, verbatim):
       radial-gradient(120% 90% at 50% 0%, rgba(193,81,43,.32), transparent 60%),
       radial-gradient(90% 70% at 85% 100%, rgba(62,110,119,.22), transparent 55%),
       linear-gradient(180deg, #f3caa0 0%, #e2a468 45%, #c1512b 78%, #953c1f 100%); */
  --color-atmosphere-accent: rgb(193 81 43 / 0.32);
  --color-atmosphere-teal: rgb(62 110 119 / 0.22);
  --color-atmosphere-ground-top: #F3CAA0;
  --color-atmosphere-ground-mid: #E2A468;
  --color-atmosphere-ground-deep: #C1512B;
  --color-atmosphere-ground-bottom: #953C1F;

  /* --- Typography -------------------------------------------------------------
     Display: Bevan, Regular 400 (its only weight, brief §2). Body: Karla,
     static 400/700 only. Both SIL OFL 1.1, Google Fonts. */

  --font-display: 'Bevan', 'Bevan Fallback', Georgia, 'Times New Roman', serif;
  --font-body:    'Karla', 'Karla Fallback', Arial, Helvetica, sans-serif;

  --font-weight-body: 400;
  --font-weight-body-strong: 700;
  --font-weight-display: 400;   /* Bevan's only weight */

  /* Type scale — clamp() values verbatim from brief §4's table. */
  --text-eyebrow: 0.8125rem;                                    /* fixed, 13px */
  --text-hero:    clamp(2.25rem, 1.72rem + 2.25vw, 3.75rem);
  --text-h2:      clamp(1.5rem, 1.29rem + 0.9vw, 2.1rem);
  --text-h3:      clamp(1.25rem, 1.16rem + 0.38vw, 1.5rem);
  --text-lead:    clamp(1.0625rem, 1.02rem + 0.19vw, 1.1875rem);
  --text-body:    clamp(1rem, 0.978rem + 0.094vw, 1.0625rem);
  --text-small:   0.875rem;                                     /* fixed, 14px */

  /* Header + rail wordmark only — not in brief §4's table. Brief §5.1's own
     360px arithmetic assumes ~15px there; named apart from --text-h3
     (services sub-heads, board headings) so the roles can't collide. */
  --text-brand: clamp(0.9375rem, 0.9rem + 0.2vw, 1.05rem);

  --leading-tight: 1.05;    /* H1 — brief §5.1 */
  --leading-snug: 1.25;
  --leading-body: 1.6;      /* brief §5.1: hero lead */

  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.08em;

  /* --- Space — house scale, unmodified. */
  --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 §4: house default (64px) — the house step
     already fits this business's plain, custodial register. */
  --section-gap: var(--space-xl);

  /* --- Layout — house defaults hold. */
  --layout-container: 72rem;
  --layout-measure: 62ch;
  --layout-gutter: clamp(1.25rem, 5vw, 3rem);
  --layout-tap-min: 44px;

  /* Header's fixed content height (brief §5.1: 56px + 1px border-bottom). */
  --header-height: 3.5rem;

  /* Brief §6 living-hero field geometry. */
  --hero-field-height: 16.25rem;   /* 260px — field height at <= 899px */
  --hero-band-min: 20rem;          /* 320px — field's own min height at >= 900px */
  --rail-width: 20rem;             /* 320px — fixed, non-sticky rail width at >= 900px */

  /* Route section's structural ornament (brief §6.2: a single flat dot,
     not a concept icon). Not a brief px value; sized against body text. */
  --route-dot-size: 0.5rem;

  /* --- Radius / shadow / border ----------------------------------------------
     Not stated in the brief — resolved from retro-local precedent (small
     restrained radius on controls, sharp elsewhere). --shadow-none is the
     only shadow token this site consumes (design-rules §4). */
  --radius-none: 0;
  --radius-sm: 4px;
  --shadow-none: none;
  --border-hairline: 1px;
  --border-thick: 3px;
  --border-style: solid;

  /* --- Motion — reveal timing: house defaults (brief §8 names these). */
  --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;

  /* Signature-move tokens (brief §6, locked exact values). Three
     independent, non-common-multiple durations so the loops never
     re-synchronise. --ease-signature is the plain CSS keyword the brief's
     keyframes want, deliberately distinct from --ease-in-out above. */
  --duration-board-swing: 9s;
  --duration-joshua-sway: 8.2s;
  --duration-sun-glint: 8.4s;
  --delay-joshua-sway: 0.4s;
  --ease-signature: ease-in-out;
  --ease-linear: linear;

  /* Sun-glint travel (brief §6: translateX(-30px) -> translateX(300px)),
     tokenised — asymmetric, so two values rather than one signed one. */
  --motion-glint-start: -1.875rem;  /* -30px */
  --motion-glint-end: 18.75rem;     /* 300px */

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

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, subset to house-tech-spec §8's declared
   safe range, identical unicode-range on every face. Bevan / Karla — SIL
   OFL 1.1. Licence text: assets/fonts/OFL-Bevan.txt, OFL-Karla.txt.

   Coverage gap: U+2010/2011/2012/2015 absent from Bevan; Karla also missing
   U+2032/2033 (same shipped files as advanced-irrigation-wilmington-nc and
   victors-pool-service-mesa-az — cmap read carried forward, byte-identical
   files). Not narrowed for — both faces lack the same set, so a page falls
   to the fallback consistently across every face, never mid-sentence.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Bevan';
  src: url('../assets/fonts/bevan-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: '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-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) -----------------------
   Direct fontTools OS/2+hhea measurements of these exact shipped woff2
   files (scripts/font-metrics.mjs — English-letter-frequency-weighted
   average char width, fontaine/@capsizecss/next/font's method).

   Bevan Fallback measured against Gelasio (Georgia's open metric-compatible
   clone — no Georgia binary in this build environment, next/font's own
   substitution) and matches advanced-irrigation-wilmington-nc's shipped
   values to two decimals (same Bevan file, same donor, re-derived here).

   Karla Fallback measured against Liberation Sans (Arial's clone) and
   matches victors-pool-service-mesa-az's and leos-towing-louisville-ky's
   shipped values to two decimals (same Karla files). CSS still names
   local('Arial') first, matching a real browser's own system font. */

@font-face {
  font-family: 'Bevan Fallback';
  src: local('Georgia');
  font-weight: 400;
  font-style: normal;
  size-adjust: 126.26%;
  ascent-override: 91.5%;
  descent-override: 35.77%;
  line-gap-override: 0%;
}

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

@font-face {
  font-family: 'Karla Fallback';
  src: local('Arial Bold'), local('Arial');
  font-weight: 700;
  font-style: normal;
  size-adjust: 100.06%;
  ascent-override: 91.64%;
  descent-override: 25.18%;
  line-gap-override: 0%;
}

/* Reduced motion: signature-move tokens. base.css's kill switch collapses
   --duration-fast/-base/-slow at :root; these brief-specific tokens need
   their own collapse. site.css also states explicit end-states. */
@media (prefers-reduced-motion: reduce) {
  :root {
    /* @allow-literal: a duration token must resolve to a real time value */
    --duration-board-swing: 0.01ms;
    --duration-joshua-sway: 0.01ms;
    --duration-sun-glint: 0.01ms;
  }
}
