/* motion.css — scroll reveals, number count-ups and tool transitions.
   Everything here applies only when motion.js has added .mo to <html>,
   which it does not do for visitors who ask for reduced motion. */
.mo .mo-rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--mo-d, 0ms);
}
.mo .mo-rv.mo-in { opacity: 1; transform: none; }

/* The Problem: the rule above each number draws in from the left */
.mo .duel-cell { position: relative; border-top-color: transparent; }
.mo .duel-cell::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--fg, #f4f2ec);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1) .15s;
}
.mo .duel-cell.fade::before { transition-delay: .35s; }
.mo .duel.visible .duel-cell::before { transform: scaleX(1); }

/* Numbers that count up keep their width while they change */
.mo [data-mo-count] { font-variant-numeric: tabular-nums; }

/* Home: each question and answer in the start tool eases in */
@keyframes mo-q { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mo .qa[data-tool] > * { animation: mo-q .45s cubic-bezier(.2,.7,.2,1) both; }
.mo .qa[data-tool] > *:nth-child(2) { animation-delay: .06s; }
.mo .qa[data-tool] > *:nth-child(3) { animation-delay: .12s; }
.mo .qa[data-tool] > *:nth-child(n+4) { animation-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  .mo-rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .qa[data-tool] > * { animation: none !important; }
}
