/**
 * 🎨 DESIGN SYSTEM - Padronização Visual Completa
 * Cores, Typography, Spacing, Componentes Reutilizáveis
 */

:root {
  /* ============================================
     🎨 PALETA DE CORES - Consistente em todo site
     ============================================ */
  
  /* Primary Brand Colors */
  --primary-brand: #ffed4e;        /* Cyberpunk Yellow - Main brand */
  --primary-light: #ffff99;        /* Cyberpunk Yellow Light */
  --primary-dark: #ffcc00;         /* Cyberpunk Yellow Dark */
  
  /* Secondary Actions */
  --secondary: #ec4899;             /* Pink - CTA, urgency */
  --secondary-light: #f472b6;       /* Pink Light */
  --secondary-dark: #be185d;        /* Pink Dark */
  
  /* Success State */
  --success: #10b981;               /* Green */
  --success-light: #6ee7b7;         /* Green Light */
  --success-dark: #059669;          /* Green Dark */
  
  /* Warning/Alert */
  --warning: #f59e0b;               /* Orange */
  --warning-light: #fbbf24;         /* Orange Light */
  --warning-dark: #d97706;          /* Orange Dark */
  
  /* Error State */
  --error: #ef4444;                 /* Red */
  --error-light: #fca5a5;           /* Red Light */
  --error-dark: #dc2626;            /* Red Dark */
  
  /* Neutral - Background, Text */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #000000;
  
  /* ============================================
     📐 TYPOGRAPHY - Consistente
     ============================================ */
  
  /* Font Families */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  
  /* Font Sizes - Escala harmônica */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
  
  /* ============================================
     📏 SPACING - Consistente
     ============================================ */
  
  --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 - Consistente
     ============================================ */
  
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;
  
  --border-thin: 1px;
  --border-default: 2px;
  --border-thick: 4px;
  
  /* ============================================
     💫 SHADOWS - Depth & Elevation
     ============================================ */
  
  --shadow-none: none;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* ============================================
     ⚡ TRANSITIONS & ANIMATIONS
     ============================================ */
  
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* ============================================
      📱 BREAKPOINTS
     ============================================ */
  
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ============================================
   🧩 BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--gray-900);
  background-color: var(--white);
  transition: background-color var(--transition-normal);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    color: var(--gray-100);
    background-color: var(--gray-900);
  }
}

/* ============================================
   📝 Typography Components
   ============================================ */

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-tight);
  color: var(--gray-800);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-tight);
  color: var(--gray-800);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-tight);
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

p {
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
  color: var(--gray-700);
}

a {
  color: var(--primary-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================
   🔘 Button Components - Padronizado
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  gap: var(--space-2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary-brand);
  color: var(--gray-900);
  box-shadow: 0 0 20px rgba(255, 237, 78, 0.4), var(--shadow-md);
  font-weight: var(--font-bold);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  box-shadow: 0 0 40px rgba(255, 237, 78, 0.9), 0 8px 16px rgba(255, 237, 78, 0.4);
  transform: translateY(-2px);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--secondary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--primary-brand);
  border: var(--border-default) solid var(--primary-brand);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--primary-light);
  color: var(--white);
}

/* ============================================
   📦 Card Components
   ============================================ */

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  border: var(--border-thin) solid var(--gray-200);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   🔗 Link Components
   ============================================ */

.link {
  color: var(--primary-brand);
  text-decoration: none;
  font-weight: var(--font-semibold);
  transition: all var(--transition-fast);
  border-bottom: var(--border-thin) solid transparent;
}

.link:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

/* ============================================
   ✅ Form Components
   ============================================ */

input,
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  border: var(--border-thin) solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

/* ============================================
   🎯 Utility Classes
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-brand); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.bg-primary { background-color: var(--primary-brand); color: var(--white); }
.bg-success { background-color: var(--success); color: var(--white); }
.bg-warning { background-color: var(--warning); color: var(--white); }
.bg-error { background-color: var(--error); color: var(--white); }

.m-0 { margin: var(--space-0); }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }

.p-0 { padding: var(--space-0); }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ============================================
   📱 RESPONSIVE - Mobile First
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
  }
  
  h2 {
    font-size: var(--text-3xl);
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  body {
    font-size: var(--text-sm);
  }
}

/* ============================================
   🌙 Dark Mode - Consistent
   ============================================ */

@media (prefers-color-scheme: dark) {
  h1, h2, h3, h4, h5, h6 {
    color: var(--gray-50);
  }
  
  p {
    color: var(--gray-300);
  }
  
  .card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
  }
  
  input,
  textarea,
  select {
    background-color: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-100);
  }
}
