/* ==========================================================================
   actually_genius — animations
   ========================================================================== */

@keyframes drift-a{
  0%, 100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(6vw, 4vh) scale(1.08); }
  66%{ transform: translate(-3vw, 8vh) scale(.96); }
}
@keyframes drift-b{
  0%, 100%{ transform: translate(0,0) scale(1); }
  40%{ transform: translate(-5vw, -6vh) scale(1.1); }
  70%{ transform: translate(3vw, -2vh) scale(.94); }
}
@keyframes drift-c{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-8vw, 5vh) scale(1.15); }
}

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

@keyframes scroll-pulse{
  0%{ transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%{ transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%{ transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100%{ transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* hero title glitch flicker — subtle, tasteful, on a timer not a loop-hover */
@keyframes glitch-flicker{
  0%, 92%, 100%{
    text-shadow: none;
    clip-path: inset(0 0 0 0);
  }
  93%{
    text-shadow: -2px 0 var(--pink), 2px 0 var(--cyan);
    clip-path: inset(20% 0 40% 0);
  }
  95%{
    text-shadow: 2px 0 var(--pink), -2px 0 var(--cyan);
    clip-path: inset(60% 0 5% 0);
  }
  97%{
    text-shadow: none;
    clip-path: inset(0 0 0 0);
  }
}
.glitch{
  animation: glitch-flicker 6s infinite;
}

/* achievement unlock pop */
@keyframes toast-in{
  from{ transform: translateX(30px); opacity: 0; }
  to{ transform: translateX(0); opacity: 1; }
}
.toast{
  animation: toast-in .35s var(--ease);
}

@keyframes toast-out{
  to{ transform: translateX(30px); opacity: 0; }
}
.toast.is-leaving{
  animation: toast-out .3s var(--ease) forwards;
}

/* achievement card unlock flash */
@keyframes unlock-flash{
  0%{ box-shadow: 0 0 0 0 rgba(255,143,216,.7); }
  100%{ box-shadow: 0 0 0 14px rgba(255,143,216,0); }
}
.achv.just-unlocked{
  animation: unlock-flash 1s ease-out;
}

/* rainbow glitch mode — easter egg */
@keyframes rainbow-cycle{
  0%{ filter: hue-rotate(0deg) saturate(1.4); }
  100%{ filter: hue-rotate(360deg) saturate(1.4); }
}
body.rainbow-mode{
  animation: rainbow-cycle 4s linear infinite;
}

/* stardust burst particle (easter egg word trigger) */
@keyframes burst-rise{
  0%{ transform: translateY(0) scale(1); opacity: 1; }
  100%{ transform: translateY(-120px) scale(.4); opacity: 0; }
}
.word-burst{
  position: fixed;
  z-index: 90;
  pointer-events: none;
  font-size: 1.2rem;
  animation: burst-rise 1.1s ease-out forwards;
}

/* mascot idle bob */
@keyframes mascot-bob{
  0%, 100%{ margin-top: 0; }
  50%{ margin-top: -4px; }
}

/* logo secret cat run */
@keyframes cat-run{
  from{ left: -60px; }
  to{ left: 100vw; }
}
.secret-runner{
  position: fixed;
  bottom: 14px;
  z-index: 95;
  font-size: 1.6rem;
  animation: cat-run 5s linear forwards;
  pointer-events: none;
}
