/* ==========================================================================
   MOTION & TRANSITION ENGINE: Files/animations.css
   PURPOSE: Powers 3D card flips, drifting ambient orbs, soundwave visualizer
   pulses, interactive haptics, and toast entrance notifications.
   ========================================================================== */

/* Ambient Drifting Mesh Background Keyframes */
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(120px, 90px) scale(1.15); }
  100% { transform: translate(-70px, 130px) scale(0.95); }
}

@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-110px, -80px) scale(1.1); }
  100% { transform: translate(60px, -60px) scale(0.9); }
}

@keyframes orbDrift3 {
  0%   { transform: translate(0, 0) scale(0.95); opacity: 0.3; }
  50%  { transform: translate(90px, -100px) scale(1.2); opacity: 0.55; }
  100% { transform: translate(-80px, 50px) scale(1); opacity: 0.35; }
}

/* Card 3D Flip System */
.flip-scene {
  perspective: 1200px;
  width: 100%;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 280px;
  transform-style: preserve-3d;
  transition: transform 0.65s var(--ease-elastic);
  border-radius: 18px;
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.flip-face-back {
  transform: rotateY(180deg);
}

/* Micro-Interaction Animations */
@keyframes pulseGlowRing {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes creatorSoundwave {
  0%   { height: 4px; opacity: 0.4; }
  100% { height: 22px; opacity: 1; }
}

@keyframes creatorPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes creatorShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-message {
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface-opaque);
  border: 1px solid var(--border-light);
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastSlideIn 0.3s var(--ease-elastic);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hover Lift Utilities */
.hover-lift {
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
}