:root {
  --ink: #18223a;
  --muted: #667085;
  --quiet: #8b93a7;
  --paper: #ffffff;
  --canvas: #f7f7f5;
  --line: #e5e7eb;
  --line-strong: #d6d9e0;
  --navy: #152044;
  --purple: #6558d3;
  --purple-soft: #efedff;
  --blue-soft: #eaf4ff;
  --green-soft: #e9f7ef;
  --peach-soft: #fff0e8;
  --yellow-soft: #fff7d6;
  --shadow: 0 18px 55px rgba(30, 39, 70, 0.1);
  --radius: 18px;
  --display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(101, 88, 211, 0.35);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(14px);
}

.nav,
.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy);
  border-radius: 9px;
  font: 700 12px/1 var(--mono);
}

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

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

.language-link {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
}

main { overflow: hidden; }

.hero {
  padding: 92px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--purple);
  font: 700 12px/1.2 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 5px var(--purple-soft);
}

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

h1 {
  max-width: 700px;
  margin-bottom: 24px;
  color: var(--navy);
  font: 600 clamp(44px, 6.2vw, 74px)/0.98 var(--display);
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 610px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button.primary {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--purple);
  box-shadow: 0 10px 24px rgba(30, 39, 70, 0.1);
}

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

.map-window {
  position: relative;
  min-height: 520px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.map-toolbar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font: 600 11px/1 var(--mono);
}

.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d8dbe2; }

.map-canvas {
  position: relative;
  min-height: 442px;
  padding: 22px;
  overflow: hidden;
  background: #fafaf9;
}

.map-title {
  position: absolute;
  left: 26px;
  top: 22px;
}

.map-title strong { display: block; color: var(--navy); font-size: 18px; }
.map-title span { color: var(--quiet); font-size: 12px; }

.flow-line {
  position: absolute;
  height: 2px;
  background: #cfd3de;
  transform-origin: left center;
}

.flow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #aeb5c4;
  border-right: 2px solid #aeb5c4;
  transform: rotate(45deg);
}

.line-a { width: 122px; left: 145px; top: 180px; transform: rotate(-22deg); }
.line-b { width: 120px; left: 270px; top: 134px; transform: rotate(24deg); }
.line-c { width: 140px; left: 310px; top: 250px; transform: rotate(-12deg); }
.line-d { width: 112px; left: 184px; top: 321px; transform: rotate(-26deg); }
.line-e { width: 104px; left: 350px; top: 340px; transform: rotate(18deg); }

.map-node {
  position: absolute;
  width: 145px;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(35, 48, 78, 0.12);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(31, 38, 62, 0.08);
  animation: float 5s ease-in-out infinite;
}

.map-node b { display: block; margin-bottom: 4px; color: var(--navy); font-size: 13px; }
.map-node small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.map-node em { display: inline-block; margin-top: 8px; padding: 2px 7px; border-radius: 99px; color: var(--purple); background: var(--purple-soft); font: 700 9px/1.5 var(--mono); font-style: normal; }
.node-a { left: 22px; top: 145px; background: var(--blue-soft); }
.node-b { left: 250px; top: 78px; animation-delay: -1.3s; }
.node-c { right: 18px; top: 184px; background: var(--green-soft); animation-delay: -2.1s; }
.node-d { left: 155px; bottom: 20px; background: var(--peach-soft); animation-delay: -0.7s; }
.node-e { right: 36px; bottom: 14px; background: var(--yellow-soft); animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.section {
  padding: 86px 0;
  border-top: 1px solid var(--line);
}

.section.white { background: var(--paper); }

.section-heading {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-heading h2 {
  margin-bottom: 15px;
  color: var(--navy);
  font: 600 clamp(33px, 4.2vw, 48px)/1.08 var(--display);
  letter-spacing: -0.04em;
}

.section-heading p { color: var(--muted); font-size: 18px; }

.reading-path-note {
  margin: -16px 0 24px;
  color: var(--muted);
}

.reading-path-note strong { color: var(--navy); }

.reading-path {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 2.2fr);
  min-height: 520px;
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 16px 46px rgba(30, 39, 70, 0.09);
}

.reading-path-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #f5f4f0;
}

.reading-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  width: 100%;
  padding: 18px 16px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.reading-step:hover { color: var(--navy); background: rgba(255, 255, 255, 0.72); }
.reading-step:focus-visible { outline: 3px solid rgba(91, 70, 214, 0.22); outline-offset: 2px; }
.reading-step.active { color: var(--navy); border-color: rgba(91, 70, 214, 0.18); background: var(--paper); box-shadow: 0 8px 22px rgba(31, 38, 62, 0.07); transform: translateX(3px); }
.reading-step > span:last-child { display: grid; gap: 4px; }
.reading-step strong { font-size: 15px; }
.reading-step small { color: var(--quiet); font-size: 12px; line-height: 1.45; }

.reading-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--purple);
  background: var(--purple-soft);
  font: 700 11px/1 var(--mono);
}

.reading-step.active .reading-number { color: white; background: var(--purple); }
.reading-stage { min-width: 0; padding: 36px; }
.reading-panel[hidden] { display: none; }
.reading-panel.active { animation: panel-in 220ms ease-out both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.reading-preview-heading { margin-bottom: 26px; }
.reading-preview-heading > span { display: block; margin-bottom: 9px; color: var(--purple); font: 700 10px/1.4 var(--mono); letter-spacing: 0.12em; }
.reading-preview-heading > strong { display: block; margin-bottom: 7px; color: var(--navy); font: 600 28px/1.12 var(--display); letter-spacing: -0.025em; }
.reading-preview-heading p { color: var(--muted); }

.overview-route {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  gap: 10px;
  min-height: 220px;
}

.overview-route > i,
.module-route > i { color: #8b8e9c; font-style: normal; }

.route-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 18px 14px;
  border: 1px solid rgba(35, 48, 78, 0.1);
  border-radius: 15px;
}

.route-card small,
.module-preview small,
.node-purpose small { color: var(--purple); font: 700 9px/1.4 var(--mono); letter-spacing: 0.08em; }
.route-card strong { color: var(--navy); font-size: 14px; }
.route-card span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.route-card.blue { background: var(--blue-soft); }
.route-card.peach { background: var(--peach-soft); }
.route-card.green { background: var(--green-soft); }
.route-card.yellow { background: var(--yellow-soft); }

.module-preview {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.5fr);
  gap: 16px;
  min-height: 220px;
}

.module-summary,
.module-route,
.node-purpose,
.node-facts { padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
.module-summary { background: var(--green-soft); }
.module-summary > strong { display: block; margin: 10px 0 18px; color: var(--navy); font-size: 18px; line-height: 1.35; }
.module-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.module-tags span { padding: 4px 8px; border-radius: 99px; color: #276546; background: rgba(255, 255, 255, 0.72); font-size: 11px; }
.module-route { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fafafa; }
.module-route > div { display: grid; gap: 7px; min-width: 0; padding: 14px 12px; border-radius: 12px; background: var(--paper); text-align: center; }
.module-route strong { color: var(--navy); font-size: 13px; }
.module-route .decision-node { background: var(--peach-soft); }

.node-preview { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 16px; min-height: 220px; }
.node-purpose { background: var(--blue-soft); }
.node-purpose > strong { display: block; margin: 10px 0; color: var(--navy); font-size: 18px; line-height: 1.35; }
.node-purpose p { color: var(--muted); font-size: 13px; }
.node-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; background: #fafafa; }
.node-facts div { padding: 10px; border-bottom: 1px solid var(--line); }
.node-facts div:nth-last-child(-n + 2) { border-bottom: 0; }
.node-facts dt { margin-bottom: 5px; color: var(--quiet); font: 700 9px/1.4 var(--mono); text-transform: uppercase; }
.node-facts dd { margin: 0; color: var(--navy); font-size: 12px; line-height: 1.45; }
.node-facts code { color: var(--purple); font-size: 10px; overflow-wrap: anywhere; }

.reading-takeaway { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.reading-takeaway strong { color: var(--navy); }

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.library-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.library-card h3 { margin-bottom: 9px; color: var(--navy); font-size: 18px; letter-spacing: -0.02em; }
.library-card p { margin-bottom: 0; color: var(--muted); font-size: 15px; }

.conversation {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.conversation-copy { position: sticky; top: 104px; }
.conversation-copy h2 { color: var(--navy); font: 600 clamp(33px, 4vw, 48px)/1.08 var(--display); letter-spacing: -0.04em; }
.conversation-copy p { color: var(--muted); font-size: 17px; }

.chat-stack { display: grid; gap: 14px; }

.chat {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 7px 20px rgba(30, 39, 70, 0.045);
}

.chat.user { margin-left: 54px; background: var(--purple-soft); border-color: #dcd7ff; }
.chat.agent { margin-right: 54px; }
.chat-label { margin-bottom: 8px; color: var(--quiet); font: 700 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.chat p { margin-bottom: 0; font-size: 15px; }

.showcase-list { display: grid; gap: 68px; }

.showcase-page {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 36px;
  align-items: center;
}

.showcase-page:nth-child(even) .showcase-copy { order: -1; }

.showcase-preview {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(30, 39, 70, .1);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.showcase-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(30, 39, 70, .15);
}

.showcase-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  background: #f5f4f0;
  font: 650 10px/1 var(--mono);
}

.showcase-browser-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aab1bf;
  box-shadow: -10px 0 #c1c6d0, -20px 0 #d2d5dc;
}

.showcase-preview-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.case-kicker { margin-bottom: 14px; color: var(--muted); font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.showcase-copy h3 { margin-bottom: 14px; color: var(--navy); font: 600 clamp(28px, 3vw, 40px)/1.08 var(--display); letter-spacing: -.035em; }
.showcase-copy > p { color: var(--muted); font-size: 16px; }
.showcase-question { padding: 14px 16px; border-left: 3px solid var(--purple); border-radius: 0 10px 10px 0; background: var(--purple-soft); }
.showcase-question strong { color: var(--navy); }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag { padding: 4px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--canvas); font: 650 10px/1.2 var(--mono); }
.case-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.case-links > a:not(.button) { color: var(--purple); font-size: 14px; font-weight: 750; text-decoration: none; }
.case-links > a:not(.button):hover { text-decoration: underline; }

.install-panel {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 36px;
  padding: 42px;
  border-radius: 24px;
  color: #fff;
  background: var(--navy);
}

.install-panel h2 { margin-bottom: 12px; font: 600 38px/1.05 var(--display); letter-spacing: -0.035em; }
.install-panel p { color: #bdc6dc; }
.install-panel a { color: #fff; }

.code-box { position: relative; overflow: hidden; border: 1px solid #344064; border-radius: 14px; background: #0e1733; }
.code-tabs { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid #303c60; }
.code-tabs button { padding: 5px 9px; border: 0; border-radius: 6px; color: #9ba6c2; background: transparent; font: 700 11px/1 var(--mono); cursor: pointer; }
.code-tabs button.active { color: #fff; background: #293557; }
.code-pane { display: none; position: relative; }
.code-pane.active { display: block; }
pre { margin: 0; padding: 24px; overflow-x: auto; color: #dbe5ff; font: 13px/1.75 var(--mono); white-space: pre; }
.copy-button { position: absolute; right: 12px; top: 12px; padding: 6px 9px; border: 1px solid #3a4668; border-radius: 7px; color: #b9c4df; background: #192443; font: 700 10px/1 var(--mono); cursor: pointer; }
.copy-button:hover { color: #fff; }

.library-card { padding: 24px; }
.library-card .license { display: inline-block; margin: 0 0 18px; padding: 4px 8px; border-radius: 99px; color: var(--purple); background: var(--purple-soft); font: 700 10px/1.2 var(--mono); }
.plain-note { margin-top: 22px; color: var(--muted); font-size: 14px; }
.plain-note a { color: var(--purple); font-weight: 700; }

.closing {
  padding: 94px 0;
  text-align: center;
}

.closing h2 { max-width: 760px; margin: 0 auto 18px; color: var(--navy); font: 600 clamp(36px, 5vw, 56px)/1.03 var(--display); letter-spacing: -0.045em; }
.closing p { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: 18px; }
.closing .actions { justify-content: center; }

.site-footer { padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 720px; }
  .map-window { max-width: 660px; width: 100%; margin: 0 auto; transform: none; }
  .library-grid { grid-template-columns: 1fr; }
  .showcase-page { grid-template-columns: 1fr; gap: 24px; }
  .showcase-page:nth-child(even) .showcase-copy { order: 0; }
  .reading-path { grid-template-columns: 1fr; }
  .reading-path-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-right: 0; border-bottom: 1px solid var(--line); }
  .reading-step { grid-template-columns: 34px 1fr; padding: 14px 12px; }
  .reading-step.active { transform: translateY(2px); }
  .conversation { grid-template-columns: 1fr; }
  .conversation-copy { position: static; }
  .install-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav, .wrap { width: min(100% - 28px, 1160px); }
  .nav-links a:not(.language-link):not(.github-link) { display: none; }
  .hero { padding: 64px 0 52px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-copy { font-size: 17px; }
  .showcase-list { gap: 48px; }
  .showcase-preview { border-radius: 14px; }
  .map-window { min-height: 420px; padding: 10px; }
  .map-canvas { min-height: 382px; padding: 14px; }
  .map-node { width: 120px; min-height: 66px; padding: 10px; }
  .map-node small { display: none; }
  .node-a { left: 8px; top: 138px; }
  .node-b { left: 138px; top: 78px; }
  .node-c { right: 4px; top: 190px; }
  .node-d { left: 58px; bottom: 24px; }
  .node-e { right: 5px; bottom: 12px; }
  .line-a { width: 66px; left: 104px; top: 163px; }
  .line-b { width: 76px; left: 220px; top: 125px; }
  .line-c { width: 72px; left: 240px; top: 225px; }
  .line-d { width: 86px; left: 120px; top: 297px; }
  .line-e { width: 74px; left: 205px; top: 316px; }
  .section { padding: 64px 0; }
  .reading-path { border-radius: 16px; }
  .reading-path-tabs { grid-template-columns: 1fr; }
  .reading-step { grid-template-columns: 34px 1fr; }
  .reading-stage { padding: 24px 18px; }
  .overview-route { grid-template-columns: 1fr; min-height: 0; }
  .overview-route > i { transform: rotate(90deg); text-align: center; }
  .module-preview, .node-preview { grid-template-columns: 1fr; }
  .module-route { flex-direction: column; }
  .module-route > i { transform: rotate(90deg); }
  .node-facts { grid-template-columns: 1fr; }
  .node-facts div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .node-facts div:last-child { border-bottom: 0; }
  .chat.user { margin-left: 20px; }
  .chat.agent { margin-right: 20px; }
  .install-panel { padding: 28px 18px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
