:root {
  --ink: #10251f;
  --ink-soft: #29443b;
  --paper: #f4f0e7;
  --paper-deep: #e9e2d4;
  --white: #fffdf8;
  --mint: #a8d8bf;
  --mint-strong: #4f9c75;
  --coral: #e56f54;
  --line: rgba(16, 37, 31, .16);
  --shadow: 0 28px 70px rgba(16, 37, 31, .16);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--paper); background: var(--ink); font-family: Georgia, serif; font-size: 21px; font-style: italic;
}
.brand-word { font-weight: 760; letter-spacing: -.035em; font-size: 20px; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
}

.intake { padding: 20px 0; }
.eyebrow {
  margin: 0 0 18px; color: var(--coral); font-size: 12px; font-weight: 780;
  letter-spacing: .14em; text-transform: uppercase;
}
h1 {
  margin: 0; max-width: 640px; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6.2vw, 78px); font-weight: 500; line-height: .96; letter-spacing: -.052em;
}
.intro { max-width: 570px; margin: 24px 0 30px; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }

.intake-form { margin-top: 30px; }
.intake-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 760; }
textarea {
  display: block; width: 100%; min-height: 145px; resize: vertical; border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 19px; color: var(--ink); background: rgba(255, 253, 248, .84);
  font-size: 16px; line-height: 1.55; box-shadow: 0 8px 26px rgba(16, 37, 31, .045);
}
textarea::placeholder, input::placeholder { color: #76867f; }
textarea:focus, input:focus { outline: 3px solid rgba(79, 156, 117, .22); border-color: var(--mint-strong); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; }
.field-note { color: #687a72; font-size: 12px; }
.form-row button {
  flex: 0 0 auto; border: 0; border-radius: 999px; padding: 13px 19px; cursor: pointer;
  color: var(--paper); background: var(--ink); font-weight: 740; box-shadow: 0 8px 20px rgba(16, 37, 31, .18);
}
.form-row button:hover { background: #1d3a31; transform: translateY(-1px); }
.form-row button:disabled, .chat-form button:disabled { cursor: wait; opacity: .58; transform: none; }

.rail-line { display: flex; align-items: center; gap: 10px; margin-top: 30px; color: #60736a; font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .09em; }
.rail-line i { width: 28px; height: 1px; background: var(--line); }
.demo-reset { margin-top: 23px; padding: 0; border: 0; border-bottom: 1px solid currentColor; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 13px; }
.status-line { min-height: 20px; margin: 10px 0 0; color: #9c3f2d; font-size: 13px; }

.agent-stage {
  position: relative; min-height: 640px; padding: 24px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 30px; color: var(--paper);
  background: var(--ink); box-shadow: var(--shadow);
}
.agent-stage::after {
  content: ""; position: absolute; z-index: 0; width: 230px; height: 230px; right: -100px; top: 120px;
  border: 44px solid rgba(168, 216, 191, .08); border-radius: 50%; pointer-events: none;
}
.stage-top, .agent-description, .conversation, .suggestions, .chat-form, .chat-status { position: relative; z-index: 1; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.agent-identity { display: flex; align-items: center; gap: 13px; }
.agent-avatar { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--mint); color: var(--ink); font-family: Georgia, serif; font-size: 24px; }
.live-label { margin: 0 0 3px; color: #bfd1c8; font-size: 11px; font-weight: 730; text-transform: uppercase; letter-spacing: .1em; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #77d69e; box-shadow: 0 0 0 4px rgba(119, 214, 158, .12); }
h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.demo-pill { border: 1px solid rgba(244, 240, 231, .24); border-radius: 999px; padding: 6px 10px; color: #c8d7d0; font-size: 10px; font-weight: 740; letter-spacing: .1em; text-transform: uppercase; }
.demo-pill.hidden { visibility: hidden; }
.agent-description { margin: 19px 0 15px; color: #b7c8c0; font-size: 13px; line-height: 1.5; }

.conversation {
  height: 390px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px;
  padding: 18px 5px 18px 0; scrollbar-width: thin; scrollbar-color: #476057 transparent;
}
.message { max-width: 84%; padding: 13px 15px; border-radius: 17px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.assistant { align-self: flex-start; color: var(--ink); background: var(--paper); border-bottom-left-radius: 5px; }
.message.user { align-self: flex-end; color: #ecf6f0; background: #36584c; border-bottom-right-radius: 5px; }
.message.pending { color: #d5e0db; background: #29443b; }
.loading-card { margin: auto; color: #a8bbb2; font-size: 13px; }

.suggestions { display: flex; gap: 7px; min-height: 34px; overflow-x: auto; padding-bottom: 3px; }
.suggestions button { flex: 0 0 auto; border: 1px solid rgba(244, 240, 231, .18); border-radius: 999px; padding: 8px 11px; color: #d7e4de; background: transparent; cursor: pointer; font-size: 11px; }
.suggestions button:hover { border-color: var(--mint); color: var(--mint); }

.chat-form { display: flex; gap: 9px; margin-top: 12px; padding: 7px; border: 1px solid rgba(244, 240, 231, .17); border-radius: 17px; background: rgba(255, 255, 255, .055); }
.chat-form input { min-width: 0; flex: 1; border: 0; padding: 10px 9px; color: var(--paper); background: transparent; font-size: 14px; }
.chat-form input:focus { outline: 0; }
.chat-form button { border: 0; border-radius: 12px; padding: 10px 15px; color: var(--ink); background: var(--mint); font-weight: 770; cursor: pointer; }
.chat-status { min-height: 18px; margin: 7px 3px 0; color: #f0aa98; font-size: 12px; }

footer {
  width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 34px;
  display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); color: #62746c; font-size: 11px;
}
.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; }

@media (max-width: 900px) {
  .page-shell { grid-template-columns: 1fr; padding-top: 42px; }
  .intake { max-width: 690px; }
  .agent-stage { min-height: 610px; }
}

@media (max-width: 560px) {
  .site-header, .page-shell, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 74px; }
  .page-shell { padding: 34px 0 48px; gap: 34px; }
  h1 { font-size: 47px; }
  .intro { font-size: 16px; }
  .form-row { align-items: stretch; flex-direction: column; }
  .form-row button { width: 100%; }
  .rail-line { gap: 6px; font-size: 9px; }
  .rail-line i { width: 15px; }
  .agent-stage { min-height: 590px; padding: 18px; border-radius: 23px; }
  .conversation { height: 370px; }
  .message { max-width: 90%; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .form-row button, .suggestions button { transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease; }
  .message { animation: rise .22s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
