/* PRIME Motion UI — site-wide motion & refinement layer.
   Everything is scoped to body.prime-motion so that disabling the plugin restores the original look. */

body.prime-motion{
  --pm-brand:#aa355d;
  --pm-brand-deep:#8c2b4a;
  --pm-brand-soft:#fff3f7;
  --pm-ink:#34252e;
  --pm-muted:#685b62;
  --pm-gold:#c9a24a;
  --pm-line:rgba(170,53,93,.12);
  --pm-ease:cubic-bezier(.22,1,.36,1);
  --pm-ease-out:cubic-bezier(.16,1,.3,1);
  --pm-r:18px;
  --pm-d:36px;
  --pm-dur:.95s;
  --pm-x:50%;
  --pm-y:50%;
}
body.prime-motion--subtle{--pm-d:18px;--pm-dur:.6s}

/* ---------- Reveal on scroll (works without Motion, driven by IntersectionObserver) ---------- */
html.pm-js body.prime-motion .pm-reveal{
  opacity:0;
  transform:translate3d(0,var(--pm-d),0);
  transition:opacity var(--pm-dur) var(--pm-ease),transform var(--pm-dur) var(--pm-ease);
  transition-delay:var(--pm-delay,0s);
  will-change:opacity,transform;
}
html.pm-js body.prime-motion .pm-reveal.pm-reveal--l{transform:translate3d(calc(var(--pm-d) * -1),0,0)}
html.pm-js body.prime-motion .pm-reveal.pm-reveal--r{transform:translate3d(var(--pm-d),0,0)}
html.pm-js body.prime-motion .pm-reveal.pm-reveal--scale{transform:scale(.94) translate3d(0,calc(var(--pm-d) / 2),0)}
html.pm-js body.prime-motion .pm-reveal.pm-in{opacity:1;transform:none}

/* Heading character reveal (Motion) */
body.prime-motion .pm-ch{display:inline-block;white-space:pre;opacity:0;will-change:transform,opacity,filter}
body.prime-motion .pm-ch.pm-ch-show,body.prime-motion .pm-split-done .pm-ch{opacity:1;filter:none;transform:none}

/* ---------- Scroll progress ---------- */
body.prime-motion .pm-progress{
  position:fixed;top:0;left:0;width:100%;height:3px;z-index:2147483000;
  transform-origin:0 50%;transform:scaleX(0);
  background:linear-gradient(90deg,var(--pm-brand) 0%,#d4587f 55%,var(--pm-gold) 100%);
  box-shadow:0 0 12px rgba(170,53,93,.35);
  pointer-events:none;
}

/* ---------- Headers: glass on scroll ---------- */
body.prime-motion .prx-header,body.prime-motion .l-header{transition:box-shadow .5s var(--pm-ease),background-color .5s var(--pm-ease)}
body.prime-motion .prx-header.pm-scrolled{background-color:rgba(255,255,255,.86)!important;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);box-shadow:0 10px 30px -18px rgba(52,37,46,.35)}
body.prime-motion .l-header.pm-scrolled{box-shadow:0 10px 30px -18px rgba(52,37,46,.35)}

/* ---------- Aurora backdrop in heroes ---------- */
body.prime-motion .pm-has-aurora{position:relative;isolation:isolate}
body.prime-motion .pm-aurora{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:-1}
body.prime-motion .pm-aurora i{
  position:absolute;border-radius:50%;filter:blur(70px);opacity:.38;mix-blend-mode:multiply;
  animation:pm-drift 22s ease-in-out infinite alternate;
}
body.prime-motion .pm-aurora i:nth-child(1){width:46vw;height:46vw;left:-12vw;top:-18vw;background:radial-gradient(circle,#ffd2e1 0%,rgba(255,210,225,0) 70%)}
body.prime-motion .pm-aurora i:nth-child(2){width:38vw;height:38vw;right:-10vw;top:10%;background:radial-gradient(circle,#ffe9c7 0%,rgba(255,233,199,0) 70%);animation-duration:28s;animation-delay:-8s}
body.prime-motion .pm-aurora i:nth-child(3){width:30vw;height:30vw;left:30%;bottom:-16vw;background:radial-gradient(circle,#f6c6d8 0%,rgba(246,198,216,0) 70%);animation-duration:26s;animation-delay:-14s}
@keyframes pm-drift{
  0%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(6vw,-3vw,0) scale(1.12)}
  100%{transform:translate3d(-4vw,4vw,0) scale(.96)}
}

/* ---------- Cards: spotlight + lift (21st.dev style) ---------- */
body.prime-motion .pm-card{
  position:relative;
  transition:transform .55s var(--pm-ease),box-shadow .55s var(--pm-ease),border-color .4s;
  background-image:radial-gradient(420px circle at var(--pm-x) var(--pm-y),rgba(170,53,93,.10),transparent 42%);
  background-repeat:no-repeat;
  background-blend-mode:multiply;
}
body.prime-motion .pba-card,
body.prime-motion .pn-card,
body.prime-motion .prx-card,
body.prime-motion .ph-article,
body.prime-motion .ph-quote,
body.prime-motion .ph-result,
body.prime-motion .ph-route,
body.prime-motion .ph-reasons > li,
body.prime-motion .ph-price-grid > *,
body.prime-motion .prx-main-price,
body.prime-motion .prime-case-grid > article,
body.prime-motion .prime-added-case{
  border-radius:var(--pm-r);
  box-shadow:0 1px 2px rgba(52,37,46,.04),0 18px 44px -24px rgba(170,53,93,.28);
}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .pm-card:hover{transform:translateY(-6px);box-shadow:0 2px 4px rgba(52,37,46,.05),0 30px 60px -26px rgba(170,53,93,.45)}
}
body.prime-motion .ph-faq > details,body.prime-motion .prx-faq > details{transition:background-color .35s,box-shadow .35s;border-radius:14px}
body.prime-motion .ph-faq > details[open],body.prime-motion .prx-faq > details[open]{background-color:#fff;box-shadow:0 14px 34px -22px rgba(170,53,93,.35)}
body.prime-motion .ph-faq > details summary,body.prime-motion .prx-faq > details summary{transition:color .3s}
body.prime-motion .ph-faq > details summary:hover,body.prime-motion .prx-faq > details summary:hover{color:var(--pm-brand)}

/* ---------- Buttons: gradient, shine sweep, press ---------- */
body.prime-motion .ph-button,
body.prime-motion .prx-button,
body.prime-motion .c-button,
body.prime-motion .prime-fixed-cta__primary,
body.prime-motion .p-drawer-bottom-buttons-link{
  position:relative;overflow:hidden;isolation:isolate;
  transition:transform .35s var(--pm-ease),box-shadow .35s var(--pm-ease),background-color .3s,color .3s,border-color .3s;
}
body.prime-motion .ph-button:not(.ph-outline),
body.prime-motion .prx-button:not(.prx-outline),
body.prime-motion .c-button:not(.prime-button--light),
body.prime-motion .prime-fixed-cta__primary{
  background-image:linear-gradient(135deg,#b93f6c 0%,var(--pm-brand) 45%,var(--pm-brand-deep) 100%);
  box-shadow:0 10px 26px -12px rgba(170,53,93,.65),inset 0 1px 0 rgba(255,255,255,.18);
}
body.prime-motion .ph-button::after,
body.prime-motion .prx-button::after,
body.prime-motion .c-button::after,
body.prime-motion .prime-fixed-cta__primary::after{
  content:"";position:absolute;inset:-40% auto -40% -60%;width:40%;
  background:linear-gradient(105deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.45) 50%,rgba(255,255,255,0) 100%);
  transform:skewX(-18deg) translateX(-120%);pointer-events:none;z-index:1;
}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .ph-button:hover,
  body.prime-motion .prx-button:hover,
  body.prime-motion .c-button:hover,
  body.prime-motion .prime-fixed-cta__primary:hover{transform:translateY(-2px)}
  body.prime-motion .ph-button:not(.ph-outline):hover,
  body.prime-motion .prx-button:not(.prx-outline):hover,
  body.prime-motion .c-button:not(.prime-button--light):hover,
  body.prime-motion .prime-fixed-cta__primary:hover{box-shadow:0 18px 34px -14px rgba(170,53,93,.75),inset 0 1px 0 rgba(255,255,255,.22)}
  body.prime-motion .ph-button:hover::after,
  body.prime-motion .prx-button:hover::after,
  body.prime-motion .c-button:hover::after,
  body.prime-motion .prime-fixed-cta__primary:hover::after{animation:pm-shine .9s var(--pm-ease) forwards}
}
@keyframes pm-shine{to{transform:skewX(-18deg) translateX(420%)}}
body.prime-motion .ph-button:active,
body.prime-motion .prx-button:active,
body.prime-motion .c-button:active,
body.prime-motion .prime-fixed-cta__primary:active{transform:scale(.97)}

/* Fixed CTA: slide-in + soft pulse on the primary action */
html.pm-js body.prime-motion .ph-fixed,
html.pm-js body.prime-motion .prx-fixed,
html.pm-js body.prime-motion .prime-fixed-cta{
  transition:transform .8s var(--pm-ease),opacity .8s var(--pm-ease);
}
html.pm-js body.prime-motion .ph-fixed:not(.pm-cta-in),
html.pm-js body.prime-motion .prx-fixed:not(.pm-cta-in),
html.pm-js body.prime-motion .prime-fixed-cta:not(.pm-cta-in){transform:translateY(110%);opacity:0}
body.prime-motion .ph-fixed .ph-button:not(.ph-outline),
body.prime-motion .prx-fixed .prx-button:not(.prx-outline),
body.prime-motion .prime-fixed-cta__primary{animation:pm-pulse 4.2s ease-in-out 2s infinite}
@keyframes pm-pulse{
  0%,78%,100%{box-shadow:0 10px 26px -12px rgba(170,53,93,.65),0 0 0 0 rgba(170,53,93,.0)}
  86%{box-shadow:0 10px 26px -12px rgba(170,53,93,.65),0 0 0 10px rgba(170,53,93,.16)}
  94%{box-shadow:0 10px 26px -12px rgba(170,53,93,.65),0 0 0 18px rgba(170,53,93,0)}
}

/* ---------- Images: parallax wrappers & hover zoom ---------- */
body.prime-motion .pm-px-wrap{overflow:hidden;border-radius:inherit}
body.prime-motion .pm-px{transform:scale(1.1);will-change:transform;display:block}
body.prime-motion .prime-gallery-grid img,
body.prime-motion .pba-photo img,
body.prime-motion .ph-media-figure img{transition:transform .9s var(--pm-ease),filter .6s}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .prime-gallery-grid img:hover,
  body.prime-motion .pba-photo:hover img{transform:scale(1.05)}
}

/* ---------- Links & section heads ---------- */
body.prime-motion .ph-eyebrow,body.prime-motion .prx-eyebrow,body.prime-motion .p-cb-header-subtitle,body.prime-motion .prime-label{letter-spacing:.22em}
body.prime-motion .ph-section h2,body.prime-motion .prx-section-head h2,body.prime-motion .p-cb-header-title{letter-spacing:.02em}
body.prime-motion .pn-card .pn-go,body.prime-motion .ph-article .ph-read,body.prime-motion .ph-page-link{transition:transform .35s var(--pm-ease),color .3s}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .pn-card:hover .pn-go,body.prime-motion .ph-article:hover .ph-read{transform:translateX(6px)}
}

/* ---------- Before / After page ---------- */
body.prime-motion .prime-added-case{background:#fff;padding:clamp(16px,2.4vw,28px)}
body.prime-motion .prime-added-case__title{font-size:clamp(1.15rem,1.2rem + .5vw,1.6rem);line-height:1.35;letter-spacing:.01em;color:var(--pm-ink)}
body.prime-motion .prime-added-case__meta{
  display:inline-flex;align-items:center;gap:.4em;margin-top:.6em;padding:.35em .9em;border-radius:999px;
  background:linear-gradient(135deg,#fff0f5,#ffe3ec);color:var(--pm-brand);font-weight:700;font-size:.92rem;letter-spacing:.02em;
}
body.prime-motion .prime-photo-pair figure{border-radius:14px;overflow:hidden;background:#f6efe8;box-shadow:0 10px 30px -18px rgba(52,37,46,.35)}
body.prime-motion .prime-photo-pair figcaption{letter-spacing:.14em;font-weight:700}
body.prime-motion .prime-photo-pair figure:last-child{box-shadow:0 0 0 2px rgba(170,53,93,.25),0 14px 34px -18px rgba(170,53,93,.5)}
body.prime-motion .prime-photo-pair img{transition:transform .9s var(--pm-ease)}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .prime-photo-pair figure:hover img{transform:scale(1.04)}
}
body.prime-motion .prime-case-grid > article{background:#fff;overflow:hidden}
body.prime-motion .prime-case-grid > article > img{transition:transform .9s var(--pm-ease)}
@media (hover:hover) and (pointer:fine){
  body.prime-motion .prime-case-grid > article:hover > img{transform:scale(1.03)}
}

/* Media coverage section (injected by the plugin) */
body.prime-motion .pm-media .pm-media__figure,
.pm-media .pm-media__figure{max-width:880px;margin:0 auto;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 2px 4px rgba(52,37,46,.04),0 30px 70px -36px rgba(170,53,93,.45)}
.pm-media .pm-media__figure img{display:block;width:100%;height:auto}
.pm-media .prime-results__note{text-align:center;margin-top:1.2em}

/* ---------- Numbers ---------- */
body.prime-motion .pm-num{font-variant-numeric:tabular-nums}

/* ---------- Accessibility & reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html.pm-js body.prime-motion .pm-reveal{opacity:1!important;transform:none!important;transition:none!important}
  body.prime-motion .pm-ch{opacity:1!important;transform:none!important;filter:none!important}
  body.prime-motion .pm-aurora i,body.prime-motion .ph-fixed .ph-button,body.prime-motion .prx-fixed .prx-button,body.prime-motion .prime-fixed-cta__primary{animation:none!important}
  body.prime-motion .pm-px{transform:none!important}
  html.pm-js body.prime-motion .ph-fixed:not(.pm-cta-in),html.pm-js body.prime-motion .prx-fixed:not(.pm-cta-in),html.pm-js body.prime-motion .prime-fixed-cta:not(.pm-cta-in){transform:none;opacity:1}
}
