:root {
  --paper: #f7f5f0;
  --paper-2: #efebe2;
  --card: #ffffff;
  --ink: #16213a;
  --text: #2a3142;
  --muted: #5f6676;
  --rule: #e2ddd1;
  --accent: #1f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe9;
  --no: #a0503c;
  --no-soft: #f6e6e0;
  --shadow: 0 1px 2px rgba(22, 33, 58, 0.06), 0 8px 24px rgba(22, 33, 58, 0.08);
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12161f;
    --paper-2: #181d28;
    --card: #1d2330;
    --ink: #eef0f4;
    --text: #d3d7df;
    --muted: #9aa1ae;
    --rule: #2a3140;
    --accent: #6cc3ad;
    --accent-ink: #0d1a16;
    --accent-soft: #1b3330;
    --no: #e09a86;
    --no-soft: #3a2621;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.15rem;
  line-height: 1;
}

.header-cta {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.header-cta:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */

.hero {
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--rule);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

h1, h2 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34rem;
}

.cta {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.cta:hover { transform: translateY(-1px); }

/* Diagram */

.diagram {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.diagram svg { display: block; width: 100%; height: auto; }

.diagram .d-label { font: 600 13px var(--sans); fill: var(--muted); letter-spacing: 0.04em; }
.diagram .d-title { font: 600 15px var(--serif); fill: var(--ink); }
.diagram .d-small { font: 12px var(--sans); fill: var(--muted); }
.diagram .d-doc { fill: var(--paper-2); stroke: var(--rule); }
.diagram .d-line { fill: var(--rule); }
.diagram .d-core { fill: var(--ink); }
.diagram .d-core-text { font: 600 15px var(--serif); fill: var(--paper); }
.diagram .d-flow { stroke: var(--rule); stroke-width: 2; fill: none; }
.diagram .d-flow-ok { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.diagram .d-ok { fill: var(--accent); }
.diagram .d-ok-soft { fill: var(--accent-soft); }
.diagram .d-no { fill: var(--no); }
.diagram .d-no-soft { fill: var(--no-soft); }
.diagram .d-agent { fill: var(--accent-soft); stroke: var(--accent); }
.diagram .d-glyph { fill: none; stroke: var(--card); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */

.section { padding: 4.5rem 0; }
.section.alt { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.split {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 3rem;
}

.split > .body { max-width: 40rem; }

.kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.lead-in {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink);
}

/* Example chat card */

.chat {
  margin: 0.5rem 0 1.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}

.chat-who {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.chat blockquote {
  margin: 0;
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 14px 14px 14px 4px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 1.08rem;
}

.closing {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.35;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-weight: 550;
}

/* Waitlist */

.waitlist {
  padding: 4.5rem 0 5rem;
}

.waitlist-card {
  max-width: 44rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 2.25rem 2rem 1.75rem;
}

.waitlist-card h2 { text-align: center; }

#waitlist-form { margin-top: 1rem; }
#waitlist-form iframe { border: 0; display: block; }

.not-live {
  padding: 1rem;
  background: var(--paper-2);
  color: var(--muted);
  border-radius: 10px;
  text-align: center;
}

.privacy-short {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Privacy page (plain document layout) */

.doc { max-width: 42rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }

/* Small screens */

@media (max-width: 860px) {
  .hero { padding: 3rem 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.25rem; }
  .split { grid-template-columns: 1fr; gap: 0.5rem; }
  .section, .waitlist { padding: 3.25rem 0; }
  .waitlist-card { padding: 1.75rem 1.1rem 1.25rem; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta { transition: none; }
}

/* Example: what Alinea returns */

.brand-mark.small { width: 1.4rem; height: 1.4rem; font-size: 0.85rem; border-radius: 5px; }

.result {
  margin: 0 0 1.25rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
}

.result-head .brand-mark { background: var(--paper); color: var(--ink); }

.result-list { list-style: none; margin: 0; padding: 0.4rem 0; }

.result-list li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.result-list li + li { border-top: 1px solid var(--rule); }
.result-list strong { color: var(--ink); font-weight: 600; }
.result-list .meta { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.result-list li.no strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--no); }

.result-list .mark {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.result-list .ok .mark { background: var(--accent); color: var(--accent-ink); }
.result-list .no .mark { background: var(--no-soft); color: var(--no); }

.chat.answer { margin-left: 2.5rem; }
.chat.answer blockquote { border-radius: 14px 14px 4px 14px; background: var(--paper-2); }

.note { font-size: 0.8rem; color: var(--muted); margin: -0.5rem 0 0; }

/* Where Alinea fits */

.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.points li {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.points strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.25rem; }

@media (max-width: 860px) {
  .result { margin-left: 0; }
  .chat.answer { margin-left: 1rem; }
  .points { grid-template-columns: 1fr; }
}

/* The Tally form is always light (the free plan has one theme, and a light
   frame on a dark page gets an opaque white backdrop anyway). So the card
   around it stays light in dark mode too, like a paper form on a dark desk. */
@media (prefers-color-scheme: dark) {
  .waitlist-card {
    background: #fbfaf7;
    border-color: #fbfaf7;
    color: #2a3142;
    color-scheme: light;
  }
  .waitlist-card h2 { color: #16213a; }
  .waitlist-card .privacy-short { color: #5f6676; border-top-color: #e2ddd1; }
  .waitlist-card a { color: #1f6b5c; }
  .waitlist-card .not-live { background: #efebe2; color: #5f6676; }
}
