/**
 * Lumen Design System - Theme CSS
 * 
 * Base styles and CSS variables for theming
 * Import this in your main CSS/HTML file
 */

/* ============================================================================
   CSS Variables - Dark Theme (Default)
   ============================================================================ */
:root {
  /* Background colors */
  --bg-background: #050505;
  --bg-surface: #0F0F0F;
  --bg-card: #18181b;
  --bg-overlay: rgba(5, 5, 5, 0.8);
  
  /* Text colors */
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717a;
  --text-inverse: #18181b;
  
  /* Border colors */
  --border-color: #27272A;
  --border-subtle: #3f3f46;
  
  /* Interactive colors */
  --button-primary: #F4F4F5;
  --button-primary-hover: #FFFFFF;
  --button-secondary: transparent;
  --button-secondary-hover: transparent;
  
  /* State colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-glow: 0 0 20px rgb(244 244 245 / 0.1);
  
  /* Animation durations */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-moderate: 300ms;
  --duration-slow: 500ms;
  
  /* Easing functions */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================================================
   Light Theme
   ============================================================================ */
.light-mode {
  /* Background colors */
  --bg-background: #FFFFFF;
  --bg-surface: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(255, 255, 255, 0.8);
  
  /* Text colors */
  --text-primary: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717a;
  --text-inverse: #F4F4F5;
  
  /* Border colors */
  --border-color: #E4E4E7;
  --border-subtle: #D4D4D8;
  
  /* Interactive colors */
  --button-primary: #18181B;
  --button-primary-hover: #000000;
  --button-secondary: transparent;
  --button-secondary-hover: transparent;
  
  /* State colors */
  --color-success: #059669;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-info: #2563eb;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgb(0 0 0 / 0.05);
}

/* ============================================================================
   Base Styles
   ============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-background);
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  transition: background-color var(--duration-moderate) var(--ease-in-out),
              color var(--duration-moderate) var(--ease-in-out);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Selection */
::selection {
  background-color: var(--text-primary);
  color: var(--bg-background);
  opacity: 0.2;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* ============================================================================
   Scrollbar Styles
   ============================================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-background);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-subtle);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-background);
}

/* ============================================================================
   Form Elements
   ============================================================================ */
input,
textarea,
select {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all var(--duration-fast) var(--ease-out);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--text-primary);
  background-color: var(--bg-background);
}

/* Special class for form fields that need explicit theming */
.input-field {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.input-field:focus {
  background-color: var(--bg-background) !important;
  border-color: var(--text-primary) !important;
}

/* Placeholder text */
::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */
.text-balance {
  text-wrap: balance;
}

.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.transition-theme {
  transition: background-color var(--duration-moderate) var(--ease-in-out),
              color var(--duration-moderate) var(--ease-in-out),
              border-color var(--duration-moderate) var(--ease-in-out);
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow effect */
.glow {
  box-shadow: var(--shadow-glow);
}

/* ============================================================================
   Animation Classes
   ============================================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn var(--duration-moderate) var(--ease-out);
}

.animate-slide-up {
  animation: slideUp var(--duration-moderate) var(--ease-out);
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

/* ============================================================================
   Responsive Utilities
   ============================================================================ */
@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }
}

@media (min-width: 1536px) {
  :root {
    font-size: 18px;
  }
}

