:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --border: #e3e5ea;
  --text: #0d1117;
  --muted: #5b6270;
  --accent: #1f4fd1;
  --radius: 12px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 14px; z-index: 10; }

.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
h3 { font-size: 21px; letter-spacing: -.01em; }

.btn { display: inline-flex; align-items: center; font-weight: 600; font-size: 15px; text-decoration: none; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); background: var(--bg); }
.btn:hover { border-color: var(--text); color: var(--text); }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn.primary:hover { background: #2a313c; color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--text); }
.btn.light:hover { background: #e9ebef; }

section.hero { position: relative; padding: 0; color: #fff; background: #23331f; }
.hero > img { width: 100%; height: min(78vh, 680px); min-height: 420px; object-fit: cover; object-position: 55% 55%; image-rendering: pixelated; }
.hero-text { position: absolute; inset: auto 0 0 0; padding: 120px 0 48px; background: linear-gradient(to top, rgba(10, 14, 10, .82), rgba(10, 14, 10, 0)); }
.hero-text p { max-width: 520px; margin: 14px 0 24px; font-size: 19px; color: rgba(255, 255, 255, .9); }

.announce { display: block; background: var(--text); color: #fff; text-decoration: none; }
.announce .wrap { display: flex; align-items: center; gap: 14px; padding: 14px 0; font-size: 15px; }
.announce img { width: 36px; height: 36px; border-radius: 9px; }
.announce .go { margin-left: auto; font-weight: 600; white-space: nowrap; }
.announce:hover { color: #fff; background: #1d2430; }

section { padding: 88px 0; scroll-margin-top: 64px; }
section + section { border-top: 1px solid var(--border); }
section > .wrap > h2 { margin-bottom: 32px; }

.cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; background: var(--bg); transition: border-color .15s; }
.card:hover { color: var(--text); border-color: #b9bec9; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.card-media.io { background: #1fc795; display: grid; place-items: center; }
.card-media.io img { width: 128px; height: 128px; border-radius: 28px; object-fit: contain; image-rendering: auto; box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
.card-body { padding: 22px 24px 26px; }
.card-body p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.meta { font-size: 14px; color: var(--muted); }
.card-body .meta { margin: 0 0 6px; }
.later { margin: 28px 0 0; color: var(--muted); font-size: 16px; }

.about p { max-width: 640px; color: #2f3540; }

.page-hero > img { width: 100%; height: min(60vh, 520px); min-height: 300px; object-fit: cover; image-rendering: pixelated; }
.page-head { padding: 56px 0 8px; }
.page-head .meta { margin: 10px 0 0; font-size: 16px; }
.prose { padding: 24px 0 88px; }
.prose p { color: #2f3540; margin: 0 0 18px; }
.prose h2 { font-size: 22px; margin: 44px 0 12px; }
.prose.after-clips { padding-top: 56px; }

.app-head { display: flex; align-items: center; gap: 22px; padding: 56px 0 32px; }
.app-head img { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 0 0 1px rgba(13, 17, 23, .08); }
.app-head .meta { margin: 8px 0 0; font-size: 16px; }

.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.clip { margin: 0; }
.clip video { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; background: #1b1530; }
.clip figcaption { margin-top: 10px; font-size: 14px; font-weight: 600; text-align: center; }

.game-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.game-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.game-list strong { flex: 0 0 120px; }
.game-list span { color: var(--muted); }

.doc { padding: 72px 0 96px; }
.doc h1 { font-size: clamp(32px, 4.5vw, 44px); }
.doc h2 { font-size: 21px; margin: 40px 0 8px; }
.doc p, .doc li { color: #2f3540; }
.doc .meta { margin-top: 10px; font-size: 15px; }

.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; }

.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin: 28px 0 8px; }
.contact-card a { font-size: 19px; font-weight: 600; }
.contact-card .meta { margin: 4px 0; }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 420px) {
  .nav .hide-xs { display: none; }
}

@media (max-width: 760px) {
  .brand { white-space: nowrap; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .hero > img { height: 70vh; }
  .hero-text { padding: 96px 0 32px; }
  .hero-text p { font-size: 17px; }
  .announce .wrap { flex-wrap: wrap; gap: 10px; }
  section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; }
  .clips { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-list li { flex-direction: column; gap: 2px; }
  .game-list strong { flex: none; }
  .app-head img { width: 80px; height: 80px; border-radius: 18px; }
}
