/* ============================================================================
 * Aetherin Design Tokens — canonical source of truth
 * ----------------------------------------------------------------------------
 * One token set for every Aetherin surface (portal, agent, streamproof,
 * admin console, docs). Copy this file into an app, or import it directly.
 *
 * Naming: `--ax-*` are the canonical tokens. `--aetherin-*` are kept as
 * aliases so earlier surfaces (portal, streamproof, admin-console) continue
 * to work without edits.
 *
 * Do not hard-code brand hex values in application CSS. Use these tokens.
 * ========================================================================== */

:root {
  color-scheme: dark;

  /* --- Brand palette (base) -------------------------------------------- */
  --ax-void: #04060c; /* page background            */
  --ax-panel: #0a101d; /* sunken panel / top bar      */
  --ax-raised: #0f1829; /* raised card surface         */
  --ax-raised-2: #121d2f; /* table head / nested surface */
  --ax-raised-3: #16233a; /* hover / active surface      */

  --ax-edge: #1c2a44; /* hairline border             */
  --ax-edge-strong: #2b3d61; /* emphasised border           */

  --ax-ice: #e8eefa; /* primary text                */
  --ax-ink-soft: #c5cee0; /* secondary text              */
  --ax-muted: #8a97b3; /* tertiary text               */
  --ax-faint: #5c6a86; /* disabled / meta text        */

  --ax-cyan: #38e8ff; /* primary accent              */
  --ax-cyan-strong: #7df1ff;
  --ax-violet: #8b6bff; /* secondary accent            */
  --ax-violet-strong: #a893ff;

  /* Tinted surfaces derived from the accents */
  --ax-cyan-soft: rgba(56, 232, 255, 0.12);
  --ax-cyan-line: rgba(56, 232, 255, 0.32);
  --ax-violet-soft: rgba(139, 107, 255, 0.14);
  --ax-violet-line: rgba(139, 107, 255, 0.34);

  /* --- Status ---------------------------------------------------------- */
  --ax-success: #34d399;
  --ax-success-soft: rgba(52, 211, 153, 0.14);
  --ax-warning: #fbbf24;
  --ax-warning-soft: rgba(251, 191, 36, 0.14);
  --ax-danger: #fb7185;
  --ax-danger-soft: rgba(251, 113, 133, 0.14);
  --ax-info: #38bdf8;
  --ax-info-soft: rgba(56, 189, 248, 0.14);

  /* --- Typography ------------------------------------------------------ */
  --ax-font-sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --ax-font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --ax-text-xs: 0.6875rem; /* 11px */
  --ax-text-sm: 0.8125rem; /* 13px */
  --ax-text-md: 0.9375rem; /* 15px */
  --ax-text-base: 1rem; /* 16px */
  --ax-text-lg: 1.25rem; /* 20px */
  --ax-text-xl: 1.5rem; /* 24px */
  --ax-text-2xl: 2rem; /* 32px */
  --ax-text-3xl: 2.75rem; /* 44px */

  --ax-leading-tight: 1.15;
  --ax-leading-normal: 1.55;
  --ax-leading-relaxed: 1.75;

  --ax-tracking-wide: 0.22em; /* uppercase labels */

  /* --- Spacing (4px grid) --------------------------------------------- */
  --ax-space-1: 0.25rem;
  --ax-space-2: 0.5rem;
  --ax-space-3: 0.75rem;
  --ax-space-4: 1rem;
  --ax-space-5: 1.25rem;
  --ax-space-6: 1.5rem;
  --ax-space-8: 2rem;
  --ax-space-10: 2.5rem;
  --ax-space-12: 3rem;
  --ax-space-16: 4rem;
  --ax-space-20: 5rem;

  --ax-page: min(1180px, calc(100% - 48px));
  --ax-page-narrow: min(760px, calc(100% - 40px));

  /* --- Radius ---------------------------------------------------------- */
  --ax-radius-xs: 4px;
  --ax-radius-sm: 6px;
  --ax-radius-md: 10px;
  --ax-radius-lg: 16px;
  --ax-radius-xl: 24px;
  --ax-radius-full: 9999px;

  /* --- Elevation ------------------------------------------------------- */
  --ax-shadow-1: 0 1px 2px rgba(2, 6, 14, 0.6);
  --ax-shadow-2: 0 12px 32px rgba(2, 6, 14, 0.45);
  --ax-shadow-3: 0 28px 64px rgba(2, 6, 14, 0.55);
  --ax-glow-cyan: 0 0 24px rgba(56, 232, 255, 0.22);
  --ax-glow-violet: 0 0 28px rgba(139, 107, 255, 0.24);

  /* --- Motion ---------------------------------------------------------- */
  --ax-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ax-dur-fast: 0.15s;
  --ax-dur-normal: 0.25s;
  --ax-dur-slow: 0.4s;

  /* --- Legacy aliases (portal / streamproof / admin-console) ----------- */
  --aetherin-void: var(--ax-void);
  --aetherin-panel: var(--ax-panel);
  --aetherin-raised: var(--ax-raised);
  --aetherin-edge: var(--ax-edge);
  --aetherin-ice: var(--ax-ice);
  --aetherin-muted: var(--ax-muted);
  --aetherin-cyan: var(--ax-cyan);
  --aetherin-violet: var(--ax-violet);

  --aetherin-font-sans: var(--ax-font-sans);
  --aetherin-font-mono: var(--ax-font-mono);

  --aetherin-space-1: var(--ax-space-1);
  --aetherin-space-2: var(--ax-space-2);
  --aetherin-space-3: var(--ax-space-3);
  --aetherin-space-4: var(--ax-space-4);
  --aetherin-space-6: var(--ax-space-6);
  --aetherin-space-8: var(--ax-space-8);
  --aetherin-space-12: var(--ax-space-12);
  --aetherin-space-16: var(--ax-space-16);

  --aetherin-radius-sm: var(--ax-radius-xs);
  --aetherin-radius-md: var(--ax-radius-sm);
  --aetherin-radius-lg: var(--ax-radius-lg);
  --aetherin-radius-full: var(--ax-radius-full);

  --aetherin-cyan-glow: var(--ax-glow-cyan);
  --aetherin-violet-glow: var(--ax-glow-violet);
}
