/* Canonical Brain tokens, scoped to shared components so existing page styles retain their values. */
/* ───────────────────────────────────────────────────────────────
   Adaptius · design tokens
   Direction (locked): Equilibrium · Warm · Structural · Refined.

   One file. Consolidated verbatim from Brain 1.0 visual/tokens/
   (colors.css · plasma.css · typography.css · spacing.css · fonts.css).
   Every custom-property name and value is carried unchanged.
   tokens.json projects the colour, type-family, and gradient values for machine consumers; where both carry a value they must agree.
   Read design.md for the laws that govern how these are spent.
   ─────────────────────────────────────────────────────────────── */

:where(.public-header, .public-footer, .public-where-next, .public-breadcrumbs, .public-intro) {

  /* ═══ NEUTRALS · the warm spine ══════════════════════════════
     Spend these under design.md · cream-canvas-dominates. */

  --color-background: #FAFAF9;   /* cream canvas · sacred, the primary surface */
  --color-foreground: #2C2825;   /* ink · body type + the pointer pupil */
  --color-surface:    #F3F0EC;   /* raised warm surface (cards over canvas) */
  --color-muted:      #736E68;   /* muted warm grey · secondary type */
  --color-accent:     #3D3834;   /* charcoal accent · hairline ring, strong type */
  --color-primary:    #F9F7F4;   /* near-white warm · inset/elevated fills */
  --color-border:     #E8E4DE;   /* hairline border on cream */

  /* ═══ WARM NEUTRAL RAMP · derived, for depth ═════════════════ */

  --warm-50:  #FDFCFB;
  --warm-100: #FAFAF9;
  --warm-200: #F3F0EC;
  --warm-300: #E8E4DE;
  --warm-400: #D6D0C8;
  --warm-500: #B4ADA4;
  --warm-600: #7A756F;
  --warm-700: #56524D;
  --warm-800: #3D3834;
  --warm-900: #2C2825;
  --warm-950: #1C1A17;           /* deep ink panel · see design.md · neutral-spine */

  /* Approved social-short end card, preserved for continuity with the released series. */
  --social-end-card-bg:   #1A1A19;
  --social-end-card-text: #F3F1ED;

  /* ═══ SEMANTIC ALIASES · design to these ═════════════════════ */

  --surface-canvas:   var(--color-background);
  --surface-raised:   var(--color-surface);
  --surface-inset:    var(--color-primary);
  --surface-ink:      var(--warm-950);   /* dark panel; cream wordmark goes here only */

  --text-primary:     var(--color-foreground);
  --text-secondary:   var(--warm-700);
  --text-muted:       var(--color-muted);
  --text-on-ink:      var(--color-background);

  --border-hairline:  var(--color-border);
  --border-strong:    var(--warm-400);

  /* CTA fills: see design.md · plasma-is-atmosphere. */
  --cta-bg:             var(--color-foreground);
  --cta-bg-hover:       var(--warm-950);
  --cta-text:           var(--color-background);
  --cta-bg-secondary:   transparent;
  --cta-text-secondary: var(--color-foreground);

  --focus-ring:       var(--plasma-bloom-iris, #988CFF);

  /* ═══ PLASMA · MIST · base haze (the ambient breath) ═════════
     Mists render at hsl(hue, 48%, 88%) · a whisper-tint on cream. */

  --plasma-mist-aqua:     #D6F6F2;
  --plasma-mist-rose:     #F5E4EE;
  --plasma-mist-golden:   #F7F4E8;
  --plasma-mist-lavender: #E8E4F5;
  --plasma-mist-peach:    #F9E7DD;   /* warm bridge mist · pairs the peach bloom */

  /* ═══ PLASMA · GLOW · mid-layer whisper ══════════════════════ */

  --plasma-glow-aqua:     #7BDEDB;
  --plasma-glow-rose:     #FAA9D1;
  --plasma-glow-golden:   #FBDEA1;
  --plasma-glow-lavender: #C2B8FA;
  --plasma-glow-peach:    #FCC6AC;   /* warm bridge glow */

  /* ═══ PLASMA · BLOOM · focal chromatic events ════════════════
     Where bloom is allowed: design.md · plasma-is-atmosphere. */

  --plasma-bloom-iris:    #988CFF;   /* soft electric purple */
  --plasma-bloom-petal:   #FF6FB5;   /* warm pink */
  --plasma-bloom-lagoon:  #24C6CF;   /* aqua-teal */
  --plasma-bloom-nectar:  #FFC85A;   /* golden amber */
  --plasma-bloom-peach:   #FF9A76;   /* see design.md · plasma-recipes */

  /* ═══ PLASMA · HUE RING · the order the atmosphere drifts ════ */

  --plasma-hue-aqua:     174;
  --plasma-hue-lavender: 250;
  --plasma-hue-rose:     320;
  --plasma-hue-golden:    45;
  --plasma-sat:          48%;    /* whisper saturation · never exceed for mists */
  --plasma-light:        88%;    /* whisper lightness */

  /* ═══ PLASMA · NAMED RECIPES ═════════════════════════════════
     These map approved color families and authorize no geometry:
     design.md · plasma-silhouette-test · ground-is-never-a-css-gradient.
     DRIFT    · lavender + aqua        · calm comms, editorial surfaces
     AURORA   · iris + aqua            · momentum, feature reveals
     SUNSET   · rose + nectar + peach  · warmth, brand story
     SPECTRUM · all five families      · see design.md · plasma-recipes */

  /* THE SIGNATURE · the brand's face: aqua to violet to pink at bloom intensity.
     The one gradient design.md names "Signature first". The live site ships it
     as --plasma; it obeys the same geometry laws as every recipe. */
  --plasma-signature: linear-gradient(120deg, var(--plasma-bloom-lagoon), var(--plasma-bloom-iris) 52%, var(--plasma-bloom-petal));

  --plasma-drift:    linear-gradient(120deg, var(--plasma-mist-lavender), var(--plasma-mist-aqua));
  --plasma-aurora:   linear-gradient(120deg, var(--plasma-mist-lavender), var(--plasma-mist-aqua) 60%, var(--plasma-mist-rose));
  --plasma-sunset:   linear-gradient(120deg, var(--plasma-mist-rose), var(--plasma-mist-golden));
  --plasma-spectrum: linear-gradient(120deg, var(--plasma-mist-aqua), var(--plasma-mist-lavender) 35%, var(--plasma-mist-rose) 70%, var(--plasma-mist-golden));

  /* ═══ TYPE · FAMILIES ════════════════════════════════════════
     Canonical pair: Plus Jakarta Sans (display/heading/body) + JetBrains Mono
     (technical only). How these files are shipped and what an offline
     projection may fall back to: design.md · pinned-variable-font. */

  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ═══ TYPE · WEIGHTS ═════════════════════════════════════════ */

  --weight-display:   300;   /* display headlines · light by canon */
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* ═══ TYPE · SCALE ═══════════════════════════════════════════ */

  --text-display:  clamp(2.5rem, 5vw, 6rem);     /* hero numerals + statements */
  --text-h1:       clamp(2rem, 3.5vw, 3.5rem);
  --text-h2:       clamp(1.5rem, 3vw, 2.5rem);
  --text-h3:       clamp(1.25rem, 2vw, 1.75rem);
  --text-h4:       1.25rem;
  --text-lead:     1.25rem;   /* opening paragraph */
  --text-body:     1rem;
  --text-small:    0.875rem;
  --text-eyebrow:  0.75rem;   /* mono, tracked-out, uppercase */
  --text-mono:     0.875rem;

  /* ═══ TYPE · LINE HEIGHT ═════════════════════════════════════ */

  --leading-tight:   1.05;   /* display */
  --leading-snug:    1.2;    /* headings */
  --leading-normal:  1.6;    /* body */
  --leading-relaxed: 1.75;

  /* ═══ TYPE · TRACKING ════════════════════════════════════════ */

  --tracking-display: -0.02em;   /* tighten the light display */
  --tracking-tight:   -0.01em;
  --tracking-normal:   0;
  --tracking-eyebrow:  0.18em;   /* mono eyebrows tracked wide */
  --tracking-mono:     0.02em;

  /* ═══ SPACING · 4px base ═════════════════════════════════════ */

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;
  --space-base: 4px;

  /* ═══ RADIUS ═════════════════════════════════════════════════ */

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ═══ ELEVATION · warm-ink, soft, low-contrast ═══════════════
     Spend these under design.md · cards-whisper. */

  --shadow-xs:   0 1px 2px rgba(44, 40, 37, 0.04);
  --shadow-sm:   0 1px 3px rgba(44, 40, 37, 0.06), 0 1px 2px rgba(44, 40, 37, 0.04);
  --shadow-md:   0 4px 16px rgba(44, 40, 37, 0.06), 0 1px 3px rgba(44, 40, 37, 0.05);
  --shadow-lg:   0 12px 40px rgba(44, 40, 37, 0.08), 0 2px 8px rgba(44, 40, 37, 0.05);
  --shadow-xl:   0 24px 70px rgba(44, 40, 37, 0.12), 0 4px 14px rgba(44, 40, 37, 0.06);
  /* A focal card may carry a whisper of plasma in its lift. */
  --shadow-bloom: 0 12px 48px rgba(152, 140, 255, 0.16), 0 4px 16px rgba(44, 40, 37, 0.06);

  /* ═══ MOTION · the 320/550/720 ladder ════════════════════════ */

  --dur-fast:   320ms;
  --dur-base:   550ms;
  --dur-slow:   720ms;
  --ease-brand:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasis: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ═══ LAYOUT ═════════════════════════════════════════════════ */

  --container-max:   1200px;
  --container-prose: 680px;
  --gutter: clamp(20px, 5vw, 64px);

  /* ═══ LIVE-SITE ALIASES · adaptius.ai vocabulary ═════════════
     The production site predates this file and speaks in short names.
     Aliases resolve by reference so both vocabularies stay one truth;
     new work designs to the semantic tokens above. Page-local layout
     values (--pad and friends) stay site-owned and are not brand truth. */

  --canvas:      var(--color-background);
  --cream:       var(--color-primary);
  --surface:     var(--color-surface);
  --ink:         var(--color-foreground);
  --accent:      var(--color-accent);
  --muted:       var(--color-muted);
  --muted2:      var(--warm-700);
  --border:      var(--color-border);
  --aqua:        var(--plasma-bloom-lagoon);
  --violet:      var(--plasma-bloom-iris);
  --pink:        var(--plasma-bloom-petal);
  --gold:        var(--plasma-bloom-nectar);
  --coral:       var(--plasma-bloom-peach);
  --aqua-soft:   var(--plasma-glow-aqua);
  --violet-soft: var(--plasma-glow-lavender);
  --pink-soft:   var(--plasma-glow-rose);
  --mist-aqua:   var(--plasma-mist-aqua);
  --mist-rose:   var(--plasma-mist-rose);
  --mist-gold:   var(--plasma-mist-golden);
  --mist-lav:    var(--plasma-mist-lavender);
  --plasma:      var(--plasma-signature);
  --font:        var(--font-body);
  --mono:        var(--font-mono);
  --maxw:        var(--container-max);
}
