/* ==========================================================================
   APK STATION LANJOUW — ANIMATIONS
   Subtle, automotive-precision motion. GSAP handles scroll reveals via
   inline transforms; this file covers CSS-native/looping motion only.
   ========================================================================== */

/* ---------- Hero ambient glow drift ---------- */
@keyframes glowDrift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3%, 4%); }
}
.hero__glow { animation: glowDrift 14s var(--ease-in-out) infinite; }

/* ---------- Hero grid subtle pan ---------- */
@keyframes gridPan {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 56px 56px, 56px 56px; }
}
.hero__grid { animation: gridPan 26s linear infinite; }

/* ---------- Eyebrow status dot pulse ---------- */
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,140,255,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(79,140,255,0); }
}
.hero__eyebrow .dot { animation: dotPulse 2.4s ease-in-out infinite; }

/* ---------- HUD cards gentle float ---------- */
@keyframes hudFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hud-card { animation: hudFloat 6s var(--ease-in-out) infinite; }
.hero__hud--2 .hud-card { animation-delay: -3s; }

/* ---------- Scroll-reveal base state (JS toggles .is-visible) ---------- */
[data-reveal] {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal="fade-up"] { transform: translateY(30px); }
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }

/* ---------- Starfield twinkle (canvas draws motion; this is CSS fallback dots) ---------- */
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
.star-dot { animation: twinkle 3.2s ease-in-out infinite; }

/* ---------- Trust bar marquee (mobile horizontal scroll cue) ---------- */
@keyframes edgeFade {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}

/* ---------- Button magnetic press feedback ---------- */
.btn { will-change: transform; }

/* ---------- Mobile nav link stagger ---------- */
.mobile-nav__link {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.mobile-nav.is-open .mobile-nav__link { opacity: 1; transform: none; }
.mobile-nav.is-open .mobile-nav__link:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(2) { transition-delay: 0.09s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(3) { transition-delay: 0.13s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(4) { transition-delay: 0.17s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(5) { transition-delay: 0.21s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(6) { transition-delay: 0.25s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(7) { transition-delay: 0.29s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(8) { transition-delay: 0.33s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(9) { transition-delay: 0.37s; }

/* ---------- Loading shimmer (used briefly before first paint of media) ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
img[loading="lazy"]:not(.is-loaded) {
  background: linear-gradient(90deg, var(--grey-100) 25%, var(--grey-50) 37%, var(--grey-100) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* ---------- Reduced motion: kill loops, keep end states ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__glow,
  .hero__grid,
  .hero__eyebrow .dot,
  .hud-card,
  .star-dot,
  img[loading="lazy"]:not(.is-loaded) {
    animation: none !important;
  }
  [data-reveal] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .mobile-nav__link {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}
