/* Advanta motion layer. Everything is gated on html.mo, which motion.js adds only when motion is allowed. */

/* 8. scroll progress hairline */
html.mo .hdr::after{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,#7cc6f2,#1d5fd1);transform:scaleX(var(--sp,0));transform-origin:0 50%;opacity:.8;pointer-events:none}

/* 3. parallax: frames clip, image is oversized so edges never show */
html.mo .mo-p{overflow:hidden}
html.mo .mo-p img{scale:1.1}
html.mo .mo-p.mo-v img{will-change:transform}
html.mo .pway figure.mo-p,html.mo .pmedia.mo-p{border-radius:var(--r)}
html.mo .pmedia.mo-p{box-shadow:var(--lift2)}
html.mo .pmedia.mo-p img{box-shadow:none}
html.mo .hero .media img{transform-origin:50% 100%;translate:0 var(--hy,0px);scale:var(--hs,1)}

/* reveal stagger (children of an .rv that has not arrived yet) */
html.mo .mo-s{transition:opacity .5s ease-out var(--d,0s),translate .5s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
html.mo.anim .rv:not(.in) .mo-s{opacity:0;translate:0 10px}

/* 1 + 4. navy surfaces: host set-up for the light and drift layers */
html.mo :is(.trust,.state,.emb,.ftr,.card.navy,.phead){position:relative;isolation:isolate}
html.mo .pfacts{isolation:isolate}
html.mo :is(.trust,.emb,.phead){overflow:hidden}

/* 4. slow drifting highlight */
html.mo :is(.trust,.emb,.phead)::after{content:"";position:absolute;z-index:-1;--mw:clamp(440px,62%,860px);width:var(--mw);aspect-ratio:1;left:calc(var(--mw) * -.45);top:calc(50% - var(--mw) / 2);pointer-events:none;background:radial-gradient(closest-side,rgba(124,198,242,.1),rgba(29,95,209,.04) 55%,rgba(29,95,209,0));animation:mo-drift 26s ease-in-out infinite alternate;animation-play-state:paused}
html.mo .phead::after{background:radial-gradient(closest-side,rgba(124,198,242,.2),rgba(124,198,242,0))}
html.mo .emb::after{animation-duration:32s}
html.mo .mo-v::after{animation-play-state:running}
@keyframes mo-drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(calc(100vw - 55%),6%,0)}}

/* 5. page and hospital transitions */
html.mo main.mo-page{animation:mo-fade .2s ease-out}
html.mo main.mo-swap>*{animation:mo-rise .35s cubic-bezier(.2,.7,.2,1)}
@keyframes mo-fade{from{opacity:0}}
@keyframes mo-rise{from{opacity:0;translate:0 10px}}
html.mo .hdr .brand.mo-sheen{position:relative;overflow:hidden}
html.mo .hdr .brand.mo-sheen::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,rgba(124,198,242,0) 30%,rgba(124,198,242,.5) 50%,rgba(124,198,242,0) 70%);transform:translateX(-110%);animation:mo-sheen .8s ease-out}
@keyframes mo-sheen{to{transform:translateX(110%)}}

/* 1 + 2. cursor light, mouse only */
@media(hover:hover) and (pointer:fine){
  html.mo :is(.trust,.state,.emb,.pfacts,.ftr,.sfeat,.card.navy)::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .6s ease-out;background:radial-gradient(380px circle at var(--mx,50%) var(--my,50%),rgba(124,198,242,.2),rgba(29,95,209,.09) 50%,rgba(29,95,209,0))}
  html.mo .sfeat::before{z-index:0}
  html.mo :is(.sindex a,.mosaic a,.gph)::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .5s ease-out;background:radial-gradient(300px circle at var(--mx,50%) var(--my,50%),rgba(124,198,242,.2),rgba(124,198,242,0))}
  html.mo .sindex a{position:relative;isolation:isolate}
  html.mo .sindex a::before{z-index:-1;inset:0 -16px;background:radial-gradient(ellipse 300px 150% at calc(var(--mx,50%) + 16px) 50%,rgba(124,198,242,.22),rgba(124,198,242,.07) 55%,rgba(124,198,242,0))}
  html.mo .mo-lit.mo-lit.mo-lit::before{opacity:1;transition-duration:.3s}
}

/* 7. touch: press feedback with a soft spring back */
@media(pointer:coarse){
  html.mo :is(.btn,.sindex a,.sfeat,.mosaic a,.gph,.mbar a,.mbar button){transition:transform .45s cubic-bezier(.3,1.7,.5,1),opacity .5s ease-out var(--d,0s),translate .5s ease-out var(--d,0s),background-color .15s ease-out,border-color .15s ease-out,color .15s ease-out,box-shadow .2s ease-out}
  html.mo :is(.btn,.sindex a,.sfeat,.mosaic a,.gph,.mbar a,.mbar button):active{transform:scale(.98);transition-duration:.09s}
}

/* reduced motion: motion.js adds nothing; this is the belt to its braces */
@media(prefers-reduced-motion:reduce){
  html.mo .hdr::after,html.mo .brand::after,html.mo :is(.trust,.emb,.phead)::after,html.mo :is(.trust,.state,.emb,.pfacts,.ftr,.sfeat,.card.navy,.sindex a,.mosaic a,.gph)::before{content:none!important}
  html.mo .mo-p img,html.mo .hero .media img{translate:none!important;scale:none!important}
  html.mo .mo-s{opacity:1!important;translate:none!important}
  html.mo main,html.mo main>*{animation:none!important}
  html.mo :is(.btn,.sindex a,.sfeat,.mosaic a,.gph,.mbar a,.mbar button):active{transform:none!important}
}
