:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: #0f172a;
  --panel-2: #111c30;
  --line: #1e293b;
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --amber: #fbbf24;
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

img {
  max-width: 100%;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-github {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text) !important;
  background: rgba(15, 23, 42, 0.6);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 92px 24px 64px;
}

.hero-copy,
.hero-card,
.stats,
.compare-wrap,
.tabs,
.tab-panel,
.grid > * {
  min-width: 0;
}

.terminal,
.tree,
pre,
code {
  max-width: 100%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 30%;
  height: 520px;
  background: radial-gradient(circle at 40% 40%, rgba(34, 211, 238, 0.16), transparent 62%);
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

h1 {
  margin: 22px 0 10px;
  font-size: clamp(52px, 8vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  background: linear-gradient(105deg, #f8fafc 20%, #a7f3d0 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-bottom: 16px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  color: var(--text);
}

.hero-body {
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.button.primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #041016;
}

.button.ghost {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
}

.hero-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, #0d1626, #070d17 70%);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.7);
  overflow: hidden;
}

.card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.65);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #34d399; }

.card-title {
  margin-left: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.75;
}

.prompt { color: var(--accent); }
.json { color: #7dd3fc; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 72px;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.stats div {
  padding: 24px;
  background: var(--bg);
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 24px;
  color: var(--text);
}

.stats span {
  color: var(--dim);
  font-size: 12px;
}

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

.section.alt {
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--max)) / 2 + 24px));
  padding-right: max(24px, calc((100vw - var(--max)) / 2 + 24px));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), transparent);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  max-width: 760px;
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.feature p,
.panel p,
.sdk p,
.faq p,
.cta p {
  color: var(--muted);
}

.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}

.compare th,
.compare td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.compare th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.7);
}

.compare td:first-child {
  color: var(--dim);
}

.compare tr:last-child td {
  border-bottom: 0;
}

.accent-col {
  color: var(--text) !important;
  background: rgba(52, 211, 153, 0.06);
}

.callout {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-left: 2px solid var(--amber);
  background: rgba(251, 191, 36, 0.06);
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.features {
  grid-template-columns: repeat(3, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.sdks {
  grid-template-columns: repeat(3, 1fr);
}

.feature,
.panel,
.sdk {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.72), rgba(7, 11, 20, 0.4));
}

.feature h3,
.panel h3,
.sdk-lang {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
}

.feature-no {
  display: block;
  margin-bottom: 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

.feature p,
.panel p,
.sdk p {
  margin: 0;
  font-size: 14px;
}

.arch {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.arch-node {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.arch-node.highlight {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12) inset;
}

.arch-label {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
}

.arch-node strong {
  display: block;
  font-size: 16px;
}

.arch-node small {
  color: var(--muted);
  font-size: 12px;
}

.arch-arrow {
  color: var(--accent);
  font-size: 20px;
}

.tree,
.tab-panel pre,
.panel pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #050a12;
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.8;
}

.tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent);
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.tab-panel pre + pre {
  margin-top: 10px;
}

.tab-note {
  margin: 12px 4px 0;
  color: var(--dim);
  font-size: 13px;
}

.sdk code,
.panel code {
  display: block;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #050a12;
  color: #7dd3fc;
  font-size: 12px;
  overflow-x: auto;
}

.sdk:hover {
  border-color: rgba(52, 211, 153, 0.35);
}

.faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
}

summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-family: var(--mono);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 14px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto 96px;
  padding: 44px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(52, 211, 153, 0.16), transparent 45%),
    linear-gradient(120deg, #0c1926, #071019);
}

.cta h2 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 38px);
}

.cta p {
  margin: 0;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 46px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 13px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-note {
  width: 100%;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 12px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
  }

  .grid.features,
  .grid.sdks {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .arch-arrow {
    transform: rotate(90deg);
    text-align: center;
  }
}

@media (max-width: 700px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-soft);
  }

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

  .nav-toggle {
    display: block;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cta {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 16px 64px;
    padding: 30px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

pre {
  position: relative;
}

pre .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 11, 20, 0.82);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

pre:hover .copy,
pre:focus-within .copy {
  opacity: 1;
}

pre .copy:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  pre .copy {
    opacity: 0.8;
  }
}

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

  .button {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
