/* Art direction: Deep tech AI company → Transparency, clarity, purity
   Palette: Clean white — the opposite of black-box AI. We are transparent and explainable.
   Typography: Cormorant (display, serif) + Satoshi (body, sans-serif) — scientific authority meets engineering precision
   Density: Very spacious — "a deep exhale", every idea has room to breathe */

/* ============================================================
   CUSTOM DESIGN TOKENS — Spitze.AI Light Palette (Primary)
   ============================================================ */

:root {
  /* Type Scale */
  --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);

  /* 4px Spacing System */
  --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-full: 9999px;

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

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Font families */
  --font-display: 'Cormorant', 'Georgia', serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;
}

/* ============================================================
   LIGHT MODE (DEFAULT) — Transparency, clarity, openness
   ============================================================ */
:root, [data-theme="light"] {
  /* Surfaces — pure white, clean */
  --color-bg:               #ffffff;
  --color-surface:          #f8f9fb;
  --color-surface-2:        #f2f3f6;
  --color-surface-offset:   #ecedf2;
  --color-surface-offset-2: #e4e6ec;
  --color-surface-dynamic:  #dcdee6;
  --color-divider:          #d0d3dc;
  --color-border:           #c2c6d0;

  /* Text — deep, authoritative */
  --color-text:           #111827;
  --color-text-muted:     #6b7280;
  --color-text-faint:     #9ca3af;
  --color-text-inverse:   #ffffff;

  /* Primary Accent — refined teal/blue for credibility */
  --color-primary:         #0d7377;
  --color-primary-hover:   #095c5f;
  --color-primary-active:  #064648;
  --color-primary-highlight: #d4eeef;

  /* Error */
  --color-error:           #c83050;
  --color-error-hover:     #a82040;
  --color-error-active:    #881830;
  --color-error-highlight: #f8e0e5;

  /* Success */
  --color-success:         #2a8840;
  --color-success-hover:   #207030;
  --color-success-active:  #186020;
  --color-success-highlight: #dff0e2;

  /* Warning */
  --color-warning:         #a87828;
  --color-warning-hover:   #906418;
  --color-warning-active:  #785210;
  --color-warning-highlight: #f5ecd8;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 250 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 250 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 250 / 0.12);
}

/* System preference fallback for light */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:               #ffffff;
    --color-surface:          #f8f9fb;
    --color-surface-2:        #f2f3f6;
    --color-surface-offset:   #ecedf2;
    --color-surface-offset-2: #e4e6ec;
    --color-surface-dynamic:  #dcdee6;
    --color-divider:          #d0d3dc;
    --color-border:           #c2c6d0;
    --color-text:           #111827;
    --color-text-muted:     #6b7280;
    --color-text-faint:     #9ca3af;
    --color-text-inverse:   #ffffff;
    --color-primary:         #0d7377;
    --color-primary-hover:   #095c5f;
    --color-primary-active:  #064648;
    --color-primary-highlight: #d4eeef;
  }
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  /* Surfaces — deep navy/charcoal */
  --color-bg:               #0a0f1a;
  --color-surface:          #0e1425;
  --color-surface-2:        #131a2e;
  --color-surface-offset:   #0c1120;
  --color-surface-offset-2: #111730;
  --color-surface-dynamic:  #1a2240;
  --color-divider:          #1e2745;
  --color-border:           #263050;

  /* Text — cool white/light gray */
  --color-text:           #e0e4ed;
  --color-text-muted:     #8a92a8;
  --color-text-faint:     #586380;
  --color-text-inverse:   #0a0f1a;

  /* Primary Accent — brighter teal for dark bg */
  --color-primary:         #4ecdc4;
  --color-primary-hover:   #3bb8b0;
  --color-primary-active:  #2a9e97;
  --color-primary-highlight: #1a3038;

  /* Error */
  --color-error:           #e06080;
  --color-error-hover:     #c84868;
  --color-error-active:    #a83050;
  --color-error-highlight: #2a1520;

  /* Success */
  --color-success:         #5cb870;
  --color-success-hover:   #48a05c;
  --color-success-active:  #38884c;
  --color-success-highlight: #152a1a;

  /* Warning */
  --color-warning:         #d4a24c;
  --color-warning-hover:   #c08e38;
  --color-warning-active:  #a87828;
  --color-warning-highlight: #2a2215;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* System preference fallback for dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:               #0a0f1a;
    --color-surface:          #0e1425;
    --color-surface-2:        #131a2e;
    --color-surface-offset:   #0c1120;
    --color-surface-offset-2: #111730;
    --color-surface-dynamic:  #1a2240;
    --color-divider:          #1e2745;
    --color-border:           #263050;
    --color-text:           #e0e4ed;
    --color-text-muted:     #8a92a8;
    --color-text-faint:     #586380;
    --color-text-inverse:   #0a0f1a;
    --color-primary:         #4ecdc4;
    --color-primary-hover:   #3bb8b0;
    --color-primary-active:  #2a9e97;
    --color-primary-highlight: #1a3038;
  }
}
