/* brand.css — Heller Heat & Air. Tier 0A primitives + the core's role answers.
 * VALUES ONLY.
 *
 * The wrapper is not optional: unlayered CSS outranks every layer, so a brand
 * sheet without it would beat core COMPONENTS, not just core tokens.
 *
 * Source: Figma palette 2001:206 and type sheet 2001:56 (read 2026-10-26 with
 * get_variable_defs), plus the comp's applied styles (38112:527). Never author
 * a derived role (-hover, on-*, --link, --icon-accent, --focus-ring, --scrim,
 * --on-gradient) — the core computes those and authoring one is a gate failure.
 *
 * Run `python3 tools/check-css.py` after every edit to this file. A comment
 * here voided an entire brand sheet once and every gate passed on it for a day:
 * an asterisk immediately followed by a slash closes this comment early,
 * whatever the surrounding prose looks like. Write token globs with a space.
 */
@layer tokens {
  /* FONTS — self-hosted Latin subsets (doc-header.php preloads two of them).
     Fetched 2026-10-26 from the Google Fonts css2 API's latin block; Inter is
     byte-identical to the Monarch / Kev Air builds' verified files. `swap`: an
     invisible heading is worse than a swapped one. */
  @font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/oswald-600-latin.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/oswald-700-latin.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Philosopher';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/philosopher-700-latin.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-400-latin.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-600-latin.woff2') format('woff2');
  }
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/inter-700-latin.woff2') format('woff2');
  }

  :root {
    /* ==================================================================
       TIER 0A — the brand's literal values. RAW HEX IS REQUIRED HERE and
       is a defect in site.css. Named for what they ARE on the palette.
       ================================================================== */
    --color-stop-sign:   #f32c14;   /* Brand/Stop Sign — Schedule Service, overline discs, stars, pins */
    --color-lake-blue:   #3e578f;   /* Brand/Lake Blue — phone buttons, footer heads, tab fill */
    --color-abyss:       #112042;   /* Brand/Abyss — headings, the nav bar, the hero veil */
    --color-stop-sign-deep: #c8220f; /* Stop Sign, deepened for TEXT on and of red — Brendan approved 2026-10-26; see the role answers below */
    --color-ocean-blue:  #022867;   /* Brand/Ocean Blue — added to the brand 2026-10-26 (Brendan); the closer callout's heading */
    --color-neutral-50:  #eef0f5;
    --color-neutral-100: #e4e9f0;
    --color-neutral-200: #dcdfe7;
    --color-neutral-300: #ccced6;
    --color-neutral-400: #c1c3cb;
    --color-neutral-500: #a9abb4;
    --color-neutral-600: #8d919a;
    --color-neutral-700: #656870;
    --color-dark-24dp:   #383838;   /* Dark Mode/24dp — the advantage cards' ink */
    --color-white:       #ffffff;
    --color-black:       #000000;

    /* ==================================================================
       TIER 0B — role answers. Only roles this brand DIFFERS on.
       ================================================================== */

    /* Stop Sign is the identity and the primary CTA (Schedule Service in the
       hero, every section, the form's Submit). Lake Blue is the supporting hue
       (every phone button, footer heads, the active service tab). The accent
       defaults to primary: the red overline discs, stars and map pins. */
    --brand-primary:      var(--color-stop-sign);
    --brand-secondary:    var(--color-lake-blue);

    /* RED THAT CARRIES TEXT IS THE DEEP RED (Brendan, 2026-10-26). White on
       #F32C14 is 4.05:1 — under AA for the comp's 16px Oswald button labels —
       and red text on white is the same 4.05:1. The deeper #C8220F gives white
       labels 5.69:1 and red text 5.69:1 on white / 4.99:1 on the grey bands
       (measure-roles.mjs, 2026-10-26). Bright Stop Sign stays on everything
       that carries no text — the overline discs, stars, pins, the red strips —
       where the bar is 3:1. Links take Lake Blue (red fails as body-link ink).
       Active tabs read Lake Blue, the comp's tab fill. */
    --btn-primary:              var(--color-stop-sign-deep);
    --brand-accent:             var(--color-stop-sign-deep);  /* the red icon discs (<fa-stack variant="accent">): white glyph 5.69:1, as the comp draws it */
    --on-accent-muted:          var(--color-white);           /* a muted tier on the deep red cannot clear 4.5 (4.45); the comp draws none, so muted = the ink */
    --text-primary-on-surface:  var(--color-stop-sign-deep);
    --text-accent-on-surface:   var(--color-stop-sign-deep);
    --tab-active:               var(--color-lake-blue);
    --btn-radius:               var(--radius-md);   /* every comp button is 12px (radius-md); the core default is radius-sm */
    --tab-active-fill:          var(--color-lake-blue);   /* the comp's filled active tab (38112:587) */
    --link-on-light:            var(--color-lake-blue);
    --link-on-sunken:           var(--color-lake-blue);

    /* THE CORE'S GENERIC GRADIENT — a fallback only: the comp's gradient bands
       are raster images (services, financing, closer), painted over this.
       Lake Blue into Abyss; the copy stands on the Abyss end. */
    --gradient-from:            var(--color-lake-blue);
    --gradient-to:              var(--color-abyss);
    --gradient-ref:             var(--color-abyss);

    /* GROUNDS. The comp's grey bands (opener, our story, FAQ) are Neutral/50,
       which is the core's sunken default — not answered. Body copy is
       Generic/Black. The one dark flat ground is the Abyss nav bar. */
    --on-surface:         var(--color-black);
    --surface-inverse:    var(--color-abyss);

    /* HEADINGS are Abyss on light grounds (every section H2); white on dark
       bands is the core's inverse default. */
    --heading-on-surface: var(--color-abyss);

    /* THE HERO VEIL — a separate fill in the comp (38112:530), Abyss at 70%
       opacity. --scrim-alpha is the TRANSPARENT share, so 30%. A dark veil
       flips the ink: every ink seam over it is answered white. */
    --scrim-tint:         var(--color-abyss);
    --scrim-alpha:        30%;
    --on-scrim:           var(--color-white);
    --heading-on-scrim:   var(--color-white);
    --link-on-scrim:      var(--color-white);
    --icon-on-scrim:      var(--color-white);
    --on-scrim-muted:     var(--color-neutral-300);

    /* TYPE FAMILIES. Oswald carries headings AND labels — the comp's buttons,
       nav links, tab labels and location pills are all Oswald Bold (the Label styles),
       and Oswald ships both weights the core's controls ask for (600/700).
       Philosopher Bold is the OVERLINE only; it ships one weight, 700, so the
       overline weight is answered to it rather than synthesized. */
    --font-heading:       'Oswald', 'Arial Narrow', system-ui, sans-serif;
    --font-body:          'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-label:         'Oswald', 'Arial Narrow', system-ui, sans-serif;
    --font-overline:      'Philosopher', Georgia, serif;
    --overline-weight:    var(--font-weight-bold);
    --overline-transform: uppercase;
    --overline-tracking:  0;

    /* THE TYPE SCALE (2001:56) — display 64/56, h1 48, h2 40, h3 32, h4 24,
       h5 20; p 18/16/14/12; labels 16/14/12/10. Identical to the Monarch and
       Kev Air scales, so the same clamps: each lands ON the comp's size at
       1440 and stays fluid below it. h5, the paragraph and label sizes are the
       core's defaults already. */
    --fs-display-lg: clamp(2rem,     calc(1.388rem + 2.612vw), 4rem);
    --lh-display-lg: 1.125;
    --fs-display-sm: clamp(1.75rem,  calc(1.214rem + 2.286vw), 3.5rem);
    --lh-display-sm: 1.143;
    --fs-h1:         clamp(1.625rem, calc(1.204rem + 1.796vw), 3rem);
    --lh-h1:         1.167;
    --fs-h2:         clamp(1.375rem, calc(1.031rem + 1.469vw), 2.5rem);
    --lh-h2:         1.2;
    --fs-h3:         clamp(1.25rem,  calc(1.020rem + 0.980vw), 2rem);
    --lh-h3:         1.25;
    --fs-h4:         clamp(1.125rem, calc(1.010rem + 0.490vw), 1.5rem);
    --lh-h4:         1.333;
    --lh-p-lg:       1.444;

    /* OVERLINE — Paragraph/Overline/Large is Philosopher 700 20/20;
       Overline/Small (12/20) is the core's default. */
    --fs-overline-lg: 1.25rem;
    --lh-overline-lg: 1;

    /* SHAPE. Buttons, cards and tabs are 12px (radius-md, the core default);
       large cards 16, the form card and photos 20 — the core's lg / xl. The
       comp's two shadows ARE the core's: Drop Shadow/Light = --shadow-sm,
       Drop Shadow/Medium = --shadow-raised. Nothing to answer. */
  }
}
