/**
 * animations.css — Keyframes and animation utilities for ARK
 */

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes scroll-indicator {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  50.001% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 95% 0);
    transform: translate(-2px, 0);
  }
  10% {
    clip-path: inset(10% 0 80% 0);
    transform: translate(2px, 0);
  }
  20% {
    clip-path: inset(30% 0 50% 0);
    transform: translate(-1px, 0);
  }
  30% {
    clip-path: inset(50% 0 30% 0);
    transform: translate(1px, 0);
  }
  40% {
    clip-path: inset(70% 0 10% 0);
    transform: translate(-2px, 0);
  }
  50% {
    clip-path: inset(90% 0 0% 0);
    transform: translate(2px, 0);
  }
  60% {
    clip-path: inset(0 0 95% 0);
    transform: translate(-2px, 0);
  }
  100% {
    clip-path: inset(0 0 95% 0);
    transform: translate(0, 0);
  }
}

@keyframes float-badge {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulse-green {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(204, 255, 0, 0);
  }
}

@keyframes pulse-fab {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━ ANIMATION UTILITIES ━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.animate-marquee {
  animation: marquee 28s linear infinite;
  display: flex;
  width: max-content;
}

.animate-fade-up {
  animation: fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float-badge {
  animation: float-badge 3s ease-in-out infinite;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━ GLITCH TEXT ━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--accent);
  animation: glitch 6s ease-in-out infinite;
  animation-delay: 2s;
}
