:root {
  --bg: #0d0f12;
  --bg-2: #14171c;
  --panel: #1a1e25;
  --line: #2a303a;
  --text: #e7e9ee;
  --muted: #9aa2b1;
  --accent: #ff8a3d;
  --accent-2: #ffc078;
  --code: #11141a;
  --radius: 10px;
  --max: 1160px;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  font-size: 18px;
}
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #d6452b);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #120a05;
}
.logo span.core { color: var(--accent); }

nav.links { display: flex; gap: 22px; font-size: 14px; }
nav.links a { color: var(--muted); }
nav.links a:hover, nav.links a.on { color: var(--text); text-decoration: none; }

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background: url("img/aerial_valley.jpg") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,15,18,0.15) 0%, rgba(13,15,18,0.55) 55%, var(--bg) 100%);
}
.hero .wrap { position: relative; padding-bottom: 72px; text-shadow: 0 2px 18px rgba(0,0,0,0.55); }
.hero .tag { background: rgba(13,15,18,0.7); padding: 6px 10px; border-radius: 4px; text-shadow: none; }
.hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.hero p.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: #d5d9e1;
  max-width: 56ch;
  margin: 0 0 28px;
}

.tag {
  display: inline-block;
  font: 600 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(26, 30, 37, 0.8);
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a0d04; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

section { padding: 88px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
h3 { font-size: 18px; margin: 0 0 8px; }
p.sub { color: var(--muted); max-width: 62ch; margin: 0 0 44px; font-size: 17px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stats div { background: var(--bg-2); padding: 22px 24px; }
.stats b { display: block; font-size: 26px; color: var(--accent-2); }
.stats span { color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.card ul li { margin: 3px 0; }
.card .ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 138, 61, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font: 700 14px var(--mono);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split.rev > :first-child { order: 2; }
.shot {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.split ul.points { list-style: none; padding: 0; margin: 20px 0 0; }
.split ul.points li {
  padding: 10px 0 10px 26px;
  border-top: 1px solid var(--line);
  position: relative;
  color: var(--muted);
  font-size: 15px;
}
.split ul.points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.split ul.points li b { color: var(--text); font-weight: 600; }

pre, code { font-family: var(--mono); }
pre {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}
code.inline, p code, li code, td code {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.88em;
}
.k { color: #ff9e64; }
.s { color: #9ece6a; }
.c { color: #5c6577; }
.f { color: #7aa2f7; }
.n { color: #e0af68; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery figure { margin: 0; }
.gallery img {
  border-radius: 8px;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}
.gallery figcaption { font-size: 13px; color: var(--muted); padding: 8px 2px 0; }
.gallery .wide { grid-column: span 2; grid-row: span 2; }
.gallery .wide img { height: 100%; aspect-ratio: auto; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  counter-reset: step;
}
.pipeline div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  color: var(--muted);
  counter-increment: step;
}
.pipeline div::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font: 700 12px var(--mono);
  color: var(--accent);
  margin-bottom: 6px;
}
.pipeline div b { display: block; color: var(--text); margin-bottom: 4px; }

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0 96px;
}
.docs aside {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 14px;
}
.docs aside a { display: block; color: var(--muted); padding: 4px 0; }
.docs aside a:hover { color: var(--text); text-decoration: none; }
.docs aside h4 {
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 18px 0 6px;
}
.docs aside h4:first-child { margin-top: 0; }
.docs article h1 { font-size: 40px; margin: 0 0 10px; }
.docs article h2 {
  font-size: 24px;
  margin: 56px 0 6px;
  padding-top: 12px;
  scroll-margin-top: 80px;
}
.docs article h2 code { font-size: 0.9em; color: var(--accent-2); }
.docs article > p { color: var(--muted); }
.docs article pre { margin: 16px 0; }

table.api {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}
table.api th, table.api td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.api th {
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
table.api td:first-child { overflow-wrap: anywhere; }
table.api td:first-child code { color: var(--accent-2); border: 0; background: none; padding: 0; }
table.api td { color: var(--muted); }

@media (max-width: 900px) {
  .grid.three, .grid.two, .split, .stats, .gallery, .pipeline, .docs { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }
  .gallery .wide { grid-column: auto; grid-row: auto; }
  .docs aside { position: static; max-height: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  nav.links { gap: 14px; }
  nav.links a.hide-sm { display: none; }
  section { padding: 64px 0; }
}

.title { font-family: "Cinzel", Georgia, serif; font-weight: 800; letter-spacing: 0.01em; }
h3.title { font-size: 22px; margin: 8px 0 6px; color: #ffd9a8; }

.pill {
  display: inline-block;
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  background: rgba(255, 138, 61, 0.12);
  border: 1px solid rgba(255, 138, 61, 0.3);
  padding: 5px 8px;
  border-radius: 999px;
}

.games {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
}
.game {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent); }
.game img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.game.feature img { aspect-ratio: auto; height: 100%; min-height: 0; flex: 1; }
.game .meta { padding: 16px 18px 20px; }
.game .meta p { color: var(--muted); font-size: 14px; margin: 0; }

.mobile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.mobile:first-of-type { border-top: 0; }
.mobile p { color: var(--muted); font-size: 16px; max-width: 60ch; margin: 0; }
.mobile h3.title { font-size: 30px; }
.mobile .icon { width: 220px; border-radius: 44px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,0.45); justify-self: center; }
.mobile .phone { width: 200px; border-radius: 22px; border: 6px solid #2a2e36; box-shadow: 0 20px 50px rgba(0,0,0,0.45); justify-self: center; }
.mobile .phones { display: flex; gap: 14px; justify-content: center; }
.mobile .phones .phone { width: 140px; }
.mobile .phones .phone:last-child { margin-top: 40px; }

@media (max-width: 900px) {
  .games { grid-template-columns: 1fr 1fr; }
  .game.feature { grid-column: span 2; }
  .mobile { grid-template-columns: 1fr; gap: 24px; }
}
