/* =========================================================
   FIRMAMENT - landing page
   A deliberately off-centre, Discord-inspired layout with a
   celestial / skyblock colour palette.
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  /* base surfaces - layered like Discord client */
  --bg-0:  #07060f;             /* page */
  --bg-1:  #0b0818;             /* main surface */
  --bg-2:  #141028;             /* card */
  --bg-3:  #1b1538;             /* elevated */
  --bg-4:  #231b46;             /* hovered */
  --line:  rgba(150, 130, 255, 0.12);
  --line-2:rgba(150, 130, 255, 0.20);

  /* text */
  --tx-1:  #ece9ff;
  --tx-2:  #b9b3df;
  --tx-3:  #7a749f;
  --tx-4:  #555072;

  /* brand */
  --br-purple:  #7c5cff;
  --br-purple2: #9a7bff;
  --br-indigo:  #4a2ab0;
  --br-cyan:    #5ac8fa;
  --br-gold:    #ffb547;
  --br-gold-2:  #ffe8a1;
  --br-green:   #00af5b;
  --br-red:     #ed4245;
  --br-discord: #5865f2;

  /* layout */
  --rail-w: 240px;
  --top-h: 64px;
  --content-max: 1440px;
  --pad-x: clamp(24px, 4vw, 72px);
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px;

  /* type */
  --f-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-serif: "Newsreader", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--tx-1);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, kbd, pre { font-family: var(--f-mono); }
::selection { background: color-mix(in oklab, var(--br-purple) 55%, #000); color: #fff; }

/* ---------- background cosmos (global) ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -5%, rgba(124,92,255,0.22), transparent 60%),
    radial-gradient(900px 600px  at -5% 30%, rgba(90,200,250,0.12),  transparent 60%),
    radial-gradient(700px 500px  at 60% 110%, rgba(255,181,71,0.08), transparent 60%),
    linear-gradient(180deg, #07060f 0%, #0a0718 60%, #07060f 100%);
  z-index: -2;
}
body::after {
  /* twinkling starfield - pure CSS radial-gradient dots */
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 13% 22%, #fff 99%, transparent),
    radial-gradient(1px 1px at 27% 71%, #d9d2ff 99%, transparent),
    radial-gradient(1.5px 1.5px at 41% 34%, #fff 99%, transparent),
    radial-gradient(1px 1px at 55% 12%, #cfc4ff 99%, transparent),
    radial-gradient(1px 1px at 62% 78%, #fff 99%, transparent),
    radial-gradient(1.2px 1.2px at 78% 45%, #fff 99%, transparent),
    radial-gradient(1px 1px at 88% 19%, #d9d2ff 99%, transparent),
    radial-gradient(1px 1px at 92% 65%, #fff 99%, transparent),
    radial-gradient(1px 1px at 7% 88%, #fff 99%, transparent),
    radial-gradient(1.4px 1.4px at 35% 92%, #cfc4ff 99%, transparent);
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.75; }
}

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x) 0 0;
  background: rgba(11, 8, 24, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brandmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em;
  width: var(--rail-w);
  padding-left: 20px;
  box-sizing: border-box;
  flex: none;
}
.brandmark-name {
  font-family: var(--f-serif);
  font-size: 20px;
  background: linear-gradient(180deg, #fff, #d8cfff 75%, #9d83ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brandmark-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tx-3);
  padding: 3px 6px; border: 1px solid var(--line-2);
  border-radius: 4px;
}

.pulse-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid var(--line-2);
  font-size: 12px; color: var(--tx-2);
}
.pulse-pill strong { color: var(--tx-1); font-weight: 700; }
.pulse-pill-ghost { background: transparent; }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tx-3); display: inline-block;
  box-shadow: 0 0 0 3px transparent;
}
.dot-live {
  background: #ff5b6b;
  box-shadow: 0 0 0 0 rgba(255,91,107,.6);
  animation: livePulse 1.8s ease-out infinite;
}
.dot-online {
  background: #23a55a;
  box-shadow: 0 0 0 3px rgba(35,165,90,0.18);
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,91,107,.55); }
  80%  { box-shadow: 0 0 0 10px rgba(255,91,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,91,107,0); }
}

.topbar-nav {
  display: flex; align-items: center; gap: 4px;
}
.topbar-nav a {
  color: var(--tx-2);
  padding: 8px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.topbar-nav a:hover { color: var(--tx-1); background: var(--bg-3); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: transform .12s ease, background .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg-3);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--bg-4); }
.btn-discord {
  background: var(--br-discord);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(88, 101, 242, .6);
}
.btn-discord:hover { background: #4752d6; }

.topbar-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--tx-2);
  background: transparent;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.topbar-ic svg { width: 18px; height: 18px; }
.topbar-ic:hover {
  color: #fff;
  background: var(--bg-3);
  border-color: var(--line-2);
  transform: translateY(-1px);
}

.btn-download {
  margin-left: 6px;
  padding: 9px 16px;
  color: #fff;
  background: linear-gradient(180deg, #00c86a, var(--br-green));
  box-shadow: 0 10px 22px -10px rgba(0,175,91,.7), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-download svg { width: 16px; height: 16px; }
.btn-download:hover { filter: brightness(1.08); box-shadow: 0 14px 26px -10px rgba(0,175,91,.85); }

/* =========================================================
   SIDE MENU - docs-style vertical navigation
   ========================================================= */
.menu {
  position: fixed;
  top: var(--top-h);
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  padding: 20px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11,8,24,.82), rgba(11,8,24,.96) 60%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  z-index: 40;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.menu::-webkit-scrollbar { width: 6px; }
.menu::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.menu-nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: none;
}

.menu-item {
  position: relative;
  display: flex; align-items: center;
  padding: 0 12px 0 14px;
  height: 34px;
  border-radius: 8px;
  color: var(--tx-3);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .15s, color .15s;
}
.menu-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px; height: 16px;
  border-radius: 2px;
  background: var(--br-purple2);
  transition: transform .15s;
}
.menu-item:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}

.menu-item.is-active {
  color: #fff;
  background: rgba(124,92,255,.12);
  font-weight: 600;
}
.menu-item.is-active::before { transform: translateY(-50%) scaleY(1); }

/* Discord-style rich presence card */
.presence {
  position: relative;
  margin-top: 22px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(124,92,255,.22), transparent 60%),
    linear-gradient(180deg, rgba(20,14,48,.9), rgba(11,8,24,.9));
  border: 1px solid rgba(124,92,255,.28);
  box-shadow: 0 10px 28px -14px rgba(124,92,255,.55), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  flex: none;
}
.presence-stars { position: absolute; inset: 0; pointer-events: none; }
.presence-stars i {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #d8cfff;
  opacity: .55;
  animation: presTwinkle 2.6s ease-in-out infinite;
}
.presence-stars i:nth-child(2){ animation-delay: .5s; opacity: .75; }
.presence-stars i:nth-child(3){ animation-delay: 1s; }
.presence-stars i:nth-child(4){ animation-delay: 1.6s; opacity: .65; }
.presence-stars i:nth-child(5){ animation-delay: .8s; opacity: .5; }
.presence-stars i:nth-child(6){ animation-delay: 2.1s; opacity: .7; }
@keyframes presTwinkle {
  0%, 100% { opacity: .25; transform: scale(.7); }
  50%      { opacity: .85; transform: scale(1.1); }
}

.presence-top {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: .18em;
  color: var(--tx-3);
  position: relative;
}
.presence-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 0 rgba(35,165,90,.7);
  animation: presPulse 1.8s ease-out infinite;
}
@keyframes presPulse {
  0%   { box-shadow: 0 0 0 0 rgba(35,165,90,.55); }
  80%  { box-shadow: 0 0 0 7px rgba(35,165,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(35,165,90,0); }
}
.presence-label { color: #23a55a; }
.presence-time {
  margin-left: auto;
  color: var(--tx-4);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  font-weight: 700;
  font-size: 10px;
}

.presence-body {
  display: flex; gap: 10px; align-items: center;
  margin-top: 9px;
  position: relative;
}
.presence-ic {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  overflow: hidden;
  background: #07060f;
  border: 1px solid rgba(124,92,255,.35);
  box-shadow: 0 4px 12px -4px rgba(124,92,255,.5);
  position: relative;
}
.presence-ic img {
  width: 100%; height: 100%;
  image-rendering: pixelated;
  display: block;
}
.presence-ic::after {
  content: "";
  position: absolute; right: -3px; bottom: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #23a55a;
  border: 2px solid #0b0818;
}
.presence-text { min-width: 0; }
.presence-title {
  font-size: 13px; font-weight: 700; color: #fff;
  line-height: 1.1;
}
.presence-sub {
  font-size: 11px; color: var(--tx-3);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.presence-detail {
  font-size: 10.5px; color: var(--tx-4);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.presence-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 16px;
  margin-top: 10px;
  position: relative;
}
.presence-bars i {
  flex: 1;
  border-radius: 1px;
  background: linear-gradient(180deg, #b79dff, var(--br-purple));
  opacity: .85;
  animation: presBar 1.2s ease-in-out infinite;
  transform-origin: bottom;
}
.presence-bars i:nth-child(1){  animation-delay: 0.00s; }
.presence-bars i:nth-child(2){  animation-delay: 0.08s; }
.presence-bars i:nth-child(3){  animation-delay: 0.16s; }
.presence-bars i:nth-child(4){  animation-delay: 0.24s; }
.presence-bars i:nth-child(5){  animation-delay: 0.32s; }
.presence-bars i:nth-child(6){  animation-delay: 0.40s; }
.presence-bars i:nth-child(7){  animation-delay: 0.48s; }
.presence-bars i:nth-child(8){  animation-delay: 0.56s; }
.presence-bars i:nth-child(9){  animation-delay: 0.64s; }
.presence-bars i:nth-child(10){ animation-delay: 0.72s; }
.presence-bars i:nth-child(11){ animation-delay: 0.80s; }
.presence-bars i:nth-child(12){ animation-delay: 0.88s; }
.presence-bars i:nth-child(13){ animation-delay: 0.96s; }
.presence-bars i:nth-child(14){ animation-delay: 1.04s; }
@keyframes presBar {
  0%, 100% { transform: scaleY(0.25); }
  50%      { transform: scaleY(1); }
}

/* Players online widget */
.players {
  margin-top: 14px;
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  flex: none;
}
.players-head {
  display: flex; align-items: center; gap: 7px;
  padding: 0 2px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .16em;
  color: var(--tx-3);
}
.players-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 0 rgba(35,165,90,.7);
  animation: presPulse 1.8s ease-out infinite;
}
.players-label { color: #23a55a; }
.players-count {
  margin-left: auto;
  color: #fff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .02em;
  font-size: 11px;
}
.players-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.player {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px;
  border-radius: 6px;
  transition: background .15s;
}
.player:hover { background: rgba(255,255,255,.04); }
.player-head {
  width: 20px; height: 20px;
  border-radius: 4px;
  image-rendering: pixelated;
  background: #1a1430;
  flex: none;
}
.player-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx-4);
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(124,92,255,.1);
  flex: none;
  transition: opacity .18s;
}
.players-more {
  margin-top: 6px;
  padding: 0 4px;
  font-size: 10.5px;
  color: var(--tx-4);
  letter-spacing: .02em;
}

/* Download & quick-link footer */
.menu-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  flex: none;
}
.menu-foot-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-4);
  padding: 0 4px 2px;
}

.menu-dl {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c86a, var(--br-green));
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(0,175,91,.7), inset 0 1px 0 rgba(255,255,255,.15);
  transition: filter .15s, box-shadow .15s;
}
.menu-dl:hover { filter: brightness(1.08); }
.menu-dl-ic {
  flex: none;
  width: 16px; height: 16px;
}
.menu-dl-ic svg { width: 16px; height: 16px; display: block; }
.menu-dl-body { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.menu-dl-v {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.005em;
}
.menu-dl-meta {
  font-size: 10.5px;
  opacity: .85;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-dl-alt {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--tx-2);
  box-shadow: none;
}
.menu-dl-alt:hover { background: var(--bg-3); color: #fff; filter: none; }

.menu-foot-row { display: flex; gap: 8px; margin-top: 4px; }
.menu-mini {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 10px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
  font-size: 12px; font-weight: 600;
  transition: background .15s, color .15s, transform .15s;
}
.menu-mini:hover { background: var(--bg-4); color: #fff; transform: translateY(-1px); }

/* Inline version-download links inside install-step #3 */
.inline-dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline-dl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0,175,91,.12);
  border: 1px solid rgba(0,175,91,.35);
  color: #7ce29d;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  transition: background .15s, color .15s, transform .15s;
}
.inline-dl:hover { background: rgba(0,175,91,.22); color: #fff; transform: translateY(-1px); }

/* Shared green "presence" dot (used in hero chat card) */
.voice-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 8px #23a55a;
  animation: voicePulse 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes voicePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* =========================================================
   MAIN CONTENT LAYOUT
   Not centred. We offset by rail width and keep content
   generous on the left edge.
   ========================================================= */
main {
  margin-left: var(--rail-w);
  padding-top: var(--top-h);
  min-width: 0;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 96px var(--pad-x) 120px;
  min-height: calc(100vh - var(--top-h));
  overflow: hidden;
}
.hero .starfield, .hero .nebula { position: absolute; pointer-events: none; }
.hero .starfield { inset: 0; }
.hero .nebula {
  right: -240px; top: -180px;
  width: 820px; height: 820px;
  background:
    radial-gradient(closest-side, rgba(124,92,255,.55), transparent 68%),
    radial-gradient(closest-side, rgba(90,200,250,.28), transparent 70%) 80% 20% / 70% 70% no-repeat;
  filter: blur(30px);
  opacity: .75;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(-20px,-14px) rotate(6deg); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(124,92,255,.12);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
  font-size: 12px; font-weight: 600;
  letter-spacing: .02em;
}

/* Title bleeds off the left. Uses a layered ghost for depth. */
.hero-title {
  position: relative;
  margin: 18px 0 18px -8px;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(56px, 8.2vw, 152px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.hero-fg { display: inline-block; white-space: nowrap; }
.hero-bg { white-space: nowrap; }
.hero-fg {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, #fff 0%, #e3d9ff 48%, #9a7bff 88%, #4a2ab0 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 32px rgba(124,92,255,.35));
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124,92,255,.18);
  transform: translate(10px, 8px);
  pointer-events: none;
}
.glyph-wave {
  display: inline-block;
  background: linear-gradient(180deg, #ffe8a1, #ffb547 60%, #b8761d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wave 3.8s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(16px, 1.2vw, 20px);
  color: var(--tx-2);
  margin: 0 0 32px;
}
.hero-sub strong { color: var(--tx-1); font-weight: 600; }

.cta-row {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 28px;
}

.cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 18px 14px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  transition: transform .15s, box-shadow .2s, background .2s, filter .15s;
}
.cta small { display: block; font-size: 11px; font-weight: 500; opacity: .8; letter-spacing: .06em; text-transform: uppercase; }
.cta strong { display: block; font-size: 17px; font-weight: 700; }
.cta kbd {
  margin-left: 4px;
  padding: 4px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.14);
  color: inherit;
}

/* Larger hero / install download CTAs */
.cta-big {
  padding: 20px 26px 20px 22px;
  gap: 18px;
  border-radius: var(--r-lg);
  min-width: 280px;
}
.cta-big small { font-size: 12px; letter-spacing: .08em; }
.cta-big strong {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.cta-big .cta-ic {
  width: 34px; height: 34px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
  flex: none;
}
.cta-big kbd {
  margin-left: 6px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 10px;
}
.cta-primary {
  background: linear-gradient(180deg, #00c86a, var(--br-green));
  color: #fff;
  box-shadow: 0 16px 32px -16px rgba(0, 175, 91, .7),
              inset 0 1px 0 rgba(255,255,255,.22);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(0,175,91,.85); }
.cta-secondary {
  background: var(--bg-3);
  color: #fff;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.cta-secondary:hover { background: var(--bg-4); transform: translateY(-2px); }
.cta-discord {
  background: var(--br-discord);
  color: #fff;
  padding: 16px 22px;
  font-size: 15px;
  box-shadow: 0 16px 32px -14px rgba(88,101,242,.8);
}
.cta-discord:hover { background: #4752d6; transform: translateY(-2px); }

.hero-proof {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  color: var(--tx-3); font-size: 13px;
}
.hero-proof li b { color: var(--tx-1); font-weight: 700; margin-right: 4px; }
.hero-proof li + li::before {
  content: "•";
  margin-right: 22px;
  color: var(--tx-4);
}

/* The Discord-style chat card */
.hero-card {
  position: relative;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(124,92,255,.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,.7),
    0 10px 30px -15px rgba(124,92,255,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  transform: rotate(1.2deg);
  max-width: 560px;
  justify-self: end;
  width: 100%;
}
.hero-card:hover { transform: rotate(0deg); transition: transform .4s ease; }

.hc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,8,24,.5);
  font-size: 13px;
}
.hc-hash { color: var(--tx-3); font-weight: 700; }
.hc-name { color: var(--tx-1); font-weight: 600; }
.hc-sep  { color: var(--tx-4); }
.hc-topic{ color: var(--tx-3); }
.hc-spacer { margin-left: auto; }
.hc-presence {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(35,165,90,.12); color: #7ce29d;
  font-weight: 600;
}

.hc-body { padding: 10px 6px 14px; }

.msg {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 10px 18px;
  transition: background .15s;
}
.msg:hover { background: rgba(255,255,255,.02); }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  color: #fff; font-weight: 700;
  background: var(--bg-4);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.avatar-gold   { background: linear-gradient(180deg, #ffe8a1, #ffb547); color: #4a2a0a; }
.avatar-purple { background: linear-gradient(180deg, #a78bff, #5a3ad0); }
.avatar-sky    { background: linear-gradient(180deg, #9fe3ff, #3aa3d6); color: #062135; }
.avatar-green  { background: linear-gradient(180deg, #66e29b, #0e9b52); }

.msg-body p { margin: 4px 0 0; color: var(--tx-2); }
.msg-body p a { color: var(--br-purple2); text-decoration: underline; text-underline-offset: 3px; }
.msg-meta {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14px;
}
.msg-name { color: #fff; font-weight: 700; }
.msg-meta time { color: var(--tx-3); font-size: 11px; }
.msg-badge {
  padding: 2px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .04em;
}
.msg-badge-dev { background: var(--br-gold); color: #3b2400; }
.msg-badge-bot { background: var(--br-discord); color: #fff; }
.msg-foot { font-size: 13px; color: var(--tx-3); }

.code-embed {
  margin-top: 10px;
  border-radius: var(--r-md);
  background: #0a0718;
  border: 1px solid var(--line);
  overflow: hidden;
}
.code-embed-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(124,92,255,.08);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.code-embed-bar .dot { width: 10px; height: 10px; }
.code-embed-bar .dot.red { background: #ed6a5e; }
.code-embed-bar .dot.yel { background: #f5bf4f; }
.code-embed-bar .dot.grn { background: #62c555; }
.code-embed-bar .code-title { color: var(--tx-3); margin-left: 6px; }
.code-embed-bar .copy { margin-left: auto; }
.code-embed pre {
  margin: 0; padding: 14px 16px;
  font-size: 13px; line-height: 1.6;
  color: var(--tx-1);
  overflow-x: auto;
}
.tkn-kw  { color: #c093ff; font-weight: 600; }
.tkn-fn  { color: #5ac8fa; }
.tkn-flag{ color: #ffb547; }
.tkn-str { color: #a3e8a1; }
.tkn-com { color: var(--tx-4); font-style: italic; }

.reacts { margin-top: 8px; display: flex; gap: 6px; }
.react {
  padding: 4px 8px; border-radius: 10px;
  background: rgba(124,92,255,.1);
  border: 1px solid var(--line-2);
  font-size: 12px; color: var(--tx-2);
}
.react b { color: var(--tx-1); margin-left: 3px; font-weight: 700; }

.hc-input {
  margin: 4px 14px 14px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  color: var(--tx-3);
  font-size: 14px;
}
.hc-input .plus {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tx-3); color: var(--bg-3);
  display: grid; place-items: center;
  font-weight: 700;
}

.copy {
  padding: 2px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--tx-2);
  background: rgba(255,255,255,.02);
  transition: background .15s, color .15s;
}
.copy:hover { background: rgba(124,92,255,.16); color: #fff; }
.copy.copied { background: var(--br-green); color: #fff; border-color: transparent; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: var(--pad-x);
  bottom: 28px;
  width: 28px; height: 44px;
  border-radius: 16px;
  border: 2px solid var(--line-2);
  display: none;
}
@media (min-width: 1200px) { .scroll-cue { display: block; } }
.scroll-cue span {
  position: absolute;
  left: 50%; top: 10px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--tx-2);
  transform: translateX(-50%);
  animation: dropDot 1.8s ease-in-out infinite;
}
.scroll-cue span:nth-child(2) { animation-delay: .15s; }
.scroll-cue span:nth-child(3) { animation-delay: .3s; }
@keyframes dropDot {
  0%   { transform: translate(-50%, 0); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translate(-50%, 18px); opacity: 0; }
}

/* =========================================================
   STATS STRIP
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 0;
  margin: 0 var(--pad-x);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transform: translateY(-40px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
}
.stat {
  padding: 22px 24px;
  background: rgba(11,8,24,.85);
  display: flex; flex-direction: column; gap: 4px;
}
.stat b {
  font-family: var(--f-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, #b8a5ff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: 13px; color: var(--tx-3); }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding: 96px var(--pad-x) 32px;
}
.sec-head-split { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.sec-kicker {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--br-purple2);
  margin-bottom: 14px;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 18ch;
}
.sec-desc {
  color: var(--tx-2);
  font-size: 16px;
  max-width: 52ch;
  margin: 0 0 6px;
}
.sec-desc code {
  padding: 2px 7px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-size: 13px;
  color: var(--br-purple2);
}

/* =========================================================
   FEATURES - Discord channel-list / bento
   ========================================================= */
.features { padding-bottom: 48px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  padding: 0 var(--pad-x);
}
.feat {
  grid-column: span 2;
  position: relative;
  padding: 22px 22px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .18s, border-color .2s, background .2s;
  overflow: hidden;
}
.feat::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 100% 0%, rgba(124,92,255,.14), transparent 60%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.feat:hover { transform: translateY(-3px); border-color: var(--line-2); }
.feat:hover::before { opacity: 1; }
.feat-wide { grid-column: span 4; }
.feat-dark {
  background: linear-gradient(135deg, #130a33, #0a0718);
  border-color: rgba(124,92,255,.3);
}
.feat-accent { background: linear-gradient(135deg, rgba(255,181,71,.12), var(--bg-2)); border-color: rgba(255,181,71,.35); }
.feat-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.feat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(124,92,255,.14);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 20px;
}
.feat h3 {
  margin: 0;
  font-size: 17px; font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.feat p { margin: 0; color: var(--tx-2); font-size: 14px; line-height: 1.6; }
.feat-pill {
  margin-left: auto;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(124,92,255,.18); color: #cebfff;
  border: 1px solid var(--line-2);
}
.feat-pill-gold { background: rgba(255,181,71,.18); color: #ffd683; border-color: rgba(255,181,71,.3); }
.feat-sub {
  margin: 10px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--tx-2);
}
.feat-sub li { padding-left: 18px; position: relative; }
.feat-sub li::before {
  content: "›";
  position: absolute; left: 4px; top: -1px;
  color: var(--br-purple2); font-weight: 700;
}
.feat code {
  padding: 2px 7px;
  background: rgba(11,8,24,.8);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-size: 12px;
  color: #c093ff;
}

/* =========================================================
   INSTALL - fake chat log
   ========================================================= */
.install { padding-bottom: 60px; }
.install-quick { display: flex; gap: 12px; flex-wrap: wrap; }
.chan {
  margin: 0 var(--pad-x);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.chan-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,8,24,.5);
  font-size: 14px;
}
.chan .msg { padding: 14px 22px; }
.chan .avatar {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* =========================================================
   COMMANDS
   ========================================================= */
.commands { padding-bottom: 64px; }
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  padding: 0 var(--pad-x);
}
.cmd {
  position: relative;
  padding: 18px 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .15s;
}
.cmd:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cmd-sig {
  font-family: var(--f-mono);
  font-size: 15px;
  padding: 10px 12px;
  background: #0a0718;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.cmd p { margin: 0; color: var(--tx-2); font-size: 14px; }
.cmd .copy { align-self: flex-start; }

/* =========================================================
   COMPATIBILITY
   ========================================================= */
.compat { padding-bottom: 64px; }
.compat-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  padding: 0 var(--pad-x);
}
.compat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: 14px;
}
.compat-table th, .compat-table td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compat-table thead th {
  background: rgba(124,92,255,.08);
  color: var(--tx-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.compat-table tbody tr:last-child td { border-bottom: 0; }
.compat-table tbody tr:hover { background: rgba(124,92,255,.05); }
.compat-table td:first-child { color: var(--tx-1); font-weight: 600; }

.compat-note {
  padding: 22px;
  background: linear-gradient(160deg, rgba(35,165,90,.1), transparent 60%), var(--bg-2);
  border: 1px solid rgba(35,165,90,.3);
  border-radius: var(--r-lg);
}
.compat-note h3 {
  margin: 0 0 8px;
  font-size: 18px; color: #7ce29d;
  font-family: var(--f-serif); font-weight: 600;
}
.compat-note p { margin: 0; color: var(--tx-2); font-size: 14px; line-height: 1.6; }

/* =========================================================
   REPO GRID
   ========================================================= */
.repo { padding-bottom: 64px; }
.repo-grid {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.repo-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .15s, border-color .2s, background .2s;
}
.repo-card:hover { transform: translateY(-3px); border-color: var(--br-purple); background: var(--bg-3); }
.repo-card h3 {
  margin: 0; font-size: 16px; font-weight: 700;
  font-family: var(--f-mono);
  color: #fff;
}
.repo-card p { margin: 0; color: var(--tx-2); font-size: 14px; flex: 1; }
.repo-link {
  margin-top: 6px;
  font-size: 12px; color: var(--br-purple2);
  font-family: var(--f-mono);
}

/* =========================================================
   FAQ
   ========================================================= */
.faq { padding-bottom: 72px; }
.faq-list {
  padding: 0 var(--pad-x);
  display: grid;
  gap: 10px;
  max-width: 880px;
}
.q {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.q[open] { border-color: var(--line-2); background: var(--bg-3); }
.q summary {
  list-style: none;
  padding: 16px 20px;
  cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  font-weight: 600; color: var(--tx-1);
  font-size: 16px;
}
.q summary::-webkit-details-marker { display: none; }
.q .chev {
  margin-left: auto;
  width: 12px; height: 12px;
  border-right: 2px solid var(--tx-2);
  border-bottom: 2px solid var(--tx-2);
  transform: rotate(45deg);
  transition: transform .25s;
}
.q[open] .chev { transform: rotate(-135deg); }
.q p {
  margin: 0;
  padding: 0 20px 18px 20px;
  color: var(--tx-2);
  font-size: 14.5px; line-height: 1.65;
}
.q p code {
  padding: 1px 6px;
  background: var(--bg-4);
  border-radius: 4px;
  font-size: 13px;
  color: #c093ff;
}
.q p a { color: var(--br-purple2); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   COMMUNITY banner
   ========================================================= */
.community {
  padding: 48px var(--pad-x) 96px;
}
.community-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  padding: 44px 48px;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(88,101,242,.25), transparent 60%),
    linear-gradient(135deg, #1e1b47, #0f0b2a);
  border: 1px solid rgba(88,101,242,.35);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.community-inner::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 30%, #fff 99%, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff 99%, transparent),
    radial-gradient(1.2px 1.2px at 70% 20%, #fff 99%, transparent),
    radial-gradient(1px 1px at 85% 60%, #fff 99%, transparent);
  opacity: .35;
  pointer-events: none;
}
.community h2 { margin: 8px 0; }
.community p { margin: 0; color: var(--tx-2); max-width: 58ch; }
.community code {
  padding: 2px 7px; background: rgba(255,255,255,.08);
  border-radius: 6px; font-size: 13px; color: #fff;
}

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  margin-left: var(--rail-w);
  padding: 60px var(--pad-x) 28px;
  border-top: 1px solid var(--line);
  background: rgba(7,6,15,.7);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.foot-brand p {
  font-size: 13.5px;
  color: var(--tx-2);
  margin: 10px 0;
  max-width: 40ch;
}
.foot-legal { color: var(--tx-3); font-size: 12px; line-height: 1.55; }
.foot-col h4 {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx-3);
}
.foot-col a {
  display: block;
  padding: 5px 0;
  color: var(--tx-2);
  font-size: 14px;
  transition: color .15s, transform .15s;
}
.foot-col a:hover { color: var(--tx-1); transform: translateX(2px); }

.foot-bar {
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--tx-3);
  font-size: 12px;
}
.foot-bar-links { display: flex; gap: 16px; }
.foot-bar-links a:hover { color: var(--tx-1); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-bottom: 80px; }
  .hero-card { justify-self: start; transform: rotate(0); max-width: 620px; }
  .feat-grid { grid-template-columns: repeat(4, 1fr); }
  .feat { grid-column: span 2; }
  .feat-wide { grid-column: span 4; }
  .compat-wrap { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1.3fr repeat(2, 1fr); }
  .community-inner { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; }
  .sec-head-split { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 820px) {
  :root { --rail-w: 0px; --pad-x: 20px; }
  .menu { display: none; }
  .topbar-nav .topbar-ic { display: none; }
  .topbar-nav .btn { display: inline-flex; }
  .brandmark { width: auto; padding-left: var(--pad-x); }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .hero-title { font-size: clamp(56px, 18vw, 120px); margin-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; transform: translateY(-24px); }
  .feat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feat, .feat-wide { grid-column: span 2; }
  .compat-table { font-size: 13px; }
  .compat-table th, .compat-table td { padding: 10px 12px; }
  .community-inner { padding: 28px 24px; }
  .foot { margin-left: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat, .feat-wide { grid-column: span 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
