/* ============================================================
   THRIVEMANAGEMENT.AI — Design Tokens
   System: Linear-inspired — near-black canvas, indigo accent,
           precise type, disciplined depth
   Mood: Authoritative, calm, modern, trustworthy, premium
   ============================================================ */

:root, [data-theme="light"] {
  /* ── Type Scale (fluid, clamped) ── */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* ── Spacing ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Light mode surfaces (subtle warm-light) ── */
  --color-bg:              #f5f5f7;
  --color-surface:         #ffffff;
  --color-surface-2:       #f9f9fb;
  --color-surface-offset:  #ededf0;
  --color-divider:         #e2e2e8;
  --color-border:          #d4d4dc;

  /* ── Light mode text ── */
  --color-text:            #0d0d10;
  --color-text-muted:      #565660;
  --color-text-faint:      #9898a8;
  --color-text-inverse:    #f7f8f8;

  /* ── Primary Accent — Linear Indigo ── */
  --color-primary:           #5e6ad2;
  --color-primary-hover:     #828fff;
  --color-primary-active:    #4a56c0;
  --color-primary-highlight: #eceef9;

  /* ── Secondary Violet ── */
  --color-violet:            #7170ff;
  --color-violet-hover:      #8f8eff;

  /* ── Navy (kept for deep CTA blocks) ── */
  --color-navy:            #0f1011;
  --color-navy-mid:        #191a1b;
  --color-navy-light:      #28282c;

  /* ── Accent Gold — badges and highlights ── */
  --color-gold:            #f5a623;
  --color-gold-light:      #fef3dc;

  /* ── Success ── */
  --color-success:           #1a7f4b;
  --color-success-highlight: #d1f0e0;

  /* ── Border radius ── */
  --radius-sm:   0.375rem;
  --radius-md:   0.625rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;
  --radius-full: 9999px;

  /* ── Shadows (light, subtle) ── */
  --shadow-sm: 0 1px 3px rgba(13,13,20,0.06), 0 1px 2px rgba(13,13,20,0.04);
  --shadow-md: 0 4px 16px rgba(13,13,20,0.10), 0 2px 6px rgba(13,13,20,0.06);
  --shadow-lg: 0 16px 48px rgba(13,13,20,0.14), 0 4px 12px rgba(13,13,20,0.08);
  --shadow-xl: 0 32px 80px rgba(13,13,20,0.18), 0 8px 24px rgba(13,13,20,0.10);

  /* ── Transitions (Linear spring easing) ── */
  --transition-fast:        150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow:        400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Content widths ── */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  /* ── Fonts — Inter Variable (Linear system font) ── */
  --font-display: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', system-ui, sans-serif;

  /* ── Letter-spacing scale (Linear aggressive negative tracking) ── */
  --ls-hero:    -0.044em;   /* ~-1.584px @ 36px */
  --ls-display: -0.022em;   /* ~-1.056px @ 48px */
  --ls-heading: -0.014em;   /* ~-0.704px @ 32px (scaled) */
  --ls-nav:     0em;
  --ls-label:   0.04em;
}

/* ═══════════════════════════════════════════
   DARK MODE — Linear marketing dark
   #08090a bg, #0f1011 panel, #191a1b surface
   ═══════════════════════════════════════════ */
[data-theme="dark"] {
  --color-bg:              #08090a;
  --color-surface:         #0f1011;
  --color-surface-2:       #131415;
  --color-surface-offset:  #191a1b;
  --color-divider:         rgba(255,255,255,0.06);
  --color-border:          rgba(255,255,255,0.08);

  --color-text:            #f7f8f8;
  --color-text-muted:      #d0d6e0;
  --color-text-faint:      #8a8f98;
  --color-text-inverse:    #08090a;

  --color-primary:           #5e6ad2;
  --color-primary-hover:     #828fff;
  --color-primary-active:    #4a56c0;
  --color-primary-highlight: rgba(94,106,210,0.15);

  --color-violet:            #7170ff;
  --color-violet-hover:      #8f8eff;

  --color-navy:            #08090a;
  --color-navy-mid:        #0f1011;
  --color-navy-light:      #191a1b;

  --color-gold:            #f5a623;
  --color-gold-light:      #2a1e08;

  --color-success:           #34d47a;
  --color-success-highlight: #0a2a18;

  /* Darker, truer shadows on near-black canvas */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4),  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6),0 4px 12px rgba(0,0,0,0.4);
  --shadow-xl: 0 32px 80px rgba(0,0,0,0.7),0 8px 24px rgba(0,0,0,0.5);
}

/* System dark-mode fallback (no explicit data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #08090a;
    --color-surface:         #0f1011;
    --color-surface-2:       #131415;
    --color-surface-offset:  #191a1b;
    --color-divider:         rgba(255,255,255,0.06);
    --color-border:          rgba(255,255,255,0.08);
    --color-text:            #f7f8f8;
    --color-text-muted:      #d0d6e0;
    --color-text-faint:      #8a8f98;
    --color-text-inverse:    #08090a;
    --color-primary:           #5e6ad2;
    --color-primary-hover:     #828fff;
    --color-primary-active:    #4a56c0;
    --color-primary-highlight: rgba(94,106,210,0.15);
    --color-violet:            #7170ff;
    --color-violet-hover:      #8f8eff;
    --color-navy:            #08090a;
    --color-navy-mid:        #0f1011;
    --color-navy-light:      #191a1b;
    --color-gold:            #f5a623;
    --color-gold-light:      #2a1e08;
    --color-success:           #34d47a;
    --color-success-highlight: #0a2a18;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4),  0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.35);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.6),0 4px 12px rgba(0,0,0,0.4);
    --shadow-xl: 0 32px 80px rgba(0,0,0,0.7),0 8px 24px rgba(0,0,0,0.5);
  }
}
