/**
 * Celthrac Deep Signal — design tokens (single source of truth).
 *
 * Promoted from the original cx-solutions.css `.cx-page` scope to :root so every
 * component, template and the legacy bridge can consume the same values.
 * RULE: no hex literals anywhere else in the theme — reference these vars only.
 *
 * 2026-07 — Palette moved to "Deep Signal · Indigo": deep indigo ink grounds the
 * UI; a single electric indigo→violet→magenta gradient (--cx-grad) is reserved
 * for hero moments and the wordmark. The legacy --cx-orange* names are retained
 * as back-compat aliases (now pointing at the indigo action colour) so existing
 * components keep working until they migrate to the --cx-accent* names.
 *
 * 2026-07-20 — "Deep Signal · Obsidian": surfaces de-tinted from indigo ink to
 * near-black graphite for a more premium ground; the indigo→violet→magenta
 * gradient is unchanged and now carries all brand colour. Action indigo nudged
 * brighter (#5b54f0) to hold contrast on true black. All text/surface pairs
 * verified WCAG AA (body 9.8:1, muted ≥5.4:1, button label 5.3:1).
 * Previous indigo-ink values: backup tokens.css.bak-20260720-222950.
 */

:root {
  /* Brand — action indigo + hero gradient */
  --cx-indigo:        #5b54f0;   /* primary action (brightened for black ground) */
  --cx-indigo-hover:  #736df3;
  --cx-violet:        #9333ea;   /* gradient mid */
  --cx-magenta:       #ec4899;   /* gradient terminus */
  --cx-accent:        var(--cx-indigo);
  --cx-accent-hover:  var(--cx-indigo-hover);
  --cx-accent-rgb:    91, 84, 240;                 /* for rgba(...) tints */
  --cx-violet-rgb:    147, 51, 234;                /* for rgba(...) tints */
  --cx-accent-glow:   rgba(91, 84, 240, .55);
  --cx-violet-glow:   rgba(147, 51, 234, .45);
  --cx-magenta-glow:  rgba(236, 72, 153, .45);
  --cx-grad:          linear-gradient(100deg, #4f46e5 0%, #9333ea 58%, #ec4899 112%);
  --cx-grad-soft:     linear-gradient(100deg, rgba(79,70,229,.16), rgba(147,51,234,.10) 60%, rgba(236,72,153,.12));

  /* Semantic */
  --cx-danger:       #e11d48;
  --cx-danger-glow:  rgba(225, 29, 72, .5);
  --cx-danger-rgb:   225, 29, 72;
  --cx-success:      #2dd4a7;   /* status messages on obsidian — AA on --cx-card */
  --cx-success-rgb:  45, 212, 167;
  --cx-warning:      #f0b429;
  --cx-warning-rgb:  240, 180, 41;

  /* Surfaces — obsidian graphite (near-black, de-tinted) */
  --cx-charcoal:     #0a0a0f;   /* bg-1 / page */
  --cx-charcoal-2:   #101016;   /* bg-2 / alt sections */
  --cx-charcoal-3:   #060609;   /* viz panel */
  --cx-card:         #14141b;   /* elevated card */
  --cx-card-hover:   #1a1a22;   /* card hover */
  --cx-surface-light:#f5f5f7;   /* light inset (rare) */

  /* Neutral ramp (graphite, tint removed) */
  --cx-white:        #fff;
  --cx-n100:         #f4f4f6;   /* headings */
  --cx-n300:         #b6b6c2;   /* body text */
  --cx-n500:         #8a8a99;   /* muted/captions (>=16px on ink) */
  --cx-n700:         #26262e;   /* borders */
  --cx-n800:         #1c1c23;   /* subtle dividers on ink */

  /* Ink channel for rgba() scrims and translucent chrome. */
  --cx-ink-rgb:      10, 10, 15;
  --cx-ink-deep-rgb: 6, 6, 9;

  /* Type families */
  --cx-fhead: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --cx-fbody: 'Inter', system-ui, sans-serif;
  --cx-fmono: 'JetBrains Mono', ui-monospace, monospace;

  /* Motion */
  --cx-ease: cubic-bezier(.2, .7, .2, 1);
  --cx-dur:  .25s;

  /* Spacing scale (extracted from the original literals) */
  --cx-space-2:  6px;
  --cx-space-3:  10px;
  --cx-space-4:  14px;
  --cx-space-5:  18px;
  --cx-space-6:  20px;
  --cx-space-7:  24px;
  --cx-space-8:  30px;
  --cx-space-9:  34px;
  --cx-space-10: 40px;
  --cx-sec-y:    96px;          /* section vertical rhythm */
  --cx-sec-y-sm: 64px;          /* section rhythm < 900px */

  /* Radii */
  --cx-radius-sm: 4px;
  --cx-radius-md: 10px;
  --cx-radius-lg: 14px;
  --cx-radius-xl: 18px;
  --cx-radius-pill: 999px;

  /* Layout */
  --cx-maxw: 1240px;
  --cx-gutter: 28px;

  /* Type scale (fluid) */
  --cx-h1: clamp(2.2rem, 5vw, 3.6rem);
  --cx-h2: clamp(1.7rem, 3.4vw, 2.5rem);
  --cx-h3: 1.18rem;
}

/**
 * Backwards-compatibility alias.
 * The legacy bridge stylesheet and any not-yet-migrated raw HTML reference the
 * tokens via the `.cx-page` scope. Re-declaring nothing here — :root already
 * provides them — but we keep the selector documented so the dependency is
 * explicit. The .cx-page class is added to <body> in the theme preprocess.
 */
