:root {
  color-scheme: dark;
  --bg: #08130f;
  --ink: #f3f7ef;
  --muted: #bac7b9;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(12, 29, 23, 0.82);
  --panel-solid: #10261f;
  --green: #6fd36a;
  --teal: #54c6c2;
  --gold: #e8bd57;
  --red: #e16c59;
  --stone: #8f9a94;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #07120e 0%, var(--bg) 34%, #111410 70%, #07110e 100%);
  color: var(--ink);
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 44px;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 52px);
  background: linear-gradient(180deg, rgba(4, 12, 9, 0.86), rgba(4, 12, 9, 0.48) 70%, transparent);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  min-width: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background:
    linear-gradient(90deg, transparent 40%, rgba(0, 0, 0, 0.24) 40% 60%, transparent 60%),
    linear-gradient(0deg, var(--gold) 50%, var(--green) 50%);
  border: 2px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.icon-button,
.primary-action,
.secondary-action,
.wide-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line);
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 112px clamp(18px, 6vw, 84px) 80px;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 10, 8, 0.94) 0%, rgba(3, 10, 8, 0.74) 38%, rgba(3, 10, 8, 0.26) 74%),
    linear-gradient(180deg, rgba(3, 10, 8, 0.16) 58%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  width: min(740px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-copy,
.hero-tagline,
.section p,
.feature p,
.rule-doc p,
.loop-step p {
  color: var(--muted);
  line-height: 1.62;
}

.hero-copy {
  max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-tagline {
  max-width: 660px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.08;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 18px;
}

.primary-action {
  color: #07120d;
  background: var(--green);
  padding: 0 20px;
}

.secondary-action {
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--line);
  padding: 0 18px;
}

.server-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(84, 198, 194, 0.12);
  color: #dff9f6;
  font-size: 0.86rem;
  font-weight: 850;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background:
    linear-gradient(90deg, rgba(111, 211, 106, 0.38), rgba(232, 189, 87, 0.32), rgba(84, 198, 194, 0.36));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 112px;
  padding: 24px clamp(18px, 4vw, 42px);
  background: #0d211a;
}

.metric-value {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 900;
}

.metric-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: clamp(68px, 9vw, 116px) clamp(18px, 6vw, 84px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(320px, 1.16fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
}

.split > div:first-child {
  position: sticky;
  top: 96px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature,
.join-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.feature,
.rule-card {
  min-height: 190px;
  padding: 24px;
}

.feature svg,
.loop-step svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
  margin-bottom: 18px;
}

.map-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background:
    linear-gradient(rgba(8, 19, 15, 0.74), rgba(8, 19, 15, 0.74)),
    url("assets/geopolitical-hero.webp") center / cover;
  border-block: 1px solid var(--line);
  padding-block: clamp(62px, 8vw, 96px);
}

.loop-step {
  padding: 22px;
  min-height: 230px;
  background: rgba(6, 15, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.loop-step span {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--gold);
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.server-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
  background: #0a1714;
}

.server-copy {
  max-width: 680px;
}

.join-box {
  padding: 12px;
}

.join-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.join-row span {
  color: var(--muted);
}

.join-row strong {
  overflow-wrap: anywhere;
}

.wide-action {
  width: 100%;
  margin-top: 12px;
  color: #07120d;
  background: var(--gold);
  padding: 0 16px;
}

.copy-status {
  min-height: 24px;
  margin: 10px 4px 0;
  color: var(--green);
  font-size: 0.92rem;
  text-align: center;
}

.rules {
  background:
    linear-gradient(180deg, rgba(232, 189, 87, 0.06), transparent 230px),
    #102017;
}

.rules-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.rules-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.rules-overview > div {
  min-height: 154px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(232, 189, 87, 0.12), rgba(84, 198, 194, 0.06)),
    rgba(6, 15, 12, 0.68);
}

.rules-overview strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.1rem;
}

.rules-overview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.overview-code,
.rules-toc a span,
.rule-section h3 span,
.rule-item h4 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(232, 189, 87, 0.36);
  border-radius: 8px;
  background: rgba(232, 189, 87, 0.12);
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
  letter-spacing: 0;
}

.overview-code {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.rules-toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 15, 12, 0.72);
}

.rules-toc a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  padding: 11px 12px;
  border-radius: 8px;
}

.rules-toc a:hover,
.rules-toc a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.rules-toc a span {
  min-width: 68px;
  min-height: 28px;
  font-size: 0.76rem;
}

.rule-doc {
  display: grid;
  gap: 18px;
}

.rule-section {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(111, 211, 106, 0.08), transparent 42%),
    rgba(12, 29, 23, 0.82);
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}

.rule-section h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.rule-section h3 span {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.9rem;
}

.rule-item {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rule-item h4 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.rule-item h4 span {
  min-height: 28px;
  padding: 0 9px;
  color: #07120d;
  background: var(--gold);
  border-color: transparent;
  font-size: 0.76rem;
}

.rule-item p {
  margin-bottom: 0;
}

.highlight-rule {
  margin-block: 6px;
  padding: 18px;
  border: 1px solid rgba(232, 189, 87, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(225, 108, 89, 0.16), rgba(232, 189, 87, 0.1)),
    rgba(232, 189, 87, 0.08);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 6vw, 84px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #07110e;
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.35;
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr 44px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 88svh;
    padding-top: 96px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 10, 8, 0.58), rgba(3, 10, 8, 0.9) 65%, var(--bg) 100%);
  }

  .status-band,
  .split,
  .server-section,
  .map-panel,
  .rules-layout,
  .rules-overview {
    grid-template-columns: 1fr;
  }

  .split > div:first-child {
    position: static;
  }

  .rules-toc {
    position: static;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 92px;
  }

  .loop-step {
    min-height: 176px;
  }

  .loop-step span {
    margin-bottom: 22px;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 210px;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 4rem);
  }

  .hero-actions {
    display: grid;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .join-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .server-chip {
    width: 100%;
    font-size: 0.88rem;
  }

  .footer {
    flex-direction: column;
  }
}
