/* ============================================================
   css/animations.css — Edgeway Digital Services
   ============================================================ */

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside grids */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.19s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.26s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.33s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.40s; }

.tech-grid .tech-card:nth-child(1) { transition-delay: 0.05s; }
.tech-grid .tech-card:nth-child(2) { transition-delay: 0.10s; }
.tech-grid .tech-card:nth-child(3) { transition-delay: 0.15s; }
.tech-grid .tech-card:nth-child(4) { transition-delay: 0.20s; }
.tech-grid .tech-card:nth-child(5) { transition-delay: 0.25s; }
.tech-grid .tech-card:nth-child(6) { transition-delay: 0.30s; }

/* ---------- Pulse dot (hero badge) ---------- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.6); opacity: 1; }
  50%       { box-shadow: 0 0 0 5px rgba(0, 212, 170, 0);  opacity: 0.5; }
}
.pulse-dot {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ---------- Blobs floating ---------- */
@keyframes blob-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(0.97); }
}
@keyframes blob-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-25px, 20px) scale(1.04); }
  66%       { transform: translate(20px, -10px) scale(0.98); }
}
@keyframes blob-float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -50%) scale(1.08); }
}
.blob-1 { animation: blob-float-1 10s ease-in-out infinite; }
.blob-2 { animation: blob-float-2 12s ease-in-out infinite; }
.blob-3 { animation: blob-float-3 8s ease-in-out infinite; }

/* ---------- Typewriter cursor ---------- */
@keyframes blink {
  0%, 100% { border-right-color: var(--accent2); }
  50%       { border-right-color: transparent; }
}
.typewriter-cursor {
  border-right: 3px solid var(--accent2);
  animation: blink 0.75s step-end infinite;
  padding-right: 3px;
}

/* ---------- Navbar scroll shadow ---------- */
#navbar.scrolled {
  background: rgba(10, 13, 20, 0.97);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ---------- Counter number roll ---------- */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-val { animation: count-up 0.5s ease forwards; }

/* ---------- Card shimmer on hover (service & tech) ---------- */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(108,99,255,0.04) 0%,
    rgba(0,212,170,0.04) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

/* ---------- Button ripple ---------- */
.btn-primary, .btn-outline, .submit-btn {
  position: relative;
  overflow: hidden;
}
.btn-primary::after,
.btn-outline::after,
.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:active::after,
.btn-outline:active::after,
.submit-btn:active::after { opacity: 1; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .blob-1, .blob-2, .blob-3 { animation: none; }
  .pulse-dot { animation: none; }
}
