:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --paper: #fff;
  --ink: #16180f;
  --muted: #666b60;
  --line: #dcdfd2;
  --green: #2f6b4f;
  --green-soft: #dfece4;
  --blue-soft: #e2ebf4;
  --amber-soft: #f4e8cc;
  --shadow: 0 24px 70px rgba(22, 24, 15, 0.1);
  --header-h: 68px;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.mark { display: block; flex: 0 0 auto; }
.mark-bg { fill: var(--ink); }
.mark-node, .mark-line { stroke: var(--paper); }
.mark-node { fill: var(--paper); }
.mark-line { stroke-width: 1.6; stroke-linecap: round; }
.mark-brand { width: 28px; height: 28px; }
.mark-surface { width: 22px; height: 22px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(245, 244, 239, 0.9);
  border-bottom: 1px solid rgba(220, 223, 210, 0.82);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 13px; font-weight: 500; }
.site-nav a:hover, .site-nav a:focus-visible, .text-link:hover, .text-link:focus-visible { color: var(--ink); }
.site-nav .nav-cta { padding: 9px 13px; border: 1px solid var(--ink); border-radius: 7px; color: var(--ink); font-weight: 600; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.nav-toggle span { display: block; width: 17px; height: 1.5px; margin: 5px auto; background: var(--ink); }

.hero {
  min-height: 100vh;
  padding: calc(var(--header-h) + clamp(52px, 9vh, 96px)) clamp(20px, 7vw, 104px) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 1120px; margin: 0 auto 60px; }
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.eyebrow::before { content: "//"; color: var(--muted); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(46px, 6vw, 88px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero-lede { max-width: 560px; margin: 26px 0 0; color: #454b40; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.7; transform: none; }
.text-link { color: var(--muted); font-size: 13px; font-weight: 600; }
.text-link span { margin-left: 5px; }

.product-surface {
  width: min(1120px, 100%);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid #cfd5cf;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
}
.surface-bar, .ledger-head, .ledger-row { display: grid; align-items: center; }
.surface-bar { grid-template-columns: 1fr auto; min-height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.surface-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.surface-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; width: 148px; color: var(--muted); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #3a9a6b; box-shadow: 0 0 0 3px rgba(58, 154, 107, 0.12); }
.live-dot.is-syncing { background: #c9932e; box-shadow: 0 0 0 3px rgba(201, 147, 46, 0.14); animation: pulse-dot 0.85s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.ledger-head, .ledger-row { grid-template-columns: minmax(320px, 1.3fr) minmax(260px, 1fr) 104px; gap: 28px; padding: 0 24px; }
.ledger-head {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  background: #faf9f6;
  color: #7d8377;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ledger-row { min-height: 92px; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row.active { background: #fafbf8; box-shadow: inset 3px 0 var(--green); }
.ledger-row strong, .ledger-row small { display: block; }
.ledger-row strong { margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.ledger-row small { color: var(--muted); font-size: 11px; }
.evidence { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence code { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #f8f8f4; color: #52584c; font-family: var(--font-mono); font-size: 10px; }
.state { width: max-content; padding: 5px 8px; border-radius: 999px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.state.shipped { color: #235a3f; background: var(--green-soft); }
.state.review { color: #395b7b; background: var(--blue-soft); }
.state.gap { color: #765a20; background: var(--amber-soft); }

.section { padding: clamp(80px, 10vw, 136px) clamp(20px, 6vw, 88px); }
.section-intro {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(300px, 1fr) minmax(220px, 0.55fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto 56px;
}
.section-intro.compact { grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr); }
.section-intro .eyebrow { margin: 6px 0 0; }
h2 { margin: 0; font-family: var(--font-display); font-optical-sizing: auto; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; font-weight: 500; letter-spacing: -0.005em; }
h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.25; }
.section-intro > p:last-child, .workflow p, .integration-note, .early-access-copy > p:last-child { color: var(--muted); line-height: 1.62; }
.section-intro > p:last-child { margin: 3px 0 0; font-size: 16px; }
.workflow-section { background: var(--paper); }
.workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1180px; margin: 0 auto; padding: 0; border-block: 1px solid var(--line); list-style: none; }
.workflow li { min-height: 200px; padding: 26px; border-right: 1px solid var(--line); }
.workflow li:first-child { border-left: 1px solid var(--line); }
.step-number { display: block; margin-bottom: 28px; color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.workflow p { max-width: 310px; margin: 12px 0 0; font-size: 14px; }

.integrations-section { border-block: 1px solid var(--line); }
.integration-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1180px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); overflow: hidden; }
.integration-row div { min-height: 122px; padding: 22px; border-right: 1px solid var(--line); }
.integration-row div:last-child { border-right: 0; }
.integration-row strong, .integration-row span { display: block; }
.integration-row strong { margin-bottom: 30px; font-size: 14px; font-weight: 600; }
.integration-row span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; line-height: 1.4; }
.integration-note { max-width: 1180px; margin: 18px auto 0; font-size: 12px; }

.early-access-section { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 0.7fr); gap: clamp(48px, 10vw, 150px); max-width: 1320px; margin: 0 auto; }
.early-access-copy > p:last-child { max-width: 580px; margin: 24px 0 0; font-size: 17px; }
.early-access-form { align-self: center; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.early-access-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.early-access-form label span { color: var(--muted); font-weight: 400; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.early-access-form input, .early-access-form select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #cbd2cc; border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 13px; }
.early-access-form input:focus, .early-access-form select:focus { outline: 2px solid rgba(47, 107, 79, 0.2); border-color: var(--green); }
.team-field { margin-top: 18px; }
.form-note, .form-status { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-status:not(:empty) { color: var(--green); font-weight: 600; }
.form-status.error { color: #9a3f35; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding: 20px clamp(20px, 5vw, 72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { color: var(--ink); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; top: var(--header-h); left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .site-nav a, .site-nav .nav-cta { padding: 13px; border: 0; }
  .hero { min-height: auto; }
  .ledger-head, .ledger-row { grid-template-columns: minmax(250px, 1fr) 104px; }
  .ledger-head span:nth-child(2), .ledger-row .evidence { display: none; }
  .section-intro, .section-intro.compact, .early-access-section { grid-template-columns: 1fr; }
  .section-intro { gap: 18px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow li, .workflow li:first-child { min-height: auto; border: 0; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .workflow li:last-child { border-bottom: 0; }
  .step-number { margin-bottom: 20px; }
  .integration-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-row div, .integration-row div:last-child { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .early-access-section { gap: 40px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 16px; }
  .hero { padding: calc(var(--header-h) + 40px) 16px 0; }
  .hero-copy { margin-bottom: 48px; }
  h1 { font-size: 42px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 16px; }
  .product-surface { width: calc(100% + 32px); margin-left: -16px; border-radius: 0; }
  .surface-bar, .ledger-head, .ledger-row { padding-inline: 16px; }
  .surface-meta { display: none; }
  .ledger-head, .ledger-row { grid-template-columns: minmax(0, 1fr) 86px; gap: 12px; }
  .ledger-row { min-height: 102px; }
  .section { padding-inline: 20px; }
  .integration-row { grid-template-columns: 1fr; }
  .integration-row div { min-height: 106px; }
  .integration-row strong { margin-bottom: 20px; }
  .early-access-form { padding: 20px; }
  .input-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button:hover, .button:focus-visible { transform: none; }
  .live-dot.is-syncing { animation: none; }
}
