@keyframes flip-in {
  0% { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0); opacity: 1; }
}
.cd__num.flip {
  animation: flip-in 350ms var(--easing);
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

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

/* ---------- Section fade-ins ---------- */
[data-section] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--easing), transform 600ms var(--easing);
}
[data-section].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Button ripple ---------- */
.btn, .contact__card { position: relative; overflow: hidden; }
.floating-btn { overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 600ms ease-out;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(2.5); opacity: 0; }
}

/* ---------- Particles / confetti ---------- */
#particles-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}
.idle-heart {
  position: fixed;
  bottom: -2rem;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 180;
  opacity: 0;
  animation: float-up 6s ease-out forwards;
  color: var(--accent);
}
@keyframes float-up {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 0.85; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

.floating-btn.hint-pulse {
  animation: hint-pulse 1.6s ease-in-out 1;
}
@keyframes hint-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
  50% { transform: scale(1.18); box-shadow: 0 8px 24px var(--accent); }
}

/* ---------- Dove ---------- */
.dove {
  position: fixed;
  top: 30%;
  left: -80px;
  z-index: 180;
  pointer-events: none;
  animation: fly 3.2s linear forwards;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}
@keyframes fly {
  0%   { transform: translate(0, 0) rotate(-4deg); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate(50vw, -40px) rotate(2deg); }
  90%  { opacity: 1; }
  100% { transform: translate(110vw, -10px) rotate(-2deg); opacity: 0; }
}

.particle {
  position: absolute;
  display: inline-block;
  will-change: transform, opacity;
  animation: particle var(--life, 1000ms) cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
  user-select: none;
}
@keyframes particle {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--vx, 0), var(--vy, 0)) rotate(var(--rotate, 360deg)); opacity: 0; }
}
