/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
:root {
  /* Colores principales */
  --primary-blue: #2563eb;
  --primary-green: #34d399;
  --dark-bg: #020617;
  --dark-card: #0f172a;
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Colores de texto */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #2563eb, #34d399);
  --gradient-card: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1),
    rgba(52, 211, 153, 0.1)
  );

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.4);

  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Bordes */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 50rem;

  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.04) 0, transparent 50%),
    radial-gradient(at 50% 0%, rgba(52, 211, 153, 0.04) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.04) 0, transparent 50%),
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  background-position: 0 0, 0 0, 0 0, center calc(var(--scroll-y, 0px) * -0.5), center calc(var(--scroll-y, 0px) * -0.5);
  z-index: -2;
  pointer-events: none;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fail-safe para AOS: Asegurar visibilidad si la animación falla */
[data-aos] {
    pointer-events: auto !important;
}

body.aos-disabled [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Forzar visibilidad inicial de textos críticos */
.hero-title, .section-title, .hero-subtitle, .section-subtitle {
    opacity: 1 !important;
    visibility: visible !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Utilidades de texto */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ============================================
   UTILIDADES GENERALES
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-white {
  background: white;
  color: var(--dark-bg);
}

.btn-white:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-blue);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ============================================
   MENSAJE DE ÉXITO
   ============================================ */
.success-message {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--primary-green);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all var(--transition-normal);
}

.success-message.show {
  opacity: 1;
  transform: translateX(0);
}

.success-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.success-content svg {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}
