/* ============================================================
   animations.css — Softly Animations
   ============================================================ */

/* ── Blob float ──────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Slow float (blobs) ──────────────────────────────────── */
@keyframes blob-float {
  0%, 100% { transform: translate(0px, 0px) scale(1); }
  33%       { transform: translate(20px, -15px) scale(1.03); }
  66%       { transform: translate(-10px, 10px) scale(0.98); }
}

/* ── Reveal up (scroll reveal) ───────────────────────────── */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Fade in ─────────────────────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ── Scale pop ───────────────────────────────────────────── */
@keyframes scale-pop {
  0%   { transform: scale(0.92); opacity: 0; }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── Cell appear ─────────────────────────────────────────── */
@keyframes cell-appear {
  0%   { opacity: 0; transform: scale(0.7) rotate(8deg); }
  80%  { transform: scale(1.04) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ── Shimmer ─────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── Spin slow ───────────────────────────────────────────── */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Grad shift ──────────────────────────────────────────── */
@keyframes grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Pulse ───────────────────────────────────────────────── */
@keyframes pulse-coral {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,183,178,0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(255,183,178,0); }
}

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

/* ── Twinkle ─────────────────────────────────────────────── */
@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── Utility animation classes ───────────────────────────── */
.anim-fade-up   { animation: fade-in-up 0.6s var(--ease-out) both; }
.anim-fade-in   { animation: fade-in    0.4s var(--ease-out) both; }
.anim-scale-pop { animation: scale-pop  0.5s var(--ease-out) both; }
.anim-float     { animation: float 4s ease-in-out infinite; }

/* Reveal on scroll (JS adds .revealed) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }
.stagger > *:nth-child(5) { animation-delay: 0.33s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }
.stagger > *:nth-child(7) { animation-delay: 0.47s; }
.stagger > *:nth-child(8) { animation-delay: 0.54s; }
