/* ================= cinematic motion layer (preview) ================= */
:root { --neon: #1fd1a5; }

/* scroll progress */
.fx-progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; height: 3px;
  transform: scaleX(0); transform-origin: right center;
  background: linear-gradient(90deg, var(--neon), var(--yellow));
  z-index: 200; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  box-shadow: 0 0 12px rgba(255, 201, 33, .55);
}
html.anim-on .fx-progress { opacity: 1; }

/* hero cinematic background layers */
html.anim-on .hero { isolation: isolate; overflow: hidden; }
.fx-aurora, .fx-grid, .fx-beam { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.fx-aurora {
  background:
    radial-gradient(46% 40% at 76% 14%, rgba(31, 209, 165, .30), transparent 70%),
    radial-gradient(40% 36% at 20% 82%, rgba(255, 201, 33, .18), transparent 72%);
  filter: blur(8px); opacity: .95;
  animation: auroraDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes auroraDrift {
  from { transform: translate3d(-3%, -2%, 0) scale(1.04); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.16); }
}
.fx-grid {
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(62% 62% at 62% 28%, #000 0%, transparent 76%);
  mask-image: radial-gradient(62% 62% at 62% 28%, #000 0%, transparent 76%);
  animation: gridDrift 30s linear infinite;
}
@keyframes gridDrift { to { background-position: 64px 64px, 64px 64px; } }
.fx-beam { overflow: hidden; }
.fx-beam::before {
  content: ""; position: absolute; top: -40%; inset-inline-start: 0;
  width: 42%; height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  animation: beamSweep 11s ease-in-out infinite;
}
@keyframes beamSweep {
  0%, 100% { transform: translateX(-40%) rotate(14deg); }
  50%      { transform: translateX(300%) rotate(14deg); }
}
.hero-in { position: relative; z-index: 1; }

/* floating hero product stage */
.hero-media { perspective: 1100px; }
.fx-halo {
  position: absolute; inset: -16% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,201,33,.36), rgba(255,201,33,.07) 56%, transparent 74%);
  filter: blur(30px);
  animation: haloPulse 6.5s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: .7; transform: scale(.95); }
  50%      { opacity: 1;  transform: scale(1.06); }
}
.fx-ring {
  position: absolute; inset: -7%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(31,209,165,.6) 72%, rgba(255,201,33,.7) 82%, transparent 92%);
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 68%, #000 73%, transparent 75%);
  mask: radial-gradient(closest-side, transparent 66%, #000 68%, #000 73%, transparent 75%);
  animation: ringSpin 16s linear infinite; opacity: .8;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
html.anim-on .hero-frame {
  animation: floatY 7s ease-in-out infinite;
  will-change: transform;
  box-shadow: 0 34px 74px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07), 0 0 70px rgba(31,209,165,.14);
  transition: box-shadow .4s ease, filter .4s ease;
}
html.anim-on .hero-frame:hover { filter: brightness(1.06); box-shadow: 0 40px 90px rgba(0,0,0,.65), 0 0 90px rgba(255,201,33,.25); }
@keyframes floatY {
  0%, 100% { transform: translateY(-7px) rotate(-2.5deg); }
  50%      { transform: translateY(9px)  rotate(-.8deg); }
}
.fx-dust { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fx-dust i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 14px rgba(31,209,165,.9), 0 0 6px rgba(255,201,33,.6);
  animation: dustRise 12s linear infinite;
}
@keyframes dustRise {
  0%   { transform: translateY(20px) scale(.6); opacity: 0; }
  20%  { opacity: .9; }
  80%  { opacity: .5; }
  100% { transform: translateY(-160px) scale(1); opacity: 0; }
}

/* upgraded scroll reveal */
html.anim-on .reveal {
  opacity: 0;
  transform: translateY(32px) scale(.988);
  filter: blur(6px);
  transition:
    opacity .85s cubic-bezier(.2,.7,.2,1),
    transform .85s cubic-bezier(.2,.7,.2,1),
    filter .7s ease;
  transition-delay: calc(var(--i, 0) * 85ms);
}
html.anim-on .reveal.in { opacity: 1; transform: none; filter: none; }

/* card motion */
html.anim-on .plan,
html.anim-on .sample,
html.anim-on .sg-accts a,
html.anim-on .hero-chips li,
html.anim-on .mk-phone {
  transition: transform .38s cubic-bezier(.2,.7,.2,1), box-shadow .38s ease, border-color .38s ease;
}
html.anim-on .plan:hover { transform: translateY(-8px); box-shadow: 0 24px 54px rgba(7,16,34,.22), 0 0 0 1px rgba(255,201,33,.4); }
html.anim-on .sample:hover { transform: translateY(-8px); box-shadow: 0 24px 54px rgba(7,16,34,.2); }
html.anim-on .sg-accts a:hover { box-shadow: 0 16px 34px rgba(7,16,34,.14); }
html.anim-on .hero-chips li:hover { transform: translateY(-3px); border-color: rgba(255,201,33,.45); }

/* section glow on the navy bands */
html.anim-on .section-navy { position: relative; isolation: isolate; }
html.anim-on .section-navy::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 40% at 88% 0%, rgba(31,209,165,.16), transparent 70%);
  animation: auroraDrift 22s ease-in-out infinite alternate;
}

/* smoother tab change (no opacity start: a paused/blocked animation must never hide a panel) */
html.anim-on .panel { animation: panelIn .45s ease; }
@keyframes panelIn { from { transform: translateY(10px); } to { transform: none; } }

/* ---------- performance / opt-outs ---------- */
@media (max-width: 720px) {
  html.anim-on .reveal { filter: none; transform: translateY(22px); }
  .fx-aurora { filter: blur(4px); }
  .fx-beam, .fx-dust { display: none; }
  .fx-halo { filter: blur(18px); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-aurora, .fx-grid, .fx-beam::before, .fx-halo, .fx-ring, .fx-dust i,
  html.anim-on .hero-frame, html.anim-on .section-navy::after, html.anim-on .panel { animation: none !important; }
  html.anim-on .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}
html.no-anim .fx-aurora, html.no-anim .fx-grid, html.no-anim .fx-beam,
html.no-anim .fx-halo, html.no-anim .fx-ring, html.no-anim .fx-dust,
html.no-anim .fx-progress { display: none !important; }
html.no-anim .hero-frame, html.no-anim .panel { animation: none !important; }
html.no-anim .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

/* ================= v2: bolder motion ================= */
/* 3D floating shapes (pure decoration) */
.fx-shapes { position:absolute; inset:0; pointer-events:none; z-index:0; perspective:900px; overflow:hidden; }
.fx-shapes .sh { position:absolute; will-change:transform; transform-style:preserve-3d; }
.sh-cube { width:54px; height:54px; border-radius:12px;
  background:linear-gradient(135deg, rgba(31,209,165,.55), rgba(31,209,165,.05));
  border:1px solid rgba(31,209,165,.7); box-shadow:0 0 28px rgba(31,209,165,.45), inset 0 0 18px rgba(31,209,165,.25);
  animation: spin3d 14s linear infinite, bob 6s ease-in-out infinite; }
.sh-cube.y { background:linear-gradient(135deg, rgba(255,201,33,.55), rgba(255,201,33,.05)); border-color:rgba(255,201,33,.8);
  box-shadow:0 0 28px rgba(255,201,33,.4), inset 0 0 18px rgba(255,201,33,.2); animation-duration:18s,7.5s; }
.sh-ring { width:90px; height:90px; border-radius:50%; border:3px solid rgba(255,201,33,.75);
  box-shadow:0 0 24px rgba(255,201,33,.5); animation: spin3d 11s linear infinite reverse, bob 8s ease-in-out infinite; }
.sh-ring.g { border-color:rgba(31,209,165,.8); box-shadow:0 0 24px rgba(31,209,165,.5); width:64px; height:64px; }
@keyframes spin3d { from{ transform: rotateX(20deg) rotateY(0deg) rotateZ(0deg);} to{ transform: rotateX(20deg) rotateY(360deg) rotateZ(40deg);} }
@keyframes bob { 0%,100%{ margin-top:0;} 50%{ margin-top:-26px;} }

/* hero frame: continuous 3D sway */
html.anim-on .hero-frame { animation: sway3d 9s ease-in-out infinite !important; transform-style:preserve-3d; }
@keyframes sway3d {
  0%,100% { transform: translateY(-8px) rotateY(-16deg) rotateX(5deg) rotateZ(-2deg); }
  50%     { transform: translateY(10px)  rotateY(14deg)  rotateX(-4deg) rotateZ(1.5deg); }
}
.hero-media { perspective: 1000px; }

/* headline: slide up + shimmering gold */
html.anim-on .hero h1, html.anim-on .hero-copy h1 { animation: headIn 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes headIn { from { transform: translateY(26px) scale(.97); letter-spacing:.04em; } to { transform:none; letter-spacing:normal; } }
html.anim-on .hero h1 em, html.anim-on .hero h1 mark, html.anim-on .hero h1 .hl, html.anim-on .hero h1 span {
  background: linear-gradient(100deg,#FFC921 20%,#fff6c4 45%,#FFC921 70%); background-size:220% 100%;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position:-220% 0; } }
html.anim-on .hero-cta, html.anim-on .hero-chips, html.anim-on .hero-copy p { animation: riseIn .9s cubic-bezier(.2,.8,.2,1) both; }
html.anim-on .hero-copy p { animation-delay:.15s; } html.anim-on .hero-cta { animation-delay:.3s; } html.anim-on .hero-chips { animation-delay:.45s; }
@keyframes riseIn { from { transform: translateY(24px); } to { transform:none; } }

/* glowing buttons */
html.anim-on .btn-primary { position:relative; overflow:hidden; animation: btnGlow 2.6s ease-in-out infinite; }
html.anim-on .btn-primary::after { content:""; position:absolute; top:0; bottom:0; width:40%; inset-inline-start:-60%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent); transform:skewX(-20deg); animation: btnShine 3.4s ease-in-out infinite; }
@keyframes btnGlow { 0%,100%{ box-shadow:0 6px 18px rgba(255,201,33,.35),0 0 0 0 rgba(255,201,33,.5);} 50%{ box-shadow:0 10px 30px rgba(255,201,33,.75),0 0 0 10px rgba(255,201,33,0);} }
@keyframes btnShine { 0%,55%{ inset-inline-start:-60%;} 100%{ inset-inline-start:130%;} }
html.anim-on .btn { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
html.anim-on .btn:hover { transform: translateY(-3px) scale(1.04); }

/* cards: 3D flip-in, then tilt on hover */
html.anim-on .plan.reveal, html.anim-on .sg-plan.reveal, html.anim-on .sample.reveal {
  transform: perspective(900px) translateY(50px) rotateX(18deg) scale(.94); }
html.anim-on .plan.reveal.in, html.anim-on .sg-plan.reveal.in, html.anim-on .sample.reveal.in { transform: perspective(900px) none; }
html.anim-on .plan, html.anim-on .sg-plan { transform-style:preserve-3d; }
html.anim-on .plan-hot { animation: hotPulse 3.2s ease-in-out infinite; }
@keyframes hotPulse { 0%,100%{ box-shadow:0 0 0 1px rgba(255,201,33,.5),0 14px 40px rgba(255,201,33,.18);} 50%{ box-shadow:0 0 0 2px rgba(255,201,33,.9),0 20px 60px rgba(255,201,33,.45);} }
html.anim-on .plan-price bdi, html.anim-on .sg-price { font-variant-numeric: tabular-nums; }

/* parallax helper + section sweep */
[data-px] { will-change: transform; }
html.anim-on .section-navy::before { content:""; position:absolute; inset:-20% -10%; z-index:-1; pointer-events:none;
  background: conic-gradient(from 0deg at 20% 80%, transparent 0 70%, rgba(31,209,165,.12) 82%, transparent 95%); animation: ringSpin 40s linear infinite; }
html.anim-on .section-navy { overflow:hidden; }

@media (max-width:720px){
  .fx-shapes { display:block; }
  .sh-cube { width:34px; height:34px; } .sh-ring{ width:54px; height:54px; } .sh-ring.g{ width:40px; height:40px; }
  html.anim-on .section-navy::before { animation:none; }
  html.anim-on .plan.reveal, html.anim-on .sg-plan.reveal, html.anim-on .sample.reveal { transform: perspective(700px) translateY(34px) rotateX(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-shapes .sh, html.anim-on .hero-frame, html.anim-on .btn-primary, html.anim-on .btn-primary::after, html.anim-on .plan-hot,
  html.anim-on .hero h1, html.anim-on .hero-cta, html.anim-on .hero-chips, html.anim-on .hero-copy p, html.anim-on .hero h1 span { animation:none !important; }
}
html.no-anim .fx-shapes { display:none !important; }
