/* Motion. The HTML is the final frame; html.motion (set before first paint when
   reduced motion is off) holds the starting frames, and js/ releases them.
   Entrances are class-triggered transitions. Type never animates, except the hero's
   entrance. Each screen's own motion is in its sections/ file; these are the rules
   more than one screen shares. */

/* Words that are on their way: hidden until a dot lands as them (js/words.js). A screen
   may let its words wait as lighter ink instead (the phone's follow-up). */
.motion .is-waiting .w, .motion .is-waiting .caret { opacity: 0; transition: none; }
.wdot { position: absolute; z-index: 3; border-radius: 50%; background: var(--sky); pointer-events: none; }

/* ---------------------------------------------------------------- everyone rises (the close) */
.motion .rise { transform: translateY(14px); opacity: 0; }
.motion .is-in .rise { transform: none; opacity: 1; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease; transition-delay: calc(var(--i) * 80ms); }

/* ---------------------------------------------------------------- loops (the home page)
   A scene that plays by itself repeats while it is in view (js/loop.js): after its finished
   frame has held, what the run changed fades out together (.is-clearing), and the next run
   plays it back in from its first frame. Nothing moves as it clears; the cards, the people
   and the grounds stay. Each screen's own clear (the hero, Time back, Your data) is in its
   sections/ file; these are the ones whose screen files are laid out elsewhere. */
/* The morning, the stage's moment on show (desktop) and the phone's cards: 10:00's turns,
   10:45's summary, the follow-up's fields and words. The reminder's run is its one tap. */
.motion .morning .is-clearing.is-played > .call .call-dots circle,
.motion .morning .is-clearing.is-played > .call .tw i,
.motion .morning .is-clearing .sp-sum .w,
.motion .morning .is-clearing .sp-sum .sp-rule,
.motion .morning .is-clearing .sp-sum .ringmark,
.motion .morning .is-clearing .sp-to,
.motion .morning .is-clearing .sp-subj,
.motion .morning .is-clearing .sp-said .w { opacity: 0; transition: opacity 0.3s ease; }
/* The phone's follow-up waits at 65% ink (sections/morning.css), so it clears to that. */
.motion .morning .psaid.is-clearing .w { opacity: 0.65; transition: opacity 0.3s ease; }
/* Dictation: her words, Done, his typed characters and his caret; the two cards, the two of
   them and the 4x stay. */
.motion .dictation.is-live.is-clearing .ds-words .w,
.motion .dictation.is-live.is-clearing .ds-done-row .ds-done,
.motion .dictation.is-live.is-clearing .dt-text .dt-chars,
.motion .dictation.is-live.is-clearing .dt-text .caret { opacity: 0; transition: opacity 0.3s ease; }

/* ---------------------------------------------------------------- reduced motion: the final frames */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
