/* ============================================
   FINANZAMIGO — Design Tokens
   Dark-first, techy/Vercel aesthetic
   ============================================ */

:root {
  /* Type scale — fluid */
  --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,    7rem);

  /* Spacing — 4px base */
  --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;

  /* Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 320ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:   1200px;
  --sidebar-width:   240px;

  /* Fonts — Geist (Vercel) for techy feel */
  --font-body:    'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-mono:    'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
}

/* ============================================
   DARK MODE (default)
   Editorial-tech: deep black surfaces, lime-electric accent
   ============================================ */
:root,
[data-theme='dark'] {
  /* Surfaces */
  --color-bg:               #08090A;
  --color-surface:          #0E0F11;
  --color-surface-2:        #131517;
  --color-surface-offset:   #1A1D20;
  --color-surface-elevated: #16181B;

  /* Borders & dividers */
  --color-border:    #1F2226;
  --color-border-strong: #2A2D31;
  --color-divider:   #15171A;

  /* Text */
  --color-text:        #EDEEF0;
  --color-text-muted:  #8A8F98;
  --color-text-faint:  #54585F;
  --color-text-inverse:#08090A;

  /* Primary — Electric lime (alpha) */
  --color-primary:           #A6FF4D;
  --color-primary-hover:     #B8FF6E;
  --color-primary-active:    #92E840;
  --color-primary-soft:      rgba(166, 255, 77, 0.12);
  --color-primary-border:    rgba(166, 255, 77, 0.28);

  /* Semantic — finance */
  --color-success: #4ADE80;     /* gains */
  --color-success-soft: rgba(74, 222, 128, 0.12);
  --color-danger:  #F87171;     /* losses */
  --color-danger-soft: rgba(248, 113, 113, 0.12);
  --color-warning: #FBBF24;
  --color-info:    #60A5FA;

  /* Setup badge colors */
  --badge-buy:        #4ADE80;
  --badge-buy-bg:     rgba(74, 222, 128, 0.10);
  --badge-add:        #60A5FA;
  --badge-add-bg:     rgba(96, 165, 250, 0.10);
  --badge-trim:       #FBBF24;
  --badge-trim-bg:    rgba(251, 191, 36, 0.10);
  --badge-breakout:   #A78BFA;
  --badge-breakout-bg:rgba(167, 139, 250, 0.10);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--color-primary-border), 0 8px 32px rgba(166, 255, 77, 0.15);

  /* Glass overlay (paywall) */
  --glass-bg: rgba(14, 15, 17, 0.6);
  --glass-blur: blur(8px);
}

/* ============================================
   LIGHT MODE
   ============================================ */
[data-theme='light'] {
  --color-bg:               #FAFAFA;
  --color-surface:          #FFFFFF;
  --color-surface-2:        #F5F5F5;
  --color-surface-offset:   #EEEEEE;
  --color-surface-elevated: #FFFFFF;

  --color-border:    #E5E5E5;
  --color-border-strong: #D4D4D4;
  --color-divider:   #EEEEEE;

  --color-text:        #0A0A0A;
  --color-text-muted:  #6B7280;
  --color-text-faint:  #9CA3AF;
  --color-text-inverse:#FFFFFF;

  --color-primary:           #16A34A;
  --color-primary-hover:     #15803D;
  --color-primary-active:    #166534;
  --color-primary-soft:      rgba(22, 163, 74, 0.10);
  --color-primary-border:    rgba(22, 163, 74, 0.25);

  --color-success: #16A34A;
  --color-success-soft: rgba(22, 163, 74, 0.10);
  --color-danger:  #DC2626;
  --color-danger-soft: rgba(220, 38, 38, 0.10);
  --color-warning: #D97706;
  --color-info:    #2563EB;

  --badge-buy:        #16A34A;
  --badge-buy-bg:     rgba(22, 163, 74, 0.10);
  --badge-add:        #2563EB;
  --badge-add-bg:     rgba(37, 99, 235, 0.10);
  --badge-trim:       #D97706;
  --badge-trim-bg:    rgba(217, 119, 6, 0.10);
  --badge-breakout:   #7C3AED;
  --badge-breakout-bg:rgba(124, 58, 237, 0.10);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.10);
  --shadow-glow: 0 0 0 1px var(--color-primary-border), 0 8px 32px rgba(22, 163, 74, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(8px);
}
