:root {
  --bg: #07090d;
  --bg-elev: #10141c;
  --fg: #eceef2;
  --muted: #8f96a3;
  --accent: #7dffb2;
  --accent-dim: rgba(125, 255, 178, 0.14);
  --line: rgba(236, 238, 242, 0.1);
  --code-fg: #c9cfd9;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
  --gutter: clamp(1.1rem, 3.5vw, 2.75rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

::selection {
  background: var(--accent-dim);
  color: var(--fg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

code {
  font-family: var(--mono);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 1.2rem var(--gutter);
  position: relative;
  z-index: 3;
}

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

.mark:hover {
  text-decoration: none;
  color: var(--accent);
}

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

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

.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

.top nav a[aria-current="page"] {
  color: var(--accent);
}

/* ---- Landing hero: full-bleed edge-to-edge ---- */

.hero {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.5rem var(--gutter) 2rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 100% at 88% 45%, rgba(125, 255, 178, 0.13), transparent 55%),
    radial-gradient(ellipse 35% 70% at 5% 100%, rgba(90, 140, 180, 0.08), transparent 50%),
    linear-gradient(100deg, #090c12 0%, var(--bg) 42%, #05070a 100%);
}

.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: linear-gradient(
      rgba(236, 238, 242, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(236, 238, 242, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 35%, #000 62%, #000 100%);
}

.partition-map {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 50%;
  width: min(56vw, 42rem);
  height: auto;
  pointer-events: none;
  opacity: 1;
  /* Keep vertical centering — `rise` would overwrite transform. */
  animation: map-in 0.9s ease-out 0.12s both;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(34rem, 46vw);
  padding: 0.25rem 0 0.5rem;
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  margin: 0 0 0.7rem;
  color: var(--fg);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
  max-width: 20ch;
}

.lede {
  color: var(--muted);
  margin: 0 0 1.15rem;
  max-width: 40ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

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

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

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

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

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

.btn.primary:hover {
  background: #a6ffc8;
}

.btn.ghost {
  border-color: var(--line);
  color: var(--fg);
  background: rgba(7, 9, 13, 0.35);
  backdrop-filter: blur(6px);
}

.btn.ghost:hover {
  border-color: rgba(236, 238, 242, 0.28);
}

.node.n2 {
  fill: var(--accent-dim);
}

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

.edges path {
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  animation: draw 1.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.nodes .node {
  opacity: 0;
  transform-origin: center;
  animation: pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nodes .n1 {
  animation-delay: 0.4s;
}
.nodes .n2 {
  animation-delay: 0.5s;
  animation: pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards,
    pulse 3.2s ease-in-out 1.2s infinite;
}
.nodes .n3 {
  animation-delay: 0.6s;
}
.nodes .n4 {
  animation-delay: 0.7s;
}
.nodes .n5 {
  animation-delay: 0.8s;
}
.nodes .n6 {
  animation-delay: 0.9s;
}

/* ---- Sections: same full-bleed gutter as hero ---- */

.band {
  width: 100%;
  margin: 0;
  padding: 4rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.band:last-of-type {
  border-bottom: none;
}

.band h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  margin: 0 0 0.7rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: min(28ch, 100%);
}

.facts {
  display: grid;
  gap: 1.75rem clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  width: 100%;
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facts.use-cases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .facts.use-cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.facts > div {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.facts dt {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
  color: var(--fg);
}

.facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.facts dd code {
  color: var(--fg);
  font-size: 0.88em;
}

.surface-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 0 clamp(1.5rem, 3vw, 3rem);
}

@media (min-width: 720px) {
  .surface-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.surface-list li {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.surface-list li:last-child {
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .surface-list li:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

.surface-list code {
  color: var(--accent);
  font-size: 0.95em;
}

.section-lede {
  color: var(--muted);
  margin: 0 0 1.85rem;
  max-width: min(54ch, 100%);
  font-size: 1.02rem;
}

.section-lede a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.section-lede code {
  color: var(--fg);
  font-size: 0.88em;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

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

.tab:hover {
  color: var(--fg);
  border-color: rgba(236, 238, 242, 0.22);
}

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

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.code {
  margin: 0;
  width: 100%;
  padding: 1.35rem clamp(1rem, 2vw, 1.6rem);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  line-height: 1.65;
  color: var(--code-fg);
  border-radius: 0;
}

.panel {
  display: none;
}

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

.access {
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: min(56ch, 100%);
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  width: 100%;
  margin: 0;
  padding: 1.6rem var(--gutter) 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

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

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

@keyframes map-in {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 14px));
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

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

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

@keyframes pulse {
  0%,
  100% {
    stroke-opacity: 1;
  }
  50% {
    stroke-opacity: 0.45;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    padding: 1.25rem var(--gutter) 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .partition-map {
    position: relative;
    right: auto;
    top: auto;
    order: -1;
    width: calc(100% + var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    opacity: 0.9;
    animation: rise 0.8s ease-out 0.08s both;
  }

  .hero-plane::after {
    mask-image: linear-gradient(180deg, #000 10%, #000 50%, transparent 100%);
  }

  .hero-copy {
    max-width: none;
    padding: 0;
  }

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

/* ---- Docs ---- */

.docs-body {
  --docs-top-h: 3.95rem;
  --docs-toc-h: 3.1rem;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(125, 255, 178, 0.06), transparent 55%),
    linear-gradient(180deg, #0b0f15 0%, var(--bg) 35%),
    var(--bg);
}

.docs-body .top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.docs {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2.25rem var(--gutter) 5.5rem;
  overflow-x: clip;
  overflow-wrap: break-word;
}

.docs-kicker {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.5vw, 3rem);
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  line-height: 1.05;
}

.docs-lede {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: min(54ch, 100%);
  font-size: 1.08rem;
  line-height: 1.55;
}

.docs-lede code,
.docs p code,
.docs li code {
  color: var(--fg);
  font-size: 0.88em;
  background: rgba(236, 238, 242, 0.05);
  padding: 0.1em 0.35em;
}

.docs-toc {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 calc(-1 * var(--gutter)) 2.75rem;
  padding: 0 var(--gutter);
  min-height: var(--docs-toc-h);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--docs-top-h);
  z-index: 4;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.docs-toc-label {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 0.95rem;
  margin-right: 0.15rem;
  border-right: 1px solid var(--line);
}

.docs-toc-links {
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  mask-image: linear-gradient(
    90deg,
    #000 0,
    #000 calc(100% - 1.75rem),
    transparent 100%
  );
}

.docs-toc-links::-webkit-scrollbar {
  display: none;
}

.docs-toc-links a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 0.65rem;
  border-bottom: 2px solid transparent;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.docs-toc-links a:first-child {
  padding-left: 0;
}

.docs-toc-links a:hover {
  color: var(--fg);
  text-decoration: none;
}

.docs-toc-links a.active,
.docs-toc-links a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.docs section {
  margin-bottom: 3.25rem;
  scroll-margin-top: calc(var(--docs-top-h) + var(--docs-toc-h) + 0.75rem);
}

.docs .code {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  .docs-body .top {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    row-gap: 0.55rem;
  }

  .docs-body .top nav {
    gap: 0.95rem;
  }

  .docs-toc-label {
    display: none;
  }

  .docs-toc-links {
    mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 1.5rem),
      transparent 100%
    );
  }
}

.docs h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: -0.025em;
  margin: 0 0 0.9rem;
  line-height: 1.2;
}

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

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

.docs ul {
  margin: 0 0 1.35rem;
  padding-left: 1.15rem;
}

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

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

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

.docs .code code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

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