/* Page heading animations and small page touches (js/ambient.js). */
body:has(.page-motion) { overflow-x: clip; }
main:has(> .page-motion) { position: relative; isolation: isolate; }
.page-motion {
  position: absolute; top: 0; left: calc(50% - 50vw); z-index: -1;
  width: 100vw; pointer-events: none; overflow: hidden;
  mask-image: linear-gradient(#000 65%, transparent);
}
.page-motion canvas { display: block; }
.page-motion.is-inside { left: 0; width: 100%; border-radius: inherit; mask-image: none; }
.scene-host:has(> .page-motion.is-inside) > :not(.page-motion):not(.section-scene) { position: relative; }
.page-motion[data-effect="motes"] { opacity: .8; }

/* Short, visible arrivals for stage items and hive diagrams. */
@keyframes motion-pop { from { opacity: .78; translate: 0 5px; } to { opacity: 1; translate: none; } }
@keyframes motion-pulse { 0%, 100% { filter: none; } 50% { filter: brightness(1.35) drop-shadow(0 0 10px #f6bd38aa); } }
.motion-pop .hive-cell, .motion-pop .prog-items li { animation: motion-pop var(--motion-panel) var(--pop-delay, 0ms) var(--motion-out) both; }
.motion-pop .prog-num { animation: motion-pop var(--motion-panel) var(--motion-out) both, motion-pulse 650ms 280ms ease-in-out; }

[data-motion-paused] .motion-pop :is(.hive-cell, .prog-items li, .prog-num) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .motion-pop :is(.hive-cell, .prog-items li, .prog-num) { animation: none; }
}
