/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====================== VARIABLES - MODO CLARO ====================== */
:root {
  --bg: #f8fafc;
  --fg: #0f172a;
  --card: #ffffff;
  --primary: #00d4ff;
  --primary-fg: #0b1324;
  --muted: #64748b;
  --border: #e2e8f0;
  --secondary: #f1f5f9;
  --radius: 0.75rem;
}

/* ====================== VARIABLES - MODO OSCURO ====================== */
.dark {
  --bg: #0b1124;
  --fg: #e2e8f5;
  --card: #131b35;
  --primary: #00d4ff;
  --primary-fg: #0b1324;
  --muted: #a3b4d1;
  --border: #1e2a47;
  --secondary: #1a2340;
}

/* ===== BASE GENERAL ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

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

.container-narrow {
  max-width: 800px;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.07; }
  50% { opacity: 0.14; }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

.gradient-text {
  background: linear-gradient(135deg, #00d4ff, #00b8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(11, 17, 36, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}
.header.scrolled {
  background: rgba(19, 27, 53, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-name {
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.desktop-nav > a,
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
.desktop-nav > a:hover,
.nav-link:hover {
  color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
}

.mega-menu-content {
  background: var(--card);
  border-radius: 1.25rem;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  padding: 2rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}

/* ===== HERO GRADIENT FIX ===== */

/* Modo claro */
.hero-gradient {
  background: linear-gradient(135deg, #ffffff, #eeeeee);
}

/* Modo oscuro (forzado correctamente) */
.dark .hero-gradient {
  background: linear-gradient(135deg, #0b1124 0%, #131b35 50%, #0b1124 100%) !important;
}

/* ====================== MODO OSCURO - REGLAS ESPECÍFICAS (solo lo necesario) ====================== */
.dark .section,
.dark .stats-section {
  background: var(--bg);
}

.dark .glow-card {
  background: var(--card);
  border-color: var(--border);
}

.dark .intro-text p,
.dark .section-header p,
.dark .glow-card p,
.dark .stat-item p,
.dark .contact-card > p,
.dark .contact-sub {
  color: var(--muted);
}

.dark .section-title-left,
.dark .cta-content h2 {
  color: var(--fg);
}

.dark .hero-content h1,
.dark .hero-content > p {
  color: var(--fg);
}

.dark .mega-menu-content {
  background: var(--card);
  border-color: var(--border);
}

.dark .btn-outline {
  border-color: var(--border);
  color: var(--fg);
}


.hero-glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: hsla(187, 100%, 50%, 0.08);
  filter: blur(130px);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid hsla(187, 100%, 50%, 0.35);
  background: hsla(187, 100%, 50%, 0.1);
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

/* Corrección de visibilidad del texto principal del Hero */
.hero-content h1,
.hero-content > p {
  color: var(--fg);
}


.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-content > p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
  margin-top: 1rem;
  width: 100%;
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,17,36,0.7), transparent);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--fg); }
.btn-outline:hover { background: var(--secondary); }
.btn-cta { background: linear-gradient(135deg, #22d3ee, #06b6d4); color: #0b1324; font-weight: 600; }
.btn-cta:hover { filter: brightness(1.1); }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #0a1f3f, #0f3b6d, #0a2540) !important;
}
.cta-content h2,
.cta-content > p {
  color: #ffffff;
}

/* ===== SECTIONS, FEATURES, STATS, etc. ===== */
.section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto;
}
.section-title-left {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}
.intro-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.glow-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 0 40px hsla(187, 100%, 50%, 0.05);
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}
.glow-card:hover {
  box-shadow: 0 0 60px hsla(187, 100%, 50%, 0.14);
  border-color: hsla(187, 100%, 50%, 0.4);
  transform: translateY(-2px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: hsla(187, 100%, 50%, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}
.feature-icon-lg {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
}
.glow-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.glow-card p {
  color: var(--muted);
  line-height: 1.7;
}

.stats-section {
  position: relative;
}
.stats-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: hsla(187, 100%, 50%, 0.06);
  filter: blur(150px);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.stat-item p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.cap-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.cap-row .feature-icon {
  margin-bottom: 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--muted);
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: hsla(187, 100%, 50%, 0.07);
  filter: blur(120px);
  pointer-events: none;
}
.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.cta-content h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  max-width: 48rem;
  line-height: 1.2;
}
.cta-content > p {
  font-size: 1.125rem;
  max-width: 36rem;
}

/* ===== CONTACT & FOOTER ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.contact-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-card .feature-icon {
  margin-bottom: 1.25rem;
}
.contact-card h3 {
  margin-bottom: 0.5rem;
}
.contact-card > p {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}
.contact-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.footer-pro {
  background: #080b14;
  color: #aaa;
  padding: 80px 20px 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}
.footer-pro h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 14px;
}
.footer-pro a {
  display: block;
  text-decoration: none;
  color: #888;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.3s;
}
.footer-pro a:hover {
  color: #00d4ff;
}
.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
  .hero-image {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .hero {
    padding: 3rem 0 2rem;
  }
  .hero-image {
    height: 200px;
  }
  .section {
    padding: 3.5rem 0;
  }
}