/* ================================================
   OPENENVELOPE — ANIMATIONS
   ================================================ */

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
              transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.40s; }
.reveal[data-d="6"] { transition-delay: 0.48s; }

/* ── Float ── */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

/* ── Pulse glow ── */
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 20px rgba(124,58,237,0.15); }
  50%      { box-shadow: 0 0 45px rgba(124,58,237,0.35); }
}
.animate-pulse { animation: pulseGlow 3s ease-in-out infinite; }

/* ── Gradient shift ── */
@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.animate-grad { background-size: 200% 200%; animation: gradShift 6s ease infinite; }

/* ── Spin (slow) ── */
@keyframes spinSlow { to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spinSlow 18s linear infinite; }

/* ── Blink ── */
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.animate-blink { animation: blink 1.4s ease-in-out infinite; }

/* ── Slide in from right ── */
@keyframes slideRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Fade in ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ── Typing cursor ── */
@keyframes cursor {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}
.typing-cursor::after {
  content: '|';
  animation: cursor 0.9s infinite;
  color: var(--cyan);
  margin-left: 2px;
}

/* Reduced motion overrides */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .animate-float,
  .animate-pulse,
  .animate-grad,
  .animate-spin-slow {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
