:root {
  --ink: #0b1217;
  --ink-2: #152838;
  --paper: #f3f7f6;
  --white: #ffffff;
  --line: #d7e3e0;
  --muted: #53636f;
  --soft: #e8f2f0;
  --teal: #00a79d;
  --teal-deep: #007f78;
  --teal-bright: #45d4cb;
  --copper: #b6633a;
  --amber: #f2b84b;
  --warn-bg: #fff4df;
  --code-bg: #071116;
  --code-fg: #d5f7ef;
  --text-on-dark: #d7e3e0;
  --line-dark: #2f4150;
  --max: 1180px;
  --radius: 8px;
  --sans: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal-deep); }
p { margin: 0; }
code, pre { font-family: var(--mono); }
pre { overflow-x: auto; white-space: pre; }
table { width: 100%; border-collapse: collapse; }
th, td { vertical-align: top; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 247, 246, 0.96);
  backdrop-filter: blur(12px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 820;
  line-height: 1;
}
.brand-mark { width: 40px; height: 40px; border-radius: var(--radius); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: var(--ink);
  color: white;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}
.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(11, 18, 23, 0.98) 0%, rgba(11, 18, 23, 0.94) 38%, rgba(11, 18, 23, 0.7) 76%, rgba(11, 18, 23, 0.5) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 760px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px;
  align-items: center;
}
.eyebrow { margin-bottom: 16px; color: var(--teal-deep); font-size: 14px; font-weight: 800; }
.hero .eyebrow { color: var(--amber); }
.hero h1 { max-width: 820px; margin: 0; font-size: clamp(44px, 7vw, 86px); line-height: 0.98; letter-spacing: 0; }
.hero-copy { max-width: 720px; margin-top: 28px; color: var(--text-on-dark); font-size: 19px; line-height: 1.75; }
.hero-actions, .section-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
}
.button.primary { background: var(--amber); color: var(--ink); }
.button.dark { background: var(--ink); color: white; }
.button.secondary { border: 1px solid #72808d; color: white; }
.button.light { border: 1px solid var(--line); background: white; color: var(--ink); }
.button:disabled { cursor: wait; opacity: 0.62; }

.section { border-bottom: 1px solid var(--line); padding: 84px 24px; }
.section.white { background: white; }
.section.soft { background: var(--soft); }
.section.dark { background: var(--ink); color: white; }
.wrap { max-width: var(--max); margin: 0 auto; }
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }
.section h2, .docs-main h1, .docs-main h2 { margin: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: 0; }
.section-lede { margin-top: 20px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.dark .section-lede, .dark .muted { color: var(--text-on-dark); }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature, .benefit, .doc-card, .verb-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 24px;
}
.feature h3, .engine h3, .doc-card h3, .verb-card h3, .benefit h3 { margin: 0; font-size: 20px; }
.feature p, .engine p, .doc-card p, .verb-card p, .benefit p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.engine-list { display: grid; gap: 18px; }
.engine { display: grid; grid-template-columns: 160px 1fr; gap: 22px; border-top: 1px solid var(--line-dark); padding-top: 22px; }
.engine-label { color: var(--amber); font-family: var(--mono); font-size: 13px; }
.engine p { color: var(--text-on-dark); }
.benefit-grid, .doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.flow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 36px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--line-dark);
}
.flow-step { background: var(--ink-2); padding: 22px; }
.flow-step strong { display: block; color: var(--amber); font-family: var(--mono); font-size: 13px; margin-bottom: 12px; }
.flow-step span { color: var(--text-on-dark); font-size: 15px; line-height: 1.6; }

.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  color: white;
}
.contact-section::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(21, 40, 56, 0.96), rgba(21, 40, 56, 0.82)),
    repeating-linear-gradient(90deg, rgba(215, 227, 224, 0.08) 0 1px, transparent 1px 110px);
}
.contact-section > .wrap {
  position: relative;
  z-index: 1;
}
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: 44px;
  align-items: start;
}
.contact-layout .section-lede { color: var(--text-on-dark); }
.contact-rails {
  display: grid;
  gap: 1px;
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--line-dark);
}
.contact-rails div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  background: rgba(11, 18, 23, 0.36);
  padding: 18px;
}
.contact-rails strong {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 13px;
}
.contact-rails span {
  color: var(--text-on-dark);
  font-size: 14px;
  line-height: 1.6;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 24px;
}
.form-heading span {
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}
.form-heading h3 {
  margin: 8px 0 0;
  font-size: 25px;
  line-height: 1.12;
}
.form-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.form-card input,
.form-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfd;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 12px 13px;
}
.form-card textarea { resize: vertical; }
.form-card input:focus,
.form-card textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 167, 157, 0.16);
  outline: 0;
}
.form-card .button { width: 100%; }
.form-trap {
  position: absolute;
  left: -10000px;
}
.form-status {
  min-height: 21px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.form-status[data-state="success"] { color: var(--teal-deep); }
.form-status[data-state="error"] { color: var(--copper); }
.form-status[data-state="pending"] { color: var(--muted); }

.docs-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; max-width: 1320px; margin: 0 auto; padding: 42px 24px 96px; }
.docs-sidebar { position: sticky; top: 86px; align-self: start; border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 20px; }
.docs-sidebar strong { display: block; margin-bottom: 12px; }
.docs-sidebar a { display: block; border-top: 1px solid #e5edeb; padding: 10px 0; color: var(--muted); font-size: 14px; }
.docs-main { min-width: 0; }
.docs-hero { border-bottom: 1px solid var(--line); background: white; padding: 58px 24px; }
.docs-hero .wrap { max-width: 980px; }
.docs-hero h1 { margin: 0; font-size: clamp(40px, 5vw, 66px); line-height: 1.02; }
.docs-hero p { max-width: 820px; margin-top: 22px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.doc-section { border-bottom: 1px solid var(--line); padding: 44px 0; }
.doc-section:first-child { padding-top: 0; }
.doc-section h2 { margin-bottom: 18px; font-size: 34px; }
.doc-section h3 { margin: 28px 0 12px; font-size: 24px; }
.doc-section p, .doc-section li { color: var(--muted); font-size: 16px; line-height: 1.78; }
.doc-section ul { margin: 14px 0 0; padding-left: 20px; }
.callout { border: 1px solid #e0c49b; border-radius: var(--radius); background: var(--warn-bg); padding: 18px; }
.code-block { margin: 18px 0 0; border: 1px solid #27313d; border-radius: var(--radius); background: var(--code-bg); color: var(--code-fg); padding: 18px; font-size: 14px; line-height: 1.65; }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.table-wrap th { background: var(--ink); color: white; font-size: 14px; text-align: left; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid #e5edeb; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap code, .doc-section code { color: var(--teal-deep); font-family: var(--mono); }
.verb-list { display: grid; gap: 16px; margin-top: 24px; }

.not-found {
  position: relative;
  display: grid;
  min-height: calc(100vh - 73px);
  overflow: hidden;
  background: var(--ink);
  color: white;
}
.not-found-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}
.not-found::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(11, 18, 23, 0.98) 0%, rgba(11, 18, 23, 0.88) 56%, rgba(11, 18, 23, 0.6) 100%),
    repeating-linear-gradient(0deg, rgba(215, 227, 224, 0.08) 0 1px, transparent 1px 72px);
}
.not-found-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 56px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 86px 24px;
  align-items: center;
}
.not-found-number {
  display: inline-grid;
  grid-template-columns: repeat(3, max-content);
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 228px;
  font-weight: 900;
  line-height: 0.78;
  text-shadow: 0 0 36px rgba(242, 184, 75, 0.28);
}
.not-found-number span {
  display: inline-grid;
  min-width: 0.64em;
  justify-content: center;
}
.not-found-number span:nth-child(2) {
  position: relative;
  color: var(--teal-bright);
}
.not-found-number span:nth-child(2)::before,
.not-found-number span:nth-child(2)::after {
  position: absolute;
  left: 50%;
  width: 54%;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: var(--amber);
  transform: translateX(-50%);
}
.not-found-number span:nth-child(2)::before { top: 23%; }
.not-found-number span:nth-child(2)::after { bottom: 20%; }
.not-found-code {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
}
.not-found h1 {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}
.not-found-copy {
  max-width: 620px;
  margin-top: 26px;
  color: var(--text-on-dark);
  font-size: 18px;
  line-height: 1.75;
}
.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.route-panel {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(21, 40, 56, 0.76);
  backdrop-filter: blur(10px);
  padding: 24px;
}
.route-panel strong {
  display: block;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 16px;
}
.route-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  border-top: 1px solid var(--line-dark);
  padding: 14px 0;
  color: var(--text-on-dark);
  font-size: 14px;
  line-height: 1.55;
}
.route-row span:first-child {
  color: var(--teal-bright);
  font-family: var(--mono);
}

.site-footer { border-top: 1px solid var(--line-dark); background: var(--ink); color: var(--text-on-dark); padding: 34px 24px; }
.footer-inner { display: flex; max-width: var(--max); margin: 0 auto; justify-content: space-between; gap: 24px; font-size: 14px; }

@media (max-width: 900px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .nav-links { flex-wrap: wrap; gap: 14px; }
  .split, .split.even, .docs-shell { grid-template-columns: 1fr; }
  .feature-grid, .benefit-grid, .doc-grid, .flow-strip { grid-template-columns: 1fr; }
  .engine { grid-template-columns: 1fr; }
  .contact-layout, .form-grid { grid-template-columns: 1fr; }
  .not-found-inner { grid-template-columns: 1fr; }
  .not-found-number { font-size: 172px; }
  .docs-sidebar { position: static; }
  .hero, .hero-inner { min-height: 680px; }
}

@media (max-width: 560px) {
  .section, .docs-hero, .docs-shell, .hero-inner { padding-left: 18px; padding-right: 18px; }
  .brand { font-size: 20px; }
  .nav-links { font-size: 15px; }
  .contact-rails div { grid-template-columns: 1fr; gap: 6px; }
  .not-found-inner { padding: 70px 18px; }
  .not-found-number { gap: 8px; font-size: 112px; }
  .route-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { flex-direction: column; }
}

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