:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --muted: #666666;
  --muted-2: #999999;
  --line: rgba(10, 10, 10, 0.08);
  --line-strong: rgba(10, 10, 10, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --radius-pill: 999px;
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  --max: 920px;
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.site-nav a.active {
  color: var(--ink);
  background: var(--surface);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.page-home main {
  min-height: calc(100vh - var(--nav-h) - 72px);
  display: flex;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.hero {
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line-strong);
}

.title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 2.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

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

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--ink-2);
}

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

.btn-ghost:hover {
  background: var(--surface);
}

.btn-x {
  background: var(--ink);
  color: #fff;
}

.btn-x:hover {
  background: #222;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}

.feature {
  background: var(--bg);
  padding: 1.75rem 1.5rem;
}

.feature-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-2);
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.feature strong {
  color: var(--ink);
  font-weight: 600;
}

.split-banner {
  margin-top: 3rem;
  padding: 2rem 2.25rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.split-stat {
  text-align: center;
}

.split-stat .value {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.split-stat .label {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 16rem;
  margin: 0 auto;
}

.split-divider {
  width: 1px;
  height: 80px;
  background: var(--line-strong);
  justify-self: center;
}

.docs-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
}

.docs-hero {
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  margin-bottom: 2rem;
}

.docs-hero p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 52rem;
}

.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.toc a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s;
}

.toc a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.docs h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.docs h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.docs p {
  color: var(--ink-2);
  max-width: 52rem;
}

.docs ul {
  color: var(--ink-2);
  padding-left: 1.25rem;
  max-width: 52rem;
}

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

.callout {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 52rem;
}

.callout p {
  margin: 0;
}

.diagram {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  max-width: 52rem;
  color: var(--muted);
  white-space: pre;
}

.site-footer {
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
  }

  .site-header {
    position: relative;
    flex-wrap: wrap;
  }

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

  .split-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .split-divider {
    width: 60px;
    height: 1px;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}
