/* Entrances and micro-interactions, all gated so reduced motion turns them off. */
@keyframes am-spin { to { transform: rotate(1turn); } }
@keyframes am-pulse { 50% { opacity: .45; } }
@keyframes am-cell { 0% { background: var(--navy); } 25%, 100% { background: var(--line); } }
@keyframes am-mount { from { opacity: 0; translate: 0 14px; } }
@keyframes am-pre-cell { from { opacity: 0; scale: .4; translate: var(--fx, 0) var(--fy, 0); } }
@keyframes am-pre-whole { to { opacity: 1; } }
@keyframes am-pre-hide { to { opacity: 0; } }
@keyframes am-pre-safety { to { visibility: hidden; opacity: 0; } } /* never leave the preloader up if JS fails */
@keyframes am-map-in { from { opacity: 0; scale: .7; } } /* a door settles onto its square */
@keyframes am-flicker { 0%, 12%, 26% { filter: brightness(.32) saturate(.45); } 8%, 20% { filter: none; } 30%, 100% { filter: none; } } /* the sign's tube catching */
@keyframes am-ding { 50% { box-shadow: inset 0 0 0 2px #2b3a44, 0 0 0 6px var(--lemon), 0 0 24px rgb(228 255 43 / .8); } } /* the lift arriving */
@keyframes am-arrow { 0% { translate: 0 .55em; opacity: 0; } 30%, 65% { opacity: 1; } 100% { translate: 0 -.55em; opacity: 0; } } /* the lift arrow running */
@keyframes am-roll { from { translate: 0 calc(.9em * var(--way, 1)); opacity: 0; } } /* a floor number rolling in */
@keyframes am-sweep { from { translate: 0 -100%; opacity: 1; } to { translate: 0 360%; opacity: 1; } } /* a landing light passing the doors */
@keyframes am-pass { 40% { background: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .5), 0 3px 0 #7d8388, 0 0 0 4px rgb(115 200 225 / .55), 0 0 16px rgb(115 200 225 / .9); } } /* a passed floor blinking */
@keyframes am-called { 50% { box-shadow: 0 1px 0 #a3b81c, 0 0 0 8px rgb(228 255 43 / .22), 0 0 30px rgb(228 255 43); } } /* the called floor breathing */
@keyframes am-sway { 0% { transform: rotate(7deg); } 30% { transform: rotate(-5deg); } 55% { transform: rotate(3deg); } 78% { transform: rotate(-1.2deg); } 100% { transform: rotate(0); } } /* the card settling on its lanyard */
@keyframes am-tick { 0% { scale: .4; } 70% { scale: 1.15; } 100% { scale: 1; } } /* a line ticked */
@keyframes am-stamp { 0% { opacity: 0; scale: 1.8; } 100% { opacity: .9; scale: 1; } } /* the PASSED stamp landing */
@keyframes am-settle { 50% { opacity: .25; } } /* the settled reading blinking */
@keyframes am-knock { 30% { translate: 0 -5px; } 60% { translate: 0 1.5px; } 100% { translate: 0 0; } } /* the gauge stopped by the neck */
@keyframes am-scan { from { top: 4%; } to { top: 96%; } } /* the lens scan line */
@keyframes am-lock { 0% { scale: 1; } 40% { scale: 1.08; } 100% { scale: 1; } } /* the lens locking onto a part */
@keyframes am-toast-in { from { opacity: 0; transform: translateY(8px); } }
.am-toast { animation: am-toast-in .25s var(--ease); }

/* Reveal (ui.js adds .is-in once): mount = a sign settles onto the wall; step = it moves in by one cell */
.js [data-reveal] { transition: opacity .5s var(--ease), translate .5s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal]:not(.is-in) { opacity: 0; translate: 0 18px; }
.js [data-reveal="step"]:not(.is-in) { translate: calc(-28px * var(--dir)) 0; }
.js [data-reveal="switch"]:not(.is-in) { opacity: 1; translate: none; } /* a switch stays in place; only its state changes */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .am-loader__cells i { animation: none !important; background: var(--navy); }
  .am-loader__cells i:nth-child(4) { background: var(--lemon); }
  /* The button spinner keeps turning, slowly: it carries meaning, not decoration. */
  .am-btn.is-loading::after { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
