/* ============================================
   DS LABS — ANIMATIONS CSS
   ============================================ */

/* ============================================
   KEYFRAMES
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(10, 132, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(10, 132, 255, 0.5), 0 0 80px rgba(0, 212, 255, 0.2); }
}

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

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(2deg); }
  75% { transform: translateY(10px) rotate(-2deg); }
}

@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  34% { border-radius: 70% 30% 46% 54% / 30% 29% 71% 70%; }
  67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}

@keyframes textReveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
  }
}

@keyframes numberCount {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spinDot {
  0% { transform: rotate(0deg) translateX(12px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(12px) rotate(-360deg); }
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes gradientOrb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  33% { transform: translate(30px, -30px) scale(1.1); opacity: 0.6; }
  66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.3; }
}

/* ============================================
   HERO GRADIENT ORBS
   ============================================ */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: gradientOrb 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.3), transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: -4s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
  top: 50%;
  left: 30%;
  animation-delay: -2s;
}

/* ============================================
   ANIMATED GRADIENT BACKGROUND
   ============================================ */
.animated-gradient-bg {
  background: linear-gradient(135deg, #0A84FF, #00D4FF, #6366F1, #0A84FF);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
}

/* ============================================
   SHIMMER EFFECT (Loading Skeleton)
   ============================================ */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-accent) 25%,
    var(--bg-hover) 50%,
    var(--bg-accent) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   GLOW BORDER
   ============================================ */
.glow-border {
  animation: borderGlow 3s ease-in-out infinite;
}

/* ============================================
   FLOATING ANIMATION CLASSES
   ============================================ */
.float-slow {
  animation: orbitFloat 8s ease-in-out infinite;
}

.float-medium {
  animation: orbitFloat 6s ease-in-out infinite;
  animation-delay: -2s;
}

.float-fast {
  animation: orbitFloat 4s ease-in-out infinite;
  animation-delay: -1s;
}

/* ============================================
   SECTION REVEAL ANIMATIONS (via IntersectionObserver)
   ============================================ */
[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-enabled [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade-left"] { transform: translateX(-40px); }
[data-reveal="fade-right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.9); }
[data-reveal="fade"] { transform: none; }

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */
.stagger-container .stagger-item {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-container.animated .stagger-item {
  animation: fadeUp 0.6s ease forwards;
}

.stagger-container.animated .stagger-item:nth-child(1) { animation-delay: 0.0s; }
.stagger-container.animated .stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-container.animated .stagger-item:nth-child(3) { animation-delay: 0.2s; }
.stagger-container.animated .stagger-item:nth-child(4) { animation-delay: 0.3s; }
.stagger-container.animated .stagger-item:nth-child(5) { animation-delay: 0.4s; }
.stagger-container.animated .stagger-item:nth-child(6) { animation-delay: 0.5s; }
.stagger-container.animated .stagger-item:nth-child(7) { animation-delay: 0.6s; }
.stagger-container.animated .stagger-item:nth-child(8) { animation-delay: 0.7s; }

/* ============================================
   TEXT ANIMATIONS
   ============================================ */
.text-reveal-word {
  display: inline-block;
  overflow: hidden;
}

.text-reveal-word span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal-word.revealed span { transform: translateY(0); }

/* ============================================
   CHART BARS ANIMATION
   ============================================ */
.chart-bar {
  transform-origin: bottom;
  animation: scaleInY 1s ease forwards;
  transform: scaleY(0);
}

@keyframes scaleInY {
  to { transform: scaleY(1); }
}

.chart-bar:nth-child(1) { animation-delay: 0.1s; height: 40%; }
.chart-bar:nth-child(2) { animation-delay: 0.2s; height: 65%; }
.chart-bar:nth-child(3) { animation-delay: 0.3s; height: 45%; }
.chart-bar:nth-child(4) { animation-delay: 0.4s; height: 80%; }
.chart-bar:nth-child(5) { animation-delay: 0.5s; height: 60%; }
.chart-bar:nth-child(6) { animation-delay: 0.6s; height: 90%; }
.chart-bar:nth-child(7) { animation-delay: 0.7s; height: 70%; }
.chart-bar:nth-child(8) { animation-delay: 0.8s; height: 85%; }

/* ============================================
   PARTICLE FADE
   ============================================ */
@keyframes particleFade {
  0% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5) translateY(-100px); }
}
