.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.magnetic {
  transition: transform 0.3s ease, box-shadow 0.4s ease;
}

.audio-toggle,
.button-primary {
  animation: gentle-pulse 3.4s ease-in-out infinite;
}

.polaroid {
  animation: float-card 8s ease-in-out infinite;
}

.memory-card:nth-child(2n) {
  animation-duration: 9s;
}

.memory-card:nth-child(3n) {
  animation-duration: 10s;
}

.page-glow-one {
  animation: drift-glow 14s ease-in-out infinite alternate;
}

.page-glow-two {
  animation: drift-glow 16s ease-in-out infinite alternate-reverse;
}

@keyframes gentle-pulse {
  0%, 100% {
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.18), 0 0 44px rgba(236, 72, 153, 0.12);
  }
  50% {
    box-shadow: 0 0 38px rgba(139, 92, 246, 0.3), 0 0 70px rgba(236, 72, 153, 0.18);
  }
}

@keyframes float-card {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes slow-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes drift-glow {
  from {
    transform: translate3d(-18px, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 18px, 0) scale(1.06);
  }
}

@keyframes ripple-out {
  from {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(5.4);
  }
}

@keyframes shift-background {
  0% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(10deg);
  }
  100% {
    filter: hue-rotate(-8deg);
  }
}

body[data-page="hear"]::before {
  animation: shift-background 18s ease-in-out infinite;
}

@media (hover: none), (pointer: coarse) {
  .audio-toggle,
  .button-primary,
  .polaroid,
  .page-glow-one,
  .page-glow-two {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
