:root {
  --bg: #07050f; --bg2: #110b24; --ink: #f6f3ff; --muted: rgba(246,243,255,.7);
  --cyan: #19d2ff; --magenta: #ff3dd6; --yellow: #ffd21f; --green: #7cf24a; --orange: #ff9b1f;
  --card: rgba(255,255,255,.05); --edge: rgba(255,255,255,.1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; width: 100%; }
body { max-width: 100vw; }
.display { font-family: Fredoka, "Lilita One", Nunito, sans-serif; font-weight: 700; letter-spacing: .2px; }

/* floating pixel confetti (filled by site.js) */
.pixels { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pixels i { position: absolute; border-radius: 3px; animation: drift 14s ease-in-out infinite; box-shadow: 0 0 14px currentColor; }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(0deg) } 50% { transform: translateY(-34px) rotate(12deg) } }
.page { position: relative; z-index: 1; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none } .pixels i { animation: none } }

/* nav */
.nav { display: flex; align-items: center; gap: 16px; padding: 18px 0; position: relative; z-index: 3; }
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 18px; }
.nav .brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(255,210,31,.6)); }
.nav .links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav .links a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; transition: background .2s, color .2s; }
.nav .links a:hover { color: var(--ink); background: var(--card); }

/* hero with video/image background */
.hero { position: relative; isolation: isolate; width: 100vw; margin-left: calc(50% - 50vw); padding: 100px 22px 80px; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; transform: scale(1.06); will-change: transform; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media video { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7,5,15,.55) 0%, rgba(7,5,15,0) 18%, rgba(7,5,15,0) 62%, rgba(7,5,15,.75) 88%, var(--bg) 100%), radial-gradient(ellipse at 50% 45%, rgba(7,5,15,0) 0%, rgba(7,5,15,.35) 100%); }
.home .nav { position: absolute; top: 0; left: 22px; right: 22px; z-index: 5; }
.hero .inner { position: relative; z-index: 2; max-width: 900px; width: 100%; min-width: 0; isolation: auto; }
.hero .logo { position: relative; z-index: 2; width: auto; height: auto; max-width: min(860px, 96vw); max-height: 76vh; margin: -40px auto -70px; animation: glow 4s ease-in-out infinite; }
@keyframes glow { 0%,100% { filter: drop-shadow(0 0 30px rgba(25,210,255,.35)) } 50% { filter: drop-shadow(0 0 60px rgba(255,61,214,.45)) } }
.hero h1 { font-size: clamp(26px, 4.2vw, 42px); margin: 22px 0 10px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.hero p { font-size: clamp(16px, 2vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 14px; font-weight: 800; text-decoration: none; color: #0b0714; background: var(--yellow); box-shadow: 0 7px 0 #b58d00; transition: transform .08s, filter .2s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 3px 0 #b58d00; }
.btn.cyan { background: var(--cyan); box-shadow: 0 7px 0 #0b84a6; }
.btn.ghost { background: rgba(7,5,15,.55); color: var(--ink); border: 1px solid var(--edge); box-shadow: none; backdrop-filter: blur(8px); }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0) } 50% { transform: translate(-50%, 8px) } }

/* sections */
section { padding: 70px 0; }
.kicker { color: var(--magenta); font-weight: 800; letter-spacing: 2px; font-size: 13px; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 44px); margin: 6px 0 24px; }

/* game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.game { background: var(--card); border: 1px solid var(--edge); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .25s ease, box-shadow .25s ease; }
.game:hover { box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.12); }
.game .banner { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.game .banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game:hover .banner img { transform: scale(1.06); }
.game .banner .icon { position: absolute; left: 18px; bottom: -26px; width: 72px; height: 72px; border-radius: 22%; box-shadow: 0 12px 30px rgba(0,0,0,.5); border: 3px solid var(--bg); }
.game .body { padding: 38px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game h3 { margin: 0; font-size: 28px; }
.game p { margin: 0; color: var(--muted); flex: 1; }
.tag { display: inline-block; width: max-content; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255,210,31,.15); color: var(--yellow); }
.tag.soon { background: rgba(25,210,255,.15); color: var(--cyan); }
.game .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.game .btn { padding: 10px 16px; font-size: 14px; }
.game.next .banner img { opacity: .9; }
.game.next .body { text-align: center; align-items: center; color: var(--muted); }
.tilt { transform-style: preserve-3d; }
.tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.08), transparent 60%); opacity: 0; transition: opacity .3s; }
.tilt:hover::after { opacity: 1; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about .art { border-radius: 26px; overflow: hidden; border: 1px solid var(--edge); box-shadow: 0 30px 80px rgba(255,210,31,.12); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.value { background: var(--card); border: 1px solid var(--edge); border-radius: 16px; padding: 16px; }
.value b { display: block; margin-bottom: 4px; font-size: 18px; }
.value span { color: var(--muted); font-size: 15px; }

/* contact */
.contact { text-align: center; }
.contact .card { display: inline-block; padding: 34px 40px; border-radius: 26px; background: linear-gradient(135deg, rgba(25,210,255,.12), rgba(255,61,214,.12)); border: 1px solid var(--edge); }
.contact .mail { font-size: clamp(20px, 3vw, 30px); font-weight: 800; color: var(--yellow); text-decoration: none; }

footer { padding: 30px 0 50px; color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--edge); }
footer a { color: var(--muted); }
footer .right { margin-left: auto; }

/* game page */
.gamebanner { position: relative; margin: 0 -22px; border-radius: 0 0 36px 36px; overflow: hidden; min-height: 52vh; }
.gamebanner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.gamebanner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,5,15,.1) 20%, var(--bg) 100%); }
.gamehero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 10px 0 40px; margin-top: -140px; position: relative; z-index: 2; }
.gamehero img.icon { width: min(100%, 360px); border-radius: 22%; justify-self: center; transform: rotate(-3deg); box-shadow: 0 30px 80px rgba(58,160,255,.4); animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: rotate(-3deg) translateY(0) } 50% { transform: rotate(-3deg) translateY(-12px) } }
.gamehero h1 { font-size: clamp(44px, 7vw, 76px); line-height: .95; margin: 8px 0 14px; }
.gamehero h1 span { color: var(--cyan); }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--edge); border-radius: 18px; padding: 20px; }
.feat b { display: block; font-size: 20px; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); }

/* legal */
.legal { max-width: 780px; }
.legal h1 { font-size: 36px; margin: 10px 0 4px; }
.legal h2 { font-size: 21px; margin-top: 30px; }
.legal .meta { color: var(--muted); margin-bottom: 20px; }

@media (max-width: 820px) {
  .about, .gamehero { grid-template-columns: 1fr; }
  .gamehero { margin-top: -60px; }
  .values, .feats { grid-template-columns: 1fr; }
  .nav .links a { padding: 6px 8px; font-size: 14px; }
  .hero { min-height: 70vh; }
}
