/* =========================================================
   ANIMATIONS — Gentle, emotional motion
   ========================================================= */

/* Gentle float */
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-float {
  animation: gentle-float 4s ease-in-out infinite;
}

/* Tape lift on hover */
@keyframes tape-lift {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-2px); }
}

.washi-tape.animate-lift {
  animation: tape-lift 3s ease-in-out infinite;
}

/* Paper rustle — subtle movement */
@keyframes paper-rustle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(0.3deg); }
  75% { transform: rotate(-0.3deg); }
}

.animate-rustle {
  animation: paper-rustle 6s ease-in-out infinite;
}

/* Fade in from below */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 1s var(--ease-gentle) forwards;
}

/* Staggered children fade */
.stagger-children > * {
  opacity: 0;
  animation: fade-up 0.8s var(--ease-gentle) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.55s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.7s; }

.stagger-complete > * {
  opacity: 1;
  animation: none;
}

/* Envelope opening sparkle */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* Page turn shadow */
@keyframes page-shadow {
  0% { opacity: 0; }
  50% { opacity: 0.3; }
  100% { opacity: 0; }
}

/* Ink writing effect */
@keyframes ink-appear {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.animate-ink {
  animation: ink-appear 2s var(--ease-gentle) forwards;
}

/* Twinkle for decorative elements */
@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.animate-twinkle {
  animation: twinkle 3s ease-in-out infinite;
}

/* Slow rotation for pressed flowers */
@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .petal {
    display: none;
  }
}
