:root {
  --canvas: #E4D9C1;
  --paper: #EFE7D3;
  --ink: #2B2A26;
  --ink-soft: #6b6459;
  --moss: #5C6B4F;
  --moss-dark: #3f4a38;
  --blaze: #D97D3D;
  --line: rgba(43,42,38,0.18);
  --line-strong: rgba(43,42,38,0.55);
  --font: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  font-size: 17px;
}
h1, h2, h3 { font-family: var(--font); font-weight: 700; text-wrap: balance; letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
a { color: inherit; }
.shell { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- NAV ---------- */
nav.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(228,217,193,0.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-strong);
}
nav.top .shell { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand svg { width: 24px; height: 24px; flex-shrink: 0; }
.brand span { font-family: var(--font); font-weight: 700; font-size: 21px; }
nav.top .origin { flex: 1; margin: 0 28px; font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1000px) { nav.top .origin { display: none; } }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 15px; font-weight: 700; text-decoration: none; }
.nav-links a:hover { color: var(--moss); }
.btn {
  display: inline-block; font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 10px 18px; border-radius: 6px; background: var(--moss); color: var(--canvas); text-decoration: none;
}
.btn:hover { background: var(--moss-dark); color: var(--canvas); }
.btn:focus-visible { outline: 3px solid var(--blaze); outline-offset: 2px; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- HERO ---------- */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line-strong); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
/* On narrow screens the phone slots in between the lede and the button, so
   the demo is the first thing after the headline. */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-grid > div:first-child { display: contents; }
  .hero h1 { order: 1; }
  .hero p.lede { order: 2; margin-bottom: 0; }
  .hero .phone { order: 3; width: 100%; }
  .hero-ctas { order: 4; }
}
.hero h1 { font-size: clamp(36px, 4.8vw, 56px); margin-bottom: 20px; }
.hero p.lede { font-size: 19px; color: var(--ink-soft); max-width: 48ch; margin: 0 0 30px; }
.hero-ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-ctas .num { font-size: 16px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.hero-ctas .num:hover { color: var(--moss); }

/* phone thread */
.phone {
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px 18px 22px;
  max-width: 380px; margin: 0 auto;
}
.phone .bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.phone .bar .who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.phone .bar .who svg { width: 18px; height: 18px; }
.phone .bar .time { font-size: 13px; color: var(--ink-soft); }
.thread { display: flex; flex-direction: column; gap: 10px; min-height: 296px; transition: opacity 0.4s ease; }
.thread.fade { opacity: 0; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.4; }
.msg.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--moss); color: var(--canvas); border-bottom-right-radius: 4px; }
.msg.appear { animation: msg-in 0.28s ease-out both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.typing { display: flex; gap: 5px; align-items: center; padding: 13px 16px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--canvas); opacity: 0.5; animation: dot 1.1s infinite ease-in-out; }
.msg.typing i:nth-child(2) { animation-delay: 0.18s; }
.msg.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg.appear, .msg.typing i { animation: none; } }

/* ---------- SECTION SCAFFOLD ---------- */
section { padding: 72px 0; border-bottom: 1px solid var(--line-strong); }
.section-head h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); max-width: 58ch; font-size: 17px; margin: 0; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 44px 0 0; padding: 0; list-style: none; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }
.steps li { border-top: 1px solid var(--line-strong); padding-top: 18px; counter-increment: step; }
.steps li::before { content: counter(step) "."; display: block; font-family: var(--font); font-size: 20px; color: var(--blaze); margin-bottom: 10px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { font-size: 16px; color: var(--ink-soft); margin: 0; }

/* before it answers (inverted) */
.safety { background: var(--ink); color: var(--canvas); border-bottom: 1px solid var(--ink); }
.safety .section-head p { color: #cbb98f; }
.safety-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
@media (max-width: 760px) { .safety-grid { grid-template-columns: 1fr; gap: 36px; } }
.safety-list { margin: 0; }
.safety-list > div { padding: 20px 0; border-top: 1px solid rgba(228,217,193,0.25); }
.safety-list > div:first-child { padding-top: 0; border-top: 0; }
.safety-list dt { font-family: var(--font); font-weight: 700; font-size: 21px; margin-bottom: 6px; }
.safety-list dd { margin: 0; font-size: 16px; color: #cbb98f; max-width: 56ch; }

/* sample questions */
.qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 760px) { .qgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .qgrid { grid-template-columns: 1fr; } }
.qcard {
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px 18px;
  font-size: 16px;
}
.qcard .tag { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.qcard .note { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 8px; line-height: 1.45; max-width: 70ch; }
.qcard.wide { grid-column: 1 / -1; }

/* final CTA */
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta-inner .num-big { font-size: 17px; color: var(--ink-soft); margin: 8px 0 0; font-variant-numeric: tabular-nums; }

/* footer */
footer { padding: 40px 0 60px; }
.foot-grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-brand svg { width: 20px; height: 20px; }
.foot-brand span { font-family: var(--font); font-weight: 700; font-size: 17px; }
.foot-links { font-size: 14px; margin: 12px 0 0; }
.foot-links a { font-weight: 700; text-decoration: none; }
.foot-links a:hover { color: var(--moss); }
.foot-legal { font-size: 13.5px; color: var(--ink-soft); max-width: 70ch; line-height: 1.6; margin: 0; }
.foot-legal + .foot-legal { margin-top: 10px; }

/* ---------- LEGAL PAGES ---------- */
.legal { padding: 56px 0 72px; border-bottom: 1px solid var(--line-strong); }
.legal .shell { max-width: 760px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 6px; }
.legal .updated { font-size: 14px; color: var(--ink-soft); margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal p, .legal li { font-size: 16.5px; color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 12px 0 4px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal th { font-size: 14px; font-weight: 700; color: var(--moss-dark); }
.legal .callout { background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.legal .mono { font-weight: 700; }
