:root {
  --ink: #14202d;
  --muted: #5a6573;
  --paper: #f7f9fc;
  --panel: #ffffff;
  --line: #dce3ec;
  --blue: #2e70ff;
  --cyan: #00a6b8;
  --green: #23a666;
  --orange: #ee8934;
  --red: #da4b4b;
  --purple: #735cd2;
  --dark: #0b1626;
  --shadow: 0 18px 45px rgba(20, 32, 45, 0.12);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

code,
pre {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
}

code {
  color: #315fbd;
}

pre {
  position: relative;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

pre code {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 5vw;
  background: rgba(247, 249, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  font: inherit;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: 4rem;
  min-height: calc(100vh - 68px);
  padding: 6rem 5vw 5rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(0, 166, 184, 0.12), transparent 26rem),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 82%);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.94;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-lede {
  max-width: 680px;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.05rem;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  background: var(--blue);
  color: white;
}

.button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.button.download {
  border: 1px solid rgba(35, 166, 102, 0.35);
  background: #eaf8f1;
  color: #137a48;
}

.button.download:hover {
  background: #dff4ea;
}

.terminal-visual {
  overflow: hidden;
  border-radius: 8px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #b8c7d9;
  font-size: 0.8rem;
}

.terminal-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-header span:nth-child(1) {
  background: var(--red);
}

.terminal-header span:nth-child(2) {
  background: var(--orange);
}

.terminal-header span:nth-child(3) {
  background: var(--green);
}

.terminal-header strong {
  margin-left: 0.55rem;
}

.terminal-visual pre {
  padding: 1.25rem;
  color: #dfe8f2;
  font-size: 0.9rem;
  line-height: 1.55;
}

.section {
  padding: 5.5rem 5vw;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.4rem;
}

.feature-grid,
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.architecture-grid article,
.option-grid article,
.step,
.doc-block,
.tab-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-card,
.architecture-grid article {
  padding: 1.25rem;
}

.feature-card:nth-child(1) {
  border-top: 4px solid var(--blue);
}

.feature-card:nth-child(2) {
  border-top: 4px solid var(--green);
}

.feature-card:nth-child(3) {
  border-top: 4px solid var(--orange);
}

.feature-card:nth-child(4) {
  border-top: 4px solid var(--purple);
}

.band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 150px;
  padding: 2rem 5vw;
  background: white;
}

.metric strong {
  color: var(--blue);
  font-size: 3rem;
  line-height: 1;
}

.metric span {
  max-width: 240px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}

.steps {
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.step > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--dark);
  color: white;
  font-weight: 800;
}

.step pre,
.doc-block pre,
.option-grid pre,
.tab-panel pre,
.large-code {
  border-radius: 8px;
  background: #101b2d;
  color: #dfe8f2;
  padding: 1rem;
  font-size: 0.86rem;
  line-height: 1.55;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.toc a {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: var(--muted);
}

.toc a:hover {
  background: #eef4ff;
  color: var(--blue);
}

.reference {
  display: grid;
  gap: 1rem;
}

.doc-block {
  padding: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef3f8;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.option-grid article {
  padding: 1.25rem;
}

.option-grid li {
  margin: 0.55rem 0;
  color: var(--muted);
}

.example-tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tab-buttons {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 0.9rem;
  font: inherit;
  font-weight: 800;
}

.tab-button.active {
  background: var(--dark);
  color: white;
}

.tab-panel {
  display: none;
  border: 0;
  padding: 1.2rem;
}

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

.example-path {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
}

.gantt-demo {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 1.25rem;
}

.gantt-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gantt-title span {
  color: var(--muted);
  font-size: 0.9rem;
}

.gantt-chart {
  display: grid;
  gap: 0.55rem;
}

.gantt-row {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  min-height: 32px;
}

.gantt-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.gantt-row::after {
  content: "";
  grid-column: 2;
  height: 24px;
  border-radius: 6px;
  background: #eef2f6;
}

.gantt-row i {
  position: absolute;
  left: calc(110px + (100% - 110px) * var(--x) / 100);
  width: calc((100% - 110px) * var(--w) / 100);
  height: 24px;
  border-radius: 6px;
  background: var(--c);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.pipeline span {
  display: grid;
  min-height: 56px;
  place-items: center;
  border-radius: 8px;
  background: var(--dark);
  color: white;
  font-weight: 800;
  text-align: center;
}

.pipeline span:nth-child(2n) {
  background: var(--blue);
}

.pipeline span:nth-child(3n) {
  background: var(--green);
}

.pipeline span:nth-child(5n) {
  background: var(--orange);
}

.large-code {
  min-height: 280px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 5vw;
  background: var(--dark);
  color: white;
}

.site-footer p {
  margin-bottom: 0;
  color: #b9c7d8;
}

.site-footer .copyright {
  margin-top: 0.6rem;
  color: #8392a7;
  font-size: 0.86rem;
}

.site-footer a {
  color: #dbe7f5;
  font-weight: 800;
}

.copy-button {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe8f2;
  padding: 0 0.55rem;
  font: 700 0.74rem Aptos, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1080px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .architecture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    min-height: 62px;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 62px;
    right: 5vw;
    left: 5vw;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .terminal-visual {
    min-width: 0;
  }

  .band,
  .feature-grid,
  .architecture-grid,
  .docs-layout,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

  .gantt-title,
  .site-footer {
    flex-direction: column;
  }

  .gantt-row {
    grid-template-columns: 82px 1fr;
  }

  .gantt-row i {
    left: calc(82px + (100% - 82px) * var(--x) / 100);
    width: calc((100% - 82px) * var(--w) / 100);
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .tab-buttons {
    flex-direction: column;
  }

  .button,
  .tab-button {
    width: 100%;
  }

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