/* Cube Siege — site styles. Dark voxel look, gold accent, bilingual (EN/RU). */
/* Self-hosted Inter + Russo One (latin + cyrillic subsets), OFL-licensed. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/Inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/RussoOne-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/RussoOne-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0a0c16;
  --bg-2: #111526;
  --panel: #161b2e;
  --line: #262c45;
  --fg: #eceef5;
  --muted: #9aa1ba;
  --gold: #ffcc40;
  --gold-2: #ffb020;
  --brick: #c0553a;
  --steel: #9aa3b8;
  --grass: #5ac948;
  --water: #3d7cf0;
  --radius: 14px;
  --maxw: 1180px;
  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── header ─────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px;
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.solid {
  background: rgba(10, 12, 22, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); color: var(--fg); font-size: 20px; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--fg); text-decoration: none; }
.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.lang a {
  color: var(--muted); font: 700 13px var(--font-body); padding: 6px 12px;
}
.lang a:hover { color: var(--fg); text-decoration: none; }
.lang a[aria-current="page"] { background: var(--gold); color: #1a1405; }
@media (max-width: 760px) { .nav .nav-link { display: none; } }



/* ── hero ───────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,12,22,.92) 0%, rgba(10,12,22,.55) 45%, rgba(10,12,22,0) 75%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10,12,22,0) 30%);
}
.hero-fallback { position: absolute; inset: 0; background: radial-gradient(80% 60% at 70% 40%, #1d2750, var(--bg)); }
.hero-content { position: relative; z-index: 2; padding-top: 80px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(52px, 9vw, 112px); line-height: .95; margin: 0 0 18px;
  color: var(--gold);
  text-shadow: 0 6px 0 #8a5a00, 0 12px 30px rgba(0,0,0,.6);
  letter-spacing: 1px;
}
.hero .tagline { font-size: clamp(18px, 2.2vw, 24px); max-width: 560px; color: #dfe2ee; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px; font-weight: 700; font-size: 16px;
  border: 1px solid var(--line); color: var(--fg); background: rgba(22,27,46,.8);
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold); }
.btn-primary { background: var(--gold); color: #1a1405; border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-2); }
.btn-appstore { background: #000; border-color: #444; }
.btn-appstore:hover { border-color: #fff; }
.btn-appstore svg { width: 22px; height: 22px; }
.btn-appstore small { display: block; font-size: 11px; font-weight: 500; color: #bbb; line-height: 1.1; }
.btn-appstore span { line-height: 1.15; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 2; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold); border-radius: 2px; animation: wheel 1.6s infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ── sections ───────────────────────────────────────── */
section { padding: 96px 0; position: relative; }
.section-title {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4.4vw, 46px);
  margin: 0 0 12px; line-height: 1.1;
}
.section-sub { color: var(--muted); max-width: 640px; margin: 0 0 44px; font-size: 18px; }
.alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 20%, var(--bg-2) 80%, var(--bg) 100%); }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; position: relative; overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: #3a4266; }
.card h3 { margin: 16px 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.voxel-icon { width: 54px; height: 54px; image-rendering: pixelated; }
.card .glow {
  position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  filter: blur(40px); opacity: .25; pointer-events: none;
}

/* gallery */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 820px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 22px;
  margin: 0 auto; max-width: 100%;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery img { width: 100%; aspect-ratio: 2796 / 1290; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.5); background: var(--panel); }
.gallery figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; text-align: center; }

/* co-op split */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.split img { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 50px; color: #d4d8e6; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--gold); color: #1a1405; font-weight: 800;
  box-shadow: 0 4px 0 #8a5a00;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* free / fair */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.pill b { color: var(--gold); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── legal / support pages ──────────────────────────── */
.doc { padding: 120px 0 64px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: clamp(32px, 5vw, 48px); margin: 0 0 6px; line-height: 1.1; }
.doc h2 { margin: 36px 0 10px; font-size: 22px; }
.doc p, .doc li { color: #d4d8e6; }
.doc .muted { color: var(--muted); }
.doc p a, .doc li a, .doc td a, .doc dd a { text-decoration: underline; text-underline-offset: 2px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--fg); }
.doc .table-scroll { overflow-x: auto; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }
.doc dt { font-weight: 700; margin-top: 18px; }
.doc dd { margin: 4px 0 0; color: #d4d8e6; }
.lang-block[hidden] { display: none; }

/* Phones: the scene fills the top, the headline sits at the bottom. */
@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(10,12,22,.9) 30%, rgba(10,12,22,0) 52%); }
  .hero-content { padding: 0 20px 96px; }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
}

/* ── Soon in 2.0 ── */
.soon { background: linear-gradient(180deg, rgba(74,144,255,.08), rgba(255,90,74,.06)); }
.soon-badge { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; font: 700 13px/1 "Russo One", system-ui, sans-serif; letter-spacing: .08em; color: #0a0c16; background: linear-gradient(90deg, #ffcc40, #ff9f40); }
.soon-line { display: inline-block; margin-top: 18px; color: #ffe08a; text-decoration: none; font-size: 15px; opacity: .92; }
.soon-line:hover { opacity: 1; text-decoration: underline; }
.nav-soon { color: #ffcc40 !important; }
@media (max-width: 640px) { .soon-line { font-size: 14px; } }
.soon .gallery { margin-top: 64px; }
#screens .gallery { margin-top: 8px; }
@media (max-width: 760px) { .soon .gallery { margin-top: 48px; } }
