:root {
  --steel: #dadbd8;
  --surface: #e7e8e5;
  --surface-high: #f5f5f2;
  --white: #fafaf8;
  --ink: #1d1e1c;
  --muted: #555753;
  --rule: #292a28;
  --rule-muted: #b8bab6;
  --button-hover: #393b37;
  --font-sans: Inter, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-utility: ui-monospace, "SFMono-Regular", Consolas, monospace;

  color: var(--ink);
  background: var(--steel);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 2rem;
  background: var(--steel);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--steel);
  font-family: inherit;
}

::selection {
  color: var(--white);
  background: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  transition: color 80ms linear, background-color 80ms linear;
}

a:hover {
  color: var(--muted);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.page-width {
  width: min(calc(100% - 48px), 820px);
  margin-inline: auto;
}

.site-header {
  border-bottom: 2px solid var(--rule);
  background: var(--steel);
}

.header-content,
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  font-family: "Chakra Petch", var(--font-utility);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
}

.header-content > a:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-decoration: none;
}

.header-content > a:last-child:hover {
  color: var(--white);
  background: var(--ink);
}

.hero {
  padding-block: clamp(72px, 13vw, 144px) clamp(80px, 14vw, 152px);
  background: var(--steel);
}

h1,
h2 {
  max-width: 100%;
  overflow-wrap: break-word;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  margin: 0 0 36px;
  font-size: clamp(2.5rem, 6.8vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

h2 {
  max-width: 25ch;
  margin: 0 0 32px;
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

p {
  max-width: 64ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
}

.hero > .page-width > p:first-of-type {
  max-width: 58ch;
  margin-bottom: 36px;
}

.primary-action,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--white);
  background: var(--ink);
  font: 600 0.9375rem/1.2 var(--font-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 80ms linear, transform 80ms linear;
}

.primary-action:hover,
button:not(:disabled):hover {
  color: var(--white);
  background: var(--button-hover);
}

.primary-action:active,
button:not(:disabled):active {
  background: var(--ink);
  transform: translateY(1px);
}

button:disabled {
  border-color: var(--muted);
  color: var(--white);
  background: var(--muted);
  cursor: not-allowed;
}

.content-section {
  padding-block: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.content-section:nth-of-type(3) {
  background: var(--steel);
}

.content-section p:last-child {
  margin-bottom: 0;
}

.section-visual {
  display: block;
  width: 100%;
  height: 64px;
  margin: 0 auto 32px;
  overflow: visible;
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.5;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.section-visual > line {
  stroke-width: 1;
}

.visual-node {
  fill: var(--surface);
}

.visual-clear {
  fill: var(--steel);
  stroke: none;
}

/* Keep the existing diagrams; replace their inline warm/olive palette. */
.visual-completed {
  fill: var(--ink) !important;
  stroke: var(--ink) !important;
}

.visual-future {
  stroke: var(--muted);
}

.visual-active {
  stroke: var(--rule);
}

#workflow-decision-hatch rect {
  fill: var(--surface) !important;
}

#workflow-decision-hatch path {
  stroke: var(--muted) !important;
}

.waitlist-section {
  border-top-width: 2px;
  background: var(--steel);
}

.waitlist-section > .page-width {
  padding: clamp(24px, 5vw, 48px);
  border: 2px solid var(--rule);
  background: var(--surface-high);
}

.waitlist-section h2 {
  max-width: 20ch;
}

form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-muted);
}

form[hidden] {
  display: none;
}

label {
  color: var(--ink);
  font-family: var(--font-utility);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  background: var(--white);
  font: 400 1rem/1.5 var(--font-sans);
  transition: background-color 80ms linear;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

input:hover {
  background: var(--surface);
}

input:focus {
  border-color: var(--ink);
  background: var(--white);
}

form button {
  justify-self: start;
  margin-top: 4px;
}

.form-feedback {
  margin-top: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--rule);
  color: var(--ink);
}

.site-footer {
  border-top: 2px solid var(--rule);
  color: var(--surface);
  background: var(--ink);
}

.footer-content {
  align-items: flex-start;
  padding-block: 40px 48px;
}

.footer-content p {
  margin: 0;
  padding-block: 12px;
  color: var(--white);
  font-family: var(--font-utility);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--surface);
  font-size: 0.875rem;
}

nav a:hover {
  color: var(--white);
}

.site-footer a:focus-visible {
  outline-color: var(--white);
}

@media (min-width: 760px) {
  .page-width {
    width: min(calc(100% - 80px), 820px);
  }
}

@media (max-width: 560px) {
  .header-content {
    gap: 12px;
    padding-block: 16px;
  }

  .wordmark {
    font-size: 1.1875rem;
  }

  .header-content > a:last-child {
    padding-inline: 12px;
    font-size: 0.75rem;
  }

  .primary-action,
  form button {
    width: 100%;
  }

  .waitlist-section > .page-width {
    padding: 24px 20px;
  }

  .footer-content {
    display: block;
  }

  .footer-content nav {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
