:root {
  --bg: #0a0c10;
  --bg-elev: #12151c;
  --fg: #e8eaed;
  --muted: #8b929e;
  --accent: #8dffb0;
  --line: rgba(232, 234, 237, 0.1);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background:
    radial-gradient(900px 480px at 85% 0%, rgba(141, 255, 176, 0.09), transparent 55%),
    linear-gradient(180deg, #0d1016 0%, var(--bg) 45%),
    var(--bg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  position: relative;
  z-index: 2;
}

.mark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}

.top nav {
  display: flex;
  gap: 1.25rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top nav a:hover {
  color: var(--fg);
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 1.75rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  max-width: 34rem;
  animation: rise 0.9s ease-out both;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--fg);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.lede {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 0.95rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent);
  color: #0a0c10;
  font-weight: 500;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--fg);
  background: transparent;
}

.btn.ghost:hover {
  border-color: var(--muted);
}

.hero-visual {
  position: relative;
  animation: fade 1.2s ease-out 0.15s both;
}

.partition-map {
  width: 100%;
  height: auto;
  display: block;
}

.node.n2 {
  fill: rgba(141, 255, 176, 0.12);
}

.node-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edges path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.6s ease-out 0.3s forwards;
}

.nodes .node {
  opacity: 0;
  animation: pop 0.5s ease-out forwards;
}

.nodes .n1 { animation-delay: 0.45s; }
.nodes .n2 { animation-delay: 0.55s; }
.nodes .n3 { animation-delay: 0.65s; }
.nodes .n4 { animation-delay: 0.75s; }
.nodes .n5 { animation-delay: 0.85s; }
.nodes .n6 { animation-delay: 0.95s; }

.connect,
.same {
  padding: 5rem 1.75rem;
  border-top: 1px solid var(--line);
  max-width: 52rem;
}

.connect h2,
.same h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-lede {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 48ch;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.tab.active {
  color: #0a0c10;
  background: var(--accent);
  border-color: var(--accent);
}

.code {
  margin: 0;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #d5d9e0;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: rise 0.35s ease-out both;
}

.access {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 52ch;
}

.access code {
  color: var(--fg);
  font-size: 0.8em;
}

.same {
  padding-bottom: 6rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--fg);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-visual {
    order: -1;
    margin: 0 -0.5rem;
  }

  .brand {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }
}

/* ---- Docs (/docs/) ---- */

.docs-body {
  background:
    radial-gradient(700px 360px at 10% 0%, rgba(141, 255, 176, 0.06), transparent 50%),
    linear-gradient(180deg, #0d1016 0%, var(--bg) 40%),
    var(--bg);
}

.docs {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 5rem;
}

.docs-kicker {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  line-height: 1.1;
}

.docs-lede {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 46ch;
}

.docs-lede code,
.docs code {
  color: var(--fg);
  font-size: 0.9em;
}

.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin: 0 0 2.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.docs-toc a {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--accent);
}

.docs section {
  margin-bottom: 2.75rem;
}

.docs h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

.docs p,
.docs li {
  color: var(--muted);
}

.docs p {
  margin: 0 0 1rem;
}

.docs ul {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

.docs li {
  margin-bottom: 0.45rem;
}

.docs li strong {
  color: var(--fg);
  font-weight: 500;
}

.docs .code {
  margin: 0 0 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
