/* ==========================================================================
   IACBT — Animations
   Subtle, clinical motion only. Everything respects prefers-reduced-motion
   via the durations zeroed out in variables.css.
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-18px, 24px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(56, 189, 248, 0); }
}

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] { transform: none; }

[data-reveal-group] > * {
  transition-delay: calc(var(--reveal-index, 0) * 90ms);
}

/* ---- Hover micro-interactions ---- */
.hoverable {
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.hoverable:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-underline:hover::after,
.link-underline:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.animate-fade-in { animation: fadeIn var(--dur-slow) var(--ease-out) both; }
.animate-slide-up { animation: slideUp var(--dur-slow) var(--ease-out) both; }
