/* ============================================================
   ATLA VENTURES - the Overture BRIDGE layer
   ============================================================
   WHAT THIS FILE IS NOW (rewritten AVT-G13/G14, 06SEP2026)

   It used to be the whole Material 3 token system, hand-maintained here
   and hand-synced with project-colors.css. Jacob's ruling 29AUG2026
   ("use the design system from overture - You will be using Material 3",
   card AVT-29AUG2026-01) moved the SOURCE of the colour system to
   Overture. This file is what is left: the tokens Overture does not
   emit.

   THE MEASUREMENT THAT DECIDED THE SPLIT (06SEP2026, counted, not guessed):
   the site consumes 48 custom properties. Overture's snapshot supplies
   11 of them. It emits 22 Material 3 colour roles and NOTHING else - no
   type scale, no shape scale, no elevation, no state layers, and no
   secondary or tertiary colour roles at all. So "retire tokens.css"
   could never have been a deletion; the honest form of AVT-G13 is this
   bridge. project-colors.css also survives, for the reason its own gate
   records: Overture emits one project-<slug>.css, and this is the only
   site that paints SEVERAL projects' accents on a single page.

   THE CASCADE (Overture spec 1.2), set in templates/layout.php:
     fonts.css
     overture-snapshot.css   <- Overture: the seed + all four looks
     tokens.css              <- THIS FILE: everything Overture lacks
     project-colors.css      <- the 16 project accents
     site.css                <- components; still zero colour literals

   HOW TO EDIT SAFELY
   - Never redeclare a token Overture already emits. The 22 it owns are
     listed in overture-snapshot.css; declaring one here silently pins it
     to one look and breaks the other three.
   - Anything here that differs between light and dark must be written
     twice: once bare (the light looks) and once under the dark-look
     selector below. There is no prefers-color-scheme in this file any
     more - the LOOK decides, and the look is chosen in layout.php.
   - The dark looks are global-dark and midnight (dist/looks.json
     "scheme":"dark"). Matinee and global-light are light.
   ============================================================ */

/* ---- Colour roles Overture does not emit -------------------
   The first five are pure aliases, so they follow whichever look is
   active with no duplication. Custom-property substitution resolves at
   use time, so aliasing a token declared in another file is safe and
   order-independent. */
:root {
  /* M3 deprecated background in favour of surface; the site still asks
     for it by name, so it is aliased rather than rewritten across
     site.css. */
  --md-sys-color-background: var(--md-sys-color-surface);
  --md-sys-color-on-background: var(--md-sys-color-on-surface);

  /* Used once, as the fallback for an unclaimed project chip. */
  --md-sys-color-surface-variant: var(--md-sys-color-surface-container-high);
  /* (--md-sys-color-on-surface-variant is Overture's; not redeclared here) */

  /* .btn-tonal only. Overture has no secondary role, so the tonal button
     becomes a raised surface - legible in all four looks by
     construction, because both halves come from the same look. */
  --md-sys-color-secondary-container: var(--md-sys-color-surface-container-high);
  --md-sys-color-on-secondary-container: var(--md-sys-color-on-surface);

  /* STATUS POSITIVE, and the one place a literal is still correct.
     tertiary-container carries MEANING here - it is the "Live" and
     "Available" chip. Aliasing it to a surface would render a status
     chip in the same grey as its own card and destroy the signal, so
     the sage pair from Canyon Dusk is kept as an explicit semantic
     colour and restated for dark looks below. */
  --md-sys-color-tertiary-container: #DCE7BE;
  --md-sys-color-on-tertiary-container: #151E02;

  /* ---- Canyon Dusk brand chrome ----------------------------
     The gradient band is brand, not theme: it survives the move to
     Overture intact. Note the copper is NOT the seed - Overture's seed
     for this project is #633923/#ba8c73 and drives --md-sys-color-
     primary, while the copper below is the brand accent Overture
     records separately as --ovt-accent (#96502b, group G10 Corporate,
     marked "kept" in design-registry.json). */
  --dusk1: #96502B;
  --dusk2: #5C4258;
  --on-dusk: #FFF3E8;
  --on-dusk-accent: #FFC89B;

  /* ---- Shape - Canyon Dusk is SHARP ---------------------- */
  --md-sys-shape-corner-xs: 2px;
  --md-sys-shape-corner-sm: 3px;
  --md-sys-shape-corner-md: 4px;
  --md-sys-shape-corner-lg: 6px;
  --md-sys-shape-corner-xl: 8px;
  --md-sys-shape-corner-full: 999px;

  /* ---- Elevation - warm canyon shadows (light looks) ----- */
  --md-sys-elevation-1: 0 2px 5px rgba(60,40,25,.15), 0 1px 2px rgba(60,40,25,.12);
  --md-sys-elevation-2: 0 4px 10px rgba(60,40,25,.16), 0 1px 3px rgba(60,40,25,.14);
  --md-sys-elevation-3: 0 8px 18px rgba(60,40,25,.18), 0 2px 5px rgba(60,40,25,.14);

  /* ---- State layer opacities ---------------------------- */
  --md-sys-state-hover: 0.08;
  --md-sys-state-focus: 0.10;
  --md-sys-state-pressed: 0.10;

  /* ---- Type ---------------------------------------------
     Self-hosted since AVT-W5; the faces are declared in fonts.css. */
  --font-display: "Space Grotesk", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-accent: "Fraunces", Georgia, "Times New Roman", serif;

  --md-type-display-lg: 700 60px/1.04 var(--font-display);
  --md-type-display-sm: 700 38px/1.08 var(--font-display);
  --md-type-headline-lg: 700 32px/1.15 var(--font-display);
  --md-type-headline-md: 700 26px/1.2 var(--font-display);
  --md-type-headline-sm: 700 22px/1.25 var(--font-display);
  --md-type-title-lg: 600 20px/1.3 var(--font-display);
  --md-type-title-md: 600 16px/1.4 var(--font-body);
  --md-type-body-lg: 400 16px/1.6 var(--font-body);
  --md-type-body-md: 400 14px/1.55 var(--font-body);
  --md-type-label-lg: 500 14px/1.4 var(--font-body);
  --md-type-label-md: 500 12px/1.35 var(--font-body);
}

/* ---- The dark looks ---------------------------------------
   global-dark and midnight, per dist/looks.json. Only the values that
   genuinely differ on a dark ground are restated; everything above is
   inherited. Must stay AFTER the :root block - both selectors have the
   same specificity, so source order is what decides. */
[data-look="global-dark"],
[data-look="midnight"] {
  --md-sys-color-tertiary-container: #3E4926;
  --md-sys-color-on-tertiary-container: #DCE7BE;

  --dusk1: #5E2E12;
  --dusk2: #3A2A3C;
  --on-dusk: #FFE9D6;
  --on-dusk-accent: #FFC89B;

  --md-sys-elevation-1: 0 2px 8px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.45);
  --md-sys-elevation-2: 0 4px 14px rgba(0,0,0,.58), 0 1px 3px rgba(0,0,0,.5);
  --md-sys-elevation-3: 0 8px 22px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5);
}
