/* ============================================================
   Dreamit Technology Ltd — Animations Stylesheet
   animations.css: keyframes, scroll-triggered animation classes
   ============================================================ */

/* ----- Base state (before animation fires) ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Delay utilities */
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* Fade-in only (no translate) */
.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.fade-in.animated { opacity: 1; }

/* Slide from left */
.slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.slide-left.animated { opacity: 1; transform: translateX(0); }

/* Slide from right */
.slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.slide-right.animated { opacity: 1; transform: translateX(0); }

/* Scale up */
.scale-up {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scale-up.animated { opacity: 1; transform: scale(1); }

/* ----- Keyframe Animations ----- */

/* Page entrance — hero text */
@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse for CTA buttons */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 4px 20px rgba(32, 190, 74, 0.25); }
  50% { box-shadow: 0 4px 32px rgba(32, 190, 74, 0.5); }
}

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

/* Spin (for loading states) */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Shimmer (for skeletons / image placeholders) */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* Counter number flip */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Hero animated entrance ----- */
.hero-text {
  animation: hero-enter 0.9s ease forwards;
}
.hero-eyebrow { animation: hero-enter 0.7s 0.1s ease both; }
.hero-text h1 { animation: hero-enter 0.7s 0.2s ease both; }
.hero-sub { animation: hero-enter 0.7s 0.35s ease both; }
.hero-cta-group { animation: hero-enter 0.7s 0.5s ease both; }
.hero-badges { animation: hero-enter 0.7s 0.65s ease both; }

/* ----- Stat number animation ----- */
.stat-number { animation: count-up 0.5s ease both; }

/* ----- Image placeholder shimmer ----- */
.img-placeholder {
  background: linear-gradient(
    90deg,
    var(--gray-100) 25%,
    var(--gray-200) 50%,
    var(--gray-100) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
}

/* ----- Scroll progress bar (optional) ----- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--green);
  z-index: 1001;
  transition: width 0.1s linear;
  width: 0%;
}

/* ----- Hover lift utilities ----- */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ----- Underline link animation ----- */
.animated-link {
  position: relative;
}
.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.3s ease;
}
.animated-link:hover::after { width: 100%; }

/* ----- Reduce motion override ----- */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .fade-in,
  .slide-left,
  .slide-right,
  .scale-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-text,
  .hero-eyebrow,
  .hero-text h1,
  .hero-sub,
  .hero-cta-group,
  .hero-badges {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .img-placeholder {
    animation: none;
    background: var(--gray-100);
  }

  .whatsapp-float {
    animation: none;
  }

  .scroll-line { animation: none; }
}
