/**
 * ═══════════════════════════════════════════════════════════
 * SUPER CLIN PROFESIONAL - IDENTIDAD VISUAL CORPORATIVA
 * ═══════════════════════════════════════════════════════════
 * 
 * Manual de Marca Oficial - Paleta Pantone
 * Versión: 1.0.0
 * Fecha: 2025
 * 
 * IMPORTANTE: Este archivo contiene los colores corporativos oficiales.
 * NO modificar sin autorización del departamento de marketing.
 * ═══════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════
   🎨 PALETA DE COLORES CORPORATIVA OFICIAL
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ━━━ COLORES PRINCIPALES (Brand Core) ━━━ */
  
  /* Rojo Principal - Color dominante de marca */
  --brand-red-primary: #EC3337;
  --brand-red-light: #F05659;
  --brand-red-dark: #D12D31;
  --brand-red-darker: #B82428;
  
  /* Amarillo Principal - Resaltar y CTA secundarios */
  --brand-yellow-primary: #FFEC17;
  --brand-yellow-light: #FFF347;
  --brand-yellow-dark: #F0DD00;
  
  /* Azul Principal - Dominante en interfaz */
  --brand-blue-primary: #426BBA;
  --brand-blue-light: #5B7EC8;
  --brand-blue-dark: #365AA8;
  --brand-blue-darker: #2A4985;
  
  /* Azul Secundario - Fondos y contraste fuerte */
  --brand-blue-secondary: #003896;
  --brand-blue-secondary-light: #0047B3;
  --brand-blue-secondary-dark: #002D77;
  
  /* Celeste Accesorio - Fondos suaves y contraste */
  --brand-cyan-accent: #00A3E0;
  --brand-cyan-light: #33B8E8;
  --brand-cyan-dark: #008DC7;
  
  /* ━━━ COLORES BASE UNIVERSALES ━━━ */
  --brand-white: #FFFFFF;
  --brand-black: #000000;
  
  /* ━━━ ESCALA DE GRISES PROFESIONAL ━━━ */
  --brand-gray-50: #F8FAFC;
  --brand-gray-100: #F2F4F7;
  --brand-gray-200: #E5E7EB;
  --brand-gray-300: #D1D5DB;
  --brand-gray-400: #9CA3AF;
  --brand-gray-500: #6B7280;
  --brand-gray-600: #4B5563;
  --brand-gray-700: #374151;
  --brand-gray-800: #1F2937;
  --brand-gray-900: #111827;
  
  /* ━━━ ALIASES SEMÁNTICOS PARA DESARROLLO ━━━ */
  --sc-primary: var(--brand-blue-primary);
  --sc-primary-dark: var(--brand-blue-dark);
  --sc-primary-light: var(--brand-blue-light);
  
  --sc-secondary: var(--brand-blue-secondary);
  --sc-secondary-dark: var(--brand-blue-secondary-dark);
  --sc-secondary-light: var(--brand-blue-secondary-light);
  
  --sc-accent: var(--brand-red-primary);
  --sc-accent-dark: var(--brand-red-dark);
  --sc-accent-light: var(--brand-red-light);
  
  --sc-highlight: var(--brand-yellow-primary);
  --sc-highlight-dark: var(--brand-yellow-dark);
  
  --sc-info: var(--brand-cyan-accent);
  --sc-info-dark: var(--brand-cyan-dark);
  --sc-info-light: var(--brand-cyan-light);
  
  /* Estados semánticos */
  --sc-success: #10B981;
  --sc-success-light: #34D399;
  --sc-success-dark: #059669;
  
  --sc-warning: #F59E0B;
  --sc-warning-light: #FBBF24;
  --sc-warning-dark: #D97706;
  
  --sc-danger: var(--brand-red-primary);
  --sc-danger-light: var(--brand-red-light);
  --sc-danger-dark: var(--brand-red-dark);
  
  /* ━━━ GRADIENTES CORPORATIVOS ━━━ */
  --gradient-primary: linear-gradient(135deg, var(--brand-blue-primary) 0%, var(--brand-cyan-accent) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--brand-blue-secondary) 0%, var(--brand-blue-primary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--brand-red-primary) 0%, var(--brand-red-light) 100%);
  --gradient-highlight: linear-gradient(135deg, var(--brand-yellow-primary) 0%, var(--brand-yellow-dark) 100%);
  --gradient-hero: linear-gradient(135deg, var(--brand-blue-secondary) 0%, var(--brand-blue-primary) 50%, var(--brand-cyan-accent) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(0, 56, 150, 0.95) 0%, rgba(66, 107, 186, 0.9) 100%);
}

/* ═══════════════════════════════════════════════════════════
   📝 TIPOGRAFÍA CORPORATIVA
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ━━━ FAMILIAS TIPOGRÁFICAS OFICIALES ━━━ */
  
  /* Raleway - Para títulos y encabezados */
  --font-heading: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-heading-heavy: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  
  /* Raleway - Para textos web, párrafos, botones y etiquetas */
  --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  
  /* Fallback para monoespaciado */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* ━━━ TAMAÑOS DE FUENTE FLUIDOS (Mobile-first) ━━━ */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  --font-size-7xl: 4.5rem;      /* 72px */
  
  /* ━━━ PESOS DE FUENTE ━━━ */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  /* ━━━ ALTURAS DE LÍNEA ━━━ */
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* ━━━ ESPACIADO DE LETRAS ━━━ */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;
}

/* Importar fuentes desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;800&display=swap');

/* Raleway Web Font - Importado desde Google Fonts */
@supports (font-family: 'Raleway') {
  body {
    font-feature-settings: "kern" 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   📐 SISTEMA DE ESPACIADO (Base 4px)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Espaciado base mínimo: 20px según planimetría del manual */
  --spacing-base: 20px;
  
  /* Escala de espaciado */
  --spacing-0: 0;
  --spacing-1: 0.25rem;    /* 4px */
  --spacing-2: 0.5rem;     /* 8px */
  --spacing-3: 0.75rem;    /* 12px */
  --spacing-4: 1rem;       /* 16px */
  --spacing-5: 1.25rem;    /* 20px - Mínimo según manual */
  --spacing-6: 1.5rem;     /* 24px */
  --spacing-7: 1.75rem;    /* 28px */
  --spacing-8: 2rem;       /* 32px */
  --spacing-10: 2.5rem;    /* 40px */
  --spacing-12: 3rem;      /* 48px */
  --spacing-16: 4rem;      /* 64px */
  --spacing-20: 5rem;      /* 80px */
  --spacing-24: 6rem;      /* 96px */
  --spacing-32: 8rem;      /* 128px */
  
  /* Espaciado de sección */
  --section-padding-sm: var(--spacing-12);
  --section-padding-md: var(--spacing-16);
  --section-padding-lg: var(--spacing-24);
}

/* ═══════════════════════════════════════════════════════════
   🎯 SISTEMA DE BORDER RADIUS
   ═══════════════════════════════════════════════════════════ */

:root {
  --radius-none: 0;
  --radius-sm: 0.25rem;     /* 4px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px - Recomendado para cards */
  --radius-3xl: 2rem;       /* 32px */
  --radius-full: 9999px;    /* Circular completo */
}

/* ═══════════════════════════════════════════════════════════
   💫 SISTEMA DE SOMBRAS
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Sombras base */
  --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 0 rgba(0, 0, 0, 0.06);
  --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);
  
  /* Sombras de marca con colores corporativos */
  --shadow-brand-blue: 0 10px 25px rgba(66, 107, 186, 0.25);
  --shadow-brand-red: 0 10px 25px rgba(236, 51, 55, 0.25);
  --shadow-brand-cyan: 0 10px 25px rgba(0, 163, 224, 0.25);
  
  /* Shadow interior */
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════
   ⚡ TRANSICIONES Y ANIMACIONES
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Duraciones */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  
  /* Funciones de easing */
  --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.27, 1.55);
  
  /* Transiciones comunes */
  --transition-fast: all var(--duration-fast) var(--ease-in-out);
  --transition-base: all var(--duration-base) var(--ease-in-out);
  --transition-slow: all var(--duration-slow) var(--ease-in-out);
}

/* ═══════════════════════════════════════════════════════════
   🎚️ Z-INDEX SCALE
   ═══════════════════════════════════════════════════════════ */

:root {
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ═══════════════════════════════════════════════════════════
   📱 BREAKPOINTS RESPONSIVOS
   ═══════════════════════════════════════════════════════════ */

:root {
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ═══════════════════════════════════════════════════════════
   🎨 APLICACIÓN BASE DE TIPOGRAFÍA CORPORATIVA
   ═══════════════════════════════════════════════════════════ */

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--brand-gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings con Raleway */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: var(--font-heading-heavy);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--brand-blue-primary);
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--font-size-5xl));
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-size: clamp(1.75rem, 4vw, var(--font-size-4xl));
  letter-spacing: var(--letter-spacing-tight);
}

h3 {
  font-size: clamp(1.5rem, 3vw, var(--font-size-3xl));
  font-family: var(--font-heading);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, var(--font-size-2xl));
  font-family: var(--font-heading);
}

h5 {
  font-size: var(--font-size-xl);
  font-family: var(--font-heading);
}

h6 {
  font-size: var(--font-size-lg);
  font-family: var(--font-heading);
}

/* ═══════════════════════════════════════════════════════════
   ♿ ACCESIBILIDAD - WCAG 2.2 AA COMPLIANCE
   ═══════════════════════════════════════════════════════════ */

/* Focus visible mejorado con colores de marca */
:focus-visible {
  outline: 3px solid var(--brand-cyan-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* En fondos oscuros, usar amarillo para mayor visibilidad */
.bg-dark :focus-visible,
[data-theme="dark"] :focus-visible {
  outline-color: var(--brand-yellow-primary);
}

/* Skip to content para lectores de pantalla */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: var(--z-tooltip);
  padding: var(--spacing-4);
  background: var(--brand-blue-primary);
  color: var(--brand-white);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  transition: top var(--duration-fast);
}

.skip-to-content:focus {
  top: 0;
}

/* ═══════════════════════════════════════════════════════════
   🎬 RESPETO POR PREFERENCIAS DE USUARIO
   ═══════════════════════════════════════════════════════════ */

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
  :root {
    --brand-blue-primary: var(--brand-blue-darker);
    --brand-red-primary: var(--brand-red-darker);
  }
}

/* ═══════════════════════════════════════════════════════════
   📝 REGLAS DE USO (Comentarios para el equipo)
   ═══════════════════════════════════════════════════════════
   
   🔴 ROJO (#EC3337):
   ✅ Usar en: Botones principales, CTA, llamados de atención
   ✅ Uso permitido: Títulos importantes, iconos de acción
   ⛔ NO usar en: Fondos completos, textos largos
   
   🟡 AMARILLO (#FFEC17):
   ✅ Usar en: Resaltar promociones, CTA secundarios, badges
   ⛔ NO usar en: Fondos principales, textos largos sobre blanco
   
   🔵 AZUL PRINCIPAL (#426BBA):
   ✅ Usar en: Títulos, encabezados, botones, iconos
   ✅ Domina la interfaz junto con rojo
   ⛔ NO mezclar con azul secundario en el mismo elemento
   
   🔵 AZUL SECUNDARIO (#003896):
   ✅ Usar en: Fondos, headers, footers, secciones destacadas
   ✅ Para contraste fuerte
   
   🔷 CELESTE (#00A3E0):
   ✅ Usar en: Fondos suaves, secciones informativas, contraste
   ✅ Complementa a los azules
   
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   
   TIPOGRAFÍA:
   
   📝 Raleway:
   ✅ Usar en: H1, H2, H3, H4, H5, H6, títulos, encabezados
   ✅ Mantener jerarquías visuales claras
   
   📝 Raleway:
   ✅ Usar en: Body, párrafos, botones, etiquetas, formularios
   ✅ Es la fuente principal para contenido y títulos
   
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   
   ESPACIADO:
   ⚠️ Mínimo 20px de margen libre (planimetría del manual)
   ✅ Usar --spacing-5 (20px) como mínimo en componentes
   
   ═══════════════════════════════════════════════════════════ */

