/* Entrance animation.
 *
 * The site is a single document: every nav link is intercepted and turned into
 * history.pushState, so there is no document navigation left to transition
 * between. The cross-document view-transition machinery that used to live here
 * was therefore dead code — it could only fire on a real page load and was then
 * skipped, which surfaced as an "Unhandled rejection: Transition was skipped"
 * on every load. Removed.
 *
 * What produces the motion now is this: on each route change the previous
 * route's markup unmounts and the new route's sections mount as fresh DOM
 * nodes, so the animation below runs naturally, without any JS.
 *
 * Each section rises 18px and fades in, one shortly after the next. `both` fill
 * keeps the start state before the delay elapses, so nothing flashes at full
 * opacity first. Driven by structure (main > section) rather than a JS-added
 * class, because the DC template re-renders while it streams and would reset a
 * class mid-flight.
 *
 * The header is deliberately NOT animated: it is identical on every route, so
 * any entrance on it — even a fade — reads as the bar reloading rather than the
 * page staying put.
 */
@keyframes acom-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

main > section {
  animation: acom-rise 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
main > section:nth-child(1) { animation-delay: 0ms; }
main > section:nth-child(2) { animation-delay: 70ms; }
main > section:nth-child(3) { animation-delay: 140ms; }
main > section:nth-child(4) { animation-delay: 210ms; }
main > section:nth-child(5) { animation-delay: 280ms; }
main > section:nth-child(n+6) { animation-delay: 340ms; }

@media (prefers-reduced-motion: reduce) {
  main > section { animation: none; }
}
