:root {
  --bg: #0b0d12;
  --bg-alt: #12151d;
  --panel: #161a24;
  --border: #262c3a;
  --text: #e7e9ee;
  --text-dim: #9aa3b5;
  --accent: #6ee7b7;
  --accent-2: #7dd3fc;
  --accent-3: #c4b5fd;
  --code-bg: #0d1017;
  --radius: 10px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
}

code, pre, .mono {
  font-family: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
}
.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-dim);
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-cta {
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text) !important;
}
.nav-cta:hover {
  border-color: var(--accent-2);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(110, 231, 183, 0.12), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(125, 211, 252, 0.12), transparent 40%);
}
.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.35);
  background: rgba(110, 231, 183, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  max-width: 720px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.15rem;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #06110d !important;
}
.btn-primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  text-decoration: none;
}

.terminal {
  max-width: 680px;
  margin: 0 auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.terminal .tbar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.tbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3f4c;
}
.tbar span:nth-child(1) { background: #ff5f56; }
.tbar span:nth-child(2) { background: #ffbd2e; }
.tbar span:nth-child(3) { background: #27c93f; }
.terminal pre {
  margin: 0;
  padding: 18px 20px;
  font-size: 14px;
  overflow-x: auto;
  color: #d6dbe4;
}
.terminal .c1 { color: var(--text-dim); }
.terminal .c2 { color: var(--accent); }

/* Sections */
section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-head .eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 10px 0 12px;
}
.section-head p {
  color: var(--text-dim);
  margin: 0;
}

/* Feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .icon {
  font-size: 22px;
  margin-bottom: 12px;
  display: inline-block;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* Architecture diagram */
.diagram {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
}
.diagram pre {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #b7bfcf;
  white-space: pre;
}
.diagram .hl1 { color: var(--accent); }
.diagram .hl2 { color: var(--accent-2); }
.diagram .hl3 { color: var(--accent-3); }

/* Steps */
.steps {
  display: grid;
  gap: 16px;
}
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.step .num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06110d;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.step h4 {
  margin: 4px 0 4px;
  font-size: 15.5px;
}
.step p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* Table types */
table.types {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
table.types th, table.types td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table.types th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
}
table.types code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12.5px;
  margin: 2px;
  display: inline-block;
}

/* Code panel with tabs */
.codepanel {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  overflow-x: auto;
}
.tab {
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--text-dim);
  cursor: pointer;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.tab.active {
  color: var(--text);
  background: var(--code-bg);
  box-shadow: inset 0 -2px 0 var(--accent-2);
}
.tabpage {
  display: none;
  padding: 20px 22px;
}
.tabpage.active {
  display: block;
}
.tabpage pre {
  margin: 0;
  font-size: 13.5px;
  overflow-x: auto;
  color: #d6dbe4;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-dim);
  font-size: 13.5px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
footer a {
  color: var(--text-dim);
}
footer a:hover {
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 18px;
}
