:root {
  --bg: #f5f1e8;
  --bg-soft: #fbf8f2;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --line: rgba(31, 41, 55, 0.12);
  --accent: #5c4632;
  --accent-2: #8a6a47;
  --paper: rgba(255,255,255,0.72);
  --shadow: 0 20px 60px rgba(54, 42, 28, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(138, 106, 71, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(92, 70, 50, 0.10), transparent 26%),
    linear-gradient(180deg, #f7f3eb 0%, #efe8db 100%);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.eyebrow, .section-kicker, .hero-card-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 10px;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 0;
  line-height: 1.05;
}

h1 { font-size: clamp(54px, 9vw, 96px); }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
h3 { font-size: 28px; margin-bottom: 14px; }

.subtitle {
  font-size: clamp(18px, 2.3vw, 22px);
  line-height: 1.6;
  max-width: 760px;
  color: var(--ink-soft);
}

.hero-notes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-notes span {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(92, 70, 50, 0.12);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-card-inner, .demo-section, .info-card, .essay { padding: 28px; }

.hero-card p:last-child,
.info-card p:last-child,
.essay p:last-child { margin-bottom: 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.section-head.narrow { align-items: flex-end; }

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  max-height: 560px;
  overflow: auto;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
}

.message {
  max-width: min(86%, 760px);
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.message.bot {
  align-self: flex-start;
  background: linear-gradient(180deg, #fffefb 0%, #f5efe4 100%);
  border: 1px solid rgba(92, 70, 50, 0.12);
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(180deg, #6f5339 0%, #59422e 100%);
  color: white;
}

.message-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 8px;
  opacity: 0.75;
}

.chat-form { margin-top: 18px; }
textarea {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  color: inherit;
  background: rgba(255,255,255,0.85);
}
textarea:focus {
  outline: 2px solid rgba(138,106,71,0.3);
  border-color: rgba(138,106,71,0.5);
}

.chat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.primary-button, .ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary-button {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: white;
}
.ghost-button {
  background: rgba(255,255,255,0.8);
  color: var(--accent);
  border: 1px solid rgba(92,70,50,0.14);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.essay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

p, li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

ul { margin: 0; padding-left: 20px; }
.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: 920px) {
  .hero, .info-grid, .essay-grid { grid-template-columns: 1fr; }
  .page { width: min(100% - 20px, 1120px); padding-top: 20px; }
  .hero-card-inner, .demo-section, .info-card, .essay { padding: 22px; }
}

@media (max-width: 640px) {
  .chat-window { min-height: 300px; padding: 14px; }
  .message { max-width: 100%; }
  .chat-actions, .section-head { flex-direction: column; align-items: stretch; }
  .primary-button, .ghost-button { width: 100%; }
  h1 { letter-spacing: -0.03em; }
  p, li { font-size: 16px; }
}
