/* ============================================
   EL CHIFLIDO - SISTEMA DE DISEÑO
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@600;700;800;900&display=swap');

:root {
  /* ========== COLORES DE MARCA ========== */
  --brand-red: #d70303;
  --brand-red-dark: #a50202;
  --brand-red-light: #ff0a0a;
  
  --brand-teal: #46bda4;
  --brand-teal-dark: #359882;
  --brand-teal-light: #5dd4ba;
  
  --brand-black: #000000;
  --brand-white: #ffffff;
  
  /* ========== COLORES FUNCIONALES ========== */
  --color-success: #46bda4;
  --color-warning: #FFB627;
  --color-error: #d70303;
  --color-info: #3B82F6;
  
  /* ========== NEUTRALES ========== */
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;
  
  /* ========== TIPOGRAFÍA ========== */
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* ========== GRADIENTES ========== */
  --gradient-primary: linear-gradient(135deg, #d70303 0%, #ff0a0a 100%);
  --gradient-secondary: linear-gradient(135deg, #46bda4 0%, #5dd4ba 100%);
  --gradient-dark: linear-gradient(135deg, #171717 0%, #404040 100%);
  --gradient-hero: linear-gradient(135deg, #d70303 0%, #46bda4 100%);
  --gradient-hero-animated: linear-gradient(270deg, #d70303, #46bda4, #d70303);
  
  /* ========== SOMBRAS ========== */
  --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);
  
  /* Sombras con glow de marca */
  --shadow-glow-red: 0 0 20px rgba(215, 3, 3, 0.3), 0 0 40px rgba(215, 3, 3, 0.1);
  --shadow-glow-teal: 0 0 20px rgba(70, 189, 164, 0.3), 0 0 40px rgba(70, 189, 164, 0.1);
  
  /* ========== TRANSICIONES ========== */
  --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-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* ========== BORDER RADIUS ========== */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* ========== SPACING ========== */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes pulse-glow-red {
  0%, 100% { box-shadow: 0 0 20px rgba(215, 3, 3, 0.3); }
  50% { box-shadow: 0 0 40px rgba(215, 3, 3, 0.6); }
}

@keyframes pulse-glow-teal {
  0%, 100% { box-shadow: 0 0 20px rgba(70, 189, 164, 0.3); }
  50% { box-shadow: 0 0 40px rgba(70, 189, 164, 0.6); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   CLASES UTILITARIAS
   ============================================ */

/* Gradientes */
.gradient-primary {
  background: var(--gradient-primary);
}

.gradient-secondary {
  background: var(--gradient-secondary);
}

.gradient-hero {
  background: var(--gradient-hero-animated);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Efectos de hover */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Glow effects */
.glow-red {
  box-shadow: var(--shadow-glow-red);
  animation: pulse-glow-red 2s ease-in-out infinite;
}

.glow-teal {
  box-shadow: var(--shadow-glow-teal);
  animation: pulse-glow-teal 2s ease-in-out infinite;
}

/* Shimmer effect */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--brand-red) 0%,
    var(--brand-red-light) 50%,
    var(--brand-red) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* Animaciones de entrada */
.animate-slide-in-up {
  animation: slide-in-up 0.4s ease-out;
}

.animate-slide-in-down {
  animation: slide-in-down 0.4s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.3s ease-out;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--brand-white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

/* Tipografía */
.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

/* ============================================
   COMPONENTES ESPECÍFICOS
   ============================================ */

/* Logo container */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-container img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Badge premium */
.badge-premium {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gradient-primary);
  color: var(--brand-white);
  box-shadow: var(--shadow-md);
}

/* Button premium */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-white);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-white);
  background: var(--gradient-secondary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Card premium */
.card-premium {
  background: var(--brand-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

/* Input premium */
.input-premium {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--neutral-900);
  background: var(--brand-white);
  transition: all var(--transition-base);
}

.input-premium:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(215, 3, 3, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .logo-container img {
    height: 32px;
  }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

/* Focus visible para teclado */
*:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

/* 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;
  }
}
