/* ========================= */
/* BASE ANIMATIONS */
/* ========================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================= */
/* DIRECCIONES */
/* ========================= */
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.7s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.7s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ========================= */
/* SCALE */
/* ========================= */
.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ========================= */
/* STAGGER (para grids) */
/* ========================= */
.stagger > * {
  opacity: 0;
  transform: translateY(25px);
}

.stagger.visible > * {
  animation: staggerFade 0.6s ease forwards;
}

.stagger.visible > *:nth-child(1) { animation-delay: 0.1s; }
.stagger.visible > *:nth-child(2) { animation-delay: 0.2s; }
.stagger.visible > *:nth-child(3) { animation-delay: 0.3s; }
.stagger.visible > *:nth-child(4) { animation-delay: 0.4s; }
.stagger.visible > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================= */
/* HOVER MICROINTERACTIONS */
/* ========================= */
.card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.btn {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ========================= */
/* NAVBAR SCROLL EFFECT */
/* ========================= */
.navbar.scrolled {
  background: rgba(10, 15, 25, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

/* ========================= */
/* UNDERLINE ANIMADO */
/* ========================= */
.navbar a {
  position: relative;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 100%;
}

/* ========================= */
/* FLOATING BUTTONS */
/* ========================= */
.float-btn {
  animation: floatPulse 2.5s infinite;
}

@keyframes floatPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ========================= */
/* HERO ENTRY */
/* ========================= */
.hero h1 {
  animation: heroFade 1s ease forwards;
}

.hero p {
  animation: heroFade 1.2s ease forwards;
}

.hero-actions {
  animation: heroFade 1.4s ease forwards;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================= */
/* SMOOTH SECTION TRANSITION */
/* ========================= */
.section {
  transition: background 0.5s ease;
}

/* ========================= */
/* REDUCE MOTION (ACCESIBILIDAD) */
/* ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}