/* RIVET — Colour tokens
   DERIVED from rivet-design-tokens v1.0.0 (frozen July 2026) + founder rulings 2026-07-07.
   The book governs. Colours resolve ONLY from here — never from hex memory.
   #0F0025 navy is RETIRED (reject on sight). Black #000000 is the anchor. */

:root {
  /* ---- Foundation ---- */
  --rivet-black:        #000000; /* Foundation anchor — dark backgrounds, text-on-light, dark-mode base */
  --rivet-slate:        #4A4A68; /* Secondary / muted text */
  --rivet-silver:       #D1D1D9; /* Borders, dividers */
  --rivet-ghost-white:  #F8F8FA; /* THE single light background / card token */
  --rivet-white:        #FFFFFF; /* Max-contrast base */

  /* ---- Brand accents ---- */
  --rivet-magenta:      #FF00D4; /* PRIMARY. PRECIOUS. Signature moments + declared semantic markers ONLY.
                                    Bounded elements — never a full-bleed field, never decorative repetition. */
  --rivet-purple:       #3B06D4; /* Secondary · Acquisition zone · focus rings. Valid as a background field. */
  --rivet-cyan:         #4CF3FE; /* Tech / AI · interactive + informational. Valid as a background field. */

  /* ---- Functional ---- */
  --rivet-gold:         #F5C24B; /* Warmth, optimism, encouragement. Valid as a background field. */
  --rivet-orange:       #FF8A47; /* Urgency (sparingly) as a marker; as a FIELD only inside a registered duo */
  --rivet-green:        #00D982; /* Growth / success · Expansion zone. Border/accent only — NEVER text on light */
  --rivet-red:          #FF4D2E; /* Errors — functional only, never brand */

  /* ---- Gradients (RESOLVED, founder-adopted; GRADIENT LAW 2026-07-19: 2–3 colours MAX) ---- */
  /* NEVER a flat full-bleed page background, and NEVER a strip (strips are single-colour —
     see ColorStrip) — graphics, covers, bands, the Pipeline itself. */
  --rivet-gradient-signature: linear-gradient(90deg, #3B06D4 0%, #FF00D4 50%, #4CF3FE 100%); /* @kind color */
  --rivet-gradient-infinite:  linear-gradient(90deg, #3B06D4 0%, #FF00D4 38%, #4CF3FE 66%, #F5C24B 100%); /* @kind color */ /* 4 stops — GRANDFATHERED, semantic home = the Pipeline graphic itself (the journey). Never a field elsewhere. */

  /* ---- Registered DUOS (founder ruling 2026-07-19) ----
     Two-colour couples — the sanctioned way to field accent colour beyond flat fields.
     LAWS: bounded bands/covers/cards, never a full-bleed page and never a strip; ONE duo per surface;
     magenta is NEVER a duo partner (stays the one precious moment placed ON the field, dark end only);
     red is never a field. Ink ruling per duo below. */
  /* Each duo is TWO palette colours (a dark-anchored duo adds one same-hue mid stop to keep the
     transition clean — still one colour + black). Ink ruling per duo. Magenta & Red are never partners. */
  /* — Dark-anchored (ground = Black · ink white) — */
  --rivet-duo-command:  linear-gradient(90deg, #000000 0%, #123A40 62%, #4CF3FE 160%); /* @kind color */ /* THE COMMAND · black→cyan · dark corporate tech hero · ink white */
  --rivet-duo-growth:   linear-gradient(90deg, #000000 0%, #063D2A 62%, #00D982 160%); /* @kind color */ /* THE GROWTH · black→green · expansion & growth stories · ink white */
  --rivet-duo-depth:    linear-gradient(90deg, #000000 0%, #1A0B4A 60%, #3B06D4 150%); /* @kind color */ /* THE DEPTH · black→purple · corporate authority, gravitas · ink white */
  --rivet-duo-prestige: linear-gradient(90deg, #000000 0%, #4A3410 60%, #F5C24B 155%); /* @kind color */ /* THE PRESTIGE · black→gold · certificates, awards, honours · ink white */
  --rivet-duo-ember:    linear-gradient(90deg, #000000 0%, #4A2412 60%, #FF8A47 155%); /* @kind color */ /* THE EMBER · black→orange · urgency on dark, deadlines · ink white */
  /* — Purple-anchored (ink white) — */
  --rivet-duo-system:   linear-gradient(90deg, #3B06D4 0%, #4CF3FE 100%); /* @kind color */ /* THE SYSTEM · purple→cyan · corporate/tech hero fields · ink white */
  --rivet-duo-catalyst: linear-gradient(90deg, #3B06D4 0%, #FF8A47 100%); /* @kind color */ /* THE CATALYST · purple→orange · announcements, events, bold editorial · ink white */
  --rivet-duo-honor:    linear-gradient(90deg, #3B06D4 0%, #F5C24B 100%); /* @kind color */ /* THE HONOR · purple→gold · membership, certification · ink white */
  --rivet-duo-ascent:   linear-gradient(90deg, #3B06D4 0%, #00D982 100%); /* @kind color */ /* THE ASCENT · purple→green · growth inside membership · ink white */
  /* — Light / warm (ink black) — */
  --rivet-duo-voice:    linear-gradient(90deg, #F5C24B 0%, #FF8A47 100%); /* @kind color */ /* THE VOICE · gold→orange · warmth, human/community/voice moments · ink black */
  --rivet-duo-harvest:  linear-gradient(90deg, #F5C24B 0%, #00D982 100%); /* @kind color */ /* THE HARVEST · gold→green · optimistic growth, outcomes · ink black */
  --rivet-duo-bright:   linear-gradient(90deg, #4CF3FE 0%, #F5C24B 100%); /* @kind color */ /* THE BRIGHT · cyan→gold · data + optimism, bright editorial · ink black */
  --rivet-duo-signal:   linear-gradient(90deg, #4CF3FE 0%, #00D982 100%); /* @kind color */ /* THE SIGNAL · cyan→green · tech growth, AI outcomes · ink black */
  --rivet-duo-spark:    linear-gradient(90deg, #4CF3FE 0%, #FF8A47 100%); /* @kind color */ /* THE SPARK · cyan→orange · energetic tech, activation · ink black */
  /* — Neutral-anchored (Foundation neutrals · quiet / premium fields) — */
  --rivet-duo-graphite: linear-gradient(90deg, #000000 0%, #4A4A68 100%); /* @kind color */ /* THE GRAPHITE · black→slate · quiet dark surface, subtle depth · ink white */
  --rivet-duo-mist:     linear-gradient(90deg, #FFFFFF 0%, #D1D1D9 100%); /* @kind color */ /* THE MIST · white→silver · quiet light surface, soft elevation · ink black */
  --rivet-duo-steel:    linear-gradient(90deg, #4A4A68 0%, #4CF3FE 100%); /* @kind color */ /* THE STEEL · slate→cyan · muted tech, understated data · ink white */
  --rivet-duo-dusk:     linear-gradient(90deg, #4A4A68 0%, #3B06D4 100%); /* @kind color */ /* THE DUSK · slate→purple · muted authority, refined corporate · ink white */
  --rivet-duo-dawn:     linear-gradient(90deg, #F8F8FA 0%, #F5C24B 100%); /* @kind color */ /* THE DAWN · ghost-white→gold · soft warm light field · ink black */
  --rivet-duo-haze:     linear-gradient(90deg, #F8F8FA 0%, #A79BEA 100%); /* @kind color */ /* THE HAZE · ghost-white→purple (softened) · soft cool membership field · ink black */
  --rivet-duo-dew:      linear-gradient(90deg, #F8F8FA 0%, #4CF3FE 100%); /* @kind color */ /* THE DEW · ghost-white→cyan · soft tech-light field · ink black */
  --rivet-glow-magenta:       radial-gradient(circle, rgba(255,0,212,0.95) 0%, rgba(59,6,212,0.40) 45%, rgba(0,0,0,0) 100%); /* @kind color */ /* PRECIOUS SEMANTIC ONLY — assigned to INFINITE moments (live pipeline/loop/model) & customer-journey hot zones (member welcome, active step); never a decorative hero wash (use a defined gradient shape) */

  /* ---- Dark-ground elevation neutrals (support values for dark corporate surfaces) ---- */
  --rivet-ink-900: #000000;
  --rivet-ink-850: #0A0A0C; /* card surface on black */
  --rivet-ink-800: #101014; /* raised surface */
  --rivet-ink-700: #12121A; /* skeleton base */
  --rivet-ink-600: #1A1A22; /* hairline / divider on dark */
  --rivet-ink-500: #1E1E2A; /* skeleton highlight */

  /* ================= SEMANTIC — DARK (corporate / professional) =================
     Mode is chosen by AUDIENCE, not preference. Neither mode is the default;
     :root carries the dark set because Black is the brand anchor and the flagship
     Revenue Command product is dark. Membership surfaces opt into .rivet-light / [data-mode="light"]. */
  --rivet-bg:            var(--rivet-black);
  --rivet-surface:       var(--rivet-ink-850);
  --rivet-surface-raised: var(--rivet-ink-800);
  --rivet-border:        var(--rivet-ink-600);
  --rivet-hairline:      var(--rivet-ink-600);
  --rivet-text:          var(--rivet-ghost-white);
  --rivet-text-strong:   var(--rivet-white);
  --rivet-text-secondary:var(--rivet-silver);
  --rivet-text-muted:    color-mix(in srgb, var(--rivet-silver) 55%, var(--rivet-slate)); /* dark-ground muted: lightened from Slate for AA readability on black */
  --rivet-focus:         var(--rivet-purple);      /* focus rings are ALWAYS Vivid Purple — never magenta */
  --rivet-accent:        var(--rivet-magenta);     /* the ONE primary action per screen */
  --rivet-accent-ink:    var(--rivet-white);       /* text on the magenta action */
  --rivet-card-border:   1px solid var(--rivet-ink-600); /* @kind other */ /* on true black, a hairline reads where a shadow cannot */
  --rivet-card-shadow:   0 1px 0 rgba(255,255,255,0.02), 0 8px 30px rgba(0,0,0,0.55);
  --rivet-skeleton:      linear-gradient(90deg, var(--rivet-ink-700) 25%, var(--rivet-ink-500) 37%, var(--rivet-ink-700) 63%); /* @kind color */
  --rivet-grid-line:     #1A1A22; /* @kind color */
}

/* ================= SEMANTIC — LIGHT (membership / community) ================= */
.rivet-light,
[data-mode="light"] {
  --rivet-bg:            var(--rivet-ghost-white);
  --rivet-surface:       var(--rivet-white);
  --rivet-surface-raised: var(--rivet-white);
  --rivet-border:        var(--rivet-silver);
  --rivet-hairline:      var(--rivet-silver);
  --rivet-text:          var(--rivet-black);
  --rivet-text-strong:   var(--rivet-black);
  --rivet-text-secondary:var(--rivet-slate);
  --rivet-text-muted:    var(--rivet-slate);
  --rivet-focus:         var(--rivet-purple);
  --rivet-accent:        var(--rivet-magenta);
  --rivet-accent-ink:    var(--rivet-white);
  /* Cards separate by SHADOW, never border, on light grounds */
  --rivet-card-border:   0 solid transparent; /* @kind other */
  --rivet-card-shadow:   0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.05);
  --rivet-skeleton:      linear-gradient(90deg, #ECECF0 25%, #F5F5F8 37%, #ECECF0 63%); /* @kind color */
  --rivet-grid-line:     rgba(209,209,217,0.35); /* @kind color */ /* EngineeringGrid blueprint line on light (Silver 35%) */
}

/* Explicit dark scope (mirror of :root) for nesting a dark island inside a light page */
.rivet-dark,
[data-mode="dark"] {
  --rivet-bg:            var(--rivet-black);
  --rivet-surface:       var(--rivet-ink-850);
  --rivet-surface-raised: var(--rivet-ink-800);
  --rivet-border:        var(--rivet-ink-600);
  --rivet-hairline:      var(--rivet-ink-600);
  --rivet-text:          var(--rivet-ghost-white);
  --rivet-text-strong:   var(--rivet-white);
  --rivet-text-secondary:var(--rivet-silver);
  --rivet-text-muted:    color-mix(in srgb, var(--rivet-silver) 55%, var(--rivet-slate)); /* dark-ground muted: lightened from Slate for AA readability on black */
  --rivet-focus:         var(--rivet-purple);
  --rivet-accent:        var(--rivet-magenta);
  --rivet-accent-ink:    var(--rivet-white);
  --rivet-card-border:   1px solid var(--rivet-ink-600); /* @kind other */
  --rivet-card-shadow:   0 1px 0 rgba(255,255,255,0.02), 0 8px 30px rgba(0,0,0,0.55);
  --rivet-skeleton:      linear-gradient(90deg, var(--rivet-ink-700) 25%, var(--rivet-ink-500) 37%, var(--rivet-ink-700) 63%); /* @kind color */
  --rivet-grid-line:     #1A1A22; /* @kind color */
}
