/* =================== VARIABLES =================== */
:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #0f1419;
  --bg-tertiary: #151a21;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.55);
  
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-strong: #8b5cf6;
  --accent-dark: #7c3aed;
  
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-strong));
  --gradient-mesh: radial-gradient(at 40% 20%, hsla(270, 100%, 70%, 0.15) 0px, transparent 50%),
                   radial-gradient(at 80% 80%, hsla(290, 100%, 60%, 0.12) 0px, transparent 50%),
                   radial-gradient(at 20% 90%, hsla(250, 100%, 70%, 0.1) 0px, transparent 50%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
  
  --container: 1280px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================== SCROLLBAR PERSONALIZADO =================== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-accent);
  border-radius: 6px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-strong) var(--bg-primary);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 80%, rgba(167, 139, 250, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 30% 70%, rgba(196, 181, 253, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.22) 0%, transparent 55%);
  animation: galaxyMove 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes galaxyMove {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 80% 10%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 30% 80%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.5), transparent);
  background-size: 200% 200%;
  animation: twinkle 8s ease-in-out infinite;
}

.stars::after {
  animation-delay: 4s;
  opacity: 0.5;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

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

/* =================== PARTICLE BACKGROUND =================== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* =================== NAVIGATION =================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 14, 20, 0.8);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(10, 14, 20, 0.95);
  border-bottom-color: var(--border-bright);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
}

.logo-wrapper {
  position: relative;
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.badge {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-bright);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  filter: blur(8px);
}

.nav-link:hover::before {
  opacity: 0.5;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.nav-cta {
  background: rgba(139, 92, 246, 0.12);
  color: #fff;
  border: 1px solid var(--accent-strong);
  box-shadow: 0 10px 28px -12px rgba(139, 92, 246, .6);
  font-weight: 600;
}

.nav-cta:hover {
  background: rgba(139, 92, 246, .15);
  box-shadow: 0 14px 36px -12px rgba(139, 92, 246, .75);
  border-color: var(--accent);
}

.nav-cta.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* =================== MAIN APP =================== */
.app-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-top: 80px;
}

/* =================== HERO SECTION =================== */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero-container {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-bright) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.7;
}

/* =================== HERO TAGS/PILLS MEJORADAS =================== */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.tag {
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.3);
}

.tag:active {
  transform: translateY(-1px) scale(1.02);
}

.tag-icon {
  width: 20px;
  height: 20px;
  padding: 4px;
  background: var(--gradient-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tag-icon svg {
  width: 100%;
  height: 100%;
  color: white;
}

@keyframes tagPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(139, 92, 246, 0);
  }
}

.tag.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-bright);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 0 40px rgba(139, 92, 246, 0.3);
  animation: tagPulse 2s infinite;
}

.tag-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 100;
}

.tag-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--accent);
}

.tag:hover .tag-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6), 0 0 60px rgba(139, 92, 246, 0.4), 0 12px 40px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
}

/* =================== HERO VISUAL CARRUSEL 3D =================== */
.hero-visual {
  position: relative;
  height: 650px;
  perspective: 2000px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.carousel-3d {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-container {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 380px;
  height: 380px;
  transform-style: preserve-3d;
  transform: translateX(-50%) translateY(-50%) rotateX(-10deg);
  transition: transform 0.1s linear;
  cursor: grab;
}

.carousel-container:active {
  cursor: grabbing;
}

.visual-card {
  position: absolute;
  width: 100%;
  height: 480px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(139, 92, 246, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: visible;
}

/* Efecto de glow brillante */
.visual-card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 26px;
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0) 0%,
    rgba(139, 92, 246, 0.3) 50%,
    rgba(167, 139, 250, 0) 100%
  );
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.4s ease;
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Líneas de energía */
.visual-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: 
    linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: energyScan 4s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes energyScan {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.visual-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 40px rgba(139, 92, 246, 0.6),
    0 0 80px rgba(139, 92, 246, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(1.05) translateZ(50px);
}

.visual-card:hover::before {
  opacity: 1;
  animation: glowPulse 1.5s ease-in-out infinite;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 
    0 8px 32px rgba(139, 92, 246, 0.5),
    0 0 0 4px rgba(139, 92, 246, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Anillos orbitando el icono */
.card-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  animation: orbitRing 3s linear infinite;
}

.card-icon::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 24px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  animation: orbitRing 4s linear infinite reverse;
}

@keyframes orbitRing {
  0% { transform: rotate(0deg) scale(1); opacity: 0.3; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.6; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.3; }
}

.visual-card:hover .card-icon {
  transform: scale(1.15) rotateY(360deg);
  box-shadow: 
    0 12px 48px rgba(139, 92, 246, 0.8),
    0 0 60px rgba(167, 139, 250, 0.6),
    0 0 0 6px rgba(139, 92, 246, 0.2);
}

.card-icon svg {
  width: 32px;
  height: 32px;
  color: white;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s;
}

.visual-card:hover .card-icon svg {
  transform: scale(1.1);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-align: center;
  background: linear-gradient(135deg, #ffffff, var(--accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s;
}

.visual-card:hover .card-title {
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
  transform: scale(1.05);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  text-align: center;
  transition: color 0.3s;
}

.visual-card:hover .card-desc {
  color: var(--text-secondary);
}

.card-metric {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.metric-item {
  text-align: center;
  transition: all 0.3s;
}

.visual-card:hover .metric-item {
  transform: translateY(-5px) scale(1.05);
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s;
}

.visual-card:hover .metric-value {
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-accent);
  color: white;
  font-size: 0.7rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
  animation: badgeBounce 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
}

.visual-card:hover .card-badge {
  animation: badgeBounce 1s ease-in-out infinite;
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.8);
}

/* Controles del carrusel */
.carousel-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 100;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--accent-bright);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.carousel-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* Hint */
.carousel-hint {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-tertiary);
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.7;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* =================== SECTIONS =================== */
.section {
  padding: 6rem 2rem;
  position: relative;
}

.section-container {
  max-width: var(--container);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =================== GRID LAYOUTS =================== */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* =================== CARDS CON EFECTO FLIP =================== */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  perspective: 1000px;
  min-height: 280px;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.3), 0 16px 48px rgba(139, 92, 246, 0.3);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 280px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-front {
  transform: rotateY(0deg);
}

.card-front .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: all 0.3s;
}

.card-front .card-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.card:hover .card-front .card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.6);
}

.card-front h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-front p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

.card-back {
  transform: rotateY(180deg);
  background: rgba(139, 92, 246, 0.08);
}

.card-back h4 {
  color: var(--accent-bright);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.card-back p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.card-back ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.card-back ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.card-back ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.card-back .back-label {
  font-size: 0.8rem;
  color: var(--accent-bright);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.3), 0 16px 48px rgba(139, 92, 246, 0.3);
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-inner .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: all 0.3s;
}

.card-inner .card-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

/* =================== FOOTER =================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 2;
}

.footer-content {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-brand .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-desc {
  color: var(--text-tertiary);
  line-height: 1.6;
  max-width: 350px;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.footer-col a {
  display: block;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
  transition: var(--transition);
  position: relative;
  padding-left: 1rem;
}

.footer-col a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent-bright);
  transform: translateX(4px);
}

.footer-col a:hover::before {
  width: 8px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-visual {
    height: 400px;
  }
  
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 4rem 1.5rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* =================== UTILITIES =================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* =================== EFECTOS ADICIONALES =================== */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
  z-index: -1;
}

.section-title:hover::after {
  width: 120%;
  height: 200%;
}

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}

@keyframes codeFlow {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(5px); }
}

.code-lines span {
  animation: codeFlow 3s ease-in-out infinite;
}

.code-lines span:nth-child(1) { animation-delay: 0s; }
.code-lines span:nth-child(2) { animation-delay: 0.3s; }
.code-lines span:nth-child(3) { animation-delay: 0.6s; }
.code-lines span:nth-child(4) { animation-delay: 0.9s; }
.code-lines span:nth-child(5) { animation-delay: 1.2s; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

.badge {
  animation: pulse 2s ease-in-out infinite;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(167, 139, 250, 0.3), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(139, 92, 246, 0.3), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(196, 181, 253, 0.2), transparent),
    radial-gradient(2px 2px at 80% 10%, rgba(167, 139, 250, 0.3), transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: moveParticles 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes moveParticles {
  0%, 100% { background-position: 0% 0%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5)); }
  50% { filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.8)); }
}

.logo-icon {
  animation: logoFloat 3s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
}

.metric-value, .card h3 {
  position: relative;
  display: inline-block;
}

.h1, .section-title {
  text-shadow: 0 0 40px rgba(167, 139, 250, 0.15);
}

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.section-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  margin: 1.5rem auto 0;
  border-radius: 2px;
  animation: lineGrow 0.8s ease-out;
}

.grid > * {
  animation: fadeInUp 0.6s ease-out backwards;
}

.grid > *:nth-child(1) { animation-delay: 0.1s; }
.grid > *:nth-child(2) { animation-delay: 0.2s; }
.grid > *:nth-child(3) { animation-delay: 0.3s; }
.grid > *:nth-child(4) { animation-delay: 0.4s; }
.grid > *:nth-child(5) { animation-delay: 0.5s; }
.grid > *:nth-child(6) { animation-delay: 0.6s; }

.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-accent);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* =================== HOVER GLOW FIX PACK v2 (appended by ChatGPT) =================== */
/* Asegura brillo morado visible en botones genéricos, nav-cta, cards y pills */

/* 1) Botón base (.btn) — en este CSS solo había :hover en variantes.
      Si tu HTML usa .btn sin variante, ahora tendrá glow. */
.btn:hover,
.btn:focus-visible{
  transform: translateY(-2px);
  box-shadow:
    0 0 22px rgba(139,92,246,.55),
    0 0 44px rgba(139,92,246,.35),
    0 10px 28px rgba(0,0,0,.28);
  outline: none;
}

/* 2) CTA de navegación (más potencia al glow) */
.nav-cta:hover,
.nav-cta:focus-visible{
  background: rgba(139, 92, 246, .18);
  box-shadow:
    0 0 24px rgba(139,92,246,.55),
    0 0 48px rgba(139,92,246,.35),
    0 14px 36px -12px rgba(139,92,246,.75);
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

/* 3) Cards planas (.card) — refuerzo suave del halo morado ya definido */
.card:hover,
.card:focus-visible{
  border-color: var(--accent);
  box-shadow:
    0 0 25px rgba(139,92,246,.50),
    0 0 50px rgba(139,92,246,.30),
    0 16px 48px rgba(139,92,246,.30);
  outline: none;
}

/* 4) Pills: añade soporte si tu HTML usa .pill además de .tag */
.pill,
.tag{
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pill:hover,
.pill:focus-visible,
.tag:focus-visible{
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow:
    0 0 25px rgba(139,92,246,.50),
    0 0 50px rgba(139,92,246,.30),
    0 8px 22px rgba(0,0,0,.25);
  outline: none;
}
/* =================== /HOVER GLOW FIX PACK v2 =================== */
