/* =====================================================================
   motion.css – polish layer, reusable on every case page (CELINE first)
   Nothing here changes layout or copy. Every effect is decoration on top of existing class names
   and switches off under prefers-reduced-motion. motion.js adds the .mo-* state classes.
   ===================================================================== */

/* 1. proof strip: cards arrive one by one; the "After" card breathes lime once it has arrived */
.mo .proof li{transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s}
.mo .proof li:hover{transform:translateY(-3px);box-shadow:0 14px 30px -20px rgba(11,11,10,.45)}
.mo .proof li.proof__after.mo-in{animation:moBreathe 4.5s ease-in-out 1.2s infinite}
@keyframes moBreathe{0%,100%{box-shadow:0 0 0 0 rgba(194,255,158,0)}50%{box-shadow:0 0 0 6px rgba(194,255,158,.55)}}
.mo .proof .flags span{transition:transform .25s,background-color .25s}
.mo .proof li:hover .flags span{transform:translateY(-2px)}

/* 2. data-unification diagram: the CELINE dot pings every time a record lands */
.model__bar i{position:relative}
.model__bar i.mo-ping::after{content:"";position:absolute;inset:0;border-radius:50%;animation:moPing .9s ease-out}
@keyframes moPing{from{box-shadow:0 0 0 0 rgba(194,255,158,.95)}to{box-shadow:0 0 0 10px rgba(194,255,158,0)}}
.lane__line{transition:border-color .3s}
.lane.is-on .lane__line{border-top-color:var(--ink)}

/* 3. screenshots: light follows the pointer, a slight tilt, the frame lifts */
.mo .shot{transform-style:preserve-3d;will-change:transform}
.mo .shot .inner{position:relative}
.mo .shot .inner::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .35s;border-radius:inherit;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.38),transparent 55%)}
.mo .shot:hover .inner::after{opacity:1}
.mo .shot.mo-tilt{transition:transform .12s linear}
.mo .shot:hover{box-shadow:0 30px 60px -36px rgba(11,11,10,.45)}

/* 4. steps index: a lime progress line fills as the reader moves through the steps */
.how__tabs ol{--mo-p:0}
.mo .how--js .how__tabs ol::after{content:"";position:absolute;left:31px;top:22px;width:2px;margin-left:-.25px;border-radius:2px;background:var(--ink);z-index:0;
  height:calc((100% - 44px) * var(--mo-p));transition:height .25s linear}
.how__tab .how__n{transition:background-color .25s,color .25s,transform .3s cubic-bezier(.2,.7,.2,1)}
.how__tab[aria-current] .how__n{transform:scale(1.06)}
.mo .how__panel .how__copy > *{transition:opacity .6s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
.mo .how__panel:not(.mo-in) .how__copy > *{opacity:.001;transform:translateY(14px)}
.mo .how__panel .how__copy > :nth-child(2){transition-delay:.06s}
.mo .how__panel .how__copy > :nth-child(3){transition-delay:.12s}
.mo .how__panel .how__copy > :nth-child(n+4){transition-delay:.18s}
.mo .pdg__flow li{transition:background-color .4s,transform .4s}
.mo .pdg__flow li.mo-step{background:rgba(194,255,158,.45)}
.mo .pdg__flow li.pdg__hot.mo-step{background:var(--lime);transform:translateY(-2px)}
.mo .hier li span{transition:background-color .35s,transform .35s}
.mo .hier li.mo-step span{transform:translateX(4px)}

/* 5. outcome chain: the dashed connectors flow left to right once the chain is in view; the cards rise in turn */
.mo .chain__list li+li::before{transition:border-color .4s}
.mo .chain.mo-in .chain__list li+li::before{border-top-color:transparent;height:2px;margin-top:-1px;
  background:repeating-linear-gradient(90deg,var(--lime) 0 6px,transparent 6px 12px);background-size:24px 2px;animation:moFlow 1.2s linear infinite}
@keyframes moFlow{to{background-position:24px 0}}
.mo .chain__list li{transition:border-color .3s,transform .4s cubic-bezier(.2,.7,.2,1),background-color .3s}
.mo .chain__list li:not(.is-here):hover{border-color:#55554F;transform:translateY(-3px);background:#151513}
.mo .chain__list a svg.i{transition:transform .25s}
.mo .chain__list li:hover a svg.i{transform:translateX(4px)}
@media (max-width:820px){
  .mo .chain.mo-in .chain__list li+li::before{height:clamp(24px,3vw,44px);width:2px;margin:0 0 0 -1px;
    background:repeating-linear-gradient(180deg,var(--lime) 0 6px,transparent 6px 12px);background-size:2px 24px;animation-name:moFlowV}
  @keyframes moFlowV{to{background-position:0 24px}}
}

/* 6. results cards: the icon swings in on hover */
.mo .card svg.i{transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.mo .card:hover svg.i{transform:translateY(-3px) rotate(-6deg)}

/* 7. related-cases rail: the card lifts, the image settles, a lime rule draws under the title, an arrow appears */
.rc h3{position:relative;display:flex;align-items:baseline;gap:8px}
.rc h3::after{content:"→";font-family:var(--f-mono);font-size:.7em;opacity:0;transform:translateX(-6px);transition:opacity .25s,transform .3s cubic-bezier(.2,.7,.2,1)}
.rc:hover h3::after,.rc:focus-visible h3::after{opacity:1;transform:none}
.rc h3{background:linear-gradient(var(--lime),var(--lime)) 0 100%/0 3px no-repeat;padding-bottom:4px;transition:background-size .45s cubic-bezier(.2,.7,.2,1)}
.rc:hover h3,.rc:focus-visible h3{background-size:100% 3px}
.rc__img{transition:box-shadow .4s}
.rc:hover .rc__img{box-shadow:0 22px 44px -28px rgba(11,11,10,.55)}
.rc .pill{transition:background-color .25s}
.rc:hover .pill{background:var(--lime)}

/* 8. small lime moments */
.btn--lime{position:relative;overflow:hidden}
.mo .btn--lime::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.65) 50%,transparent 70%);transform:translateX(-120%);pointer-events:none}
.mo .btn--lime:hover::after{transition:transform .7s ease;transform:translateX(120%)}
.mo .sym input:checked + span{animation:moTick .35s ease}
@keyframes moTick{40%{transform:translateX(3px)}}

/* reduced motion: complete and static */
@media (prefers-reduced-motion:reduce){
  .mo .proof li.proof__after.mo-in,.model__bar i.mo-ping::after,.mo .chain.mo-in .chain__list li+li::before{animation:none}
  .mo .how__panel:not(.mo-in) .how__copy > *{opacity:1;transform:none}
  .mo .shot.mo-tilt{transform:none!important}
  .rc h3,.rc h3::after,.mo .chain__list li,.mo .card svg.i{transition:none}
}
