:root {
  --bg: #0d0b0a;
  --bg-alt: #14110f;
  --surface: #1b1714;
  --line: #2e2722;
  --text: #f1ebe4;
  --muted: #a69a8f;
  --ember: #ff6b2c;
  --ember-hi: #ffb067;
  --ember-dim: #7a3216;
  --ok: #6fd18a;
  --bad: #ff5d5d;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 10px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember-hi); }
code { font: 0.88em var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0.1em 0.4em; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 2.5rem; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--ember);
  background: var(--ember);
  color: #1a0b03;
  font: 600 0.95rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--ember-hi); border-color: var(--ember-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgb(13 11 10 / 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 800 1.25rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.wordmark svg { width: 22px; height: 22px; color: var(--ember); }
.wordmark-sm { font-size: 1rem; }
.nav-links { display: flex; gap: 1.5rem; margin-right: auto; margin-left: 1rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--muted);
  white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-pill[data-status="up"] .dot { background: var(--ok); }
.status-pill[data-status="down"] .dot { background: var(--bad); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#entropy-field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; padding-top: 8rem; padding-bottom: 4rem; }
.hero h1 {
  font-size: clamp(3.5rem, 13vw, 9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero h1 span { color: var(--ember); }
.lede { margin-top: 1.25rem; max-width: 36rem; font-size: 1.15rem; color: #cfc4b9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 12rem));
  margin: 5rem 0 0;
  border-top: 1px solid var(--line);
}
.stats > div { padding: 1.25rem 0 0; }
.stats > div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.stats dt { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.stats dd { margin: 0.35rem 0 0; font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--display); font-variant-numeric: tabular-nums; }

/* Sections */
.section { padding: 6.5rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg); padding: 2rem 1.6rem 2.2rem; }
.feature-num { display: block; font: 500 0.8rem var(--mono); color: var(--ember); margin-bottom: 2.5rem; }
.feature h3 { margin-bottom: 0.75rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* Connect */
.connect { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
.connect > * { min-width: 0; }
.connect h2 { margin-bottom: 1rem; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 3.75rem;
  border-left: 1px solid var(--line);
  margin-left: 1.1rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: -1.1rem; top: -0.2rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ember);
  color: var(--ember);
  font: 600 0.9rem var(--mono);
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--muted); }
.codeline {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.9rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.codeline code { flex: 1; min-width: 0; background: none; border: 0; padding: 0; color: var(--text); overflow-x: auto; white-space: nowrap; }
.copy { flex: none; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.8rem; font: 500 0.8rem var(--body); cursor: pointer; }
.copy:hover { border-color: var(--muted); }

/* Weekly kills */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.board-head h2 { margin-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board th { text-align: left; font: 600 0.75rem var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
.board td { padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board tr:last-child td { border-bottom: 0; }
.board .rank { width: 3.5rem; font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.board .name { font-weight: 600; }
.board .kills { text-align: right; }
.board td.kills { font-family: var(--mono); color: var(--ember-hi); }
.board .empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; white-space: normal; }
.faction-alliance { color: #6ea8ff; }
.faction-horde { color: #ff6b6b; }

/* Register */
.register { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.register h2 { margin-bottom: 1rem; }
.notes { margin: 1.75rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.notes li { padding: 0.65rem 0 0.65rem 1.25rem; border-top: 1px solid var(--line); position: relative; }
.notes li::before { content: ''; position: absolute; left: 0; top: 1.25rem; width: 6px; height: 6px; background: var(--ember); transform: rotate(45deg); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: 0.4rem; font-size: 0.88rem; font-weight: 500; }
.optional { color: var(--muted); font-weight: 400; margin-left: 0.25rem; }
.form input {
  font: 1rem var(--body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s;
}
.form input:hover { border-color: #463b33; }
.form input:focus { outline: 2px solid var(--ember); outline-offset: 1px; border-color: var(--ember); }
.form input[aria-invalid="true"] { border-color: var(--bad); }
.form-msg { min-height: 1.4em; font-size: 0.9rem; }
.form-msg.error { color: var(--bad); }
.form-msg.success { color: var(--ok); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer-inner { display: flex; gap: 2rem; align-items: center; justify-content: space-between; }
.footer p { color: var(--muted); font-size: 0.85rem; max-width: 40rem; }

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .status-pill { margin-left: auto; }
  .connect, .register { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .section { padding: 4.5rem 0; }
  .hero-inner { padding-top: 4.5rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3.5rem; }
  .features { grid-template-columns: 1fr; }
  .board-head { flex-direction: column; align-items: start; gap: 0.5rem; }
  .steps li { padding-left: 2.25rem; }
  .footer-inner { flex-direction: column; align-items: start; }
  .card { padding: 1.5rem; }
}
@media (max-width: 440px) {
  .status-pill .label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
