:root {
  --bg: #0d1220;
  --bg2: #131a2d;
  --panel: #181f35;
  --line: #27304d;
  --text: #e8ebf4;
  --muted: #9aa3bd;
  --gold: #ffc94a;
  --gold-d: #b8862a;
  --navy: #22407e;
  --green: #5be37d;
  --red: #ff5a5a;
  --blue: #8fd3ff;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
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(--gold); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, .brand span, .hud-label, .banner-demo { font-family: "Pixelify Sans", Inter, sans-serif; font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 18px; letter-spacing: .5px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; color: var(--gold); }
.muted { color: var(--muted); }
section { padding: 72px 0; }
.band { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(13, 18, 32, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.2rem; }
.brand img { image-rendering: pixelated; border-radius: 6px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--text); }
.lang-toggle { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: 600 .85rem Inter, sans-serif; cursor: pointer; }
.lang-toggle:hover { border-color: var(--gold-d); }

/* hero */
.hero { padding: 80px 0 90px; background:
  radial-gradient(800px 400px at 85% 10%, rgba(34, 64, 126, .45), transparent 70%),
  radial-gradient(600px 300px at 10% 90%, rgba(255, 201, 74, .08), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.kicker { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 20px; }
h1 span { color: var(--gold); }
.lead { font-size: 1.1rem; color: #cdd3e4; max-width: 520px; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .12s, background .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold); color: #1b1404; box-shadow: 0 3px 0 var(--gold-d); }
.btn.primary:hover { background: #ffd56e; }
.btn.ghost { color: var(--text); border-color: var(--line); background: rgba(255, 255, 255, .02); }
.btn.ghost:hover { border-color: var(--gold-d); }

/* the in-game panel demo */
.panel-demo { position: relative; }
.hud { position: relative; display: flex; gap: 16px; background: rgba(24, 26, 38, .92); border: 1px solid #2c2f44; padding: 18px 20px 18px 24px; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); min-height: 168px; }
.hud-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); border-radius: 6px 0 0 6px; }
.hud-icon { font-size: 34px; line-height: 1; width: 40px; padding-top: 18px; }
.hud-body { flex: 1; min-width: 0; }
.hud-row { display: flex; justify-content: space-between; gap: 10px; }
.hud-label { color: #8a8a9a; font-size: .8rem; }
.hud-time { color: #b8b8c8; font-family: "JetBrains Mono", monospace; font-size: .9rem; }
.hud-word { font-family: "Pixelify Sans", Inter, sans-serif; font-weight: 600; color: var(--gold); font-size: 1.9rem; line-height: 1.2; margin: 6px 0 2px; text-shadow: 2px 2px 0 #3d2c00; overflow-wrap: anywhere; }
.hud-read { color: var(--blue); font-family: "JetBrains Mono", monospace; font-size: .95rem; min-height: 0; }
.hud-native { color: #b8b8c8; font-size: .95rem; }
.hud-bar { height: 4px; background: #2c2e3e; margin: 10px 0 8px; border-radius: 2px; overflow: hidden; }
.hud-bar span { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.hud-heard { font-family: "JetBrains Mono", monospace; font-size: .9rem; color: #8a8a9a; min-height: 1.4em; }
.hud-heard.ok { color: var(--green); }
.banner-demo { position: absolute; left: 50%; bottom: -54px; transform: translateX(-50%) scale(.6); opacity: 0; color: var(--green); font-size: 1.8rem; text-shadow: 3px 3px 0 #0b3a19; transition: opacity .25s, transform .35s cubic-bezier(.2, 1.6, .4, 1); white-space: nowrap; }
.banner-demo.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* how + features */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; position: relative; }
.steps li::before { content: counter(s); font-family: "Pixelify Sans", Inter, sans-serif; font-weight: 600; color: var(--gold); font-size: 1.6rem; display: block; margin-bottom: 6px; }
.steps b { display: block; margin-bottom: 6px; }
.steps span { color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { padding: 18px 20px; border-left: 3px solid var(--navy); background: rgba(255, 255, 255, .015); border-radius: 0 var(--radius) var(--radius) 0; }
.feat p { margin: 0; color: var(--muted); }

/* languages */
.langs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.lang { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.lang b { display: block; font-size: 1.05rem; }
.lang span { color: var(--muted); font-size: .85rem; }

/* download */
.picker { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 18px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--muted); padding: 8px 16px; border-radius: 6px; font: 600 .95rem Inter, sans-serif; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--navy); color: #fff; }
.seg button:hover:not([aria-selected="true"]) { color: var(--text); }
.dl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.dl-main { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dl-name { font-family: "JetBrains Mono", monospace; font-size: .95rem; overflow-wrap: anywhere; }
.dl-meta { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.dl-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.sha { margin-top: 14px; display: flex; gap: 10px; align-items: baseline; font-size: .8rem; color: var(--muted); }
.sha code { font-family: "JetBrains Mono", monospace; overflow-wrap: anywhere; color: #c7cde0; }
.all-files { margin-top: 18px; }
.all-files summary { cursor: pointer; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td a { font-family: "JetBrains Mono", monospace; font-size: .85rem; overflow-wrap: anywhere; }
.install { margin-top: 30px; }
.install ol { color: var(--muted); padding-left: 20px; margin: 0; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

/* faq */
#faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
#faq summary { cursor: pointer; font-weight: 600; }
#faq p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: .9rem; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 70px; }
  .steps, .features { grid-template-columns: 1fr; }
  .langs { grid-template-columns: repeat(2, 1fr); }
  .top nav { display: none; }
  .lang-toggle { margin-left: auto; }
  section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banner-demo { transition: none; }
}
