:root {
  --bg: #0e0c0a;
  --bg-2: #161310;
  --bg-3: #1e1914;
  --cream: #f6efe6;
  --cream-dim: #cbbfb0;
  --muted: #8f8274;
  --line: rgba(246, 239, 230, 0.1);
  --line-strong: rgba(246, 239, 230, 0.18);
  --orange: #ee7a1e;
  --orange-2: #ff9f45;
  --orange-deep: #d9620c;
  --pink: #f48fb1;
  --ok: #7dba6a;
  --danger: #e07060;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --max: 1120px;
  --nav-h: 68px;
  --font: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --display: "Fraunces", "Songti SC", "Noto Serif SC", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
code, kbd, pre { font-family: var(--mono); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(238, 122, 30, 0.16), transparent 60%),
    radial-gradient(700px 400px at 90% 8%, rgba(244, 143, 177, 0.08), transparent 55%);
}
body > * { position: relative; z-index: 1; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}
.wrap-narrow { width: min(760px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  backdrop-filter: blur(18px);
  background: rgba(14, 12, 10, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 17px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a, .nav-links button.lang {
  color: var(--cream-dim);
  font-size: 14px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-links a:hover, .nav-links button.lang:hover,
.nav-links a.is-active { color: var(--cream); background: rgba(246, 239, 230, 0.06); }
.nav-cta {
  background: var(--cream) !important;
  color: #1a120c !important;
  font-weight: 700 !important;
  padding: 9px 14px !important;
}
.nav-cta:hover { filter: brightness(0.95); }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}

.hero {
  padding: 72px 0 28px;
  text-align: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.kicker img { width: 22px; height: 22px; border-radius: 6px; background: #fff; }
.display {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.display em {
  font-style: italic;
  color: var(--orange-2);
}
.lede {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--cream-dim);
  max-width: 640px;
  margin: 0 auto 32px;
}
.cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(246, 239, 230, 0.06); }
.btn-light { background: var(--cream); color: #1a120c; }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 239, 230, 0.03);
  color: var(--cream-dim);
  font-weight: 600;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
}

.hero-stage {
  margin: 56px auto 0;
  width: min(var(--max), calc(100% - 48px));
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 28px;
  align-items: end;
}
.device {
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.device-phone {
  border-radius: 32px;
  padding: 12px 12px 16px;
  max-width: 320px;
  margin: 0 auto;
}
.device-laptop {
  border-radius: 18px 18px 8px 8px;
  min-height: 360px;
}
.notch {
  width: 86px; height: 8px; border-radius: 99px;
  background: #2a2420; margin: 4px auto 10px;
}
.screen {
  background: #f7f4ef;
  color: #1f2329;
  border-radius: 22px;
  min-height: 420px;
  overflow: hidden;
}
.screen-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #ece7df;
  font-size: 13px;
  font-weight: 700;
}
.screen-bar .status { margin-left: auto; color: #34c759; font-size: 11px; font-weight: 650; }
.chat { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
}
.bubble.me { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 5px; }
.bubble.you { align-self: flex-start; background: #fff; border: 1px solid #ece7df; border-bottom-left-radius: 5px; }
.bubble .meta { display: block; font-size: 10px; opacity: 0.7; margin-bottom: 4px; font-weight: 700; }
.bubble pre {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 8px;
  background: #1a1612;
  color: #f6efe6;
  font-size: 11px;
  overflow: auto;
}
.laptop-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #211c18;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.dots { display: flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a332c; display: block; }
.dots i:nth-child(1) { background: #e07060; }
.dots i:nth-child(2) { background: #e0b060; }
.dots i:nth-child(3) { background: #7dba6a; }
.hub-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 320px;
}
.hub-side {
  background: #1a1612;
  border-right: 1px solid var(--line);
  padding: 14px;
}
.hub-side h4 { margin: 0 0 12px; font-size: 12px; color: var(--muted); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.proj {
  padding: 10px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.proj.active { background: rgba(238, 122, 30, 0.16); color: var(--orange-2); }
.hub-main { padding: 16px; }
.log {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cream-dim);
  line-height: 1.7;
}
.log .ok { color: var(--ok); }
.log .cmd { color: var(--orange-2); }

.section { padding: 88px 0; }
.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 12px;
  font-weight: 560;
}
.section-head p { margin: 0; color: var(--cream-dim); font-size: 17px; }
.alt { background: linear-gradient(180deg, rgba(246,239,230,0.025), transparent); }

.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.engine-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.engine-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.engine-card:hover {
  border-color: rgba(238, 122, 30, 0.45);
  background: rgba(238, 122, 30, 0.08);
  transform: translateY(-2px);
}
.engine-card .mark {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1a120c;
  background: linear-gradient(160deg, var(--orange-2), var(--orange));
}
.engine-card h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.engine-card p {
  margin: 0;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.engine-more { margin-top: 18px; }
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--cream-dim); font-size: 14px; }
.card .icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(238, 122, 30, 0.14);
  color: var(--orange-2);
  margin-bottom: 14px;
  font-size: 18px;
}

.arch {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.arch-col {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.arch-col h3 { margin: 0 0 12px; font-size: 15px; }
.arch-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(246, 239, 230, 0.04);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.arch-item:last-child { margin-bottom: 0; }
.arch-arrow {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 22px;
  min-width: 28px;
}
.or {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  margin: 8px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.step {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.step b { display: block; font-size: 12px; color: var(--orange-2); margin-bottom: 6px; }
.step span { font-size: 14px; font-weight: 650; }

.cli {
  background: #120f0c;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.cli-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.copy-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream-dim);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}
.cli pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #efe4d6;
}
.cli .c { color: var(--muted); }
.cli .g { color: var(--ok); }
.cli .o { color: var(--orange-2); }

.faq details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p, .faq details ul { color: var(--cream-dim); margin: 10px 0 0; font-size: 15px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.site-footer h4 { color: var(--cream); margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.site-footer a { display: block; padding: 4px 0; color: var(--cream-dim); }
.site-footer a:hover { color: var(--cream); }
.footnote { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.docs-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 36px 0 80px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.docs-nav {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow: auto;
  padding-right: 8px;
}
.docs-nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--cream-dim);
  font-size: 14px;
}
.docs-nav a:hover, .docs-nav a.is-active {
  background: rgba(238, 122, 30, 0.12);
  color: var(--orange-2);
}
.docs-nav .group {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
  font-weight: 700;
}
.prose { min-width: 0; }
.prose h1 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  font-weight: 560;
}
.prose h2 {
  font-size: 22px;
  margin: 36px 0 12px;
  letter-spacing: -0.02em;
}
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--cream-dim); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 18px; }
.prose a { color: var(--orange-2); text-decoration: underline; text-underline-offset: 3px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0 20px;
}
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px 10px;
  vertical-align: top;
}
.prose td code { word-break: break-all; }
.prose th { color: var(--cream); font-weight: 650; }
.prose .note {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--cream-dim);
  margin: 16px 0;
}
.prose pre, .prose .cli { margin: 12px 0 20px; }
.prose code {
  font-size: 0.92em;
  background: rgba(246, 239, 230, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

.dl-hero { padding: 56px 0 20px; }
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.dl-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dl-card h3 { margin: 0; font-size: 22px; }
.dl-card p { margin: 0; color: var(--cream-dim); }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange-2);
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 24px 16px;
}
.mobile-nav a, .mobile-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 4px;
  background: none;
  border: 0;
  color: var(--cream);
  font-size: 16px;
  cursor: pointer;
}
body.nav-open .mobile-nav { display: block; }

@media (max-width: 980px) {
  .hero-stage, .arch, .hub-grid, .grid-3, .grid-4, .steps, .footer-grid, .docs-shell, .dl-grid, .grid-2 {
    grid-template-columns: 1fr;
  }
  .engine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .arch-arrow { transform: rotate(90deg); min-height: 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .hero { padding-top: 48px; }
  .section { padding: 64px 0; }
  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: none;
    padding-right: 0;
  }
  .docs-nav .group { width: 100%; margin: 10px 0 4px; }
}

@media (max-width: 640px) {
  .wrap, .wrap-narrow, .docs-shell, .hero-stage { width: calc(100% - 32px); }
  .cta-row { flex-direction: column; }
  .btn { width: 100%; }
  .engine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
