/* ====================================================================
   Purpose : Every keyframe on the domain, the off-screen pause, and the one
             switch that stops them all.
   Detail  : Animations move transform and opacity only; never width,
             height, top, or left. Each keyframe is used by a class in
             04_controls.css or a page sheet. Entrance animations fill
             backwards, so with animation off an element simply sits where
             it belongs. Timed keyframes run on the clock, not on frames, so
             they look the same at 30, 60, or 120 frames a second. Under
             prefers-reduced-motion every animation and transition is off
             and reveal targets are visible at once.
   ==================================================================== */

/* ====================================================================
   Kind    : Component
   Name    : keyframes
   Purpose : The named motions; a page never declares its own.
   ==================================================================== */
/* ping: a ring leaves a live dot */
@keyframes ping { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(1.9); } }
/* rise: a revealed block arrives */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
/* rise-line: a headline line comes up through its mask */
@keyframes rise-line { from { transform: translateY(105%); } }
/* fade-in: a block appears in place */
@keyframes fade-in { from { opacity: 0; } }
/* draw: the hero slash is drawn from its top; the trip's fill is drawn by the scroll */
@keyframes draw { from { transform: scaleY(0); } }
/* from-origin: an element travels from its untransformed place to its own transform; scroll-driven, for the closing horizon */
@keyframes from-origin { from { transform: none; } }
/* breathe: the hero slash dims and returns */
@keyframes breathe { 50% { opacity: 0.6; } }
/* glint: a highlight crosses the machine */
@keyframes glint { 0%, 25% { transform: translateX(-120%) skewX(-18deg); } 75%, 100% { transform: translateX(320%) skewX(-18deg); } }
/* scan: a red scan line passes down the viewport */
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
/* travel: a packet crosses the tunnel */
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(0); } }
/* equalize: uneven shares settle to one equal share each */
@keyframes equalize { 0%, 15% { transform: scaleY(var(--share)); } 45%, 80% { transform: scaleY(0.6); } 100% { transform: scaleY(var(--share)); } }
/* forget: memory fills while a request runs, then empties */
@keyframes forget { 0% { transform: scaleX(0); } 35%, 55% { transform: scaleX(0.78); } 85%, 100% { transform: scaleX(0); } }
/* blink: a typing caret */
@keyframes blink { 50% { opacity: 0; } }

/* ====================================================================
   Kind    : Component
   Name    : .reveal
   Purpose : Hidden until scrolled into view, then rises; visible without JavaScript.
   ==================================================================== */
/* html.js .reveal:not(.is-in): hidden only when the script that reveals is running */
html.js .reveal:not(.is-in) { opacity: 0; }
.reveal.is-in { animation: rise 1s var(--ease-expo) var(--delay, 0s) backwards; }

/* ====================================================================
   Kind    : Component
   Name    : [data-loop]
   Purpose : A looping animation holds still while its region is off screen.
   ==================================================================== */
[data-loop].is-offscreen, [data-loop].is-offscreen *, [data-loop].is-offscreen *::before, [data-loop].is-offscreen *::after { animation-play-state: paused; }

/* ====================================================================
   Kind    : Component
   Name    : reduced-motion
   Purpose : One switch: nothing moves for a visitor who asked for that.
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal:not(.is-in) { opacity: 1; }
}
