/* ═══════════════════════════════════════════════════════════════════════════
   GLIMMIO — AURORA DESIGN TOKENS  ·  single source of truth
   ---------------------------------------------------------------------------
   Brand: violet (#6C63FF light / #7C6FF7 dark) + cyan accent (#22D3EE).
   Light is the base (:root) — public pages carry no data-theme and render
   light automatically. Dark is layered via :root[data-theme="dark"] (the
   platform always sets data-theme explicitly via its no-flash init script).

   This file is intentionally loaded LAST on platform pages so its tokens win
   over the legacy :root/[data-theme="light"] blocks scattered across the older
   stylesheets (dashboard.css, platform-shell.css, admin-v2.css, …). The dark
   block uses :root[data-theme="dark"] (specificity 0,2,0) so it also beats any
   legacy [data-theme="light"] declaration regardless of load order.

   All legacy variable names (--blue, --purple, --bg*, --text*, --brand*,
   --ds-* derived, --gp-*, --adm-*, --radius*) are aliased here, so thousands
   of existing var(--x) usages re-skin to Aurora without markup changes.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand ─────────────────────────────────────────────────────────────── */
  --brand:            #6C63FF;
  --brand-strong:     #574FD6;
  --brand-soft:       rgba(108, 99, 255, .10);
  --brand-ring:       rgba(108, 99, 255, .35);
  --primary:          var(--brand);          /* legacy alias (addon-hubs, premium-landing) */
  --primary-strong:   var(--brand-strong);

  /* ── Accent (cyan) ─────────────────────────────────────────────────────── */
  --accent:           #0891B2;   /* text-safe cyan on light surfaces */
  --accent-bright:    #22D3EE;   /* vivid cyan for gradients / dark */
  --accent-soft:      rgba(34, 211, 238, .12);

  /* ── Signature gradient ────────────────────────────────────────────────── */
  --grad-brand:       linear-gradient(135deg, #6C63FF, #22D3EE);

  /* ── Surfaces / borders / text (neutral cool-slate ramp) ───────────────── */
  --bg:               #F7F8FB;
  --bg2:              #FFFFFF;
  --bg3:              #F1F3F9;
  --bg4:              #E8EBF3;
  --bg5:              #DCE1EC;
  --surface:          #FFFFFF;
  --surface2:         #F1F3F9;
  --border:           #E4E8F0;
  --border2:          #CFD6E4;
  --border3:          #B6C0D2;
  --line:             #E4E8F0;
  --line-strong:      #CFD6E4;
  --text:             #1A2233;
  --text2:            #5A6678;
  --text3:            #8A95A8;
  --text1:            #1A2233;   /* legacy public alias */
  /* legacy public/shell neutral ramp (platform-public.css, platform-shell.css) */
  --ink-950: #070B12; --ink-900: #1A2233; --ink-800: #243044; --ink-700: #37425A;
  --ink-500: #5A6678; --ink-300: #AEB8C9; --ink-200: #CFD6E4; --ink-100: #EEF1F7;
  --paper: #F7F8FB; --card: #FFFFFF; --card-strong: #FFFFFF;

  /* ── Semantic ──────────────────────────────────────────────────────────── */
  --green:            #16A34A;  --green2:   #15803D;  --green-bg:  rgba(22, 163, 74, .10);
  --yellow:           #D97706;  --amber:    #D97706;  --yellow-bg: rgba(217, 119, 6, .10);
  --amber-bg:         rgba(217, 119, 6, .10);
  --red:              #DC2626;  --red2:     #991B1B;  --red-bg:    rgba(220, 38, 38, .08);
  --success:          #16A34A;  --success-soft: rgba(22, 163, 74, .10);
  --warning:          #D97706;  --warning-soft: rgba(217, 119, 6, .10);
  --danger:           #DC2626;  --danger-soft:  rgba(220, 38, 38, .08);

  /* ── Legacy primary aliases → brand (re-skins dashboard blue → violet) ─── */
  --blue:             var(--brand);
  --blue2:            #4F46E5;
  --blue-bg:          var(--brand-soft);
  --blue-dark:        #4F46E5;
  --purple:           var(--brand);
  --purple2:          var(--brand-strong);
  --purple-bg:        var(--brand-soft);
  --cyan:             var(--accent);
  --cyan-bg:          var(--accent-soft);
  --orange:           #EA580C;
  --teal:             #0D9488;
  --pink:             #DB2777;
  --gray:             #6B7280;

  /* ── Typography ────────────────────────────────────────────────────────── */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --font:         var(--font-sans);   /* legacy alias */
  --mono:         var(--font-mono);   /* legacy alias */

  --fs-2xs: 10px; --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px;
  --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 20px; --fs-3xl: 24px; --fs-4xl: 30px; --fs-5xl: 38px;

  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-heavy: 800;

  --lh-tight: 1.15; --lh-snug: 1.3; --lh-normal: 1.5; --lh-relaxed: 1.65;
  --ls-tight: -.02em; --ls-normal: 0; --ls-wide: .04em;

  /* ── Spacing (4px base) ────────────────────────────────────────────────── */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  /* ── Radius ────────────────────────────────────────────────────────────── */
  --r: 8px; --r2: 12px; --r3: 16px; --r-pill: 999px;
  --radius: 8px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 22px;
  --rl: 16px; --rx: 24px;
  --gp-radius: 12px;

  /* ── Shadows ───────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 4px rgba(16, 24, 40, .07);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .10);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .16);
  --shadow:    0 4px 16px rgba(16, 24, 40, .10);
  --shadow2:   0 1px 4px rgba(16, 24, 40, .07);

  /* ── Motion ────────────────────────────────────────────────────────────── */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 120ms; --dur: 180ms; --dur-slow: 280ms;

  /* ── Z-index scale ─────────────────────────────────────────────────────── */
  --z-dropdown: 300; --z-sticky: 1200; --z-overlay: 10000; --z-modal: 10050; --z-toast: 10100;

  /* ── Layout ────────────────────────────────────────────────────────────── */
  --public-max: 1180px;

  /* ── Public header namespace (--gp-*) — light ──────────────────────────── */
  --gp-bg:            #FFFFFF;
  --gp-bg-2:          #F7F8FB;
  --gp-bg-3:          #F1F3F9;
  --gp-surface:       #FFFFFF;
  --gp-surface-2:     #F1F3F9;
  --gp-border:        #E4E8F0;
  --gp-border-strong: #CFD6E4;
  --gp-text:          #1A2233;
  --gp-muted:         #5A6678;
  --gp-faint:         #8A95A8;
  --gp-purple:        var(--brand);
  --gp-purple-strong: var(--brand-strong);
  --gp-cyan:          var(--accent);
  --gp-success:       var(--success);

  /* ── Admin namespace (--adm-*) — light ─────────────────────────────────── */
  --adm-bg:        #F7F8FB;
  --adm-bg2:       #FFFFFF;
  --adm-bg3:       #F1F3F9;
  --adm-surface:   #FFFFFF;
  --adm-surf2:     #F1F3F9;
  --adm-surf3:     #E8EBF3;
  --adm-border:    #E4E8F0;
  --adm-border2:   #CFD6E4;
  --adm-border3:   #B6C0D2;
  --adm-text1:     #1A2233;
  --adm-text2:     #5A6678;
  --adm-muted:     #8A95A8;
  --adm-purple:    var(--brand);
  --adm-purple2:   var(--brand-strong);
  --adm-cyan:      var(--accent);
  --adm-green:     var(--green);
  --adm-amber:     var(--amber);
  --adm-red:       var(--red);
  --adm-purple-bg: var(--brand-soft);
  --adm-green-bg:  var(--green-bg);
  --adm-red-bg:    var(--red-bg);
  --adm-amber-bg:  var(--amber-bg);
  --adm-sidebar-w: 240px;
  --adm-topbar-h:  58px;
  --adm-r:  8px; --adm-rl: 12px; --adm-rx: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME  ·  platform only (:root[data-theme="dark"])
   Only theme-dependent tokens are overridden; type/spacing/radius/motion/z
   and layout are inherited from the light block above.
   ═══════════════════════════════════════════════════════════════════════════ */
:root[data-theme="dark"] {
  /* Brand */
  --brand:            #7C6FF7;
  --brand-strong:     #9A8FFF;
  --brand-soft:       rgba(124, 111, 247, .16);
  --brand-ring:       rgba(124, 111, 247, .45);

  /* Accent */
  --accent:           #22D3EE;
  --accent-bright:    #22D3EE;
  --accent-soft:      rgba(34, 211, 238, .14);
  --grad-brand:       linear-gradient(135deg, #7C6FF7, #22D3EE);

  /* Surfaces / borders / text */
  --bg:               #0B0E14;
  --bg2:              #11151D;
  --bg3:              #161B26;
  --bg4:              #1E2532;
  --bg5:              #28303F;
  --surface:          #161B26;
  --surface2:         #1C2333;
  --border:           #1F2733;
  --border2:          #2D3645;
  --border3:          #3A4556;
  --line:             #1F2733;
  --line-strong:      #2D3645;
  --text:             #E6ECF6;
  --text2:            #9AA7BC;
  --text3:            #5E6B80;
  --text1:            #E6ECF6;

  /* Semantic */
  --green:  #22C55E; --green2: #16A34A; --green-bg: rgba(34, 197, 94, .12);
  --yellow: #F59E0B; --amber:  #F59E0B; --yellow-bg: rgba(245, 158, 11, .12);
  --amber-bg: rgba(245, 158, 11, .12);
  --red:    #EF4444; --red2:   #B91C1C; --red-bg: rgba(239, 68, 68, .12);
  --success: #22C55E; --success-soft: rgba(34, 197, 94, .12);
  --warning: #F59E0B; --warning-soft: rgba(245, 158, 11, .12);
  --danger:  #EF4444; --danger-soft:  rgba(239, 68, 68, .12);

  /* Legacy primary aliases */
  --blue:     var(--brand);
  --blue2:    #6357E6;
  --blue-bg:  var(--brand-soft);
  --blue-dark:#6357E6;
  --purple:   var(--brand);
  --purple2:  var(--brand-strong);
  --purple-bg:var(--brand-soft);
  --cyan:     var(--accent);
  --cyan-bg:  var(--accent-soft);
  --orange:   #F97316;
  --teal:     #14B8A6;
  --pink:     #EC4899;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --shadow:    0 8px 32px rgba(0, 0, 0, .5);
  --shadow2:   0 2px 8px rgba(0, 0, 0, .3);

  /* Public header namespace — dark */
  --gp-bg:            #0B0E14;
  --gp-bg-2:          #11151D;
  --gp-bg-3:          #161B26;
  --gp-surface:       #161B26;
  --gp-surface-2:     #1C2333;
  --gp-border:        rgba(255, 255, 255, .08);
  --gp-border-strong: rgba(255, 255, 255, .16);
  --gp-text:          #E6ECF6;
  --gp-muted:         #9AA7BC;
  --gp-faint:         #5E6B80;

  /* Admin namespace — dark */
  --adm-bg:        #0B0E14;
  --adm-bg2:       #11151D;
  --adm-bg3:       #161B26;
  --adm-surface:   #161B26;
  --adm-surf2:     #1C2333;
  --adm-surf3:     #222B3D;
  --adm-border:    rgba(255, 255, 255, .07);
  --adm-border2:   rgba(255, 255, 255, .12);
  --adm-border3:   rgba(255, 255, 255, .20);
  --adm-text1:     #E6ECF6;
  --adm-text2:     #9AA7BC;
  --adm-muted:     #5E6B80;
}

/* ── Display typeface on headings (Inter stays for body/UI) ──────────────── */
h1, h2, h3,
.section-title, .hero h1, .hero-title,
.ds-page-header h1, .ds-section-header h2 {
  font-family: var(--font-display);
  letter-spacing: var(--ls-tight);
}
