:root {
  --paper: #faf8f4;
  --tint: #f2eee7;
  --ink: #171a21;
  --muted: #5b6170;
  --line: #e0dacf;
  --accent: #a8432a;
  --accent-dark: #8a3520;
  --accent-soft: #f6e6df;
  --card: #ffffff;
  --radius: 12px;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 26px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-invert { background: var(--paper); color: var(--ink); }
.btn-invert:hover { background: #fff; }
.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { border-color: var(--ink); }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.02; }
h1 em { color: var(--accent); }
h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; max-width: 18em; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede { font-size: 20px; color: var(--muted); max-width: 36em; margin: 24px 0 0; }
.section-lede { font-size: 19px; color: var(--muted); max-width: 40em; margin: 20px 0 0; }
.fine { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { padding: 96px 0 88px; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 36px; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  list-style: none;
  padding: 28px 0 0;
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.hero-points li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 2px; background: var(--accent); vertical-align: middle; }

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 20px; margin-top: 44px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card-accent { border-top: 3px solid var(--accent); }

/* Diagram */
.diagram {
  display: grid;
  grid-template-columns: 180px 36px 1fr 36px 180px;
  align-items: center;
  margin-top: 48px;
}
.walls {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--tint);
  padding: 34px 22px 22px;
}
.walls-label {
  position: absolute;
  top: -13px;
  left: 20px;
  padding: 2px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.walls-row { display: grid; grid-template-columns: 1fr 28px 1.15fr 28px 1fr; align-items: center; }
.walls-row-secondary { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }

.node, .operator {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 15px;
  line-height: 1.35;
}
.node-primary { border-color: var(--accent); background: var(--accent-soft); }
.node-quiet { border-style: dashed; background: transparent; }
.operator { border-color: var(--ink); }
.node-kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.node-primary .node-kicker { color: var(--accent); }
.node-note { font-size: 13px; color: var(--muted); }

.flow-arrow { position: relative; height: 2px; background: var(--ink); margin: 0 4px; }
.flow-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 7px solid var(--ink);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.flow-arrow-in { background: none; border-top: 2px dashed var(--ink); height: 0; }
.flow-arrow-in::after { top: -6px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 56px 0 0;
}
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 20px; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--serif); font-size: 30px; color: var(--accent); margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* Platform split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 44px; }
.split > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.split > div:last-child { border-color: var(--accent); }
.split-title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin-bottom: 18px; }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.feature-list strong { color: var(--ink); font-weight: 600; }

/* Clouds */
.cloud {
  padding: 30px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  font-size: 19px;
  font-weight: 600;
}
.clouds + .fine { margin: 18px 0 0; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 20px 0; }
details:first-of-type { margin-top: 32px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* Closing CTA */
.cta { background: var(--ink); color: var(--paper); padding: 96px 0; text-align: center; }
.cta h2 { margin: 0 auto; }
.cta p { color: #b9bdc7; font-size: 19px; margin: 20px auto 32px; max-width: 32em; }

/* Footer */
.site-footer { padding: 44px 0 36px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-family: var(--serif); font-size: 24px; }
.footer-brand + .fine { margin: 4px 0 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.legal { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner .btn { margin-left: auto; }
  .grid-3, .steps, .split { grid-template-columns: 1fr; }
  .steps { gap: 24px; }

  .diagram { grid-template-columns: 1fr; justify-items: stretch; }
  .walls-row { grid-template-columns: 1fr; }
  .walls-row-secondary { grid-template-columns: 1fr; }
  .flow-arrow, .flow-arrow-in {
    width: 2px;
    height: 26px;
    margin: 4px auto;
    background: var(--ink);
    border: 0;
  }
  .flow-arrow-in { background: repeating-linear-gradient(var(--ink) 0 5px, transparent 5px 9px); }
  .flow-arrow::after, .flow-arrow-in::after {
    right: -4px;
    top: auto;
    bottom: -1px;
    border-top: 7px solid var(--ink);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 0;
  }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .cta { padding: 72px 0; }
  .lede { font-size: 18px; }
}

/* Demo form */
.demo-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
  text-align: left;
}
.demo-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: #b9bdc7; }
.demo-form .optional { font-weight: 400; color: #8a8f9c; }
.demo-form input, .demo-form textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #3a3f4b;
  border-radius: 8px;
  background: #20242d;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}
.demo-form textarea { resize: vertical; }
.demo-form input:focus, .demo-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.demo-form button { border: 0; cursor: pointer; font-family: inherit; margin-top: 4px; }
.demo-form button:disabled { opacity: 0.6; cursor: default; }
.field-wide { grid-column: 1 / -1; }
.field-trap { position: absolute; left: -9999px; }
.cta .form-status { margin: 20px auto 0; min-height: 1.6em; font-size: 17px; }
.cta .form-status-ok { color: var(--paper); }
.cta .form-status-error { color: #f0a48f; }

@media (max-width: 600px) {
  .demo-form { grid-template-columns: 1fr; }
}
