/* Premium motion layer (WDG). Tokens + page transitions + hero lines + press feedback + reveals.
   Works alongside each site's own CSS; everything respects prefers-reduced-motion. */
:root{
  --pm-ease-out:cubic-bezier(0.23,1,0.32,1);
  --pm-ease-in-out:cubic-bezier(0.77,0,0.175,1);
  --pm-rise:18px;
}
@media (prefers-reduced-motion:reduce){:root{--pm-rise:0px}}

/* Page-to-page: native cross-document view transitions (Chrome/Edge/Safari; others load normally) */
@view-transition{navigation:auto}
@media (prefers-reduced-motion:reduce){@view-transition{navigation:none}}
::view-transition-old(root){animation:280ms var(--pm-ease-out) both pm-vt-out}
::view-transition-new(root){animation:380ms var(--pm-ease-out) both pm-vt-in}
@keyframes pm-vt-out{to{opacity:0}}
@keyframes pm-vt-in{from{opacity:0;translate:0 10px}}

/* Press feedback: individual `scale` property so it never fights a component's own transform */
.pm-press:active:not(:disabled){scale:.97}

/* Hero headline: each line rises out of its own mask */
.pm-js [data-pm-lines]:not(.pm-ready){visibility:hidden;animation:pm-failsafe 0s 1.5s forwards}
@keyframes pm-failsafe{to{visibility:visible}}
.pm-line{display:block;overflow:hidden;padding-bottom:.08em;margin-bottom:-.08em}
.pm-line>span{display:block;animation:pm-line-up 950ms var(--pm-ease-out) both;animation-delay:calc(var(--pm-i)*110ms + 120ms)}
@keyframes pm-line-up{from{translate:0 105%}}
@media (prefers-reduced-motion:reduce){.pm-line>span{animation:pm-fade 400ms ease both}}
@keyframes pm-fade{from{opacity:0}}

/* Generic reveal (for elements the site doesn't already reveal) */
.pm-js [data-pm-reveal]{opacity:0;translate:0 var(--pm-rise);transition:opacity .8s var(--pm-ease-out),translate .8s var(--pm-ease-out);transition-delay:calc(var(--pm-i,0)*70ms)}
.pm-js [data-pm-reveal].pm-in{opacity:1;translate:none}
@media (prefers-reduced-motion:reduce){.pm-js [data-pm-reveal]{transition-duration:.3s;transition-delay:0s}}

/* ── Website motion recipes (premium-website-motion skill, Nov 2026) ── */

/* Hero: lede, buttons and proof line step in after the headline (450/560/650ms) */
.pm-js .hero-side>*{animation:pm-step-up 800ms var(--pm-ease-out) both}
.pm-js .hero-side>*:nth-child(1){animation-delay:450ms}
.pm-js .hero-side>*:nth-child(2){animation-delay:560ms}
.pm-js .hero-side>*:nth-child(3){animation-delay:650ms}
@keyframes pm-step-up{from{opacity:0;translate:0 14px}}
@media (prefers-reduced-motion:reduce){.pm-js .hero-side>*{animation:pm-fade 400ms ease both;animation-delay:0s!important}}

/* Hero proof line: true facts only (risk reversal next to the main button) */
.hero-deal{margin:16px 0 0;font-size:14px;font-weight:600}
.hero-deal a{color:var(--gold,#BC8C34);text-decoration:underline;text-underline-offset:3px}
.pm-proof{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:18px;font-size:13px;letter-spacing:.02em;opacity:.88;list-style:none;padding:0}
.pm-proof li{display:inline-flex;align-items:center;gap:7px}
.pm-proof li::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--gold,#BC8C34)}

/* Header: hides while scrolling down, comes back on scroll up; keyboard focus always brings it back */
.nav{transition:background .35s,color .35s,box-shadow .35s,transform .45s var(--pm-ease-out)}
.nav.pm-hide:not(.open){transform:translateY(-100%)}
.nav:focus-within{transform:none!important}
@media (prefers-reduced-motion:reduce){.nav{transition:background .35s,color .35s,box-shadow .35s}}

/* Button fill: colour rises from the bottom on hover (mouse/trackpad only) */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .btn,.nav-cta{position:relative;isolation:isolate;overflow:hidden}
  .btn::before,.nav-cta::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--pm-fill,rgba(255,255,255,.14));clip-path:inset(100% 0 0 0);transition:clip-path .45s var(--pm-ease-out)}
  .btn:hover::before,.nav-cta:hover::before{clip-path:inset(0)}
  .btn-light{--pm-fill:#DCEF8E}.btn-light:hover{background:var(--lime,#C3E25B)}
  .btn-dark{--pm-fill:var(--accent,#387A3C)}.btn-dark:hover{background:var(--ink,#1E2B2B)}
  .btn-line{--pm-fill:var(--ink,#1E2B2B)}.btn-line:hover{background:transparent;transition:color .45s}
  .btn-ghost:hover{background:transparent}
  .nav-cta{--pm-fill:#DCEF8E}.nav.solid .nav-cta{--pm-fill:var(--accent,#2F7A3B)}
}

/* Magnetic main button (one per page, set by premium-motion.js) */
.pm-magnet{transition:translate .3s var(--pm-ease-out)}
.pm-magnet.pm-pulling{transition-property:background,color,border-color,scale!important}
