/* ProteinText — calm, legible, mobile-first.
   Hierarchy rule for the hero: headline first, the conversation second,
   one button third. Nothing else competes for the first screen. */
:root {
  --paper: #fbf8f1;
  --sand: #f2ecdf;
  --sand-soft: #f7f2e8;
  --surface: #ffffff;
  --ink: #1a2320;
  --muted: #5a6661;
  --line: #ddd5c4;
  --line-soft: #e8e1d2;
  --evergreen: #24594d;
  --evergreen-dark: #163b33;
  --evergreen-pale: #e5efe9;
  --clay: #9c5340;
  --focus: #0d6bd8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 24px 60px rgba(38, 30, 18, 0.10), 0 3px 12px rgba(38, 30, 18, 0.06);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.58;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
a { color: var(--evergreen-dark); text-underline-offset: 3px; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img, svg { max-width: 100%; }
button, input { font: inherit; }
button, .button { min-height: 48px; }
h1, h2, h3 { font-family: var(--serif); text-wrap: balance; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.nav-wrap {
  width: min(1140px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
  font-size: 20px;
}
.brand-mark {
  width: 31px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px 9px 9px 3px;
  background: var(--evergreen);
  color: white;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--muted); font-size: 15px; font-weight: 650; text-decoration: none; }
.nav-link:hover { color: var(--evergreen-dark); text-decoration: underline; }
.nav-cta {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--evergreen);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}
.nav-cta:hover { background: var(--evergreen-dark); color: #fff; }

/* ---- Hero ------------------------------------------------------------- */
/* DOM order is the mobile reading order: headline, conversation, button.
   The grid only re-seats those same three blocks for wide screens. */
.hero {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(44px, 6vh, 76px) 0 clamp(40px, 5vh, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  column-gap: clamp(48px, 7vw, 96px);
  row-gap: 34px;
  align-items: start;
}
.hero-copy { grid-column: 1; grid-row: 1; align-self: end; }
.hero-actions { grid-column: 1; grid-row: 2; align-self: start; }
.hero-demo { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 66px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.hero-lede {
  margin: 22px 0 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
}
.hero-cta {
  display: inline-grid;
  place-items: center;
  min-height: 56px;
  padding: 0 40px;
  border-radius: 12px;
  background: var(--evergreen);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(36, 89, 77, 0.20);
}
.hero-cta:hover { background: var(--evergreen-dark); color: #fff; }
.hero-price { margin: 14px 0 0; color: var(--muted); font-size: 15px; }

.demo-card {
  padding: 22px 22px 26px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 22px 50px rgba(38, 30, 18, 0.10);
}
.demo-label {
  margin: 0 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}
/* Messages stack against the bottom, so each new one lifts the thread. */
.demo-thread {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.msg { display: grid; grid-template-rows: 1fr; }
.msg-inner { overflow: hidden; min-height: 0; }
.msg + .msg .msg-inner { padding-top: 10px; }
.msg[data-typing] { display: none; }

.bubble {
  width: fit-content;
  max-width: 86%;
  padding: 12px 16px;
  border-radius: 20px;
  background: var(--sand);
  font-size: 16px;
  line-height: 1.4;
}
.bubble.sent { margin-left: auto; background: var(--evergreen); color: white; border-bottom-right-radius: 6px; }
.bubble.received { border-bottom-left-radius: 6px; }

.bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 15px 17px;
}
.bubble.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa39e;
}
@keyframes typing-dot {
  0%, 62%, 100% { opacity: 0.34; transform: translate3d(0, 0, 0); }
  31% { opacity: 1; transform: translate3d(0, -3px, 0); }
}

/* The thread plays itself in once: the meal lands at the bottom, the reply
   is typed, then the check-in lifts everything to its resting position. */
.js .msg { grid-template-rows: 0fr; transition: grid-template-rows 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.js .msg[data-typing] { display: grid; }
.js .msg .bubble {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 260ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.js .msg.is-in { grid-template-rows: 1fr; }
.js .msg.is-in .bubble { opacity: 1; transform: translate3d(0, 0, 0); }
.js .msg.is-in .bubble.typing span { animation: typing-dot 1.25s infinite ease-in-out; }
.js .msg.is-in .bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.js .msg.is-in .bubble.typing span:nth-child(3) { animation-delay: 0.36s; }

/* Measuring pass. The typing row keeps its collapsed state so what we measure
   is exactly the resting layout, and the card never changes size mid-sequence. */
.js .demo-thread.is-measuring .msg[data-msg] { grid-template-rows: 1fr; transition: none; }
.js .demo-thread.is-measuring .bubble { opacity: 1; transform: none; transition: none; }

/* ---- Sections --------------------------------------------------------- */
.section { padding: 80px 0; }
.section.alt { background: var(--sand); }
.container { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.container.narrow { width: min(720px, calc(100% - 40px)); }
.section-heading { margin-bottom: 36px; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--evergreen);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.container.narrow h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.lead { margin: 20px 0 0; color: var(--muted); font-size: 19px; line-height: 1.55; }
.fine { margin: 26px 0 0; color: var(--muted); font-size: 15px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step { padding-top: 22px; border-top: 2px solid var(--line); }
.step-number {
  display: block;
  margin-bottom: 12px;
  font-family: var(--serif);
  color: var(--clay);
  font-size: 30px;
  line-height: 1;
}
.step h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--muted); font-size: 16.5px; }

.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 56px; }
.faq-item h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.22; letter-spacing: -0.02em; }
.faq-item p { margin: 0; color: var(--muted); font-size: 16.5px; }

.founder-strip { padding: 72px 0; }
.founder-strip .container { text-align: center; }
.founder-quote { margin: 0; }
.founder-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 2.6vw, 31px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.founder-attrib { margin: 22px 0 0; color: var(--muted); font-size: 15px; font-weight: 600; }

/* ---- The close -------------------------------------------------------- */
.signup-section { padding-bottom: 96px; }
.signup-head { margin-bottom: 28px; text-align: center; }
.signup-head h2 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.signup-price {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.price { font-size: 21px; font-weight: 750; letter-spacing: -0.02em; }
.guarantee {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--evergreen-pale);
  color: var(--evergreen-dark);
  font-size: 14px;
  font-weight: 700;
}
.signup-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-intro { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.field { display: grid; gap: 7px; margin-top: 16px; }
.field label { font-size: 15px; font-weight: 750; }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c3bcac;
  border-radius: var(--radius-sm);
}
.field input:hover { border-color: #8d867a; }
.field input:focus { border-color: var(--focus); outline: 3px solid rgba(13, 107, 216, 0.18); }
.consent-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px 14px 14px;
  border-radius: var(--radius-md);
  background: var(--sand-soft);
}
.consent-row input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--evergreen); }
.consent-copy { font-size: 15.5px; line-height: 1.45; color: #3a4642; }
.submit-button {
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--evergreen);
  color: white;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(36, 89, 77, 0.20);
}
.submit-button:hover { background: var(--evergreen-dark); }
.submit-button:disabled { opacity: 0.68; cursor: wait; }
.form-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

.sticky-cta { display: none; }

/* ---- Secondary pages -------------------------------------------------- */
.legal-main { padding: 72px 0 96px; }
.legal-document { width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.legal-document h1 { font-size: clamp(36px, 4.6vw, 52px); line-height: 1.06; }
.legal-meta { margin: 16px 0 42px; color: var(--muted); }
.legal-document h2 { margin: 44px 0 12px; font-size: 27px; letter-spacing: -0.02em; }
.legal-document p, .legal-document li { color: #3a4642; }
.legal-document li + li { margin-top: 10px; }
.privacy-promise {
  margin: 34px 0;
  padding: 24px 26px;
  border: 2px solid var(--evergreen);
  border-radius: var(--radius-md);
  background: var(--evergreen-pale);
  color: var(--evergreen-dark) !important;
  font-size: 20px;
  font-weight: 750;
}
.summary-box { margin: 32px 0; padding: 22px 24px; border-radius: var(--radius-md); background: var(--sand); }
.summary-box p { margin: 0; }
.story-lede { margin: 0 0 32px; font-size: 21px; line-height: 1.5; color: var(--muted) !important; }
.story-signoff { margin: 40px 0 0; padding-top: 26px; border-top: 1px solid var(--line); font-weight: 700; }
.story-cta { margin: 44px 0 0; padding: 32px 34px; border-radius: var(--radius-lg); background: var(--sand); text-align: center; }
.story-cta h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: -0.025em; }
.story-cta p { margin: 0 0 20px; color: var(--muted) !important; }
.story-cta .button {
  display: inline-grid;
  place-items: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 12px;
  background: var(--evergreen);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.story-cta .button:hover { background: var(--evergreen-dark); color: #fff; }

.thanks-main { min-height: calc(100svh - 72px); display: grid; place-items: center; padding: 56px 20px; }
.thanks-card {
  width: min(620px, 100%);
  padding: clamp(32px, 6vw, 60px);
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow);
}
.thanks-check {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--evergreen-pale);
  color: var(--evergreen-dark);
  font-size: 28px;
  font-weight: 800;
}
.thanks-card h1 { font-size: clamp(34px, 5.4vw, 46px); }
.thanks-card p { color: var(--muted); font-size: 18px; }
.text-link { font-weight: 750; }

.site-footer { padding: 34px 0; color: var(--muted); background: var(--sand); border-top: 1px solid var(--line); }
.footer-wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-brand { color: var(--ink); font-weight: 750; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.footer-links a { color: var(--muted); }
.footer-small { width: 100%; margin: 0; font-size: 14px; }

#signup { scroll-margin-top: 90px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .msg { grid-template-rows: 1fr; }
  .js .msg[data-typing] { display: none; }
  .js .msg .bubble { opacity: 1; transform: none; }
}
