/* ==========================================================================
   NexovianTec — animation.css
   Keyframes + scroll-reveal animation classes
   ========================================================================== */

/* ---------- Scroll reveal base states ---------- */
.fade-up, .fade-left, .fade-right, .zoom-in, .scale-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(.25,.1,.25,1), transform 0.8s cubic-bezier(.25,.1,.25,1);
}

.fade-up { transform: translateY(40px); }
.fade-left { transform: translateX(-50px); }
.fade-right { transform: translateX(50px); }
.zoom-in { transform: scale(0.9); }
.scale-in { transform: scale(0.85); }

.fade-up.in-view,
.fade-left.in-view,
.fade-right.in-view,
.zoom-in.in-view,
.scale-in.in-view {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger children of grids when revealed */
.services-grid .service-card,
.portfolio-grid .portfolio-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.services-grid.in-view .service-card,
.portfolio-grid.in-view .portfolio-item {
  opacity: 1;
  transform: translateY(0);
}
.services-grid.in-view .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid.in-view .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid.in-view .service-card:nth-child(3) { transition-delay: 0.19s; }
.services-grid.in-view .service-card:nth-child(4) { transition-delay: 0.26s; }
.services-grid.in-view .service-card:nth-child(5) { transition-delay: 0.33s; }
.services-grid.in-view .service-card:nth-child(6) { transition-delay: 0.4s; }

/* ---------- Floating animation ---------- */
.float-anim { animation: floatY 6s ease-in-out infinite; }

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
}

.float-anim-slow { animation: floatYSlow 7s ease-in-out infinite; }

@keyframes floatYSlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-14px) scale(1.015); }
}

/* ---------- Floating shapes in hero ---------- */
.shape-1 { animation: floatY 7s ease-in-out infinite; }
.shape-2 { animation: floatY 5.5s ease-in-out infinite reverse; }
.shape-3 { animation: floatSpin 12s linear infinite; }

@keyframes floatSpin {
  0% { transform: rotate(-15deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-20px); }
  100% { transform: rotate(-15deg) translateY(0); }
}

/* ---------- Gradient drift ---------- */
.hero-gradient-1 { animation: drift1 10s ease-in-out infinite alternate; }
.hero-gradient-2 { animation: drift2 12s ease-in-out infinite alternate; }

@keyframes drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 30px) scale(1.1); }
}
@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.05); }
}

@keyframes ctaDrift {
  0% { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(20px, -15px) rotate(6deg); }
}

@keyframes techPan {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-220px, -220px); }
}

/* ---------- Typing cursor blink ---------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- Scroll indicator dot ---------- */
@keyframes scrollDot {
  0% { top: 8px; opacity: 1; }
  70% { top: 24px; opacity: 0.3; }
  100% { top: 8px; opacity: 0; }
}

/* ---------- Marquee slide (word slide animation) ---------- */
@keyframes marqueeSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Ripple ---------- */
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ---------- Particle drift ---------- */
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-140px) translateX(20px); opacity: 0; }
}

/* ---------- Counter pulse on trigger ---------- */
.stat-number.counting { animation: counterPulse 0.4s ease; }
@keyframes counterPulse {
  0% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ---------- Card hover shine (services / portfolio already handled via transform) ---------- */
.service-card, .portfolio-item, .review-card {
  will-change: transform;
}
