/* ============================================================
   LITEMIND — Animations
   Keyframes & animation utilities
   ============================================================ */

/* ---------- Gradient Shift ---------- */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Fade In Up ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Fade In Scale ---------- */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Fade In Left ---------- */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Fade In Right ---------- */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ---------- Float Slow ---------- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25%      { transform: translateY(-15px) rotate(2deg); }
  75%      { transform: translateY(10px) rotate(-2deg); }
}

/* ---------- Pulse Glow ---------- */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--primary-glow),
                0 0 40px transparent;
  }
  50% {
    box-shadow: 0 0 30px var(--primary-glow),
                0 0 60px var(--primary-glow);
  }
}

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

/* ---------- Breathe ---------- */
@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.6;
  }
}

/* ---------- Breathe Circle ---------- */
@keyframes breathe-circle {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

/* ---------- Rotate Slow ---------- */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Typewriter Cursor ---------- */
@keyframes blink-caret {
  0%, 50% { border-color: var(--primary); }
  51%, 100% { border-color: transparent; }
}

/* ---------- Slide In from Bottom (for chat bubbles) ---------- */
@keyframes slideInBubble {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Typing Dots ---------- */
@keyframes typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ---------- Check Mark Draw ---------- */
@keyframes draw-check {
  0%   { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

/* ---------- Circle Draw ---------- */
@keyframes draw-circle {
  0%   { stroke-dashoffset: 166; }
  100% { stroke-dashoffset: 0; }
}

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

/* ---------- Orb Drift ---------- */
@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(30px, -50px) scale(1.1); }
  50%      { transform: translate(-20px, -80px) scale(0.95); }
  75%      { transform: translate(-40px, -30px) scale(1.05); }
}

@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-50px, 30px) scale(0.9); }
  50%      { transform: translate(40px, 60px) scale(1.15); }
  75%      { transform: translate(20px, -20px) scale(1); }
}

@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, 40px) scale(1.1); }
  66%      { transform: translate(-30px, 70px) scale(0.9); }
}

/* ---------- Scale In ---------- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Shake (for errors) ---------- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-8px); }
  50%      { transform: translateX(8px); }
  75%      { transform: translateX(-4px); }
}

/* ============================================================
   ANIMATION UTILITIES
   ============================================================ */

.animate-float       { animation: float 6s ease-in-out infinite; }
.animate-float-slow  { animation: float-slow 8s ease-in-out infinite; }
.animate-breathe     { animation: breathe 4s ease-in-out infinite; }
.animate-rotate-slow { animation: rotate-slow 30s linear infinite; }
.animate-pulse-glow  { animation: pulse-glow 3s ease-in-out infinite; }
.animate-spin        { animation: spin 1s linear infinite; }

.animate-shimmer {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(179, 157, 219, 0.08) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* Delay modifiers */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-700 { animation-delay: 700ms; }
.delay-1000 { animation-delay: 1000ms; }

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
