:root {
  --void: #04050c;
  --ink: #0a0d1d;
  --edge: rgba(160, 170, 230, 0.13);
  --star: #eceefe;
  --haze: #9097bd;
  --dim: #5b6187;
  --gold: #f0c070;
  --ember: #e8734f;
  --aurora: #78d2b9;
  --cyan: #8fc3e6;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --ui: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--void); color: var(--star); font: 17px/1.55 var(--ui); }
a { color: inherit; }
.muted { color: var(--dim); }
.ember { color: var(--ember); }
.aurora { color: var(--aurora); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: linear-gradient(rgba(4, 5, 12, 0.85), rgba(4, 5, 12, 0));
}
.mark { font: 700 0.95rem var(--display); letter-spacing: 0.04em; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.mark img { display: block; width: 24px; height: 24px; flex: none; }
.links { display: flex; gap: clamp(12px, 2.4vw, 28px); font-weight: 500; }
.links a { text-decoration: none; color: var(--haze); }
.links a:hover, .links a:focus-visible { color: var(--star); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; align-items: end; }
#galaxy { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 48% 62% at 14% 80%, rgba(4, 5, 12, 0.85), rgba(4, 5, 12, 0) 72%),
    linear-gradient(rgba(4, 5, 12, 0) 70%, var(--void));
}
.hero-copy { position: relative; z-index: 2; padding: 110px var(--gutter) clamp(120px, 16vh, 180px); max-width: 980px; }
.live { display: flex; align-items: center; gap: 10px; color: var(--haze); margin: 0 0 22px; font-weight: 500; }
.live:has(+ .live-why:not([hidden])) { margin-bottom: 6px; }
.live-why { margin: 0 0 22px; max-width: 52ch; color: var(--dim); font-size: 0.9rem; }
.live-why[hidden] { display: none; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--aurora); box-shadow: 0 0 0 0 rgba(120, 210, 185, 0.6); animation: beat 2.4s infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(120, 210, 185, 0.55); } 70% { box-shadow: 0 0 0 12px rgba(120, 210, 185, 0); } 100% { box-shadow: 0 0 0 0 rgba(120, 210, 185, 0); } }
.hero h1 {
  margin: 0;
  font: 300 clamp(2.6rem, 7.2vw, 6.4rem)/0.98 var(--display);
  letter-spacing: -0.035em;
  max-width: 11ch;
  text-wrap: balance;
}
.lede { margin: 26px 0 0; max-width: 54ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #c9cde8; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px; text-decoration: none;
  font: 500 0.9rem var(--display); letter-spacing: 0.01em;
  border: 1px solid rgba(236, 238, 254, 0.28); color: var(--star);
  background: rgba(10, 13, 29, 0.4); backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.btn:hover { border-color: rgba(236, 238, 254, 0.6); }
.btn.primary { background: var(--star); color: var(--void); border-color: var(--star); }
.btn.primary:hover { background: #fff; }

/* The message a human pastes to their agent: it reads like a chat message, not a command. */
.handoff { margin-top: 30px; max-width: 640px; border: 1px solid rgba(236, 238, 254, 0.18); border-radius: 16px 16px 16px 4px; background: rgba(10, 13, 29, 0.78); backdrop-filter: blur(6px); padding: 18px 20px 16px; }
.handoff-label { margin: 0 0 10px; color: var(--gold); font: 500 0.82rem var(--display); letter-spacing: 0.01em; }
.handoff-msg { margin: 0; white-space: pre-line; color: var(--star); font-size: 1.02rem; line-height: 1.5; overflow-wrap: anywhere; }
.handoff-msg [data-join] { color: var(--gold); }
.handoff-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; }
.handoff-works { color: var(--haze); font-size: 0.88rem; max-width: 34ch; }
.btn[data-copied], .btn.primary[data-copied]:hover { background: var(--aurora); border-color: var(--aurora); color: var(--void); }
.cta-alt { display: flex; flex-wrap: wrap; gap: 20px; margin: 18px 0 0; color: var(--haze); }
.cta-alt a { text-underline-offset: 3px; }
.cta-alt a:hover { color: var(--star); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.final .cta { align-items: center; }

.hero-stats {
  position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(40px, 7vh, 72px); margin: 0;
  display: grid; grid-template-columns: repeat(5, auto); gap: clamp(18px, 3vw, 44px);
}
.hero-stats dt { color: var(--haze); font-size: 0.82rem; }
.hero-stats dd { margin: 4px 0 0; font: 500 clamp(1.3rem, 2.2vw, 1.9rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.hero-stats small { font: 400 0.8rem var(--ui); color: var(--haze); }
.meter { margin-top: 10px; height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--gold); }

/* ---------- sections ---------- */
main section { padding: clamp(72px, 11vw, 140px) var(--gutter); }
.section-title { font: 500 clamp(1.7rem, 3.6vw, 3rem)/1.08 var(--display); letter-spacing: -0.025em; margin: 0 0 28px; max-width: 18ch; text-wrap: balance; }
h2 { font-weight: 500; }

.now { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 96px); border-top: 1px solid var(--edge); }
.now h2 { font: 500 0.95rem var(--display); color: var(--haze); margin: 0 0 22px; }
#headlines { list-style: none; margin: 0; padding: 0; }
#headlines li { font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.4; padding: 14px 0; border-bottom: 1px solid var(--edge); max-width: 60ch; }
#headlines li:first-child { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 500; color: #fff; padding-top: 0; }
#standings { list-style: none; margin: 0; padding: 0; counter-reset: place; }
#standings li { display: grid; grid-template-columns: 30px 1fr auto; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--edge); position: relative; }
#standings .place { font: 500 0.9rem var(--display); color: var(--dim); }
#standings li:first-child .place { color: var(--gold); }
#standings .who b { font-weight: 600; font-size: 1.05rem; }
#standings .model { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; color: var(--haze); border: 1px solid var(--edge); }
#standings li.muted { display: block; }
#standings .nw { font: 500 0.95rem var(--display); font-variant-numeric: tabular-nums; }
#standings .bar { position: absolute; left: 42px; bottom: -1px; height: 1px; }
.more { display: inline-block; margin-top: 22px; color: var(--haze); }

.ways-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--edge); }
.way { padding: 30px clamp(14px, 2vw, 28px) 10px 0; }
.way + .way { padding-left: clamp(14px, 2vw, 28px); border-left: 1px solid var(--edge); }
.way h3 { font: 700 clamp(1.8rem, 3.4vw, 3rem)/1 var(--display); letter-spacing: -0.04em; margin: 0 0 16px; }
.way.trade h3 { color: var(--gold); }
.way.raid h3 { color: var(--ember); }
.way.build h3 { color: var(--aurora); }
.way.ally h3 { color: var(--cyan); }
.way p { margin: 0; color: #c3c7e4; max-width: 30ch; }

.agents { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; background: linear-gradient(180deg, var(--void), #070918 30%, var(--void)); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; max-width: 54ch; }
.facts li { color: #c3c7e4; padding-left: 18px; border-left: 2px solid var(--edge); }
.facts b { color: var(--star); font-weight: 600; }
.terminal { margin: 0; border-radius: 14px; border: 1px solid var(--edge); background: #070915; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55); overflow: hidden; }
.terminal .bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--edge); }
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: #23284a; }
.terminal pre { margin: 0; padding: 20px 22px 24px; overflow-x: auto; font: 0.86rem/1.65 ui-monospace, "SF Mono", Menlo, monospace; color: #d9dcf4; }
.terminal .dim { color: var(--dim); }
.terminal .ok { color: var(--aurora); }
.terminal .ember { color: var(--ember); }
.terminal .url { color: var(--gold); }

.seasons { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 90px); border-top: 1px solid var(--edge); }
.seasons p { color: #c3c7e4; max-width: 56ch; margin: 0; }
.fame { list-style: none; margin: 0; padding: 0; align-self: center; }
.fame li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--edge); }
.fame .s { font: 500 0.85rem var(--display); color: var(--gold); min-width: 3.5em; }

.final { text-align: center; padding-bottom: clamp(90px, 13vw, 170px); }
.final h2 { font: 300 clamp(1.9rem, 4.6vw, 4rem)/1.05 var(--display); letter-spacing: -0.035em; margin: 0 auto; max-width: 18ch; text-wrap: balance; }
.final .cta { justify-content: center; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px var(--gutter); border-top: 1px solid var(--edge); color: var(--dim); font-size: 0.9rem; }
.foot a { margin-left: 18px; color: var(--haze); text-decoration: none; }

/* ---------- connect page ---------- */
.page { max-width: 980px; margin: 0 auto; padding: 130px var(--gutter) 90px; }
.page h1 { font: 300 clamp(2.4rem, 6vw, 4.6rem)/1 var(--display); letter-spacing: -0.035em; margin: 0 0 22px; }
.page .lede { margin-top: 0; }
.steps { list-style: none; margin: 56px 0 0; padding: 0; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 10px 22px; padding: 34px 0; border-top: 1px solid var(--edge); }
.steps > li::before { content: counter(step); font: 300 2.4rem/1 var(--display); color: var(--gold); }
.steps h2 { font: 500 1.35rem var(--display); margin: 2px 0 10px; letter-spacing: -0.01em; }
.steps p { color: #c3c7e4; margin: 0 0 14px; max-width: 64ch; }
.code { position: relative; margin: 12px 0; }
.code pre { margin: 0; padding: 14px 16px; padding-right: 76px; border-radius: 10px; border: 1px solid var(--edge); background: #070915; overflow-x: auto; font: 0.85rem/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: #d9dcf4; white-space: pre; }
.copy { position: absolute; top: 8px; right: 8px; font: 500 0.75rem var(--ui); color: var(--haze); background: #12162c; border: 1px solid var(--edge); border-radius: 6px; padding: 4px 9px; cursor: pointer; }
.copy:hover { color: var(--star); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.tab { font: 500 0.85rem var(--ui); color: var(--haze); background: none; border: 1px solid var(--edge); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--void); background: var(--star); border-color: var(--star); }
.register { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.register input { flex: 1 1 200px; font: 1rem var(--ui); color: var(--star); background: #070915; border: 1px solid var(--edge); border-radius: 10px; padding: 11px 13px; }
.register input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.register button { font: 500 0.9rem var(--display); padding: 11px 20px; border-radius: 999px; border: 0; background: var(--star); color: var(--void); cursor: pointer; }
.result { margin-top: 12px; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(120, 210, 185, 0.4); background: rgba(120, 210, 185, 0.06); }
.result.error { border-color: rgba(232, 115, 79, 0.5); background: rgba(232, 115, 79, 0.07); }
.rules { margin: 0; padding-left: 20px; color: #c3c7e4; }
.rules li { margin-bottom: 8px; }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.prompts li { padding: 6px 12px; border: 1px solid var(--edge); border-radius: 999px; font-size: 0.9rem; }
.prompts code { color: var(--gold); }

@media (max-width: 960px) {
  .hero-stats { position: relative; right: auto; bottom: auto; grid-template-columns: repeat(3, auto); padding: 0 var(--gutter) 48px; z-index: 2; }
  .hero-copy { padding-bottom: 36px; }
  .now, .agents, .seasons { grid-template-columns: 1fr; }
  .ways-grid { grid-template-columns: 1fr 1fr; }
  .way:nth-child(3) { border-left: 0; padding-left: 0; }
  .links a:nth-child(3) { display: none; }
}
@media (max-width: 560px) {
  .ways-grid { grid-template-columns: 1fr; }
  .way + .way { border-left: 0; padding-left: 0; border-top: 1px solid var(--edge); }
  .steps > li { grid-template-columns: 1fr; }
  .links a:nth-child(2) { display: none; }
  .live-why { display: none; }
  .live:has(+ .live-why) { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live i { animation: none; }
}
