:root {
  --bg: #f6f5f0;
  --surface: #ffffff;
  --ink: #101411;
  --ink-2: #4c534e;
  --ink-3: #8a908b;
  --line: #e4e3dc;
  --line-strong: #cfcec6;
  --green: #17a366;
  --green-ink: #0f7a4c;
  --green-soft: #e3f5ec;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input { font: inherit; }
img { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */

.site-header,
.hero,
.flow,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--bg);
  background: var(--ink);
  border-radius: 8px;
}

.brand-mark svg { width: 18px; height: 18px; }

.header-cta {
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}

.header-cta:hover { border-color: var(--ink); background: var(--surface); }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(64px, 10vw, 128px) 0 clamp(48px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 12px 6px 10px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(23, 163, 102, 0.35);
  animation: pulse-dot 2.4s ease-out infinite;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.hero-lede {
  max-width: 580px;
  margin: 26px 0 24px;
  color: var(--ink-2);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: -10px 0 34px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Form ---------- */

.waitlist-form { width: min(480px, 100%); }

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 20, 17, 0.04), 0 12px 32px -12px rgba(16, 20, 17, 0.12);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.form-row:focus-within {
  border-color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 20, 17, 0.04), 0 0 0 4px rgba(16, 20, 17, 0.06);
}

.form-row input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.form-row input::placeholder { color: var(--ink-3); }

.form-row button {
  min-height: 42px;
  padding: 0 18px;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: calc(var(--radius) - 5px);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}

.form-row button:hover { background: #000; }
.form-row button:active { transform: scale(0.98); }
.form-row button:disabled { cursor: wait; opacity: 0.6; transform: none; }

.form-row input:focus-visible,
.form-row button:focus-visible,
.header-cta:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.honey { position: absolute; left: -9999px; }

.form-note,
.form-status {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

.form-note strong { color: var(--ink); font-weight: 500; }
.form-status { min-height: 20px; margin-top: 6px; color: var(--green-ink); font-weight: 500; }
.form-status.is-error { color: #b4392a; }

/* ---------- Integration cluster ---------- */

.stack {
  margin-top: clamp(44px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stack-tiles {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-tiles::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

.tile {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 20, 17, 0.04), 0 10px 24px -14px rgba(16, 20, 17, 0.25);
  transform: translateY(var(--dy, 0));
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}

.tile:nth-child(odd) { --dy: -6px; }
.tile:nth-child(even) { --dy: 6px; }
.tile:hover { transform: translateY(calc(var(--dy, 0) - 3px)); box-shadow: 0 1px 2px rgba(16, 20, 17, 0.04), 0 14px 28px -14px rgba(16, 20, 17, 0.35); }

.tile svg,
.tile img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  fill: currentColor;
}

.tile-hub {
  --dy: 0;
  width: 60px;
  height: 60px;
  margin-inline: 6px;
  color: var(--green);
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 17px;
}

.tile-hub svg { width: 28px; height: 28px; fill: none; }

.stack-caption {
  max-width: 400px;
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
  text-wrap: balance;
}

/* ---------- Flow panel ---------- */

.flow { padding-bottom: clamp(56px, 8vw, 96px); }

.flow-panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 20, 17, 0.03), 0 30px 60px -30px rgba(16, 20, 17, 0.18);
  overflow: hidden;
}

.pulse-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  color: var(--green);
  pointer-events: none;
}

.pulse-line path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.2s var(--ease) 0.9s forwards;
}

.step {
  padding: 40px 32px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step:last-child { border-right: 0; }

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.step-num {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.brief,
.doc,
.mail {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.brief {
  justify-content: space-between;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.brief-text {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.brief-meta,
.doc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
}

.brief-meta { justify-content: space-between; }

.doc,
.mail {
  padding: 18px;
  border: 1px solid var(--line);
}

.doc-head img { width: 16px; height: 16px; object-fit: contain; }
.doc-head span:nth-child(2) { color: var(--ink-2); font-weight: 500; }

.pill {
  margin-left: auto;
  padding: 3px 8px;
  color: var(--green-ink);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.doc h2 {
  margin: 18px 0 14px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.doc-lines { display: grid; gap: 8px; margin-top: auto; }
.doc-lines i { display: block; height: 6px; background: var(--line); border-radius: 3px; }
.doc-lines i:nth-child(2) { width: 92%; }
.doc-lines i:nth-child(3) { width: 78%; }
.doc-lines i:nth-child(4) { width: 55%; }

.mail-subject {
  margin: 18px 0 20px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mail-chart {
  height: 72px;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.mail-chart span {
  flex: 1;
  height: calc(var(--h) * 100%);
  background: var(--line-strong);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  animation: grow 900ms var(--ease) both;
}

.mail-chart span:nth-child(2) { animation-delay: 1.35s; }
.mail-chart span:nth-child(3) { animation-delay: 1.45s; }
.mail-chart span:nth-child(4) { animation-delay: 1.55s; }
.mail-chart span:nth-child(5) { animation-delay: 1.65s; background: var(--green); }
.mail-chart span:first-child { animation-delay: 1.25s; }


/* ---------- Footer ---------- */

.site-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
}

.site-footer p { margin: 0; }
.footer-note { text-align: right; }

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 800ms var(--ease) calc(var(--i, 0) * 110ms) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(23, 163, 102, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(23, 163, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 163, 102, 0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .flow-panel { grid-template-columns: 1fr; }
  .pulse-line { display: none; }
  .step { padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  .site-header,
  .hero,
  .flow,
  .site-footer { width: min(100% - 32px, 1120px); }
  .site-header { height: 68px; }
  .hero { padding-top: 56px; }
  h1 { font-size: clamp(40px, 11.5vw, 56px); }
  .hero-lede { margin: 22px 0 22px; }
  .hero-points { flex-direction: column; align-items: center; gap: 8px; margin: 0 0 30px; }
  .form-row { grid-template-columns: 1fr; gap: 5px; }
  .form-row button { width: 100%; }
  .site-footer { padding: 20px 0; flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .pulse-line path { stroke-dashoffset: 0; animation: none; }
  .mail-chart span { animation: none; }
  .live-dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
