/* ============================================
   Design Tokens + Theme System — KIVI.AZ
   ============================================ */

/* ---- DARK THEME (Default) ---- */
:root,
[data-theme="dark"] {
  /* Brand — Lime/Kiwi palette */
  --color-primary: #a6d92e;
  --color-primary-light: #b8e550;
  --color-primary-dark: #8bbf20;
  --color-accent: #69782b;
  --color-accent-light: #8bbf20;

  /* Backgrounds */
  --color-bg: #080c14;
  --color-bg-alt: #0c1220;
  --color-surface: #121a2e;
  --color-glass: rgba(18, 26, 46, 0.6);
  --color-glass-border: rgba(166, 217, 46, 0.06);

  /* Text */
  --color-text: #f0f4f8;
  --color-text-secondary: #8b95a8;
  --color-text-muted: #4a5568;

  /* Borders */
  --color-border: rgba(166, 217, 46, 0.08);
  --color-border-hover: rgba(166, 217, 46, 0.2);

  /* Scheme indicator */
  --scheme: dark;
}

/* ---- LIGHT THEME ---- */
[data-theme="light"] {
  --color-primary: #8bbf20;
  --color-primary-light: #a6d92e;
  --color-primary-dark: #69782b;
  --color-accent: #4a8c1b;
  --color-accent-light: #a6d92e;

  --color-bg: #f7f9fc;
  --color-bg-alt: #eef2f7;
  --color-surface: #ffffff;
  --color-glass: rgba(255, 255, 255, 0.75);
  --color-glass-border: rgba(0, 0, 0, 0.06);

  --color-text: #1a202c;
  --color-text-secondary: #4a5568;
  --color-text-muted: #a0aec0;

  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(139, 191, 32, 0.3);

  --scheme: light;
}

/* ---- PURPLE THEME ---- */
[data-theme="purple"] {
  --color-primary: #a78bfa;
  --color-primary-light: #c4b5fd;
  --color-primary-dark: #7c3aed;
  --color-accent: #8b5cf6;
  --color-accent-light: #c4b5fd;

  --color-bg: #0c0820;
  --color-bg-alt: #120e2e;
  --color-surface: #1a1445;
  --color-glass: rgba(26, 20, 69, 0.65);
  --color-glass-border: rgba(167, 139, 250, 0.08);

  --color-text: #ede9fe;
  --color-text-secondary: #a5a0c8;
  --color-text-muted: #5a5580;

  --color-border: rgba(167, 139, 250, 0.08);
  --color-border-hover: rgba(167, 139, 250, 0.2);

  --scheme: dark;
}

/* ---- OCEAN THEME ---- */
[data-theme="ocean"] {
  --color-primary: #06b6d4;
  --color-primary-light: #22d3ee;
  --color-primary-dark: #0891b2;
  --color-accent: #0ea5e9;
  --color-accent-light: #38bdf8;

  --color-bg: #031c2c;
  --color-bg-alt: #062540;
  --color-surface: #0a3050;
  --color-glass: rgba(10, 48, 80, 0.6);
  --color-glass-border: rgba(6, 182, 212, 0.08);

  --color-text: #e0f2fe;
  --color-text-secondary: #7dd3fc;
  --color-text-muted: #38688a;

  --color-border: rgba(6, 182, 212, 0.08);
  --color-border-hover: rgba(6, 182, 212, 0.2);

  --scheme: dark;
}

/* ============================================
   Typography
   ============================================ */
:root {
  --ff: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3.5rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
}

/* ============================================
   Spacing, Radius, Shadows, Z-index, Layout
   ============================================ */
:root {
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 8px 30px rgba(166, 217, 46, 0.2);

  --t-fast: 150ms ease;
  --t-base: 300ms ease;
  --t-slow: 500ms ease;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --z-bg: -1;
  --z-base: 1;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;

  --container-max: 1200px;
  --container-pad: 1.5rem;
  --header-h: 64px;
}

/* ---- Theme transition on all colors ---- */
*, *::before, *::after {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Light theme specific overrides */
[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(139, 191, 32, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 191, 32, 0.06) 1px, transparent 1px) !important;
}
[data-theme="light"] .header {
  background: rgba(247, 249, 252, 0.85) !important;
}
[data-theme="light"] .header.scrolled {
  background: rgba(247, 249, 252, 0.96) !important;
}
[data-theme="light"] .section-title {
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
[data-theme="light"] .logo-text {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
