body.home { padding: 0 16px 40px; max-width: 1100px; margin: 0 auto; overflow-x: hidden; }
body.home > *:not(.bg) { position: relative; z-index: 1; }

/* ---------- animated background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% -10%, #2a0d18 0%, #0b0a0e 55%); }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; }
/* soft glows: gradients instead of blur filters, and only transform animates (cheap for the GPU) */
.orb { position: absolute; border-radius: 50%; will-change: transform; }
.o1 { width: 900px; height: 900px; left: -420px; top: -400px; background: radial-gradient(closest-side, rgba(255,42,85,.42), rgba(255,42,85,0)); animation: drift1 22s ease-in-out infinite alternate; }
.o2 { width: 760px; height: 760px; right: -380px; top: 20%; background: radial-gradient(closest-side, rgba(106,31,255,.26), rgba(106,31,255,0)); animation: drift2 28s ease-in-out infinite alternate; }
.o3 { width: 700px; height: 700px; left: 30%; bottom: -420px; background: radial-gradient(closest-side, rgba(255,77,106,.28), rgba(255,77,106,0)); animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-110px, -80px) scale(.9); } }
.floor { position: absolute; left: -30%; right: -30%; bottom: -10%; height: 55%; perspective: 340px; contain: strict; }
/* fade the grid into the dark with a gradient on top (a CSS mask here would be redrawn every frame) */
.floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, #0b0a0e 12%, rgba(11,10,14,.85) 35%, rgba(11,10,14,0) 90%); pointer-events: none; }
.grid { position: absolute; left: 0; right: 0; top: -64px; bottom: 0; transform: rotateX(62deg); transform-origin: 50% 100%; overflow: hidden; }
.grid::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 64px); will-change: transform;
  background-image: linear-gradient(rgba(255,77,106,.38) 1px, transparent 1px), linear-gradient(90deg, rgba(255,77,106,.38) 1px, transparent 1px);
  background-size: 64px 64px; animation: gridmove 3.2s linear infinite; }
@keyframes gridmove { from { transform: translateY(-64px); } to { transform: translateY(0); } }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }

/* ---------- top bar ---------- */
nav.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; padding-top: max(16px, env(safe-area-inset-top)); }
nav.top a { color: var(--ink); text-decoration: none; margin-left: 18px; font-size: 14px; }
nav.top .brandmark { margin: 0; font-weight: 800; letter-spacing: .14em; }
nav.top .pill { background: var(--acc); color: #160509; padding: 7px 14px; border-radius: 999px; font-weight: 700; }
@media (max-width: 520px) { nav.top span a:not(.pill) { display: none; } }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 40px 0 30px; }
.hero .logo { display: block; margin: 0 auto; width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 0 70px rgba(255,77,106,.35); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero .logo, .phone { will-change: transform; }
.hero h1 { font-size: clamp(40px, 9vw, 76px); letter-spacing: .12em; margin: 22px 0 6px; font-weight: 800; position: relative; display: inline-block; text-shadow: 0 0 30px rgba(255,77,106,.45); }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: .7; }
.glitch::before { color: #ff2a55; animation: gl1 4s infinite steps(1); clip-path: inset(0 0 60% 0); }
.glitch::after { color: #6ae3ff; animation: gl2 4s infinite steps(1); clip-path: inset(55% 0 0 0); }
@keyframes gl1 { 0%, 92%, 100% { transform: none; opacity: 0; } 93% { transform: translate(-3px, -1px); opacity: .8; } 96% { transform: translate(2px, 1px); opacity: .8; } }
@keyframes gl2 { 0%, 93%, 100% { transform: none; opacity: 0; } 94% { transform: translate(3px, 1px); opacity: .7; } 97% { transform: translate(-2px, 0); opacity: .7; } }
.hero .tag { font-size: 20px; margin: 0 0 10px; }
.hero .sub { max-width: 640px; margin: 0 auto; }
.cta { display: flex; gap: 10px; justify-content: center; margin: 22px 0 18px; flex-wrap: wrap; }
.cta .btn { min-width: 190px; }
.games { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 760px; margin: 0 auto; }
.games span { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(21,17,26,.85); border: 1px solid var(--line); color: var(--mut); }

.sec { text-align: center; font-size: 13px; letter-spacing: .2em; margin: 46px 0 18px; }

/* ---------- preview ---------- */
.stage { display: grid; grid-template-columns: 1fr 250px; gap: 26px; align-items: center; }
@media (max-width: 820px) { .stage { grid-template-columns: 1fr; justify-items: center; } }
.window { width: 100%; background: rgb(15,12,19); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,77,106,.08); transform: perspective(1400px) rotateY(4deg); transition: transform .6s; }
.window:hover { transform: none; }
.wbar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #120e16; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mut); }
.wbar i { width: 10px; height: 10px; border-radius: 50%; background: #3a2f42; } .wbar i:first-child { background: #ff4d6a; }
.wbar span { margin-left: 8px; }
.shots { position: relative; aspect-ratio: 16 / 10; }
.shots img, .pshots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .6s, transform .8s; transform: scale(1.02); }
.shots img.on, .pshots img.on { opacity: 1; transform: none; }
.tabs { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.tabs button { font-size: 13px; padding: 7px 12px; border-radius: 999px; }
.tabs button.on { background: var(--acc); border-color: var(--acc); color: #160509; font-weight: 700; }
.cap { padding: 6px 14px 12px; margin: 0; }
.phone { position: relative; width: 240px; aspect-ratio: 390 / 844; border-radius: 34px; padding: 10px; background: linear-gradient(145deg, #2a2130, #0d0b10); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 50px rgba(255,77,106,.15); animation: float 7s ease-in-out infinite; }
.phone .notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 70px; height: 16px; border-radius: 10px; background: #050407; z-index: 2; }
.pshots { position: relative; width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #0b0a0e; }
.dots { position: absolute; bottom: -22px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #3a2f42; transition: background .3s, width .3s; }
.dots i.on { background: var(--acc); width: 16px; border-radius: 4px; }

/* ---------- features ---------- */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.f { background: rgba(21,17,26,.92); transition: transform .25s, border-color .25s, box-shadow .25s; }
.f:hover { transform: translateY(-3px); border-color: #5a2338; }
.f b { font-size: 15px; } .f p { margin: 6px 0 0; color: var(--mut); font-size: 14px; }

/* ---------- download ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 46px; scroll-margin-top: 20px; }
.plat { display: grid; gap: 10px; align-content: start; padding: 20px; background: rgba(21,17,26,.94); }
.plat.first { border-color: #5a2338; box-shadow: 0 0 0 1px #5a2338, 0 10px 40px rgba(255,77,106,.12); }
.plat h2 { font-size: 15px; margin: 0; }
.plat .ico { font-size: 30px; }
.btn { display: block; text-align: center; text-decoration: none; padding: 14px; border-radius: 12px; font-weight: 700; color: var(--ink); background: rgba(34,26,40,.85); border: 1px solid var(--line); transition: transform .15s, box-shadow .2s; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #160509; box-shadow: 0 0 24px rgba(255,77,106,.35); }
.btn.primary:hover { box-shadow: 0 0 40px rgba(255,77,106,.6); }
.btn:active { transform: scale(.98); }
.steps { display: grid; gap: 6px; font-size: 13px; }
.steps .dim { opacity: .55; }
details summary { cursor: pointer; color: var(--acc); }
.how { margin-top: 14px; padding: 18px 20px; background: rgba(21,17,26,.94); }
.how ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
footer { text-align: center; margin-top: 26px; }
footer a { color: var(--mut); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* phones: same look, fewer layers */
@media (max-width: 700px) {
  .o2, .scan { display: none; }
  .o1 { width: 600px; height: 600px; left: -300px; top: -260px; }
  .o3 { width: 480px; height: 480px; }
  .floor { left: -10%; right: -10%; height: 42%; }
  .window { transform: none; }
}
