/* ============================================
   DESIGN SYSTEM - Complete Consistency
   Typography, Colors, Spacing, Accessibility
   ============================================ */

:root {
  /* Brand Colors - WCAG AA Compliant */
  --cte-primary: #532A75;
  --cte-primary-hover: #432060;
  --cte-primary-light: rgba(83, 42, 117, 0.1);
  --cte-accent: #84AE60;
  --cte-accent-hover: #6d9450;
  --cte-whatsapp: #25D366;
  --cte-whatsapp-hover: #1da851;
  
  /* Neutral Colors - Optimized Contrast */
  --cte-black: #0F172A;
  --cte-gray-900: #1E293B;
  --cte-gray-800: #334155;
  --cte-gray-700: #475569;
  --cte-gray-600: #64748B;
  --cte-gray-500: #94A3B8;
  --cte-gray-400: #CBD5E1;
  --cte-gray-300: #E2E8F0;
  --cte-gray-200: #F1F5F9;
  --cte-gray-100: #F8FAFC;
  --cte-white: #FFFFFF;
  
  /* Semantic Colors */
  --cte-success: #10B981;
  --cte-success-light: #D1FAE5;
  --cte-error: #EF4444;
  --cte-error-light: #FEE2E2;
  --cte-warning: #F59E0B;
  --cte-warning-light: #FEF3C7;
  --cte-info: #3B82F6;
  --cte-info-light: #DBEAFE;
  
  /* Typography Scale - WCAG Compliant Sizes */
  --font-xs: 0.75rem;      /* 12px - minimum readable */
  --font-sm: 0.875rem;     /* 14px - body small */
  --font-base: 1rem;       /* 16px - body standard */
  --font-lg: 1.125rem;     /* 18px - large body */
  --font-xl: 1.25rem;      /* 20px - small heading */
  --font-2xl: 1.5rem;      /* 24px - medium heading */
  --font-3xl: 1.875rem;    /* 30px - large heading */
  --font-4xl: 2.25rem;     /* 36px - display */
  --font-5xl: 3rem;        /* 48px - hero */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights - Optimal Readability */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Spacing Scale - 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 */
  
  /* 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-full: 9999px;
  
  /* Shadows - Subtle to Prominent */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Z-index Scale */
  --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;
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

/* Headings - Consistent Hierarchy */
h1, .cte-h1 {
  font-size: var(--font-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--cte-gray-900);
  margin-bottom: var(--space-6);
}

h2, .cte-h2 {
  font-size: var(--font-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--cte-gray-900);
  margin-bottom: var(--space-5);
}

h3, .cte-h3 {
  font-size: var(--font-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--cte-gray-900);
  margin-bottom: var(--space-4);
}

h4, .cte-h4 {
  font-size: var(--font-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--cte-gray-800);
  margin-bottom: var(--space-3);
}

h5, .cte-h5 {
  font-size: var(--font-lg);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--cte-gray-800);
  margin-bottom: var(--space-3);
}

h6, .cte-h6 {
  font-size: var(--font-base);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--cte-gray-700);
  margin-bottom: var(--space-2);
}

/* Body Text */
p, .cte-text {
  font-size: var(--font-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--cte-gray-700);
  margin-bottom: var(--space-4);
}

/* Small Text */
small, .cte-text-sm {
  font-size: var(--font-sm);
  line-height: var(--leading-normal);
  color: var(--cte-gray-600);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1, .cte-h1 { font-size: var(--font-3xl); }
  h2, .cte-h2 { font-size: var(--font-2xl); }
  h3, .cte-h3 { font-size: var(--font-xl); }
  h4, .cte-h4 { font-size: var(--font-lg); }
}

/* ============================================
   BUTTON SYSTEM
   ============================================ */

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

.cte-btn-primary {
  background: var(--cte-primary);
  color: var(--cte-white);
  box-shadow: var(--shadow-sm);
}

.cte-btn-primary:hover {
  background: var(--cte-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.cte-btn-whatsapp {
  background: var(--cte-whatsapp);
  color: var(--cte-white);
  box-shadow: var(--shadow-sm);
}

.cte-btn-whatsapp:hover {
  background: var(--cte-whatsapp-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.cte-btn-secondary {
  background: var(--cte-gray-100);
  color: var(--cte-gray-900);
  border: 1px solid var(--cte-gray-300);
}

.cte-btn-secondary:hover {
  background: var(--cte-gray-200);
  border-color: var(--cte-gray-400);
}

/* ============================================
   FOCUS STATES - Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cte-primary);
  outline-offset: 2px;
}

/* ============================================
   CARD SYSTEM - Consistent Design
   ============================================ */

.cte-card {
  background: var(--cte-white);
  border: 1px solid var(--cte-gray-300);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

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

/* ============================================
   MINIMUM TOUCH TARGET - Mobile Accessibility
   ============================================ */

@media (max-width: 768px) {
  button,
  a.cte-btn,
  input[type="submit"],
  input[type="button"],
  .cte-clickable {
    min-height: 44px;
    min-width: 44px;
  }
}
