/* ABOUT MOTION - the applied motion for about.html: desktop from 900px
   (this part) and the phone below it (PHONE, the last section).
   100-motion-design/motion-guidance.md explains it.

   DESKTOP, from 900px. The selection work behind
   it is in 100-motion-design/about/combined/, where this file is
   selected-motion.css with preview paths and the review-only ?hero tool; its
   README.md records the combining rules and picker.json lists the
   selections. The head gate in about.html adds pilot-intro-pending and
   sel-on at 900px and up without reduced motion; about-motion.js adds
   pilot-settle-run (hero) and sel-ready (below the hero). Without those
   classes the page is the still page.

   Hero settle: Plan Your Visit's rules and values, unchanged
   (120-website/site/plan-your-visit-motion.css).

   Hero push on the speaker: Plan Your Visit's push at its strength (0.93,
   2.4s, same curve), held on the speaker. The library frames this photo
   from its left edge (--cc-photo-focal-desktop: 0% ...), which is also the
   scale's origin, so a bare push slides the speaker about 70px right while
   he grows. The translate below keeps his face in place while the room
   closes in around him (proposal B's anchoring): for a scale s about origin
   O, translating by (1 - s) times the face's offset from O holds the face.
   The face sits about 70% across and 12% down from the origin. The left
   edge opens at most about 70px at 1440 and 50px at 1024, inside the
   scrim's solid black (14% of the hero's width). */
:root {
  --hero-push-from: 0.93;
  --hero-push-duration: 2.4s;
  --hero-push-ease: cubic-bezier(0.2, 0.55, 0.4, 0.92);
  --hero-anchor-x: 70%;
  --hero-anchor-y: 12%;
  --hero-text-start: 0.6s;
  --hero-text-offset: 0s;
  --hero-text-ease: var(--hero-push-ease);
  --pilot-settle-start: var(--hero-text-start);
  --pilot-settle-stagger: 80ms;
  --pilot-settle-duration: calc(var(--hero-push-duration) + var(--hero-text-offset) - var(--hero-text-start) - 2 * var(--pilot-settle-stagger));
  --pilot-settle-scale: 1.08;
  --pilot-settle-blur: 8px;
  --pilot-settle-ease: var(--hero-text-ease);
}
@property --hero-arrive {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
.pilot-intro-pending .cc-hero__photo { --hero-arrive: var(--hero-push-from); }
.pilot-intro-pending .cc-hero__photo,
.sel-on .cc-hero__photo {
  transform: scale(var(--hero-arrive));
  translate: calc((1 - var(--hero-arrive)) * var(--hero-anchor-x)) calc((1 - var(--hero-arrive)) * var(--hero-anchor-y));
}
.pilot-settle-run .cc-hero__photo {
  animation: hero-push var(--hero-push-duration) var(--hero-push-ease) both;
}
@keyframes hero-push {
  from { --hero-arrive: var(--hero-push-from); }
  to { --hero-arrive: 1; }
}
.pilot-intro-pending .cc-hero__body > * { opacity: 0; }
.pilot-settle-run .cc-hero__body > * {
  transform-origin: left center;
  animation: pilot-settle var(--pilot-settle-duration) var(--pilot-settle-ease) both;
  animation-delay: calc(var(--pilot-settle-start) + var(--pilot-beat, 0) * var(--pilot-settle-stagger) - var(--pilot-clip-at, 0s));
}
.cc-hero__body > .cc-eyebrow,
.cc-hero__body > .cc-hero__title { --pilot-beat: 0; }
.cc-hero__body > .cc-hero__lead { --pilot-beat: 1; }
.cc-hero__body > .cc-hero__actions { --pilot-beat: 2; }
@keyframes pilot-settle {
  from { opacity: 0; scale: var(--pilot-settle-scale); filter: blur(var(--pilot-settle-blur)); }
  to { opacity: 1; scale: 1; filter: blur(0); }
}

/* ---- Below the hero. about-motion.js plays every entrance as Web
   Animations with fill "backwards" and adds .sel-shown in the frame it
   starts, so a finished element is the library's own rendering. These
   rules hold only the waiting poses; each matches its first keyframe.
   Sources: pastors band, pull quotes, pathway words and closing band are
   proposal B's (100-motion-design/about/proposals/2026-10-28-b/about-motion.css); the pathway
   steps are proposal A's (100-motion-design/about/proposals/2026-10-28-a/about-motion.css). */
@media (min-width: 900px) {

  /* Waiting to enter. */
  .sel-on [data-sel]:not(.sel-shown) {
    opacity: 0;
  }

  /* Photo light: photographs wait partly visible, in their start pose. */
  .sel-on :is([data-sel="settle-photo"], [data-sel="photo-arrival"]):not(.sel-shown) {
    opacity: 0.35;
  }
  .sel-on [data-sel="settle-photo"]:not(.sel-shown) img {
    transform: scale(1.06);
  }
  .sel-on [data-sel="photo-arrival"]:not(.sel-shown) {
    transform: translateY(28px);
  }
  .sel-on [data-sel="photo-arrival"]:not(.sel-shown) img {
    transform: scale(1.06);
  }

  /* Pathway words (pastors' quote, inside More): the row stays; each word
     waits faint, at the emblem's waiting light, and lights in order. */
  .sel-on [data-sel="path-words"]:not(.sel-shown) {
    opacity: 1;
  }
  .sel-on [data-sel="path-words"]:not(.sel-shown) > li {
    opacity: var(--words-wait-light, 0.18);
  }

  /* Pathway steps (ABOUT-02 emblem). about-motion.js cuts the one emblem
     graphic into four steps by stacking three copies of it in the same grid
     cell, each clipped to one step; the arrow before a word travels with it.
     Cut lines are measured on Love Connect Disciple Lead Icons.png
     (1500 x 349, transparent): between the word and the next arrow, at
     x 276, 699 and 1105. A new graphic needs new lines. While the panel
     carries .sel-path the steps wait faint and grey, a short way back along
     the path; when the last step lands the copies are removed. */
  .sel-on [data-sel-path].sel-path > .cc-emblem-panel__img {
    grid-row: 1;
    grid-column: 2 / span 10;
  }
  .sel-on [data-sel-path].sel-path > [data-step="1"] { clip-path: inset(0 calc(100% - 276 / 1500 * 100%) 0 0); }
  .sel-on [data-sel-path].sel-path > [data-step="2"] { clip-path: inset(0 calc(100% - 699 / 1500 * 100%) 0 calc(276 / 1500 * 100%)); }
  .sel-on [data-sel-path].sel-path > [data-step="3"] { clip-path: inset(0 calc(100% - 1105 / 1500 * 100%) 0 calc(699 / 1500 * 100%)); }
  .sel-on [data-sel-path].sel-path > [data-step="4"] { clip-path: inset(0 0 0 calc(1105 / 1500 * 100%)); }
  .sel-on [data-sel-path].sel-path:not(.sel-shown) > .cc-emblem-panel__img {
    opacity: var(--path-wait-light, 0.18);
    filter: grayscale(1);
    translate: calc(-1 * var(--path-step, 28px)) 0;
  }
}

/* ============================================================================
   PHONE, below 900px. The selection work behind it is in
   100-motion-design/about/combined-mobile/, where this section is
   selected-motion.css (shared by its user-picks.html, the composition
   applied here); its README.md records the composition and its combining
   rules.

   Gating: every rule needs html.abm-on, set by the head gate in about.html
   below 900px without reduced motion and removed by its fail-safe if the
   phone runtime in about-motion.js never starts. Every rule also sits below
   900px. The desktop rules above (sel-on, pilot-) are untouched; their hero
   keyframes and values are reused here: @property --hero-arrive,
   @keyframes hero-push and the --hero-push-* properties on :root.

   Entrances below the hero are Web Animations in about-motion.js; this
   section holds the hero clock, the waiting poses and the readiness rules.
   A finished element is the library's own rendering. The welcome breath
   ("breathe") rules are dormant: the family panorama carries no data-abm
   hook, so it is still, as are the mission words.
   ============================================================================ */
@media (max-width: 899.98px) {

  /* ---- Hero push (reused, Plan Your Visit's phone rules): the speaker's
     photo waits slightly small, still, and pushes in to its framing on the
     desktop curve and length, about the library's focal origin (61% and
     about 14% down, just above the speaker's face, so the face holds within
     a few pixels). Every edge stays filled at the start pose. */
  .abm-on.abm-hero-photo-wait .cc-hero__photo {
    --hero-arrive: var(--hero-push-from);
    transform: scale(var(--hero-arrive));
  }
  .abm-on.abm-hero-photo-run .cc-hero__photo {
    transform: scale(var(--hero-arrive));
    animation: hero-push var(--hero-push-duration) var(--hero-push-ease) both;
  }

  /* ---- Soft title rise (reused, Plan Your Visit's phone values): only the
     title moves; it lights quickly and rises 0.45em behind a still mask at
     its foot, on the push's curve, resting as the picture rests. The lead
     paragraphs and the Plan Your Visit button are still from first paint. */
  :root {
    --abm-title-start: 0.25s;
    --abm-title-duration: 2s;
    --abm-title-ease: var(--hero-push-ease);
    --abm-title-room: 0.18em;
    --abm-title-travel: 0.45em;
    --abm-title-light-ms: 0.7s;
  }
  .abm-on.abm-hero-words-wait .cc-hero__title,
  .abm-on.abm-hero-words-run .cc-hero__title {
    opacity: 0;
    translate: 0 var(--abm-title-travel);
    clip-path: inset(calc(-1 * var(--abm-title-room)) calc(-1 * var(--abm-title-room)) calc(var(--abm-title-travel) - var(--abm-title-room)) calc(-1 * var(--abm-title-room)));
  }
  .abm-on.abm-hero-words-run .cc-hero__title {
    animation:
      abm-title-rise-soft var(--abm-title-duration) var(--abm-title-ease) var(--abm-title-start) both,
      abm-title-light var(--abm-title-light-ms) cubic-bezier(0.22, 1, 0.36, 1) var(--abm-title-start) both;
  }
  @keyframes abm-title-rise-soft {
    from {
      translate: 0 var(--abm-title-travel);
      clip-path: inset(calc(-1 * var(--abm-title-room)) calc(-1 * var(--abm-title-room)) calc(var(--abm-title-travel) - var(--abm-title-room)) calc(-1 * var(--abm-title-room)));
    }
    to {
      translate: 0 0;
      clip-path: inset(calc(-1 * var(--abm-title-room)) calc(-1 * var(--abm-title-room)) calc(-1 * var(--abm-title-room)) calc(-1 * var(--abm-title-room)));
    }
  }
  @keyframes abm-title-light {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* ---- Waiting to enter. The phone runtime adds .abm-shown in the frame a
     photo's entrance starts, or when the words' entrance has finished. */
  .abm-on [data-abm]:not(.abm-shown) {
    opacity: 0;
  }

  /* Framed photo settle (pastors' portrait): Photo light's waiting light,
     the picture slightly near (About desktop's values). */
  .abm-on [data-abm="settle-photo"]:not(.abm-shown) {
    opacity: 0.35;
  }
  .abm-on [data-abm="settle-photo"]:not(.abm-shown) img {
    transform: scale(1.06);
  }

  /* Framed photo settle, welcome breath (family panorama, inside More): full
     light, the picture slightly near; it eases back until the whole family
     shows, as the library frames it. */
  .abm-on [data-abm="breathe"]:not(.abm-shown) {
    opacity: 1;
  }
  .abm-on [data-abm="breathe"]:not(.abm-shown) img {
    transform: scale(1.06);
  }

  /* Photo arrival (closing greeting): waiting light, a short way down, the
     picture slightly near (About desktop's values). */
  .abm-on [data-abm="photo-arrival"]:not(.abm-shown) {
    opacity: 0.35;
    transform: translateY(28px);
  }
  .abm-on [data-abm="photo-arrival"]:not(.abm-shown) img {
    transform: scale(1.06);
  }

  /* A picture shows only once loaded and decoded, so a late or progressive
     load never paints in during a waiting pose or an entrance. Until then
     the frame shows its own dark ground. */
  .abm-on [data-abm-picture]:not(.abm-img-ready) img {
    visibility: hidden;
  }

  /* Pathway words (pastors' second quote, inside More): the row stays; each
     word waits faint, at the emblem's waiting light. */
  .abm-on [data-abm="path-words"]:not(.abm-shown) {
    opacity: 1;
  }
  .abm-on [data-abm="path-words"]:not(.abm-shown) > li {
    opacity: 0.18;
  }

  /* Pathway marks (the four step cards' Love, Connect, Disciple, Lead marks,
     inside More): each card's mark waits faint and grey, as the emblem's
     steps do, and comes into full colour as its card enters. The card's
     words are still. */
  .abm-on [data-abm="mark"]:not(.abm-shown) {
    opacity: 1;
  }
  .abm-on [data-abm="mark"]:not(.abm-shown) img {
    opacity: 0.18;
    filter: grayscale(1);
  }

  /* Pathway steps (Every Believer a Leader emblem): desktop's cut, stacked
     in the panel's one grid row across all four phone columns. The cut
     lines are measured on Love Connect Disciple Lead Icons.png (1500 x 349,
     transparent) at x 276, 699 and 1105, as on desktop. While the panel
     carries .abm-path the steps wait faint and grey, a short way back along
     the path; when the last step lands the copies are removed. */
  .abm-on [data-abm-path].abm-path > .cc-emblem-panel__img {
    grid-row: 1;
    grid-column: 1 / -1;
  }
  .abm-on [data-abm-path].abm-path > [data-abm-step="1"] { clip-path: inset(0 calc(100% - 276 / 1500 * 100%) 0 0); }
  .abm-on [data-abm-path].abm-path > [data-abm-step="2"] { clip-path: inset(0 calc(100% - 699 / 1500 * 100%) 0 calc(276 / 1500 * 100%)); }
  .abm-on [data-abm-path].abm-path > [data-abm-step="3"] { clip-path: inset(0 calc(100% - 1105 / 1500 * 100%) 0 calc(699 / 1500 * 100%)); }
  .abm-on [data-abm-path].abm-path > [data-abm-step="4"] { clip-path: inset(0 0 0 calc(1105 / 1500 * 100%)); }
  .abm-on [data-abm-path].abm-path:not(.abm-shown) > .cc-emblem-panel__img {
    opacity: 0.18;
    filter: grayscale(1);
    translate: calc(-1 * var(--abm-path-step, 10px)) 0;
  }
}
