/* =========================================================
   eGREGious — Motion
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.9) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.12) rotate(8deg); }
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-2.5%, 1.8%, 0); }
}

@keyframes shimmer {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

@keyframes floatSpark {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.45; }
  50%      { transform: translateY(-12px) rotate(14deg); opacity: 1; }
}

.spark {
  animation: floatSpark 7s ease-in-out infinite;
}

.spark:nth-of-type(2) { animation-delay: 1.3s; }
.spark:nth-of-type(3) { animation-delay: 2.6s; }
.spark:nth-of-type(4) { animation-delay: 3.9s; }

/* Respect users who don't want motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
