/* ===========================
   EHITRAIT — animations.css
   =========================== */

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.services-grid .reveal:nth-child(1) { transition-delay: 0s; }
.services-grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.14s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.21s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.28s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.35s; }

.work-grid .reveal:nth-child(1) { transition-delay: 0s; }
.work-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.work-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(92,240,160,0.8); }
  50% { opacity: 0.5; box-shadow: 0 0 18px rgba(92,240,160,0.3); }
}

/* Float animation for code card */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.hero-visual { animation: float 5s ease-in-out infinite; }

/* Orb slow drift */
@keyframes drift1 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(30px, 20px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-20px, 30px); }
}
.orb-1 { animation: drift1 12s ease-in-out infinite; }
.orb-2 { animation: drift2 15s ease-in-out infinite; }

/* Stat counter fade-in */
.stat-num { transition: color 0.3s; }

/* Button ripple-like hover */
.btn-primary {
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.btn-primary:hover::after { transform: scaleX(1); }

/* Service card icon bounce on hover */
.service-card:hover .service-icon {
  animation: iconBounce 0.4s ease;
}
@keyframes iconBounce {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-6px); }
  70%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

/* Typing cursor in hero */
.hero-title::after {
  content: '';
  display: inline-block;
  width: 3px; height: 0.8em;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
  opacity: 0;
}
@keyframes blink {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}
