/* AdPay motion — smooth "blur → sharp" reveals, intro loader, growing dark panels, corner light.
   Loaded on every public page. Everything turns off with the device's "reduce motion" setting. */

/* ---------- 1. headings: words go from soft/blurred to sharp, one by one ---------- */
.mw { display: inline-block; opacity: .12; filter: blur(10px); transform: translateY(.18em); transition: opacity .8s cubic-bezier(.2,.7,.2,1), filter .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); will-change: opacity, filter; }
[data-mw].mw-in .mw { opacity: 1; filter: none; transform: none; }

/* ---------- 2. blocks: soft blur + slight scale → sharp ---------- */
[data-mb] { opacity: 0; filter: blur(14px); transform: translateY(28px) scale(.97); transition: opacity 1s cubic-bezier(.2,.7,.2,1), filter 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
[data-mb].mw-in { opacity: 1; filter: none; transform: none; }

/* ---------- 3. dark panels grow as you scroll + soft corner light ---------- */
[data-grow] { transform-origin: 50% 0; will-change: transform; }
.mw-light { position: relative; isolation: isolate; }
.mw-light::before { content: ""; position: absolute; z-index: 0; pointer-events: none; left: -12%; top: -30%; width: 60%; height: 120%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--brand-400) / .28), rgb(var(--brand-500) / .08) 55%, transparent);
  transform: rotate(-24deg); filter: blur(30px); animation: mwBeam 14s ease-in-out infinite alternate; }
.mw-light > * { z-index: 1; }
.mw-light > :not(.absolute):not(.fx-aurora) { position: relative; }
@keyframes mwBeam { 0% { transform: rotate(-24deg) translate(0,0) } 100% { transform: rotate(-14deg) translate(14%, 8%) } }

/* ---------- 4. intro loader (homepage, once per visit) ---------- */
#mwIntro { position: fixed; inset: 0; z-index: 100; background: #fff; display: grid; place-items: center; transition: clip-path 1s cubic-bezier(.76,0,.24,1); clip-path: inset(0 0 0 0); }
#mwIntro.out { clip-path: inset(0 0 100% 0); }
#mwIntro .lg { display: flex; align-items: center; gap: 14px; font: 800 clamp(34px, 6vw, 64px)/1 Inter, system-ui, sans-serif; letter-spacing: -.04em; color: #0b0b0f; }
#mwIntro .lg img { width: 1.1em; height: 1.1em; opacity: 0; transform: scale(.6) rotate(-20deg); animation: mwPop .6s cubic-bezier(.2,1.4,.4,1) .05s forwards; }
#mwIntro .lg span { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(.3em); animation: mwLetter .5s cubic-bezier(.2,.7,.2,1) forwards; }
#mwIntro .lg span.p { color: rgb(var(--brand-500)); }
#mwIntro .bar { position: absolute; left: 50%; bottom: 14%; width: 160px; height: 3px; translate: -50% 0; border-radius: 9px; background: #eef0f3; overflow: hidden; }
#mwIntro .bar i { position: absolute; inset: 0; background: rgb(var(--brand-500)); transform: scaleX(0); transform-origin: left; animation: mwBar 1.1s cubic-bezier(.4,0,.2,1) .1s forwards; }
@keyframes mwPop { to { opacity: 1; transform: none } }
@keyframes mwLetter { to { opacity: 1; filter: none; transform: none } }
@keyframes mwBar { to { transform: scaleX(1) } }

/* ---------- 5. "pay in one tap" auto demo ---------- */
.pd-sec { position: relative; }
.pd-frame { position: relative; border-radius: 34px; background: #f1f2f5; padding: 26px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.04); }
.pd-app { position: relative; border-radius: 24px; background: #fff; padding: 22px; box-shadow: 0 30px 60px -30px rgba(15,23,42,.35); }
.pd-lbl { font-size: 12px; color: #6b7280; font-weight: 600; }
.pd-amt { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 14px 16px; border-radius: 16px; background: #f6f7f9; }
.pd-amt b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: #fff; border-radius: 99px; padding: 6px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pd-cur i { width: 16px; height: 16px; border-radius: 50%; background: rgb(var(--brand-500)); display: inline-block; }
.pd-to { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid #eef0f3; opacity: 0; transform: translateY(10px); transition: all .5s cubic-bezier(.2,.7,.2,1); }
.pd-to.on { opacity: 1; transform: none; }
.pd-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: #1877F2; font-size: 18px; }
.pd-btn { position: relative; margin: 18px auto 0; height: 52px; width: 100%; border-radius: 99px; background: #0b0b0f; color: #fff; font-weight: 700; display: grid; place-items: center; overflow: hidden;
          transition: width .5s cubic-bezier(.65,0,.35,1), background .4s ease, transform .15s ease; }
.pd-btn span { transition: opacity .25s ease; white-space: nowrap; }
.pd-btn.press { transform: scale(.96); }
.pd-btn.load { width: 52px; }
.pd-btn.load span { opacity: 0; }
.pd-btn .spin { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.25); border-top-color: #fff; opacity: 0; animation: pdSpin .7s linear infinite; transition: opacity .2s; }
.pd-btn.load .spin { opacity: 1; }
.pd-btn.ok { width: 100%; background: rgb(var(--brand-400)); color: #052e16; }
.pd-btn.ok .spin { opacity: 0; }
@keyframes pdSpin { to { transform: rotate(360deg) } }
.pd-cursor { position: absolute; left: 70%; top: 18%; width: 22px; height: 22px; z-index: 5; pointer-events: none; transition: left 1s cubic-bezier(.45,0,.2,1), top 1s cubic-bezier(.45,0,.2,1), transform .15s; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.pd-cursor.click { transform: scale(.82); }
.pd-toast { position: absolute; right: -18px; top: -22px; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px -20px rgba(15,23,42,.45); font-size: 12px; opacity: 0; transform: translateY(10px) scale(.9); transition: all .5s cubic-bezier(.2,1.3,.4,1); z-index: 4; }
.pd-toast.on { opacity: 1; transform: none; }
.pd-toast b { display: block; font-size: 15px; }
.pd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: rgb(var(--brand-500) / .12); color: rgb(var(--brand-700)); font-size: 12px; font-weight: 700; }
.pd-chip i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--brand-500)); display: inline-block; }
.pd-mini { border-radius: 22px; background: #fff; padding: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 20px 40px -30px rgba(15,23,42,.3); }

@media (prefers-reduced-motion: reduce) {
  .mw, [data-mb] { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; }
  [data-grow] { transform: none !important; }
  .mw-light::before { animation: none; }
  #mwIntro { display: none; }
}
