/* =====================================================================
   VEXSMP — styles
   ===================================================================== */

:root {
  --bg: #f4f6fb;
  --bg-2: #eaf0f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --header-bg: rgba(244, 246, 251, 0.85);
  --ink: #0f1b3d;
  --ink-2: #1e3a5f;
  --muted: #5d6f8c;
  --line: #e2e8f0;
  --line-2: #d3dce8;
  --accent: #3b6fa0;
  --accent-bright: #1f8fd0;
  --accent-soft: rgba(59, 111, 160, 0.08);
  --accent-ring: rgba(59, 111, 160, 0.35);
  --navy: #0f1b3d;
  --navy-2: #1b3358;
  --on-navy: #e8edf3;
  --on-navy-muted: #9fb0c8;
  --grid: rgba(15, 27, 61, 0.05);
  --good: #1f9d55;
  --bad: #d64545;
  --text-grad: linear-gradient(180deg, #2ab0e2 0%, #1d58a6 100%);
  --block-grad: linear-gradient(180deg, #38c9ee 0%, #2a8fcf 55%, #1d4f9f 100%);
  --shadow-sm: 0 1px 2px rgba(15, 27, 61, 0.06);
  --shadow: 0 1px 2px rgba(15, 27, 61, 0.06), 0 18px 40px -22px rgba(15, 27, 61, 0.35);
  --shadow-lg: 0 2px 4px rgba(15, 27, 61, 0.08), 0 28px 60px -24px rgba(15, 27, 61, 0.45);

  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 8px;
  --container: 1152px;
  --gutter: 40px;
  --header-h: 88px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1124;
    --bg-2: #0e1830;
    --surface: #111c37;
    --surface-glass: rgba(17, 28, 55, 0.72);
    --header-bg: rgba(10, 17, 36, 0.82);
    --ink: #eef3fb;
    --ink-2: #c3d0e3;
    --muted: #8b9cb7;
    --line: #1d2a49;
    --line-2: #2a3a5e;
    --accent: #6fb6ea;
    --accent-bright: #4fc6f0;
    --accent-soft: rgba(111, 182, 234, 0.1);
    --accent-ring: rgba(111, 182, 234, 0.4);
    --navy: #070d1d;
    --navy-2: #13254a;
    --grid: rgba(255, 255, 255, 0.035);
    --good: #3ccf7f;
    --bad: #f06a6a;
    --text-grad: linear-gradient(180deg, #5ad6f6 0%, #3b86dc 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 28px 60px -24px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Type helpers ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mono { font-family: var(--font-mono); }

.grad-text {
  background: var(--text-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
}

.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }
.version-card .version-num.grad-text { color: transparent; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--accent);
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.link-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.link-mono:hover { color: var(--ink); }

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { font-size: 16px; }

.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-2); }
@media (prefers-color-scheme: dark) {
  .btn-primary { background: var(--accent); color: #07122a; }
  .btn-primary:hover { background: var(--accent-bright); }
}

.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 1;
  background: var(--bg-2);
  color: var(--muted);
  border-color: var(--line-2);
  box-shadow: none;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 420px at 15% -10%, rgba(42, 143, 207, 0.14), transparent 70%),
    radial-gradient(900px 380px at 100% 0%, rgba(29, 79, 159, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: center;
  gap: 48px;
  padding-top: 84px;
  padding-bottom: 80px;
}

.hero h1 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.hero h1 .grad-text { display: inline-block; padding-bottom: 0.08em; }

.hero-sub {
  margin-top: 22px;
  max-width: 470px;
  color: var(--ink-2);
  font-size: 16.5px;
}

.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Stat / IP card */

.stat-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  padding: 26px;
}
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.stat-card .eyebrow { letter-spacing: 0.25em; }

.stat-value {
  margin: 18px 0 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: break-word;
}
.stat-value.is-long { font-size: clamp(24px, 2.6vw, 32px); }
.stat-value.is-xlong { font-size: clamp(20px, 2vw, 24px); }
.stat-value small {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--muted);
}
.stat-value .status-dot { width: 12px; height: 12px; border-radius: 3px; margin-right: 12px; vertical-align: middle; position: relative; top: -0.08em; }

.stat-rows { border-top: 1px solid var(--line); }
.stat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-row strong { font-weight: 700; color: var(--ink); }
.stat-row .mono { font-size: 13px; color: var(--ink-2); text-align: right; }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 2px;
  margin-right: 8px;
  background: var(--muted);
  vertical-align: 1px;
}
.status-dot.online { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.status-dot.offline { background: var(--bad); }

/* ---------- Main / sections ---------- */

main { flex: 1; }

.section { padding: 88px 0; }
.section + .section { padding-top: 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.section-head p { margin-top: 14px; max-width: 560px; color: var(--ink-2); }

/* Info grid */

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.card h3 { margin-top: 18px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* Rules */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }

.rules li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
}
.rules li:first-child { padding-top: 4px; }
.rules li:last-child { border-bottom: 0; padding-bottom: 0; }
.rules .num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 3px; }

.card-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 14px; }

/* Versions */

.version-card { padding: 32px; }
.version-range {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}
.version-end .eyebrow { letter-spacing: 0.25em; font-size: 10px; color: var(--muted); }
.version-end:last-child { text-align: right; }
.version-end:last-child .eyebrow { justify-content: flex-end; }
.version-card .version-num {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.block-track { display: flex; gap: 5px; align-items: center; margin-bottom: 21px; }
.block-track span {
  flex: 1;
  height: 18px;
  min-width: 6px;
  border-radius: 3px;
  background: var(--block-grad);
  box-shadow: inset 0 -4px 0 rgba(15, 27, 61, 0.25), 0 0 0 1.5px #1d0e46;
  opacity: 0.25;
  transition: opacity 0.4s ease;
}
.block-track span.lit { opacity: 1; }

.version-note { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--ink-2); font-size: 15px; }
.version-note span { display: inline-flex; align-items: center; gap: 8px; }
.version-note .icon { color: var(--accent); font-size: 16px; }

/* Steps */

.step .step-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); }
.step h3 { margin-top: 10px; }
.ip-chip {
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-2);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  min-height: 46px;
}
.ip-chip.is-empty { color: var(--muted); }

/* Shop teaser & shop */

.shop-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background:
    radial-gradient(500px 200px at 90% 0%, rgba(56, 201, 238, 0.22), transparent 70%),
    linear-gradient(135deg, #0b1532 0%, #1b3358 100%);
  color: var(--on-navy);
  box-shadow: var(--shadow-lg);
  margin-top: 16px;
}
.shop-banner h3 { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; color: #fff; }
.shop-banner p { margin-top: 4px; color: var(--on-navy-muted); font-size: 15px; }
.shop-banner .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.shop-banner .btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }

.tabs {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
}
.tab .count {
  font-size: 11px; font-weight: 500;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.product {
  display: flex; flex-direction: column;
  padding: 28px;
}
.product.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
}
@media (prefers-color-scheme: dark) { .badge { background: var(--accent); color: #07122a; } }

.price { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.price strong { font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 1; letter-spacing: -0.03em; }
.price span { font-size: 13px; color: var(--muted); }

.perks { margin: 22px 0 26px; display: grid; gap: 10px; }
.perks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.perks .icon { margin-top: 3px; font-size: 15px; color: var(--accent); stroke-width: 2.5; }

.product .btn { margin-top: auto; }

.shop-note {
  margin-top: 32px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
}
.shop-note .icon { flex: none; margin-top: 3px; color: var(--accent); font-size: 16px; }

.empty {
  padding: 40px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: var(--radius);
}

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: var(--on-navy); border-top: 1px solid var(--navy); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding-top: 26px; padding-bottom: 26px;
}
.site-footer .eyebrow { color: var(--on-navy); letter-spacing: 0.25em; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 13px; color: var(--on-navy-muted); }
.footer-meta a:hover { color: #fff; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  transform: translate(-50%, 16px);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #5ad6f6; }

/* ---------- Motion ---------- */

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-enter { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.page-enter.d1 { animation-delay: 0.08s; }
.page-enter.d2 { animation-delay: 0.16s; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; --header-h: 68px; }

  .header-inner { padding: 0 16px; gap: 12px; }
  .brand img { height: 34px; }
  .menu-btn { display: inline-flex; }
  .header-actions .link-mono { display: none; }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; font-size: 13px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"]::after { display: none; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 56px; padding-bottom: 56px; }

  .grid-3, .split { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }

  .version-card { padding: 24px; }
  .version-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
  .version-range .block-track { grid-column: 1 / -1; grid-row: 2; margin-bottom: 0; }

  .shop-banner { flex-direction: column; align-items: flex-start; padding: 24px; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 56px; }
  .header-actions .btn { padding: 0 12px; height: 38px; font-size: 13px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   Discord, dark sections and the 404 page
   ===================================================================== */

[hidden] { display: none !important; }

.icon-fill { fill: currentColor; stroke: none; }

.nav-mobile-only { display: none; }

/* Discord buttons */

.btn-discord { background: rgba(88, 101, 242, 0.07); color: #4350d8; border-color: #5865f2; }
.btn-discord:hover { background: rgba(88, 101, 242, 0.14); }
@media (prefers-color-scheme: dark) {
  .btn-discord { background: rgba(88, 101, 242, 0.14); color: #b4bbff; }
}

.btn-discord-solid { background: #5865f2; color: #fff; box-shadow: 0 10px 26px -12px rgba(88, 101, 242, 0.9); }
.btn-discord-solid:hover { background: #4752c4; }

/* Anything on a dark navy background */

.on-dark .btn-primary { background: #fff; color: #0f1b3d; }
.on-dark .btn-primary:hover { background: #dff3ff; }
.on-dark .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.on-dark .btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }
.on-dark .btn-discord { background: rgba(88, 101, 242, 0.16); color: #c3c9ff; }
.on-dark .btn-discord:hover { background: rgba(88, 101, 242, 0.28); }
.on-dark .grad-text { background-image: linear-gradient(180deg, #5ad6f6 0%, #3b86dc 100%); }

/* Discord band on the home page */

.discord-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(88, 101, 242, 0.35);
  background:
    radial-gradient(520px 240px at 0% 0%, rgba(88, 101, 242, 0.38), transparent 70%),
    radial-gradient(520px 220px at 100% 100%, rgba(56, 201, 238, 0.18), transparent 70%),
    linear-gradient(135deg, #0b1532 0%, #1a2a5e 100%);
  color: var(--on-navy);
  box-shadow: var(--shadow-lg);
}
.discord-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px;
  border-radius: 18px;
  background: #5865f2;
  color: #fff;
  font-size: 36px;
  box-shadow: 0 12px 30px -10px rgba(88, 101, 242, 0.85);
}
.discord-text .eyebrow { color: #b4bbff; }
.discord-text h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}
.discord-text p { margin-top: 6px; color: var(--on-navy-muted); font-size: 15px; }
.discord-text .discord-count { margin-top: 12px; font-size: 13px; color: #d5daff; }
.discord-band .btn { height: 48px; padding: 0 24px; }

/* ---------- 404: the void ---------- */

.void {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 78px);
  background:
    radial-gradient(760px 380px at 50% -5%, rgba(56, 201, 238, 0.24), transparent 70%),
    radial-gradient(900px 520px at 50% 115%, rgba(88, 101, 242, 0.2), transparent 70%),
    linear-gradient(180deg, #0f1b3d 0%, #070c1c 100%);
  color: var(--on-navy);
}
.void::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 100%);
  pointer-events: none;
}

.void-specks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.void-specks span {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 1px;
  background: #a6e6ff;
  opacity: 0;
  animation: speck var(--d) linear var(--delay) infinite;
}
@keyframes speck {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: var(--o); }
  85% { opacity: var(--o); }
  100% { transform: translateY(-105vh) rotate(180deg); opacity: 0; }
}

.void-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 72px;
  padding-bottom: 88px;
}
.void .eyebrow { justify-content: center; color: #9fc3e6; }
.void h1 {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}
.void h1 .grad-text { display: inline-block; padding-bottom: 0.08em; }
.void-sub { margin-top: 18px; max-width: 520px; color: var(--on-navy-muted); font-size: 17px; }

.void-coords {
  margin-top: 26px;
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: #cfe3f7;
}
.void-coords b { font-weight: 500; color: #5ad6f6; }
.void-path { margin-top: 12px; max-width: 100%; font-size: 12px; color: var(--on-navy-muted); overflow-wrap: anywhere; }
.void-path span { color: #cfe3f7; }

.void .hero-cta { justify-content: center; margin-top: 32px; }

.void-links {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.void-links a { color: var(--on-navy-muted); transition: color 0.15s ease; }
.void-links a:hover { color: #fff; }

/* Block-built "404" */

.pixel-404 {
  --px: 22px;
  --gap: 3px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 17), var(--px));
  grid-auto-rows: var(--px);
  gap: var(--gap);
  margin-bottom: 48px;
}
.pixel-404.built { animation: bob 6s ease-in-out 1.6s infinite; }
.pixel-fallback {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 120px;
  line-height: 1;
  color: #5ad6f6;
}

.px {
  position: relative;
  border-radius: 3px;
  background: linear-gradient(180deg, #45d4f4 0%, #2a8fcf 55%, #1d4f9f 100%);
  box-shadow:
    0 0 0 2px #1d0e46,
    inset 0 -5px 0 rgba(10, 18, 60, 0.35),
    inset 0 3px 0 rgba(255, 255, 255, 0.22);
  animation: land 0.75s cubic-bezier(0.3, 0.7, 0.3, 1.15) both;
}
.px.spark::after {
  content: "";
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: 24%;
  height: 24%;
  background: rgba(255, 255, 255, 0.55);
}
.px.loose {
  position: absolute;
  width: var(--px);
  height: var(--px);
  left: calc(var(--col) * (var(--px) + var(--gap)));
  top: calc(7 * (var(--px) + var(--gap)));
  opacity: 0;
  animation: fall-away 3.6s cubic-bezier(0.5, 0, 0.9, 0.6) var(--delay) infinite;
}

@keyframes land {
  0% { transform: translateY(-70vh); opacity: 0; }
  35% { opacity: 1; }
  78% { transform: translateY(3px); }
  100% { transform: none; opacity: 1; }
}
@keyframes fall-away {
  0% { transform: translateY(-14px) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  45% { opacity: 0.9; }
  100% { transform: translateY(calc(var(--px) * 1.9)) rotate(var(--rot)) scale(0.6); opacity: 0; }
}
.void-inner > :not(.pixel-404) { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .px.loose, .void-specks { display: none; }
}

@media (max-width: 860px) {
  .nav .nav-mobile-only { display: block; }

  .discord-band { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 24px; }
  .discord-band .btn { width: 100%; }
  .discord-logo { width: 56px; height: 56px; font-size: 30px; border-radius: 15px; }
  .discord-text h3 { font-size: 24px; }

  .void-inner { padding-top: 56px; padding-bottom: 64px; }
  .void-specks span:nth-child(2n) { display: none; }
  .pixel-404 { --px: 14px; --gap: 2px; margin-bottom: 36px; }
  .px { border-radius: 2px; box-shadow: 0 0 0 1.5px #1d0e46, inset 0 -3px 0 rgba(10, 18, 60, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.22); }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 50px; }
  .void .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
}
