/* ============================================
   TOKENS – Design variables for ToolSpry
   Modern, refined palette with gradient accent.
   ============================================ */

/* Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colors – Light theme (default) */
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-hover: #f8fafc;
  --color-text: #0f172a;
  --color-text-secondary: #64748b;
  --color-muted: #94a3b8;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-soft: rgba(59, 130, 246, 0.08);
  --color-accent-start: #3b82f6;
  --color-accent-end: #8b5cf6;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-border-focus: #3b82f6;
  --color-error: #ef4444;
  --color-success: #22c55e;
  --color-ad-bg: #f1f5f9;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

  /* Glassmorphism */
  --blur: 12px;
  --glass-bg: rgba(255, 255, 255, 0.8);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: clamp(1.875rem, 4vw, 2.5rem);
  --font-size-hero: clamp(2rem, 5vw, 3.5rem);
  --line-height: 1.6;
  --line-height-tight: 1.2;
  --letter-spacing-tight: -0.025em;

  /* 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;

  /* Layout */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --max-width: 42rem;
  --max-width-wide: 72rem;
  --navbar-height: 4rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme – automatic via system preference */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --color-bg: #0b0f1a;
    --color-bg-alt: #0f1423;
    --color-surface: #131825;
    --color-surface-hover: #1a2035;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-muted: #64748b;
    --color-primary: #60a5fa;
    --color-primary-hover: #93c5fd;
    --color-primary-soft: rgba(96, 165, 250, 0.1);
    --color-accent-start: #60a5fa;
    --color-accent-end: #a78bfa;
    --color-border: #1e293b;
    --color-border-hover: #334155;
    --color-border-focus: #60a5fa;
    --color-error: #f87171;
    --color-success: #4ade80;
    --color-ad-bg: #0f1423;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.2);

    --glass-bg: rgba(19, 24, 37, 0.85);
  }
}

/* Manual dark theme override */
.theme-dark {
  --color-bg: #0b0f1a;
  --color-bg-alt: #0f1423;
  --color-surface: #131825;
  --color-surface-hover: #1a2035;
  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-muted: #64748b;
  --color-primary: #60a5fa;
  --color-primary-hover: #93c5fd;
  --color-primary-soft: rgba(96, 165, 250, 0.1);
  --color-accent-start: #60a5fa;
  --color-accent-end: #a78bfa;
  --color-border: #1e293b;
  --color-border-hover: #334155;
  --color-border-focus: #60a5fa;
  --color-error: #f87171;
  --color-success: #4ade80;
  --color-ad-bg: #0f1423;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(96, 165, 250, 0.2);

  --glass-bg: rgba(19, 24, 37, 0.85);
}

/* Manual light theme override */
.theme-light {
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-hover: #f8fafc;
  --color-text: #0f172a;
  --color-text-secondary: #64748b;
  --color-muted: #94a3b8;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-soft: rgba(59, 130, 246, 0.08);
  --color-accent-start: #3b82f6;
  --color-accent-end: #8b5cf6;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-border-focus: #3b82f6;
  --color-error: #ef4444;
  --color-success: #22c55e;
  --color-ad-bg: #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.8);
}
