/* =============================================
   UltraCalcMock — Design Tokens & Theme System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Typography ── */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;
  --fs-5xl: 3.75rem;

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

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

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

  /* ── Border 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-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-theme: 500ms ease;

  /* ── Z-Index Scale ── */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;

  /* ── Shadows (theme-aware, defined below) ── */
  /* ── Colors (theme-aware, defined below) ── */
}

/* ═══════════════════════════════════════════════
   THEME: DARK (Default)
   ═══════════════════════════════════════════════ */
[data-theme="dark"], :root {
  --bg-primary: #07080f;
  --bg-secondary: #0f1120;
  --bg-tertiary: #171b30;
  --bg-elevated: #1c2142;
  --bg-card: rgba(15, 17, 32, 0.85);
  --bg-card-hover: rgba(28, 33, 66, 0.9);
  --bg-glass: rgba(15, 17, 32, 0.6);
  --bg-input: rgba(23, 27, 48, 0.8);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;
  --text-inverse: #0f172a;

  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-primary-muted: rgba(99, 102, 241, 0.15);
  --accent-secondary: #8b5cf6;
  --accent-secondary-hover: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --accent-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.12);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.12);

  --border-color: rgba(99, 102, 241, 0.15);
  --border-color-hover: rgba(99, 102, 241, 0.3);
  --border-subtle: rgba(148, 163, 184, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.08);

  --glass-bg: rgba(15, 17, 32, 0.65);
  --glass-border: rgba(99, 102, 241, 0.12);
  --glass-blur: 16px;

  --scrollbar-track: #0f1120;
  --scrollbar-thumb: #2d3363;
  --scrollbar-thumb-hover: #3d4373;

  --gradient-hero: linear-gradient(135deg, #07080f 0%, #0f1120 30%, #171b30 60%, #1c1042 100%);
  --gradient-card: linear-gradient(145deg, rgba(15, 17, 32, 0.9), rgba(28, 33, 66, 0.6));
  --gradient-text: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
}

/* ═══════════════════════════════════════════════
   THEME: LIGHT
   ═══════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-input: rgba(241, 245, 249, 0.8);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #f1f5f9;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-primary-muted: rgba(79, 70, 229, 0.1);
  --accent-secondary: #7c3aed;
  --accent-secondary-hover: #6d28d9;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed, #9333ea);
  --accent-glow: 0 0 20px rgba(79, 70, 229, 0.2);

  --color-success: #16a34a;
  --color-success-bg: rgba(22, 163, 74, 0.08);
  --color-error: #dc2626;
  --color-error-bg: rgba(220, 38, 38, 0.08);
  --color-warning: #d97706;
  --color-warning-bg: rgba(217, 119, 6, 0.08);
  --color-info: #2563eb;
  --color-info-bg: rgba(37, 99, 235, 0.08);

  --border-color: rgba(79, 70, 229, 0.12);
  --border-color-hover: rgba(79, 70, 229, 0.25);
  --border-subtle: rgba(15, 23, 42, 0.06);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(79, 70, 229, 0.06);

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(79, 70, 229, 0.1);
  --glass-blur: 16px;

  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;

  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #eef2ff 30%, #e0e7ff 60%, #ede9fe 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.8));
  --gradient-text: linear-gradient(135deg, #4f46e5, #7c3aed, #9333ea);
}

/* ═══════════════════════════════════════════════
   THEME: EYE COMFORT (Warm Dark)
   ═══════════════════════════════════════════════ */
[data-theme="comfort"] {
  --bg-primary: #151210;
  --bg-secondary: #1e1a16;
  --bg-tertiary: #28231d;
  --bg-elevated: #322b24;
  --bg-card: rgba(30, 26, 22, 0.85);
  --bg-card-hover: rgba(50, 43, 36, 0.9);
  --bg-glass: rgba(30, 26, 22, 0.6);
  --bg-input: rgba(40, 35, 29, 0.8);

  --text-primary: #e8dfd4;
  --text-secondary: #b5a898;
  --text-tertiary: #8c7f6f;
  --text-muted: #6b5f50;
  --text-inverse: #1c1917;

  --accent-primary: #d97706;
  --accent-primary-hover: #f59e0b;
  --accent-primary-muted: rgba(217, 119, 6, 0.15);
  --accent-secondary: #c2410c;
  --accent-secondary-hover: #ea580c;
  --accent-gradient: linear-gradient(135deg, #d97706, #ea580c, #dc2626);
  --accent-glow: 0 0 20px rgba(217, 119, 6, 0.25);

  --color-success: #65a30d;
  --color-success-bg: rgba(101, 163, 13, 0.12);
  --color-error: #dc2626;
  --color-error-bg: rgba(220, 38, 38, 0.12);
  --color-warning: #ca8a04;
  --color-warning-bg: rgba(202, 138, 4, 0.12);
  --color-info: #2563eb;
  --color-info-bg: rgba(37, 99, 235, 0.12);

  --border-color: rgba(217, 119, 6, 0.15);
  --border-color-hover: rgba(217, 119, 6, 0.3);
  --border-subtle: rgba(181, 168, 152, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(217, 119, 6, 0.12);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(217, 119, 6, 0.08);

  --glass-bg: rgba(30, 26, 22, 0.65);
  --glass-border: rgba(217, 119, 6, 0.12);
  --glass-blur: 16px;

  --scrollbar-track: #1e1a16;
  --scrollbar-thumb: #4a3f33;
  --scrollbar-thumb-hover: #5a4f43;

  --gradient-hero: linear-gradient(135deg, #151210 0%, #1e1a16 30%, #28231d 60%, #2d1f10 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 26, 22, 0.9), rgba(50, 43, 36, 0.6));
  --gradient-text: linear-gradient(135deg, #f59e0b, #ea580c, #dc2626);
}
