/**
 * TOWERPARTS DESIGN SYSTEM
 * Design Tokens - CSS Variables
 * Dark Premium Theme com suporte a Light Mode
 */

/* ========================================
   CUSTOM FONTS
   ======================================== */

@font-face {
  font-family: 'Exo';
  src: url('../fonts/exo.bold-italic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Exo Demi';
  src: url('../fonts/exo.demi-bold-italic.otf') format('opentype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ========================================
     CORES - DARK THEME (Padrão)
     ======================================== */
  
  /* Backgrounds */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #1f1f1f;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  
  /* Surfaces com blur (Glassmorphism) */
  --surface-glass: rgba(255, 255, 255, 0.05);
  --surface-glass-hover: rgba(255, 255, 255, 0.08);
  --surface-glass-active: rgba(255, 255, 255, 0.12);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --text-tertiary: #8a8a8a;
  --text-muted: #666666;
  --text-inverse: #0a0a0a;
  
  /* Brand Colors - Amarelo Premium */
  --brand-primary: #e30613;
  --brand-primary-hover: #ff2030;
  --brand-primary-active: #b00510;
  --brand-secondary: #ffffff;
  --brand-gradient: linear-gradient(135deg, #e30613 0%, #ffffff 100%);
  
  /* Accent Colors */
  --accent-red: #ff4444;
  --accent-green: #00e676;
  --accent-blue: #2979ff;
  --accent-purple: #d500f9;
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  
  /* Shadows - Premium */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px rgba(227, 6, 19, 0.3);
  
  /* Blur Effects */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  
  /* ========================================
     TIPOGRAFIA
     ======================================== */
  
  /* Font Families */
  --font-primary: 'Exo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Exo', 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);
  --text-5xl: clamp(3rem, 2.4rem + 3vw, 4rem);
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;
  
  /* ========================================
     SPACING - Sistema 4px base
     ======================================== */
  
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* ========================================
     BORDER RADIUS
     ======================================== */
  
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;
  
  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slowest: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Easing Functions Premium */
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  
  /* ========================================
     Z-INDEX LAYERS
     ======================================== */
  
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-notification: 1080;
  
  /* ========================================
     BREAKPOINTS (para JS)
     ======================================== */
  
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
}

/* ========================================
   LIGHT THEME - Modo Claro
   ======================================== */

[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-elevated: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.95);
  
  /* Surfaces com blur */
  --surface-glass: rgba(255, 255, 255, 0.8);
  --surface-glass-hover: rgba(255, 255, 255, 0.9);
  --surface-glass-active: rgba(255, 255, 255, 1);
  
  /* Text Colors */
  --text-primary: #0a0a0a;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;
  --text-muted: #adb5bd;
  --text-inverse: #ffffff;
  
  /* Brand Colors (mantém) */
  --brand-primary: #ffc107;
  --brand-primary-hover: #ffb300;
  --brand-primary-active: #ffa000;
  
  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.18);
  
  /* Shadows - Light Theme */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 40px rgba(255, 193, 7, 0.2);
}

/* ========================================
   UTILITY - System Preference Support
   ======================================== */

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    /* Aplica light theme se usuário preferir */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #0a0a0a;
    /* ... adicionar mais variáveis se necessário */
  }
}

/* ========================================
   SMOOTH THEME TRANSITION
   ======================================== */

* {
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
}

/* Desabilita transição em elementos específicos */
.no-transition,
.no-transition * {
  transition: none !important;
}
