/* Animaciones y Micro-interacciones Premium */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Cursor personalizado (opcional) */
@media (pointer: fine) {
  * {
    cursor: default;
  }

  a, button {
    cursor: pointer;
  }
}

/* Animación de entrada para hero */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: heroFadeIn 1s ease-out backwards;
}

.hero-content h1 { animation-delay: 0.1s; }
.hero-content h2 { animation-delay: 0.2s; }
.hero-content .hero-subtitle { animation-delay: 0.3s; }
.hero-content .hero-description { animation-delay: 0.4s; }
.hero-content .hero-stats { animation-delay: 0.5s; }
.hero-content .btn { animation-delay: 0.6s; }

/* Parallax sutil en scroll */
@media (prefers-reduced-motion: no-preference) {
  .parallax {
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  }
}

/* Hover effect para links con gradiente */
.gradient-link {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  transition: background-position 0.3s ease;
}

.gradient-link:hover {
  background-position: right center;
}

/* Shimmer effect para cards premium */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

/* Glow effect en hover */
.glow-on-hover {
  position: relative;
  transition: all 0.3s ease;
}

.glow-on-hover::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg,
    var(--primary-color),
    var(--primary-light),
    var(--primary-color)
  );
  background-size: 400%;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.3s ease;
  z-index: -1;
  animation: glowRotate 3s linear infinite;
}

.glow-on-hover:hover::before {
  opacity: 1;
}

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

/* Magnetic button effect */
@media (pointer: fine) {
  .magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  }
}

/* Stagger animation para listas */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Pulse animation para CTAs */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 102, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
  }
}

.pulse-cta {
  animation: pulse 2s infinite;
}

/* Text gradient animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light),
    var(--primary-color)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* Blur reveal effect */
@keyframes blurReveal {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.blur-reveal {
  animation: blurReveal 1s ease-out;
}

/* Scale on hover para imágenes */
.scale-hover {
  overflow: hidden;
}

.scale-hover img {
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.scale-hover:hover img {
  transform: scale(1.1);
}

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

.float {
  animation: float 3s ease-in-out infinite;
}

/* Rotate on hover */
.rotate-hover {
  transition: transform 0.3s ease;
}

.rotate-hover:hover {
  transform: rotate(5deg);
}

/* Slide in from sides */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
