/* Section entrances, refined (homepage only, CSS only; homepage-motion.js
   still owns the pending → entered/instant states).
   Before: each group slid 14px as one block, which read as almost no motion.
   Now each arrival is a short choreography:
   - Text settles item by item (eyebrow, heading, copy, action; list rows one
     after another) with a longer, softer travel. Rules draw in alongside
     (homepage-doctor / -lines / -closing).
   - Large images open from a slightly inset frame while the photo settles
     from a gentle zoom: the frame moves, the picture stays in view.
   Unchanged rules from the motion contract: content is never hidden (opacity
   ≥ .94 throughout), entrances happen once, arrivals from above, restored
   positions and anchor jumps land settled ("instant" never transitions),
   and nothing is scroll-linked. The pinned therapy stage is not touched.
   Reduced motion and no-JS: no transforms at all. */

@media(prefers-reduced-motion:no-preference){
  .elementor-86 .sv-home[data-sv-home-motion=on]{
    --en-y:34px;--en-step:85ms;--en-dur:1.15s;--en-ease:cubic-bezier(.16,1,.3,1);
    --en-inset:5%;--en-zoom:1.08}

  /* ---------- The groups stop moving as blocks; their items move instead ---------- */
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-therapy-heading,.sv-service-copy,.sv-faq-heading,.sv-faq-list,
    .sv-doctor-copy-inner,.sv-doctor-facts,.sv-portrait-wrap,.sv-library-header,.sv-feature-video-copy,.sv-library-list,
    .sv-feature-video-media,.sv-closing-top,.sv-closing-routes)[data-sv-enter]{transform:none;opacity:1}

  /* Items (one level of wrappers is looked through). */
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(
    .sv-therapy-heading>*,
    .sv-service-copy>:not(.sv-service-index),
    .sv-faq-heading>*,
    .sv-faq-list>details,
    .sv-doctor-copy-inner>*,
    .sv-doctor-facts>.sv-fact,
    .sv-library-header>div>*,.sv-library-header>a,
    .sv-feature-video-copy>*,
    .sv-library-list>*,
    .sv-closing-top>div>*,
    .sv-closing-routes>.sv-route>*){--en-i:0}

  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-therapy-heading,.sv-service-copy,.sv-faq-heading,.sv-faq-list,
    .sv-doctor-copy-inner,.sv-doctor-facts,.sv-library-header,.sv-feature-video-copy,.sv-library-list,.sv-closing-top,.sv-closing-routes)[data-sv-enter=pending]
    :is(.sv-therapy-heading>*,.sv-service-copy>:not(.sv-service-index),.sv-faq-heading>*,.sv-faq-list>details,.sv-doctor-copy-inner>*,
      .sv-doctor-facts>.sv-fact,.sv-library-header>div>*,.sv-library-header>a,.sv-feature-video-copy>*,.sv-library-list>*,
      .sv-closing-top>div>*,.sv-closing-routes>.sv-route>*){
    transform:translate3d(0,var(--en-y),0);opacity:.94}

  .elementor-86 .sv-home[data-sv-home-motion=on] [data-sv-enter=entered]
    :is(.sv-therapy-heading>*,.sv-service-copy>:not(.sv-service-index),.sv-faq-heading>*,.sv-faq-list>details,.sv-doctor-copy-inner>*,
      .sv-doctor-facts>.sv-fact,.sv-library-header>div>*,.sv-library-header>a,.sv-feature-video-copy>*,.sv-library-list>*,
      .sv-closing-top>div>*,.sv-closing-routes>.sv-route>*){
    transition:transform var(--en-dur) var(--en-ease) calc(var(--sv-enter-delay,0ms) + var(--en-i) * var(--en-step)),
               opacity var(--en-dur) var(--en-ease) calc(var(--sv-enter-delay,0ms) + var(--en-i) * var(--en-step)),
               /* keep the controls' own state fades */
               background-color var(--sv-dur-state,.2s) var(--sv-ease-state,ease),color var(--sv-dur-state,.2s) var(--sv-ease-state,ease),
               border-color var(--sv-dur-state,.2s) var(--sv-ease-state,ease),box-shadow var(--sv-dur-state,.2s) var(--sv-ease-state,ease)}

  /* Order within a group (capped so nothing waits long). */
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-therapy-heading,.sv-faq-heading,.sv-doctor-copy-inner,.sv-feature-video-copy,.sv-faq-list,.sv-library-list,.sv-doctor-facts)>:nth-child(2),
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-library-header>div,.sv-closing-top>div)>:nth-child(2),
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-service-copy>h3+*{--en-i:1}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-therapy-heading,.sv-faq-heading,.sv-doctor-copy-inner,.sv-feature-video-copy,.sv-faq-list,.sv-library-list,.sv-doctor-facts)>:nth-child(3),
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-service-copy>ul,
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-library-header>a{--en-i:2}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-therapy-heading,.sv-faq-heading,.sv-doctor-copy-inner,.sv-feature-video-copy,.sv-faq-list,.sv-library-list)>:nth-child(4),
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-service-copy>a{--en-i:3}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-feature-video-copy,.sv-faq-list,.sv-library-list)>:nth-child(n+5){--en-i:4}
  /* Closing rows: title, description, action; the second row follows the first. */
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-closing-routes>.sv-route>p{--en-i:1}
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-closing-routes>.sv-route>a{--en-i:2}
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-closing-routes>.sv-route:nth-child(2)>h3{--en-i:1.5}
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-closing-routes>.sv-route:nth-child(2)>p{--en-i:2.5}
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-closing-routes>.sv-route:nth-child(2)>a{--en-i:3.5}

  /* ---------- Large images: the frame opens, the photo settles ---------- */
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-portrait-wrap{--en-r:var(--sv-r-portrait,6px)}
  .elementor-86 .sv-home[data-sv-home-motion=on] .sv-feature-video-media{--en-r:var(--sv-r-feature,6px)}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-portrait-wrap,.sv-feature-video-media)[data-sv-enter=pending]{
    clip-path:inset(var(--en-inset) round var(--en-r))}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-portrait-wrap,.sv-feature-video-media)[data-sv-enter=entered]{
    clip-path:inset(0 round var(--en-r));
    transition:clip-path 1.3s var(--en-ease) var(--sv-enter-delay,0ms)}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-portrait-wrap,.sv-feature-video-media)[data-sv-enter=pending] img{transform:scale(var(--en-zoom))}
  .elementor-86 .sv-home[data-sv-home-motion=on] :is(.sv-portrait-wrap,.sv-feature-video-media)[data-sv-enter=entered] img{
    transition:transform 1.6s var(--en-ease) var(--sv-enter-delay,0ms)}

  /* ---------- Settled arrivals never animate ---------- */
  .elementor-86 .sv-home[data-sv-home-motion=on] [data-sv-enter=instant],
  .elementor-86 .sv-home[data-sv-home-motion=on] [data-sv-enter=instant] *{transition:none!important}

  /* ---------- Phones: same order, shorter travel, quicker beat, lighter frame ---------- */
  @media(max-width:760px){
    .elementor-86 .sv-home[data-sv-home-motion=on]{--en-y:16px;--en-step:55ms;--en-dur:.7s;--en-inset:3%;--en-zoom:1.04}
  }
}
