/* ════════════════════════════════════════
   animations.css — keyframes + pre-GSAP base states
   ════════════════════════════════════════ */

@keyframes blink   { 50% { opacity: 0; } }
@keyframes bob     { 50% { transform: translateY(4px); } }
@keyframes idle    { 50% { transform: translateY(-3%); } }
@keyframes grid-run { to { background-position: 0 0, 0 0, 0 64px; } }

/* Occasional glitch burst on headings */
@keyframes glitch-a {
  0%, 86%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
  87% { opacity: .9; clip-path: inset(10% 0 60% 0); transform: translateX(-5px); }
  89% { opacity: .9; clip-path: inset(55% 0 20% 0); transform: translateX(4px); }
  91% { opacity: .9; clip-path: inset(30% 0 45% 0); transform: translateX(-2px); }
  93% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 88%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
  89% { opacity: .9; clip-path: inset(70% 0 5% 0); transform: translateX(5px); }
  91% { opacity: .9; clip-path: inset(15% 0 70% 0); transform: translateX(-4px); }
  94% { opacity: 0; }
}
.glitch::before { animation: glitch-a 4.5s steps(1) infinite; }
.glitch::after  { animation: glitch-b 4.5s steps(1) infinite .1s; }
.glitch--alt::before { animation-delay: 1.3s; }
.glitch--alt::after  { animation-delay: 1.4s; }

/* Elements GSAP reveals start hidden only when JS + motion are on */
.js-motion [data-reveal] { opacity: 0; }

/* Respect reduced motion: no loops, no scanline flicker */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .glitch::before, .glitch::after { display: none; }
}
