/* =====================================================================
   METATRON MOTHERSHIP — BRAND SYSTEM
   MET-59 / P1-28. Re-derived by CTO 2026-09-18 (CEO cycle 5 §4).

   THE PROBLEM THIS SOLVES
   -----------------------
   Fourteen pages, fourteen inline :root blocks, no shared stylesheet.
   The brand kit could not be APPLIED, only re-typed — and re-typing drifts:
   petal.html carries --green: #6FAE7C where the system's confirmed state is
   #4CAF50. Nobody changed it on purpose; it was typed a fifteenth time.
   CIO's document-fork failure, expressed in CSS.

   HOW THIS IS SAFE TO LAND TODAY
   ------------------------------
   This file is linked BEFORE each page's existing inline <style>. CSS
   cascade means the inline block still wins on every token it defines, so
   linking it changes NOTHING that renders. It gives the system a single
   source of truth immediately; pages drop their inline blocks one at a time,
   at whatever pace is safe, and each one that drops picks up these values.

   Verified, not assumed: every page rendered byte-identically before and
   after this file was linked (test/brandcss.test.js records the method).

   Values from EXIT_BRAND.md §2 and BRAND_GUIDELINES.md §6.
   ===================================================================== */

:root {
  /* --- Surfaces --- */
  --bg: #14102B;              /* deep indigo, page background */
  --bg-raised: #1D1840;       /* card and panel surfaces */
  --border: #362E5C;          /* dividers, card edges */

  /* --- Accents --- */
  --gold: #C79A4B;            /* primary accent, CTAs */
  --gold-hover: #D9AC5D;      /* CTA hover — literal on all 14 pages before this */
  --gilded: #D4AF37;          /* brighter gold, glows and borders */
  --violet: #8B7FD1;          /* secondary accent, labels */
  /* --amethyst / --teal / --indigo RETIRED 2026-09-18 on Brand Lead's ruling
     (MET-50): declared here and var()-referenced zero times anywhere. The one
     coincidental hex match — amethyst's value reused for an unrelated
     parchment heading — is not the §5 mesh system in disguise; that mesh is
     real on the Brand System reference page and was never built into
     mothership.html. */

  /* --- Text --- */
  --ink: #EDE6D6;             /* primary text, warm off-white */
  --ink-muted: #B7AFCB;       /* secondary text */

  /* --- Semantic state ---
     These carry meaning, not decoration. Red = needs action, green = done.
     --green is THE confirmed-state colour. petal.html currently overrides it
     with #6FAE7C; that divergence is tracked, not adopted. */
  --green: #4CAF50;           /* confirmed / complete */
  --green-soft: #7FD489;      /* the lighter confirmed tint (synthesis, status text) */
  --red: #C0392B;             /* unconfirmed / needs action */
  --red-bright: #FF6B5B;      /* confirm-CTA border */
  --error: #E38B8B;           /* inline form error text — literal on all 14 pages */

  /* --on-gold is the 19th value, not part of Brand's ruled 18.
     C10-BRAND-1 excluded it saying it was "already promoted cycle 8". It was
     not: it is absent from this file and literal on all 14 pages. Checked
     rather than accepted. The NAME is Brand's own, written in that same
     comment ("#221808 (on-gold)"), so landing it executes their stated intent
     rather than inventing a token in their lane — only the status was wrong,
     and that is reported back to them. */
  --on-gold: #221808;         /* text on a gold fill */

  /* --- Type roles ---
     Spectral for headings and reading values, Inter for UI, Cinzel for the
     weekly parchment only (inscriptional; deliberately not used on long
     paragraphs, where it hurts readability). Fraunces is the kit's signature
     display face.
     NOT self-hosted yet: BRAND_GUIDELINES §4.1 requires .woff2, and the kit
     ships only four .ttf files for the video renderer — not these weights,
     and no Cinzel at all. Pages still load the Google CDN. Referencing font
     files that do not exist would be the plausible-404 bug. */
  --font-display: "Fraunces", "Spectral", Georgia, serif;
  --font-heading: "Spectral", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-parchment: "Cinzel", "Spectral", Georgia, serif;

  /* --- Motion ---
     BRAND_GUIDELINES §6: slow breathing glows, never sharp transitions.
     The durations carry hierarchy — faster means more urgent. */
  --breathe-hub: 4.5s;        /* the hub */
  --breathe-confirmed: 3.5s;  /* a confirmed petal, settled */
  --breathe-unconfirmed: 2s;  /* unconfirmed — faster, more urgent */
  --pulse-cta: 1.8s;          /* the confirm button, most urgent */

  /* --- Transition durations — Brand Lead ruling C10-BRAND-1, bucket 1.
     Proposed in §3.1 and never landed until now. Faster means more urgent,
     same hierarchy as the breathe values above. */
  --duration-instant: 0.15s;
  --duration-fast: 0.2s;
  --duration-standard: 0.3s;

  /* --- Parchment set — the weekly reading surface.
     A genuinely separate light palette, not a variant of the dark one: it is
     what a paying member looks at for four weeks. --font-parchment has been a
     first-class concept here since v53 with no matching colours; this is the
     half that was missing.

     --parchment-heading is a DELIBERATE new name even though its hex equals
     the retired --amethyst. Brand ruled that collision coincidental in §3.1.
     Naming it --amethyst would resurrect a retired token under a different
     job, and would move the parchment heading by accident if the mesh palette
     ever moved. */
  --parchment-bg: #F0E9D8;
  --parchment-ink: #2B2318;
  --parchment-label: #8A7355;
  --parchment-meaning: #5A4E3E;
  --parchment-heading: #6B2C8F;

  /* --- Named surface pair --- */
  --gradient-petal-deep: #241D4D;  /* petal radial gradient stop */
  --void: #0B0818;                 /* page vignette stop */

  /* --- Channel companions ---
     A hex token cannot take an alpha channel, so every glow in the product was
     a hand-typed rgba() literal — which is how the unconfirmed pulse drifted
     (28,3,7) off --red without anyone changing it on purpose.
     Brand ruled companion tokens rather than relative-color syntax, because
     rgb(from ...) support in the TikTok/IG in-app webviews of §4.1 is
     unconfirmed and this product's audience lives in them.

     USE THEM AS: rgba(var(--green-rgb), 0.55)

     NOT as rgb(var(--green-rgb) / 0.55). Brand's ruling wrote the values in
     comma form and the syntax in slash form; those two are incompatible, and
     the combination is INVALID CSS that falls back to opaque black. Measured
     in Chromium 141 before choosing:
         rgb(var(--comma) / .5)   -> rgb(0, 0, 0)      INVALID
         rgba(var(--comma), .5)   -> rgba(76,175,80,.5) OK
     The comma form is also the one that satisfies Brand's own stated
     constraint — universal support, CSS Color 3, no version floor at all —
     so it keeps their declared values byte for byte AND their compat
     criterion. Reported to Brand rather than silently resolved. */
  --green-rgb: 76,175,80;
  --gilded-rgb: 212,175,55;
  --gold-rgb: 199,154,75;
  --red-rgb: 192,57,43;       /* --red's REAL channels; the glow carried (220,60,50) */
}

/* Nobody should have to remember this per page. One block, one place.
   A vestibular-sensitive visitor gets a still page without any page
   opting in. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
