/* ============================================================
   Playloudr Homepage — motion & graphics layer
   Additive only. Gated behind prefers-reduced-motion.
   ============================================================ */

/* ---------- Scroll progress bar ---------- */
.fx-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 200; pointer-events: none;
  background: var(--blue-grad);
  box-shadow: 0 0 12px rgba(45,127,230,.55);
  transition: width .08s linear;
}

/* ---------- Animated hero aurora ---------- */
.mkt-hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-aurora {
  position: absolute; inset: -25% -10% auto -10%; height: 150%;
  z-index: -2; pointer-events: none; filter: blur(60px); opacity: .8;
}
.hero-aurora i {
  position: absolute; display: block; border-radius: 50%;
  mix-blend-mode: multiply;
}
.hero-aurora i:nth-child(1) {
  width: 520px; height: 520px; left: 48%; top: -8%;
  background: radial-gradient(circle at 30% 30%, oklch(0.72 0.16 255 / .55), transparent 70%);
  animation: auroraA 18s ease-in-out infinite;
}
.hero-aurora i:nth-child(2) {
  width: 460px; height: 460px; left: 60%; top: 18%;
  background: radial-gradient(circle at 50% 50%, oklch(0.74 0.15 330 / .42), transparent 70%);
  animation: auroraB 22s ease-in-out infinite;
}
.hero-aurora i:nth-child(3) {
  width: 420px; height: 420px; left: 30%; top: 30%;
  background: radial-gradient(circle at 50% 50%, oklch(0.78 0.13 200 / .40), transparent 70%);
  animation: auroraC 26s ease-in-out infinite;
}
@keyframes auroraA { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(-60px,40px) scale(1.12)} 66%{transform:translate(40px,-30px) scale(.94)} }
@keyframes auroraB { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-80px,30px) scale(1.15)} }
@keyframes auroraC { 0%,100%{transform:translate(0,0) scale(1)} 40%{transform:translate(70px,-50px) scale(1.1)} 80%{transform:translate(-30px,40px) scale(.9)} }

/* subtle grid texture over hero */
.mkt-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(45,127,230,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(45,127,230,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%);
}

/* ---------- Shimmer on gradient wordmark ---------- */
.mkt-hero h1 .pay {
  background-size: 220% 100%;
  animation: payShimmer 6s ease-in-out infinite;
}
@keyframes payShimmer { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
/* exit (scrolling back up): slide back down the way it came in */
.reveal.out-down { opacity: 0; transform: translateY(26px); }
.reveal-scale { transform: translateY(26px) scale(.97); }
.reveal-scale.in { transform: none; }

/* ---------- Floating phone + parallax ---------- */
.mkt-stage { perspective: 1200px; }
.mkt-stage .phone {
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}

/* glow ring behind phone */
.mkt-stage::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 380px; height: 380px; transform: translate(-30%,-50%);
  z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, oklch(0.72 0.16 255 / .28), transparent 68%);
  animation: ringPulse 5s ease-in-out infinite;
}
@keyframes ringPulse { 0%,100%{opacity:.55; transform:translate(-30%,-50%) scale(1)} 50%{opacity:.9; transform:translate(-30%,-50%) scale(1.08)} }

/* ---------- Juicy card hover ---------- */
.mkt-card {
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s cubic-bezier(.22,1,.36,1), border-color .25s;
}
.mkt-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 2px 4px rgba(17,20,43,.04), 0 26px 50px rgba(17,20,43,.14);
  border-color: var(--blue-300);
}
.mkt-card-ico { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.mkt-card:hover .mkt-card-ico { transform: translateY(-2px) scale(1.12) rotate(-4deg); }
.mkt-card.link-card { position: relative; overflow: hidden; }
.mkt-card.link-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.mkt-card.link-card:hover::after { transform: translateX(120%); }

/* ---------- Bobbing problem pills ---------- */
.scatter .pill {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s, color .2s;
  animation: pillBob 5s ease-in-out infinite;
  animation-delay: var(--bob, 0s);
}
.scatter .pill:hover {
  transform: translateY(-5px) scale(1.06); color: var(--blue-600);
  box-shadow: 0 14px 28px rgba(17,20,43,.12);
}
@keyframes pillBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

/* ---------- Magnetic / shiny primary buttons ---------- */
.btn-primary { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-130%); transition: transform .6s ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:hover::after { transform: translateX(130%); }

/* ---------- Flow nodes pop in sequence ---------- */
.flow .node { transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s; }
.flow .node.accent { animation: nodePulse 2.6s ease-in-out infinite; }
@keyframes nodePulse {
  0%,100%{ box-shadow: var(--sh-blue), 0 0 0 0 rgba(45,127,230,.45); }
  50%{ box-shadow: var(--sh-blue), 0 0 0 10px rgba(45,127,230,0); }
}
.flow .node:hover { transform: translateY(-3px) scale(1.04); }

/* ---------- App frame entrance tilt ---------- */
.app-frame { transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s; }
.reveal.app-frame { transform: translateY(34px) rotateX(7deg); transform-origin: center top; }
.reveal.app-frame.in { transform: none; }
.frame-stat .fs-num { font-variant-numeric: tabular-nums; }

/* table rows stagger */
.table tbody tr { opacity: 0; transform: translateX(-14px); transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1); }
.table tbody tr.in { opacity: 1; transform: none; }
.table tbody tr:hover { background: var(--blue-tint); }

/* ---------- FAQ hover ---------- */
.faq-item { transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s, border-color .25s; }
.faq-item:hover { transform: translateY(-3px); border-color: var(--blue-300); box-shadow: 0 16px 34px rgba(17,20,43,.10); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .table tbody tr { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-aurora i, .mkt-stage::before,
  .mkt-hero h1 .pay, .scatter .pill, .flow .node.accent { animation: none !important; }
}
