/* ============================================
   THE BIG BIN TOOLBOX — Shared Animations
   ============================================ */

/* --- Fade In --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Slide --- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* --- Pulse & Glow --- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-dim); }
  50% { box-shadow: 0 0 40px var(--accent-glow); }
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 10px var(--accent-dim); }
  50% { text-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-dim); }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1deg); }
  66% { transform: translateY(4px) rotate(-1deg); }
}

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

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

/* --- Bounce --- */
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* --- Typing Cursor --- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Glitch Text --- */
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

/* --- Stagger Classes --- */
.anim-fade-in { animation: fadeIn var(--duration-slow) var(--ease-out) both; }
.anim-fade-in-up { animation: fadeInUp var(--duration-slow) var(--ease-out) both; }
.anim-fade-in-down { animation: fadeInDown var(--duration-slow) var(--ease-out) both; }
.anim-fade-in-scale { animation: fadeInScale var(--duration-slow) var(--ease-out) both; }
.anim-slide-left { animation: slideInLeft var(--duration-slow) var(--ease-out) both; }
.anim-slide-right { animation: slideInRight var(--duration-slow) var(--ease-out) both; }
.anim-bounce { animation: bounceIn 0.6s var(--ease-spring) both; }
.anim-float { animation: float 3s ease-in-out infinite; }
.anim-pulse { animation: pulse 2s ease-in-out infinite; }
.anim-glow { animation: glowPulse 2s ease-in-out infinite; }
.anim-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Stagger delays */
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-7 { animation-delay: 0.7s; }
.anim-delay-8 { animation-delay: 0.8s; }

/* --- Scroll-triggered (JS adds .visible) --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Copy Flash --- */
.copy-flash {
  animation: fadeInScale 0.2s var(--ease-spring) both;
}
