:root {
  --ink: #16241e;
  --ink-2: #3c4a43;
  --ink-3: #6b7770;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --line: #e4e2da;
  --line-2: #eeede7;
  --green: #1f3d33;
  --green-2: #2f6b4f;
  --green-soft: #e6efe9;
  --pos: #2f7a55;
  --neg: #c2572f;
  --top: #2a6a93;
  --mid: #5c6d76;
  --low: #a8691c;
  --bot: #c2570f;
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-inline: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.link { font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.link:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; font: 600 14.5px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.15s, transform 0.15s; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(31, 61, 51, 0.22); }
.btn-primary:hover { background: #17302a; transform: translateY(-1px); }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.grid-bg { position: absolute; inset: 0 0 35% 0; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000 30%, transparent); pointer-events: none; }
.hero-inner { position: relative; text-align: center; }
.eyebrow { margin: 0 0 14px; color: var(--green-2); font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0 auto; font: 400 clamp(46px, 7.4vw, 88px)/1.02 var(--serif); letter-spacing: -0.02em; }
h1 em, .section-title em { color: var(--green-2); }
.lede { max-width: 640px; margin: 22px auto 0; color: var(--ink-2); font-size: 18.5px; }
.cta-form { display: flex; gap: 6px; width: min(460px, 100%); margin: 32px auto 0; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: 0 10px 30px rgba(22, 36, 30, 0.07); }
.cta-form input { flex: 1; min-width: 0; border: 0; padding: 0 16px; background: none; font: 15px var(--sans); color: var(--ink); outline: none; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.btn-ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-light { background: #fff; color: var(--green); }
.btn-light:hover { background: #eef3ef; }
.fine { margin: 14px 0 0; color: var(--ink-3); font-size: 13.5px; }

/* Product frame */
.app-frame { position: relative; display: grid; grid-template-columns: 180px 1fr; margin: 56px 0 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 30px 80px rgba(22, 36, 30, 0.12); overflow: hidden; }
.app-side { display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--line); background: #fbfbf8; }
.app-side img { margin: 0 0 18px 6px; }
.side-item { padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-size: 14px; }
.side-item.is-active { background: var(--green); color: #fff; font-weight: 600; }
.app-main { min-width: 0; padding: 24px 26px 18px; }
.app-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.app-kicker { margin: 0; color: var(--ink-3); font-size: 13px; }
.app-title { margin: 2px 0 0; font: 400 32px/1.1 var(--serif); }
.picker { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.picker-label { color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.picker-value { font-size: 14px; font-weight: 600; }
.demo-tabs { display: inline-flex; gap: 4px; margin: 18px 0 14px; padding: 4px; border-radius: 999px; background: var(--paper); }
.demo-tabs button { border: 0; border-radius: 999px; padding: 7px 14px; background: none; color: var(--ink-2); font: 500 13.5px var(--sans); cursor: pointer; }
.demo-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); font-weight: 600; }
.cond-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cond { padding: 14px; border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.3s, box-shadow 0.3s; }
.cond.flash { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.cond h4 { margin: 0; color: var(--ink-3); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cond b { display: block; margin: 6px 0 10px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cond b small { margin-left: 4px; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.bar { position: relative; height: 6px; border-radius: 999px; background: var(--line-2); }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width 0.5s ease, background 0.3s; }
.bar em { position: absolute; top: 50%; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px var(--line); transition: left 0.5s ease, background 0.3s; }
.cond p { margin: 10px 0 0; color: var(--ink-2); font-size: 12.5px; }
.app-note { margin: 14px 0 0; color: var(--ink-3); font-size: 12.5px; }

/* Sections */
.section { padding: 96px 0; }
.section-title { max-width: 720px; margin: 0; font: 400 clamp(34px, 4.6vw, 54px)/1.06 var(--serif); letter-spacing: -0.015em; }
.section-title.center, .lede.center { margin-inline: auto; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
.step { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step-num { color: var(--ink-3); font: 400 30px var(--serif); }
.step-kicker { margin: 14px 0 6px; color: var(--green-2); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.step h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.step p:last-child { margin: 0; color: var(--ink-2); font-size: 15px; }

.feature.alt { background: #f1f0ea; }
.feature-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr); align-items: center; gap: 56px; }
.feature-inner.reverse { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr); }
.feature-inner.reverse .feature-copy { order: 2; }
.feature-copy p { color: var(--ink-2); font-size: 17px; }
.feature-copy .section-title + p { margin-top: 18px; }
.checks { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 28px; color: var(--ink); font-size: 15px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%232f6b4f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

.card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 20px 50px rgba(22, 36, 30, 0.08); }
.mock { padding: 24px; }
.mock-title { margin: 0 0 16px; font-weight: 700; }
.mock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-fields div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mock-fields span { color: var(--ink-3); font-size: 12px; }
.mock-fields b { font-size: 14px; }
.mock-count { margin: 18px 0 8px; color: var(--ink-2); font-size: 14px; }
.mock-count b { color: var(--ink); font-size: 18px; }
.mock-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.mock-rows li { display: flex; justify-content: space-between; padding: 10px 12px; font-size: 14px; }
.mock-rows li + li { border-top: 1px solid var(--line-2); }
.mock-rows li span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mock-caption { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.waterfall { width: 100%; height: auto; }
.waterfall .axis line { stroke: var(--line); }
.waterfall text { font: 600 11px var(--sans); fill: var(--ink-2); }
.waterfall .lab { font-weight: 500; fill: var(--ink-3); font-size: 10px; }
.waterfall .conn { stroke: #c9c7bd; stroke-dasharray: 3 3; }
.scales { display: grid; gap: 16px; }
.scale-row { display: grid; grid-template-columns: 140px 1fr 56px; align-items: center; gap: 14px; }
.scale-row span { font-size: 14px; font-weight: 600; }
.scale-row b { text-align: right; font-variant-numeric: tabular-nums; }
.chat { display: grid; gap: 14px; }
.msg { max-width: 92%; padding: 14px 16px; border-radius: 14px; font-size: 14.5px; }
.msg.user { justify-self: end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--paper); border-bottom-left-radius: 4px; }
.msg p { margin: 0 0 8px; }
.msg ol { margin: 0; padding-left: 20px; }
.msg .tool { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--green-soft); color: var(--green-2); font: 600 11.5px ui-monospace, monospace; }

.stats { padding: 64px 0; border-block: 1px solid var(--line); background: var(--panel); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-grid b { display: block; font: 400 52px/1 var(--serif); letter-spacing: -0.02em; }
.stats-grid span { display: block; margin-top: 8px; color: var(--ink-3); font-size: 14px; }

.tilemap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; max-width: 780px; margin: 40px auto 0; }
.tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; cursor: default; transition: transform 0.15s; }
.tile:hover, .tile:focus-visible { transform: scale(1.12); outline: 2px solid var(--ink); outline-offset: 1px; }
.map-readout { margin: 18px 0 0; text-align: center; color: var(--ink-2); font-weight: 600; }

.access { background: var(--green); color: #fff; }
.access-inner { text-align: center; }
.access .section-title { margin-inline: auto; }
.access .lede { color: #d5e2da; }
.access .cta-form { border-color: transparent; }
.access .btn-primary { background: #0f211b; box-shadow: none; }
.access .fine, .access .fine a { color: #b7c8be; }

details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
details:first-of-type { margin-top: 36px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--ink-3); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; color: var(--ink-2); }

.footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .cond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three, .feature-inner, .feature-inner.reverse { grid-template-columns: 1fr; }
  .feature-inner.reverse .feature-copy { order: 0; }
  .feature-inner { gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .app-frame { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .cond-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
  .nav-actions .link { display: none; }
  .tilemap { gap: 3px; }
  .tile { font-size: 9px; border-radius: 5px; }
  .scale-row { grid-template-columns: 100px 1fr 44px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Scroll stage: the real product grows from an inset frame to the full viewport. */
.hero { padding-bottom: 0; }
.stage { position: relative; height: 230vh; margin-top: 48px; }
.stage-sticky { position: sticky; top: 0; display: grid; place-items: start center; height: 100vh; overflow: hidden; padding-top: 72px; }
.stage-frame { --p: 0; margin: 0; width: calc(min(1160px, 100vw - 32px) + (100vw - min(1160px, 100vw - 32px)) * var(--p)); border: 1px solid var(--line); border-radius: calc(20px * (1 - var(--p))); background: var(--panel); box-shadow: 0 40px 100px rgba(22, 36, 30, calc(0.16 * (1 - var(--p)))); overflow: hidden; will-change: width; }
.stage-bar { display: flex; align-items: center; gap: 7px; height: calc(38px * (1 - var(--p))); padding: 0 16px; border-bottom: 1px solid var(--line-2); background: #fbfbf8; opacity: calc(1 - var(--p) * 1.4); overflow: hidden; }
.stage-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e0ded6; }
.stage-bar span { margin-left: 14px; padding: 3px 14px; border-radius: 999px; background: var(--paper); color: var(--ink-3); font-size: 12px; }
.stage-frame img { display: block; width: 100%; height: auto; }

/* Real screenshots in feature sections. */
.shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 24px 60px rgba(22, 36, 30, 0.12); }
.shot-stack { position: relative; padding: 0 0 18% 0; }
.shot-stack .shot-back { width: 88%; }
.shot-stack .shot-front { position: absolute; right: 0; bottom: 0; width: 58%; box-shadow: 0 30px 80px rgba(22, 36, 30, 0.22); }
.feature-inner.stacked { grid-template-columns: 1fr; gap: 40px; }
.feature-inner.stacked .feature-copy { max-width: 760px; }
@media (max-width: 960px) {
  .stage { height: auto; margin-top: 32px; }
  .stage-sticky { position: static; height: auto; padding: 0 16px; }
  .stage-frame { width: 100%; }
  .shot-stack { padding-bottom: 30%; }
}
@media (prefers-reduced-motion: reduce) { .stage { height: auto; } .stage-sticky { position: static; height: auto; } }
