/* Nukito Games — design system. Dark, brand colours taken from the Cubix icon. */
@font-face { font-family: "Unbounded"; src: url("/assets/fonts/Unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/Figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0720;
  --bg-2: #0e0929;
  --surface: #151039;
  --surface-2: #1d1647;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f3efff;
  --muted: #a9a1d0;
  --violet: #9a6bff;
  --violet-deep: #5230e0;
  --cyan: #8cf0ff;
  --orange: #ff8a3d;
  --yellow: #ffd23f;
  --radius: 20px;
  --display: "Unbounded", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 800 .75rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #1a1230; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 7, 32, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font: 800 1rem/1 var(--display); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.badge-logo { width: 132px; height: auto; border-radius: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .06); }
.nav .lang { border: 1px solid var(--line-strong); margin-left: 8px; font-weight: 800; font-size: .8rem; letter-spacing: .08em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 14px; font: 800 1rem/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn { white-space: nowrap; }
.btn-primary { background: var(--yellow); color: #1a1230; box-shadow: 0 6px 0 #c79a12, 0 14px 30px rgba(255, 210, 63, .22); }
.btn-primary:hover { color: #1a1230; transform: translateY(-2px); box-shadow: 0 8px 0 #c79a12, 0 18px 36px rgba(255, 210, 63, .28); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c79a12; }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 14px; background: #000; border: 1px solid var(--line-strong); color: #fff; text-decoration: none; opacity: .72; cursor: default; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.store strong { display: block; font: 700 1.02rem/1.2 var(--body); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 100px); isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(48% 55% at 78% 30%, rgba(154, 107, 255, .38), transparent 70%), radial-gradient(34% 40% at 18% 80%, rgba(140, 240, 255, .14), transparent 70%), radial-gradient(30% 30% at 90% 85%, rgba(255, 138, 61, .14), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 18px 0 22px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-meta { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--cyan); }

/* ---------- phones ---------- */
.phones { position: relative; display: grid; place-items: center; min-height: 560px; }
.phone { position: relative; width: 100%; aspect-ratio: 600 / 1299; padding: 2.4%; border-radius: 13% / 6%; background: linear-gradient(160deg, #2a2160, #07041a 40%); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 40px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .03); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.5% / 4.9%; background: #0c0826; }
.phone::after { content: ""; position: absolute; top: 3.2%; left: 50%; width: 22%; height: 1.6%; transform: translateX(-50%); border-radius: 99px; background: #02010a; }
.phones .phone { position: absolute; }
.phones .p-main { width: min(290px, 62%); z-index: 3; animation: float 7s ease-in-out infinite; }
.phones .p-left { width: min(230px, 48%); left: 0; top: 14%; rotate: -9deg; z-index: 2; opacity: .96; animation: float 8s ease-in-out -2s infinite; }
.phones .p-right { width: min(230px, 48%); right: 0; top: 10%; rotate: 8deg; z-index: 1; animation: float 9s ease-in-out -4s infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.phone-solo { width: min(300px, 100%); margin-inline: auto; }

/* ---------- sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section-head { max-width: 40em; margin-bottom: 44px; }
.section-head h2 { margin: 14px 0 14px; }
.band { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }

.game-card { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: 28px; border: 1px solid var(--line-strong); overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(70% 90% at 90% 20%, rgba(154, 107, 255, .35), transparent 70%), linear-gradient(160deg, #1b1352, #0f0a2e); }
.game-card .icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 30px rgba(82, 48, 224, .5); }
.game-card h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 18px 0 10px; font-weight: 800; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; padding: 0; list-style: none; }
.tags li { font-size: .78rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--text); margin: 0; }
.game-card .phone-solo { width: min(250px, 70%); rotate: 4deg; margin-bottom: -22%; }
.soon-card { margin-top: 20px; padding: 22px 28px; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--muted); display: flex; gap: 14px; align-items: center; }
.soon-card svg { width: 22px; height: 22px; color: var(--violet); flex: none; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02)); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(154, 107, 255, .16); color: var(--violet); }
.card .ico.c { background: rgba(140, 240, 255, .13); color: var(--cyan); }
.card .ico.o { background: rgba(255, 138, 61, .15); color: var(--orange); }
.card .ico.y { background: rgba(255, 210, 63, .14); color: var(--yellow); }
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1.1 var(--display); letter-spacing: -.03em; background: linear-gradient(120deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .92rem; line-height: 1.4; }

.cta { text-align: center; padding: clamp(40px, 6vw, 72px) 24px; border-radius: 28px; border: 1px solid var(--line-strong); background: radial-gradient(60% 120% at 50% 0, rgba(154, 107, 255, .32), transparent 70%), var(--surface); }
.cta h2 { margin-bottom: 14px; }
.cta p { color: var(--muted); max-width: 34em; margin-inline: auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Cubix page ---------- */
.page-hero .hero-grid { grid-template-columns: 1.1fr .9fr; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.app-id img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 26px rgba(82, 48, 224, .55); }
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.note { font-size: .85rem; color: var(--muted); margin-top: 12px; }

.demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: 28px; border: 1px solid var(--line-strong); background: radial-gradient(80% 80% at 100% 0, rgba(140, 240, 255, .12), transparent 60%), linear-gradient(170deg, #17104a, #0d0929); }
.demo-steps { display: flex; gap: 8px; margin: 18px 0 20px; }
.demo-steps button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: 800 .95rem var(--body); cursor: pointer; }
.demo-steps button[aria-pressed="true"] { background: var(--violet-deep); color: #fff; border-color: var(--violet); }
.demo-steps button.done::after { content: "✓"; margin-left: 2px; color: var(--cyan); }
.demo-msg { min-height: 3.4em; margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: .98rem; line-height: 1.5; }
.demo-msg.bad { border-color: rgba(255, 99, 99, .55); background: rgba(255, 99, 99, .09); }
.demo-msg.good { border-color: rgba(103, 232, 160, .55); background: rgba(103, 232, 160, .1); }
.demo-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.demo-actions .btn { padding: 10px 18px; font-size: .92rem; border-radius: 12px; }
.demo-actions .btn[hidden] { display: none; }
.stage { padding: 22px; border-radius: 24px; background: linear-gradient(160deg, rgba(140, 240, 255, .07), rgba(154, 107, 255, .12)); border: 1px solid var(--line); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.board { display: grid; gap: 10px; justify-content: center; margin-bottom: 22px; }
.cell { width: 76px; height: 76px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 2px dashed rgba(255, 255, 255, .14); display: grid; place-items: center; position: relative; }
.cell.over { background: rgba(140, 240, 255, .12); border-color: var(--cyan); }
.tray { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); min-height: 100px; }
.pc { position: relative; width: 76px; height: 76px; border-radius: 18px; background: linear-gradient(160deg, #4b36b0, #2a1c78); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 6px 0 #170f4a, 0 10px 18px rgba(0, 0, 0, .35); display: grid; place-items: center; font: 800 1.5rem/1 var(--display); color: #fff; touch-action: none; cursor: grab; }
.pc small { position: absolute; bottom: 6px; font: 800 .95rem/1 var(--body); color: var(--text); opacity: .9; }
.pc.fixed { background: linear-gradient(160deg, #38298c, #1f1560); cursor: default; box-shadow: 0 6px 0 #120b3a, 0 10px 18px rgba(0, 0, 0, .35); }
.pc.fixed::before { content: ""; position: absolute; top: 6px; left: 6px; width: 9px; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.pc.sel { outline: 3px solid var(--yellow); outline-offset: 3px; }
.pc.ghost { position: fixed; pointer-events: none; z-index: 200; transform: translate(-50%, -50%) scale(1.08); opacity: .94; }
.pc.shake { animation: shake .4s; }
.pc.pop { animation: pop .35s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
@keyframes pop { 50% { scale: 1.12; } }
.z { position: absolute; border-radius: 6px; }
.z.lt { background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.z.gt { background: var(--orange); box-shadow: 0 0 14px var(--orange); }
.z.eq { background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.z.L, .z.R { width: 6px; top: 16%; height: 68%; }
.z.U, .z.D { height: 6px; left: 16%; width: 68%; }
.z.L { left: -3px; } .z.R { right: -3px; } .z.U { top: -3px; } .z.D { bottom: -3px; }
.legend { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 6px; border-radius: 4px; display: inline-block; }

.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 28px; scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; -webkit-overflow-scrolling: touch; }
.shot { flex: 0 0 min(250px, 68vw); scroll-snap-align: center; margin: 0; }
.shot figcaption { margin-top: 16px; text-align: center; font-weight: 700; font-size: .95rem; }
.shot figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; margin-top: 2px; }

details { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); margin-bottom: 10px; }
summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.5rem/1 var(--body); color: var(--cyan); transition: rotate .2s; }
details[open] summary::after { rotate: 45deg; }
details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ---------- legal / prose ---------- */
.legal-head { padding: clamp(40px, 6vw, 72px) 0 24px; }
.legal-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 14px 0 12px; }
.tldr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 8px; }
.tldr .card { padding: 20px; }
.prose { padding-bottom: 80px; }
.prose h2 { font-size: 1.45rem; margin: 52px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h3 { font-family: var(--body); font-size: 1.1rem; font-weight: 800; letter-spacing: 0; margin: 28px 0 8px; color: #fff; }
.prose li { margin-bottom: 8px; }
.prose ul { padding-left: 1.2em; }
.prose strong { color: #fff; }
.meta { color: var(--muted); font-size: .92rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { margin: 0 0 14px; font: 800 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { color: var(--text); text-decoration: none; font-size: .95rem; }
.foot-grid a:hover { color: var(--cyan); }
.foot-brand p { color: var(--muted); font-size: .92rem; max-width: 24em; margin-top: 16px; }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }

/* ---------- motion ---------- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .7s ease, translate .7s ease; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .phones .phone { animation: none !important; }
  * { transition-duration: .01ms !important; }
}
.no-js .reveal { opacity: 1; translate: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .page-hero .hero-grid, .game-card, .demo { grid-template-columns: 1fr; }
  .phones { min-height: 480px; margin-top: 12px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .game-card .phone-solo { margin: 12px auto -40%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .tldr { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav a:not(.keep) { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .phones .p-left, .phones .p-right { display: none; }
  .phones { min-height: 0; }
  .phones .p-main { position: relative; width: min(260px, 74%); }
  .cell, .pc { width: 66px; height: 66px; }
  .btn-row .btn { flex: 1 1 100%; }
  .foot-grid { grid-template-columns: 1fr; }
  .stage { padding: 14px; }
}
