/* =====================================================================
   ANIMATIONS — the emotional choreography.
   Nothing snaps. Everything blooms, drifts, glows, or whispers in.
   ===================================================================== */

/* ---- Entrances ----------------------------------------------------- */
@keyframes bloom-in {
  0%   { opacity: 0; transform: translateY(26px) scale(0.97); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes whisper-in {
  0%   { opacity: 0; transform: translateY(14px); letter-spacing: 0.02em; }
  100% { opacity: 1; transform: translateY(0); letter-spacing: 0; }
}
@keyframes fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes scale-in {
  0%   { opacity: 0; transform: scale(0.9); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* reveal utility (driven by IntersectionObserver) */
.reveal            { opacity: 0; }
.reveal.is-visible { animation: bloom-in 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

.reveal-soft            { opacity: 0; }
.reveal-soft.is-visible { animation: whisper-in 1.1s ease forwards; }

.reveal-scale            { opacity: 0; }
.reveal-scale.is-visible { animation: scale-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* stagger helpers */
.is-visible.d1 { animation-delay: 0.10s; }
.is-visible.d2 { animation-delay: 0.22s; }
.is-visible.d3 { animation-delay: 0.34s; }
.is-visible.d4 { animation-delay: 0.46s; }
.is-visible.d5 { animation-delay: 0.58s; }
.is-visible.d6 { animation-delay: 0.70s; }

/* ---- Ambient / looping -------------------------------------------- */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes float-card {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(0.4deg); }
}
@keyframes drift {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(16px, -14px); }
  66%  { transform: translate(-12px, 10px); }
  100% { transform: translate(0, 0); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 38px 6px var(--accent-glow); }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.10); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.08); }
  70%      { transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.04); opacity: 1; }
}
@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ripple {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(2.6); opacity: 0; }
}
@keyframes gradient-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Classes ------------------------------------------------------- */
.float-soft   { animation: float-soft 7s ease-in-out infinite; }
.float-card   { animation: float-card 9s ease-in-out infinite; }
.drift        { animation: drift 18s ease-in-out infinite; }
.glow-pulse   { animation: glow-pulse 4.5s ease-in-out infinite; }
.heartbeat    { animation: heartbeat 2.6s ease-in-out infinite; }
.breathe      { animation: breathe 6s ease-in-out infinite; }
.slow-spin    { animation: slow-spin 60s linear infinite; }

/* text gradient shimmer */
.text-shimmer {
  background: linear-gradient(100deg, var(--text), var(--accent), var(--text));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

/* hover glow utilities */
.hover-glow { transition: box-shadow 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.hover-glow:hover { transform: translateY(-6px); box-shadow: 0 0 40px -6px var(--accent-glow); }

/* ripple element on buttons */
.ripple-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  pointer-events: none;
  animation: ripple 0.9s ease-out forwards;
}

/* reduced motion — respect the visitor */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
