/* 3-UAE Studio — home hero motion graphic: a store builds itself on a tablet and a phone (12s loop) */
.mg { --t: 12s; --v1: #8B6CFF; --v2: #5B3FE0; --cy: #23C4E8; --pk: #FF5C8A; position: relative; width: 100%; max-width: 660px; aspect-ratio: 600 / 500; margin-inline: auto; container-type: inline-size; isolation: isolate; user-select: none; }
.mg *, .mg *::before, .mg *::after { box-sizing: border-box; }
.mg svg { display: block; }
.mg-streaks { position: absolute; inset: -6% -10%; width: 120%; height: 112%; z-index: -1; fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; filter: blur(.4px); }
.mg-streaks path:nth-child(2) { stroke: rgba(255, 255, 255, .08); }
.mg-streaks path:nth-child(3) { stroke: rgba(255, 255, 255, .06); }
.mg-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); opacity: .55; }
.mg-orb.o1 { width: 52cqw; aspect-ratio: 1; left: 18cqw; top: 14cqw; background: radial-gradient(circle, rgba(139, 108, 255, .55), transparent 65%); animation: mgOrb 9s ease-in-out infinite; }
.mg-orb.o2 { width: 36cqw; aspect-ratio: 1; left: 0; top: 40cqw; background: radial-gradient(circle, rgba(35, 196, 232, .4), transparent 65%); animation: mgOrb 11s ease-in-out infinite reverse; }
@keyframes mgOrb { 50% { transform: translate(3cqw, -3cqw) scale(1.08); } }

/* ---------- devices ---------- */
.mg-tab-float { position: absolute; top: 9cqw; right: 1cqw; width: 86cqw; animation: mgFloat 7s ease-in-out infinite; }
.mg-phone-float { position: absolute; left: 0; bottom: 4cqw; width: 25.5cqw; z-index: 3; animation: mgFloat 6s ease-in-out -2s infinite; }
@keyframes mgFloat { 50% { transform: translateY(-1.4cqw); } }
.mg-tab { padding: 1.3cqw; border-radius: 3.4cqw; background: linear-gradient(150deg, #2B2B2F, #0C0C0E 55%, #1A1A1D); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 5cqw 9cqw -4cqw rgba(0, 0, 0, .9), 0 0 7cqw -2cqw rgba(139, 108, 255, .35); transform: perspective(1600px) rotateY(-9deg) rotateX(5deg) rotateZ(-1deg); transform-origin: 60% 50%; }
.mg-phone { padding: 1.2cqw; border-radius: 5cqw; background: linear-gradient(150deg, #2E2E32, #0B0B0D 60%, #1C1C1F); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 4cqw 7cqw -2cqw rgba(0, 0, 0, .95), 0 0 6cqw -2cqw rgba(35, 196, 232, .3); transform: perspective(1200px) rotateY(10deg) rotateZ(2deg); }
.mg-screen { position: relative; aspect-ratio: 16 / 10.4; border-radius: 2.4cqw; overflow: hidden; background: #0B0B0F; container-type: inline-size; }
.mg-pscreen { position: relative; aspect-ratio: 9 / 19; border-radius: 3.8cqw; overflow: hidden; background: #0B0B0F; container-type: inline-size; }
.mg-notch { position: absolute; z-index: 6; top: 3cqw; left: 50%; width: 30cqw; height: 6.4cqw; margin-left: -15cqw; border-radius: 99px; background: #000; }

/* tablet chrome */
.mg-addr { position: relative; z-index: 5; display: flex; align-items: center; gap: 2cqw; height: 5.6cqw; padding: 0 2.2cqw; background: #16161B; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.mg-dots { display: flex; gap: .9cqw; }
.mg-dots i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #FF5F57; }
.mg-dots i:nth-child(2) { background: #FEBC2E; } .mg-dots i:nth-child(3) { background: #28C840; }
.mg-url { display: inline-flex; align-items: center; gap: .8cqw; margin-inline: auto; padding: .5cqw 2.6cqw; border-radius: 99px; background: #0D0D11; color: #A1A1AE; font: 600 1.55cqw/1.4 var(--f-brand, system-ui); letter-spacing: .02em; }
.mg-url svg { width: 1.5cqw; height: 1.5cqw; fill: none; stroke: currentColor; stroke-width: 2.4; }
.mg-view { position: absolute; inset: 5.6cqw 0 0; overflow: hidden; }

/* ---------- wireframe (the draft) ---------- */
.mg-wire { position: absolute; inset: 0; padding: 0 4cqw; background-color: #0D0D11; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 3cqw 3cqw; }
.mg-wire i, .mg-wire b, .mg-wire em, .mg-wire u, .p-wire i, .p-wire b, .p-wire u { display: block; border-radius: .8cqw; background: linear-gradient(90deg, #1D1D24 0%, #2C2C36 50%, #1D1D24 100%); background-size: 200% 100%; animation: mgShimmer 1.6s linear infinite; }
@keyframes mgShimmer { to { background-position: -200% 0; } }
.w-nav { display: flex; align-items: center; justify-content: space-between; height: 8cqw; }
.w-nav b { width: 12cqw; height: 2.4cqw; }
.w-nav span { display: flex; gap: 2.4cqw; }
.w-nav span i { width: 6cqw; height: 1.3cqw; }
.w-nav em { width: 3.2cqw; height: 3.2cqw; border-radius: 50%; }
.w-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3cqw; align-items: center; min-height: 34cqw; }
.w-txt { display: flex; flex-direction: column; gap: 1.6cqw; }
.w-txt .a { width: 22%; height: 2.2cqw; border-radius: 99px; }
.w-txt .b { width: 92%; height: 3.6cqw; }
.w-txt .c { width: 64%; height: 3.6cqw; }
.w-txt .d { width: 80%; height: 1.5cqw; }
.w-txt u { width: 40%; height: 4.6cqw; border-radius: 99px; margin-top: .8cqw; }
.w-img { aspect-ratio: 1.2; border-radius: 2cqw; display: grid; place-items: center; outline: 1px dashed rgba(255, 255, 255, .2); outline-offset: -1px; background: rgba(255, 255, 255, .02); }
.w-img svg { width: 7cqw; height: 7cqw; fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: 1.4; }
.w-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2cqw; margin-top: 3cqw; }
.w-cards i { height: 15cqw; border-radius: 1.8cqw; }

/* ---------- the designed store ---------- */
.mg-site { position: absolute; inset: 0; color: #fff; background: radial-gradient(60% 70% at 26% 46%, rgba(124, 92, 255, .38), transparent 70%), radial-gradient(45% 55% at 92% 8%, rgba(35, 196, 232, .2), transparent 70%), #0E0B1E; clip-path: inset(0 0 100% 0); animation: mgReveal var(--t) linear infinite; }
@keyframes mgReveal {
  0%, 8% { clip-path: inset(0 0 100% 0); opacity: 1; }
  24% { clip-path: inset(0 0 0 0); }
  95% { clip-path: inset(0 0 0 0); opacity: 1; }
  99% { clip-path: inset(0 0 0 0); opacity: 0; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}
.mg-sweep { position: absolute; z-index: 4; inset-inline: 0; top: 0; height: .5cqw; background: linear-gradient(90deg, transparent, var(--v1) 18%, #fff 50%, var(--cy) 82%, transparent); box-shadow: 0 0 2cqw 0.4cqw rgba(139, 108, 255, .7); opacity: 0; animation: mgSweep var(--t) linear infinite; }
@keyframes mgSweep { 0%, 7.9% { top: 0; opacity: 0; } 8% { top: 0; opacity: 1; } 24% { top: 100%; opacity: 1; } 24.1%, 100% { top: 100%; opacity: 0; } }
.mg-page { padding: 0 4cqw; animation: mgScroll var(--t) var(--ease, ease) infinite; }
@keyframes mgScroll { 0%, 63% { transform: none; } 73%, 97% { transform: translateY(-22cqw); } 100% { transform: none; } }

.s-nav { display: flex; align-items: center; justify-content: space-between; height: 8cqw; }
.s-logo { display: inline-flex; align-items: center; gap: .8cqw; direction: ltr; }
.s-logo svg { width: 3.4cqw; height: 3.4cqw; fill: var(--v1); filter: drop-shadow(0 0 .8cqw rgba(139, 108, 255, .8)); }
.s-logo b { font: 800 2cqw/1 var(--f-brand, system-ui); letter-spacing: .12em; }
.s-links { display: flex; gap: 2.6cqw; }
.s-links i { font-style: normal; font-size: 1.55cqw; font-weight: 600; color: rgba(255, 255, 255, .62); }
.s-links i:first-child { color: #fff; }
.s-cart { position: relative; display: grid; place-items: center; width: 4.4cqw; height: 4.4cqw; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.s-cart svg { width: 2.6cqw; height: 2.6cqw; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-cart em { position: absolute; top: -.6cqw; inset-inline-end: -.6cqw; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--pk); display: grid; place-items: center; font: 800 1.3cqw/1 var(--f-brand, system-ui); font-style: normal; box-shadow: 0 0 1.2cqw rgba(255, 92, 138, .8); animation: mgBadge var(--t) var(--ease, ease) infinite; }
.s-cart em b { grid-area: 1 / 1; }
.s-cart em b:first-child { animation: mgB0 var(--t) step-end infinite; }
.s-cart em b:last-child { opacity: 0; animation: mgB1 var(--t) step-end infinite; }
@keyframes mgB0 { 0% { opacity: 1; } 56% { opacity: 0; } 99% { opacity: 1; } }
@keyframes mgB1 { 0% { opacity: 0; } 56% { opacity: 1; } 99% { opacity: 0; } }
@keyframes mgBadge { 0%, 55% { transform: scale(1); } 57.5% { transform: scale(1.6); } 61% { transform: scale(1); } }

.s-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3cqw; align-items: center; min-height: 34cqw; }
.s-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2cqw; }
.s-copy > * { animation: mgUp var(--t) var(--ease, ease) infinite; }
.s-copy > :nth-child(2) { animation-delay: .08s; } .s-copy > :nth-child(3) { animation-delay: .16s; } .s-copy > :nth-child(4) { animation-delay: .24s; } .s-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes mgUp { 0%, 13% { opacity: 0; transform: translateY(2.4cqw); } 21%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.s-tag { display: inline-block; padding: .35cqw 1.4cqw; border-radius: 99px; font-size: 1.35cqw; font-weight: 700; color: #D3C8FF; background: rgba(139, 108, 255, .18); border: 1px solid rgba(139, 108, 255, .4); }
.mg h3, .mg h4 { margin: 0; font-family: var(--f-display, system-ui); font-weight: 800; line-height: 1.22; color: #fff; text-wrap: balance; }
.mg h3 { font-size: 4.3cqw; background: linear-gradient(100deg, #fff 30%, #CBBEFF 70%, #8EE7FA); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.s-copy p { margin: 0; font-size: 1.55cqw; line-height: 1.6; color: rgba(255, 255, 255, .64); max-width: 30cqw; }
.s-price { display: flex; align-items: baseline; gap: .7cqw; }
.s-price b { font: 800 3.3cqw/1 var(--f-brand, system-ui); }
.s-price span { font-size: 1.4cqw; font-weight: 700; color: rgba(255, 255, 255, .7); }
.s-price s { font: 600 1.5cqw/1 var(--f-brand, system-ui); color: rgba(255, 255, 255, .38); }
.s-btn { display: inline-flex; align-items: center; justify-content: center; padding: 1.25cqw 2.8cqw; border-radius: 99px; font-size: 1.6cqw; font-weight: 800; color: #fff; background: linear-gradient(90deg, var(--v1), var(--cy)); box-shadow: 0 1cqw 3cqw -1cqw rgba(139, 108, 255, .9); white-space: nowrap; }
.s-copy .s-btn { animation: mgUp var(--t) var(--ease, ease) .32s infinite, mgPress var(--t) ease infinite; }
@keyframes mgPress { 0%, 44.6% { scale: 1; filter: none; } 45.6% { scale: .9; filter: brightness(1.3); } 47.4% { scale: 1.04; } 49% { scale: 1; filter: none; } }

.s-art { position: relative; aspect-ratio: 1.12; display: grid; place-items: center; }
.s-ring { position: absolute; width: 82%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, rgba(35, 196, 232, .9) 75%, rgba(139, 108, 255, .9) 90%, transparent 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: mgSpin 4s linear infinite; }
.s-ring.r2 { width: 62%; background: none; border: 1px dashed rgba(255, 255, 255, .16); -webkit-mask: none; mask: none; animation-duration: 18s; animation-direction: reverse; }
@keyframes mgSpin { to { transform: rotate(1turn); } }
.s-pad { position: relative; width: 84%; height: auto; filter: drop-shadow(0 2.6cqw 3cqw rgba(60, 30, 200, .65)); animation: mgPadIn var(--t) var(--ease, ease) infinite; }
@keyframes mgPadIn { 0%, 16% { opacity: 0; transform: scale(.55) rotate(-22deg) translateY(4cqw); } 24% { opacity: 1; transform: scale(1.06) rotate(4deg); } 28% { transform: scale(1) rotate(-6deg); } 36% { transform: rotate(-2deg) translateY(-1.2cqw); } 44% { transform: rotate(-6deg); } 52% { transform: rotate(-2deg) translateY(-1.2cqw); } 60% { transform: rotate(-6deg); } 70% { transform: rotate(-3deg) translateY(-1cqw); } 96% { opacity: 1; transform: rotate(-6deg); } 100% { opacity: 0; } }
.s-spark { position: absolute; width: 1cqw; height: 1cqw; border-radius: 50%; background: #fff; box-shadow: 0 0 1.4cqw .3cqw var(--cy); animation: mgTwinkle 2.4s ease-in-out infinite; }
.s-spark.k1 { top: 14%; inset-inline-start: 18%; } .s-spark.k2 { top: 72%; inset-inline-start: 86%; animation-delay: .8s; box-shadow: 0 0 1.4cqw .3cqw var(--pk); } .s-spark.k3 { top: 20%; inset-inline-start: 84%; animation-delay: 1.5s; width: .7cqw; height: .7cqw; }
@keyframes mgTwinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }

.s-best { padding-top: 2cqw; }
.s-h { margin: 0; font-size: 2.1cqw; font-weight: 800; }
.s-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin-top: 1.4cqw; }
.s-card { position: relative; display: grid; gap: .5cqw; padding: 1.8cqw; border-radius: 1.8cqw; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); opacity: 0; animation: mgCard var(--t) var(--ease, ease) infinite; }
.s-card:nth-child(2) { animation-delay: .18s; } .s-card:nth-child(3) { animation-delay: .36s; }
@keyframes mgCard { 0%, 64% { opacity: 0; transform: translateY(3cqw) scale(.96); } 71%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.s-card svg { width: 6.4cqw; height: 6.4cqw; margin-bottom: .6cqw; fill: none; stroke: #A894FF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 .8cqw rgba(139, 108, 255, .7)); }
.s-card b { font-size: 1.55cqw; font-weight: 700; }
.s-card > span { font-size: 1.4cqw; font-weight: 700; color: var(--cy); }
.s-card em { font-style: normal; font-family: var(--f-brand, system-ui); }
.s-card i { position: absolute; bottom: 1.6cqw; inset-inline-end: 1.6cqw; width: 3cqw; height: 3cqw; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 2cqw; line-height: 1; background: rgba(139, 108, 255, .28); color: #fff; }

.mg-toast { position: absolute; z-index: 3; top: 2cqw; left: 50%; display: inline-flex; align-items: center; gap: 1cqw; padding: .9cqw 2cqw; border-radius: 99px; font-size: 1.5cqw; font-weight: 700; white-space: nowrap; background: rgba(18, 16, 36, .92); border: 1px solid rgba(74, 222, 128, .45); box-shadow: 0 1.4cqw 3cqw -1cqw rgba(0, 0, 0, .8); opacity: 0; transform: translate(-50%, -160%); animation: mgToast var(--t) var(--ease, ease) infinite; }
.mg-toast svg { width: 2cqw; height: 2cqw; fill: none; stroke: #4ADE80; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes mgToast { 0%, 56% { opacity: 0; transform: translate(-50%, -160%); } 59%, 66% { opacity: 1; transform: translate(-50%, 0); } 70%, 100% { opacity: 0; transform: translate(-50%, -160%); } }
.mg-fly { position: absolute; z-index: 3; width: 9cqw; top: 39.4%; inset-inline-start: 70.4%; opacity: 0; filter: drop-shadow(0 0 1.4cqw rgba(139, 108, 255, .9)); animation: mgFly var(--t) cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes mgFly { 0%, 46.9% { opacity: 0; top: 39.4%; inset-inline-start: 70.4%; transform: scale(1); } 47% { opacity: 1; top: 39.4%; inset-inline-start: 70.4%; transform: scale(1); } 51% { top: 14%; inset-inline-start: 80%; transform: scale(.65) rotate(-14deg); } 55.5% { opacity: 1; top: 1.8%; inset-inline-start: 89.3%; transform: scale(.2) rotate(-30deg); } 56.5%, 100% { opacity: 0; top: 1.8%; inset-inline-start: 89.3%; transform: scale(.2); } }

.mg-cursor { position: absolute; z-index: 6; width: 3.4cqw; height: 3.4cqw; fill: #fff; stroke: #0B0B0F; stroke-width: 1.3; stroke-linejoin: round; filter: drop-shadow(0 .4cqw .6cqw rgba(0, 0, 0, .6)); opacity: 0; animation: mgCursor var(--t) cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes mgCursor { 0%, 31% { opacity: 0; top: 98%; inset-inline-start: 46%; transform: scale(1); } 34% { opacity: 1; } 43.6% { top: 60.5%; inset-inline-start: 8.8%; transform: scale(1); } 45.4% { transform: scale(.8); } 47% { transform: scale(1); } 52% { opacity: 1; top: 63%; inset-inline-start: 12%; } 56%, 100% { opacity: 0; top: 66%; inset-inline-start: 15%; } }
.mg-click { position: absolute; z-index: 5; width: 7cqw; height: 7cqw; top: 55.3%; inset-inline-start: 8%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); opacity: 0; animation: mgRipple var(--t) ease-out infinite; }
@keyframes mgRipple { 0%, 45% { opacity: 0; transform: scale(.2); } 45.6% { opacity: 1; transform: scale(.3); } 52%, 100% { opacity: 0; transform: scale(1.7); } }

/* ---------- phone ---------- */
.p-wire { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4cqw; padding: 15cqw 8cqw 8cqw; background: #0D0D11; }
.p-wire b { width: 40%; height: 6cqw; }
.p-wire .img { height: 62cqw; border-radius: 6cqw; outline: 1px dashed rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .02); animation: none; }
.p-wire > i:not(.img) { height: 8cqw; }
.p-wire .s { width: 70%; height: 5cqw !important; }
.p-wire u { width: 60%; height: 12cqw; border-radius: 99px; }
.p-wire span { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; } .p-wire span i { height: 32cqw; border-radius: 5cqw; }
.p-site { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3.2cqw; padding: 15cqw 8cqw 8cqw; color: #fff; background: radial-gradient(80% 45% at 50% 32%, rgba(124, 92, 255, .42), transparent 72%), #0E0B1E; clip-path: inset(0 0 100% 0); animation: mgRevealP var(--t) linear infinite; }
@keyframes mgRevealP {
  0%, 12% { clip-path: inset(0 0 100% 0); opacity: 1; }
  28% { clip-path: inset(0 0 0 0); }
  95% { clip-path: inset(0 0 0 0); opacity: 1; }
  99% { clip-path: inset(0 0 0 0); opacity: 0; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}
.mg-sweep.p { height: 1.4cqw; animation-name: mgSweepP; }
@keyframes mgSweepP { 0%, 11.9% { top: 0; opacity: 0; } 12% { top: 0; opacity: 1; } 28% { top: 100%; opacity: 1; } 28.1%, 100% { top: 100%; opacity: 0; } }
.p-nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.p-nav .s-logo svg { width: 9cqw; height: 9cqw; } .p-nav .s-logo b { font-size: 5.6cqw; }
.p-bag { width: 8cqw; height: 8cqw; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p-art { position: relative; width: 100%; aspect-ratio: 1.15; display: grid; place-items: center; }
.p-art .s-ring { width: 80%; }
.p-art svg { width: 84%; filter: drop-shadow(0 5cqw 6cqw rgba(60, 30, 200, .7)); animation: mgBob 3s ease-in-out infinite; }
@keyframes mgBob { 50% { transform: translateY(-3cqw) rotate(-4deg); } }
.p-site .s-tag { font-size: 4.2cqw; padding: 1cqw 3.6cqw; }
.mg h4 { font-size: 9.6cqw; }
.p-site .s-price b { font-size: 9cqw; } .p-site .s-price span { font-size: 4.4cqw; }
.p-site > .s-btn { width: 100%; padding: 4cqw; font-size: 5cqw; animation: mgTap var(--t) ease infinite; }
@keyframes mgTap { 0%, 70% { scale: 1; } 71.5% { scale: .92; filter: brightness(1.3); } 73% { scale: 1; filter: none; } }
.p-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; width: 100%; margin-top: 1.5cqw; }
.p-row span { aspect-ratio: 1.15; display: grid; place-items: center; border-radius: 5cqw; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.p-row svg { width: 18cqw; height: 18cqw; fill: none; stroke: #A894FF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2cqw rgba(139, 108, 255, .7)); }
.p-sheet { position: absolute; inset: auto 0 0; z-index: 2; display: flex; flex-direction: column; gap: 4cqw; padding: 7cqw 7cqw 9cqw; border-radius: 9cqw 9cqw 0 0; background: #17142C; border-top: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 -6cqw 12cqw rgba(0, 0, 0, .6); transform: translateY(105%); animation: mgSheet var(--t) var(--ease, ease) infinite; }
@keyframes mgSheet { 0%, 73% { transform: translateY(105%); } 78%, 96% { transform: none; } 100% { transform: translateY(105%); } }
.p-sh { margin: 0; font-size: 5.4cqw; font-weight: 800; }
.p-item { display: flex; align-items: center; gap: 3cqw; padding: 3cqw; border-radius: 5cqw; background: rgba(255, 255, 255, .05); }
.p-item svg { width: 15cqw; flex: none; }
.p-item span { display: flex; flex-direction: column; flex: 1; font-size: 4.2cqw; line-height: 1.3; }
.p-item small { color: rgba(255, 255, 255, .55); font-size: 3.6cqw; }
.p-item em { font: 800 5cqw/1 var(--f-brand, system-ui); font-style: normal; color: var(--cy); }
.p-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 4.4cqw; font-weight: 700; color: rgba(255, 255, 255, .75); }
.p-total b { color: #fff; font-size: 5.6cqw; }
.p-sheet .s-btn { width: 100%; padding: 4cqw; font-size: 4.8cqw; animation: mgPay var(--t) ease infinite; }
@keyframes mgPay { 0%, 82% { scale: 1; } 83.5% { scale: .92; filter: brightness(1.3); } 85% { scale: 1; filter: none; } }
.p-done { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5cqw; background: rgba(14, 11, 30, .94); opacity: 0; animation: mgDone var(--t) ease infinite; }
@keyframes mgDone { 0%, 85% { opacity: 0; } 87%, 96% { opacity: 1; } 99%, 100% { opacity: 0; } }
.p-done svg { width: 30cqw; height: 30cqw; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.p-done circle { stroke: #4ADE80; stroke-dasharray: 145; stroke-dashoffset: 145; animation: mgDraw1 var(--t) ease infinite; filter: drop-shadow(0 0 3cqw rgba(74, 222, 128, .7)); }
.p-done path { stroke: #4ADE80; stroke-dasharray: 36; stroke-dashoffset: 36; animation: mgDraw2 var(--t) ease infinite; }
@keyframes mgDraw1 { 0%, 86% { stroke-dashoffset: 145; } 90%, 100% { stroke-dashoffset: 0; } }
@keyframes mgDraw2 { 0%, 89% { stroke-dashoffset: 36; } 92%, 100% { stroke-dashoffset: 0; } }
.p-done b { font-size: 5.6cqw; font-weight: 800; }

/* ---------- floating chips ---------- */
.mg-pill, .mg-palette, .mg-notif { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 1.2cqw; border-radius: 99px; color: #fff; background: rgba(22, 22, 26, .82); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 2cqw 4cqw -1.6cqw rgba(0, 0, 0, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.mg-pill { top: 3.6cqw; left: 7cqw; padding: 1.2cqw 2.4cqw; font-size: 2.2cqw; font-weight: 700; transform: rotate(-6deg); animation: mgPill 5s ease-in-out infinite; }
.mg-pill svg { width: 2.8cqw; height: 2.8cqw; fill: none; stroke: currentColor; stroke-width: 1.8; }
@keyframes mgPill { 50% { transform: rotate(-4deg) translateY(-1cqw); } }
.mg-palette { top: 2.4cqw; right: 8cqw; padding: 1cqw 1.6cqw; gap: .9cqw; opacity: 0; animation: mgChip var(--t) var(--ease, ease) infinite; }
.mg-palette i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--v1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.mg-palette i:nth-child(2) { background: var(--cy); } .mg-palette i:nth-child(3) { background: var(--pk); }
.mg-palette b { margin-inline-start: .4cqw; font: 700 2cqw/1 var(--f-brand, system-ui); color: rgba(255, 255, 255, .85); }
@keyframes mgChip { 0%, 12% { opacity: 0; transform: translateY(1.6cqw) scale(.9); } 17%, 94% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
.mg-notif { right: 3cqw; bottom: 3cqw; padding: 1.2cqw 2.6cqw 1.2cqw 1.4cqw; gap: 1.4cqw; opacity: 0; animation: mgNotif var(--t) var(--ease, ease) infinite; }
[dir="rtl"] .mg-notif { padding: 1.2cqw 1.4cqw 1.2cqw 2.6cqw; }
.mg-notif > svg { width: 4.4cqw; height: 4.4cqw; padding: .9cqw; border-radius: 50%; background: rgba(74, 222, 128, .18); fill: none; stroke: #4ADE80; stroke-width: 2; stroke-linejoin: round; }
.mg-notif > span { display: flex; flex-direction: column; line-height: 1.25; }
.mg-notif b { font-size: 2cqw; } .mg-notif small { font-size: 1.8cqw; color: #4ADE80; font-weight: 700; }
@keyframes mgNotif { 0%, 86% { opacity: 0; transform: translateY(2.4cqw); } 89%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mg *, .mg *::before { animation: none !important; }
  .mg-site, .p-site { clip-path: none; }
  .mg-sweep, .mg-cursor, .mg-click, .mg-fly, .mg-toast, .p-done, .mg-notif { display: none; }
  .s-copy > *, .s-pad, .s-card, .mg-palette { opacity: 1; }
  .s-cart em b:first-child { opacity: 0; } .s-cart em b:last-child { opacity: 1; }
}

/* English (left-to-right): mirror the composition so the phone covers the product art, not the copy */
[dir="ltr"] .mg-tab-float { right: auto; left: 1cqw; }
[dir="ltr"] .mg-phone-float { left: auto; right: 0; }
[dir="ltr"] .mg-tab { transform: perspective(1600px) rotateY(9deg) rotateX(5deg) rotateZ(1deg); transform-origin: 40% 50%; }
[dir="ltr"] .mg-phone { transform: perspective(1200px) rotateY(-10deg) rotateZ(-2deg); }
[dir="ltr"] .mg-pill { left: auto; right: 7cqw; transform: rotate(6deg); animation-name: mgPillL; }
@keyframes mgPillL { 50% { transform: rotate(4deg) translateY(-1cqw); } }
[dir="ltr"] .mg-palette { right: auto; left: 8cqw; }
[dir="ltr"] .mg-notif { right: auto; left: 3cqw; }
[dir="ltr"] .mg-orb.o1 { left: auto; right: 18cqw; } [dir="ltr"] .mg-orb.o2 { left: auto; right: 0; }
[dir="ltr"] .mg-streaks { transform: scaleX(-1); }

/* =================== v2: more eye-catching =================== */
.mg { --dir: 1; }
[dir="ltr"] .mg { --dir: -1; }
@property --mga { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
/* light running around the device frames */
.mg-tab, .mg-phone { position: relative; }
.mg-tab::before, .mg-phone::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--mga), transparent 0 62%, rgba(139, 108, 255, .95) 74%, #fff 79%, rgba(35, 196, 232, .95) 84%, transparent 94%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: mgBeam 4.5s linear infinite; pointer-events: none; z-index: 2; }
.mg-phone::before { animation-duration: 3.6s; animation-direction: reverse; }
@keyframes mgBeam { to { --mga: 360deg; } }
/* glass shine across the tablet after the design appears */
.mg-screen::after { content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .13) 46%, rgba(255, 255, 255, .03) 52%, transparent 58%); transform: translateX(-130%); animation: mgShine var(--t) ease-in-out infinite; }
@keyframes mgShine { 0%, 25% { transform: translateX(-130%); } 34%, 100% { transform: translateX(130%); } }
.mg-orb { opacity: .7; }
.mg-orb.o1 { animation: mgOrb 9s ease-in-out infinite, mgOrbFlash var(--t) ease infinite; }
@keyframes mgOrbFlash { 0%, 20% { filter: blur(40px) brightness(1); } 26% { filter: blur(40px) brightness(1.8); } 40%, 100% { filter: blur(40px) brightness(1); } }

/* the controller flies out of the screen, hovers in front of it, then dives into the cart */
.s-pad { animation-name: mgPadBack; }
@keyframes mgPadBack { 0%, 56% { opacity: 0; transform: scale(.4) rotate(-20deg); } 60% { opacity: 1; transform: scale(1.08) rotate(2deg); } 64% { transform: scale(1) rotate(-6deg); } 72% { transform: rotate(-3deg) translateY(-1cqw); } 96% { opacity: 1; transform: rotate(-6deg); } 100% { opacity: 0; } }
.mg-fly { display: none; }
.mg-pop { position: absolute; z-index: 2; left: 19cqw; top: 5cqw; width: 42cqw; aspect-ratio: 200 / 130; pointer-events: none; opacity: 0; animation: mgPop var(--t) cubic-bezier(.34, 1.2, .5, 1) infinite; }
[dir="ltr"] .mg-pop { left: auto; right: 19cqw; }
.pop-pad { position: relative; z-index: 2; width: 100%; height: auto; filter: drop-shadow(0 3cqw 3cqw rgba(40, 20, 160, .75)) drop-shadow(0 0 2.4cqw rgba(139, 108, 255, .55)); }
@keyframes mgPop {
  0%, 21% { opacity: 0; transform: translate(calc(-3cqw * var(--dir)), 17cqw) scale(.32) rotate(calc(-24deg * var(--dir))); }
  23% { opacity: 1; }
  25.5% { transform: translate(0, -1.6cqw) scale(1.14) rotate(calc(7deg * var(--dir))); }
  28.5% { transform: translate(0, 0) scale(1) rotate(calc(-5deg * var(--dir))); }
  32% { transform: translateY(-1.8cqw) rotate(calc(-9deg * var(--dir))); }
  36% { transform: translateY(0) rotate(calc(-3deg * var(--dir))); }
  40% { transform: translateY(-1.8cqw) rotate(calc(-9deg * var(--dir))); }
  44% { opacity: 1; transform: translateY(-.4cqw) scale(1.04) rotate(calc(-4deg * var(--dir))); }
  47% { transform: translateY(-2.4cqw) scale(1.1) rotate(calc(4deg * var(--dir))); }
  52% { transform: translate(calc(-12cqw * var(--dir)), -5cqw) scale(.45) rotate(calc(-28deg * var(--dir))); }
  55.6% { opacity: 1; transform: translate(calc(-20.5cqw * var(--dir)), -.6cqw) scale(.07) rotate(calc(-50deg * var(--dir))); }
  56.4%, 100% { opacity: 0; transform: translate(calc(-20.5cqw * var(--dir)), -.6cqw) scale(.07); }
}
.pop-glow { position: absolute; z-index: 0; left: 10%; right: 10%; bottom: -14%; height: 40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(139, 108, 255, .7), transparent); filter: blur(8px); animation: mgGlow 1.6s ease-in-out infinite; }
@keyframes mgGlow { 50% { opacity: .55; transform: scaleX(.85); } }
.pop-ring { position: absolute; z-index: 1; left: 50%; top: 50%; width: 70%; aspect-ratio: 1; margin: -35% 0 0 -35%; border-radius: 50%; border: .5cqw solid rgba(139, 108, 255, .9); box-shadow: 0 0 3cqw rgba(35, 196, 232, .8), inset 0 0 2cqw rgba(139, 108, 255, .7); opacity: 0; animation: mgShock var(--t) ease-out infinite; }
.pop-ring.r2 { border-color: rgba(35, 196, 232, .9); animation-name: mgShock2; }
@keyframes mgShock { 0%, 23% { opacity: 0; transform: scale(.2); } 24% { opacity: 1; transform: scale(.3); } 31%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes mgShock2 { 0%, 25% { opacity: 0; transform: scale(.2); } 26% { opacity: .9; transform: scale(.3); } 34%, 100% { opacity: 0; transform: scale(2.4); } }
.pop-beam { position: absolute; z-index: 0; left: 18%; right: 18%; top: 40%; height: 120%; background: linear-gradient(180deg, rgba(139, 108, 255, .55), rgba(35, 196, 232, .15) 60%, transparent); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); filter: blur(4px); opacity: 0; animation: mgBeamUp var(--t) ease infinite; }
@keyframes mgBeamUp { 0%, 21% { opacity: 0; } 24% { opacity: 1; } 32%, 100% { opacity: 0; } }
.pop-dot { position: absolute; z-index: 3; width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #fff; box-shadow: 0 0 1.6cqw .4cqw var(--cy); opacity: 0; animation: mgOrbit 3.2s ease-in-out infinite, mgDotsOn var(--t) linear infinite; }
.pop-dot.d1 { left: 4%; top: 18%; } .pop-dot.d2 { left: 92%; top: 8%; animation-delay: -.6s, 0s; box-shadow: 0 0 1.6cqw .4cqw var(--pk); }
.pop-dot.d3 { left: 86%; top: 86%; animation-delay: -1.2s, 0s; width: .8cqw; height: .8cqw; } .pop-dot.d4 { left: 10%; top: 80%; animation-delay: -1.8s, 0s; box-shadow: 0 0 1.6cqw .4cqw #FFD166; } .pop-dot.d5 { left: 50%; top: -6%; animation-delay: -2.4s, 0s; width: .8cqw; height: .8cqw; }
@keyframes mgOrbit { 50% { transform: translate(1.2cqw, -1.6cqw) scale(1.4); } }
@keyframes mgDotsOn { 0%, 25% { opacity: 0; } 28%, 45% { opacity: 1; } 49%, 100% { opacity: 0; } }

/* sparkle burst when the controller lands in the cart */
.mg-burst { position: absolute; z-index: 5; top: 6.7%; inset-inline-start: 93.8%; width: 0; height: 0; }
.mg-burst i { position: absolute; left: -.5cqw; top: -.5cqw; width: 1cqw; height: 1cqw; border-radius: 50%; background: #fff; box-shadow: 0 0 1.4cqw .3cqw var(--v1); opacity: 0; animation: mgBurst var(--t) ease-out infinite; }
.mg-burst i:nth-child(1) { --bx: 0; --by: -4.5cqw; } .mg-burst i:nth-child(2) { --bx: 3.2cqw; --by: -3.2cqw; box-shadow: 0 0 1.4cqw .3cqw var(--cy); } .mg-burst i:nth-child(3) { --bx: 4.5cqw; --by: 0; }
.mg-burst i:nth-child(4) { --bx: 3.2cqw; --by: 3.2cqw; box-shadow: 0 0 1.4cqw .3cqw var(--pk); } .mg-burst i:nth-child(5) { --bx: 0; --by: 4.5cqw; } .mg-burst i:nth-child(6) { --bx: -3.2cqw; --by: 3.2cqw; box-shadow: 0 0 1.4cqw .3cqw var(--cy); }
.mg-burst i:nth-child(7) { --bx: -4.5cqw; --by: 0; box-shadow: 0 0 1.4cqw .3cqw #FFD166; } .mg-burst i:nth-child(8) { --bx: -3.2cqw; --by: -3.2cqw; }
@keyframes mgBurst { 0%, 55.6% { opacity: 0; transform: translate(0, 0) scale(.4); } 56.2% { opacity: 1; transform: translate(0, 0) scale(1); } 61%, 100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(.2); } }
.s-cart { animation: mgCartGlow var(--t) ease infinite; }
@keyframes mgCartGlow { 0%, 55.6% { box-shadow: none; } 57% { box-shadow: 0 0 0 .6cqw rgba(139, 108, 255, .5), 0 0 3cqw rgba(139, 108, 255, .9); } 64%, 100% { box-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  .mg-pop, .mg-burst, .mg-screen::after { display: none; }
  .mg-tab::before, .mg-phone::before { animation: none; }
}
