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

@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-hero {
  animation: fade-in 0.6s ease both;
}

.animate-fade-in {
  animation: fade-in 0.45s ease both;
}

.tool-card {
  animation: fade-in 0.45s ease both;
  animation-delay: calc(var(--stagger, 0) * 40ms);
}

#tool-modal-backdrop.is-visible {
  animation: backdrop-in 0.25s ease both;
}

#tool-modal-panel.is-visible {
  animation: slide-up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (min-width: 640px) {
  #tool-modal-panel.is-visible {
    animation: fade-in-scale 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

.category-pill {
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-pill:hover {
  transform: translateY(-1px);
}

.category-pill:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
