:root {
  --bg: #0b1a33;
  --bg-deep: #081326;
  --surface: #12284c;
  --surface-2: #183462;
  --line: #24467d;
  --blue: #2f86f0;
  --blue-hi: #5aa7ff;
  --ice: #bfe3ff;
  --gold: #ffd34a;
  --discord: #5865f2;
  --text: #eaf2ff;
  --muted: #a9bddb;
  --font-head: 'Chakra Petch', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-hi); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }


/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(8, 19, 38, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.15rem var(--font-head); }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 22px; list-style: none; }
.links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.links a:hover { color: var(--text); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { color: var(--text); text-decoration: none; font: 700 .9rem var(--font-head); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; min-height: 40px; display: inline-flex; align-items: center; }
.lang:hover { border-color: var(--blue); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: var(--radius); font: 700 1.05rem var(--font-head); text-decoration: none; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 0 #1a4f99; }
.btn-primary:hover { background: var(--blue-hi); }
.btn-ghost { color: var(--text); border: 2px solid var(--line); background: rgba(18, 40, 76, .6); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-discord { background: var(--discord); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 150px; background: linear-gradient(#060f20 0%, #0c2147 70%, #12305c 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 96px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='384' height='64'%3E%3Cpath fill='%230b1a33' d='M0 32h64v-16h48v24h96v-16h32v-16h80v24h64V64H0z'/%3E%3C/svg%3E") 0 100% / 384px 64px repeat-x, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='96'%3E%3Cpath fill='%23112a52' d='M0 48h48v-16h72v24h48v-32h96v16h48v-24h72v32h48v-16h48V96H0z'/%3E%3C/svg%3E") 0 100% / 480px 96px repeat-x; image-rendering: pixelated; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: center; }
.hero-in { max-width: 640px; }
.races { margin: 0; }
.races img { width: 100%; image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 4px #081326, 0 18px 40px rgba(0, 0, 0, .45); }
.races figcaption { margin-top: 14px; color: var(--muted); font-size: .95rem; }
.launch { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 211, 74, .14); border: 1px solid rgba(255, 211, 74, .5); color: var(--gold); font: 600 .95rem var(--font-head); }
.hero h1 { font-size: clamp(3.4rem, 9vw, 6.4rem); letter-spacing: -1px; text-shadow: 0 6px 0 #1d4f86, 0 0 40px rgba(90, 167, 255, .35); }
.lead { font-size: 1.15rem; color: var(--ice); margin: 22px 0 28px; max-width: 52ch; }

.ip { display: grid; grid-template-columns: auto 1fr; gap: 2px 18px; align-items: center; width: 100%; max-width: 460px; padding: 16px 20px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s ease, transform .15s ease; }
.ip:hover { border-color: var(--blue); transform: translateY(-2px); }
.ip-addr { grid-row: span 2; font: 700 1.55rem var(--font-head); color: #fff; }
.ip-meta { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--muted); }
.ip-hint { font-size: .85rem; color: var(--blue-hi); }
.ip.copied .ip-hint { color: var(--gold); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7a93; flex: none; }
.dot.on { background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }
.dot.off { background: #ff6b6b; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.editions { margin: 18px 0 0; color: var(--muted); font-size: .92rem; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section:nth-of-type(odd) { background-color: var(--bg-deep); }
.sub { color: var(--muted); font-size: 1.08rem; margin: 12px 0 40px; max-width: 62ch; }
.center { text-align: center; margin-top: 36px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; }
.grid6 h3 { margin-bottom: 10px; }
.grid6 p { margin: 0; color: var(--muted); }

/* spotlight rows */
.spot { display: grid; gap: 64px; }
.spot-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.spot-row.rev .spot-img { order: 2; }
.spot-img { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; place-items: center; min-height: 240px; }
.spot-img img { image-rendering: pixelated; width: 100%; }
.spot-text p { color: var(--muted); font-size: 1.08rem; margin: 14px 0 0; }

/* join */
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.join .tag { margin: 6px 0 16px; color: var(--blue-hi); font-weight: 600; }
.join ol { padding-left: 22px; display: grid; gap: 10px; color: var(--muted); }
.addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 20px 0 0; padding: 12px 14px; background: var(--bg-deep); border-radius: 8px; }
.addr span { color: var(--muted); font-size: .9rem; }
.addr code { font: 700 1.05rem var(--font-head); color: var(--gold); }
.note { margin: 24px 0 0; color: var(--muted); }

/* store */
.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pcard img { aspect-ratio: 1; object-fit: cover; }
.pcard h3, .pcard p { padding: 0 20px; }
.pcard h3 { margin-top: 18px; }
.pcard p { color: var(--muted); margin: 8px 0 20px; }

/* community */
.comm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ccard { display: block; padding: 32px; border-radius: 14px; text-decoration: none; color: var(--text); border: 1px solid var(--line); transition: transform .15s ease, border-color .15s ease; }
.ccard:hover { transform: translateY(-3px); border-color: var(--blue); }
.ccard.discord { background: linear-gradient(135deg, #3b44b8, #5865f2); border-color: #6b77ff; }
.ccard.wiki { background: var(--surface-2); }
.ccard h3 { font-size: 1.8rem; }
.ccard p { margin: 10px 0 18px; color: #dbe5ff; max-width: 44ch; }
.go { font: 700 1rem var(--font-head); }

/* footer */
.foot { background-color: var(--bg-deep); border-top: 1px solid var(--line); padding: 40px 0 28px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot p { color: var(--muted); margin: 10px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot .legal { margin: 28px auto 0; font-size: .8rem; color: #7f93b3; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .links { display: none; }
  .grid6, .store-grid { grid-template-columns: 1fr 1fr; }
  .spot-row, .spot-row.rev { grid-template-columns: 1fr; gap: 24px; }
  .spot-row.rev .spot-img { order: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .races { max-width: 520px; }
}
@media (max-width: 640px) {
  .nav-end .btn-discord { display: none; }
  .grid6, .store-grid, .join-grid, .comm-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 120px; }
  .ip-addr { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .ip, .ccard { transition: none; }
  .btn:hover, .ip:hover, .ccard:hover { transform: none; }
}
