:root {
  --bg: #FAF8F5;
  --bg-alt: #F2EEE8;
  --fg: #1A1714;
  --fg-muted: #6B6460;
  --rose: #C4404F;
  --rose-light: #E8D0D4;
  --rose-dark: #9B2E3A;
  --cream: #FAF8F5;
  --charcoal: #2E2A27;
  --border: #DDD8D2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, blockquote {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 48px 100px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse at center, #F5E8EA 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 24px;
}

.hero-text h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 28px;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--rose);
}

.lede {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
}

/* Agent orbit visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.agent-orbit {
  position: relative;
  width: 340px;
  height: 340px;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.orbit-ring-1 { width: 180px; height: 180px; }
.orbit-ring-2 { width: 270px; height: 270px; border-color: var(--rose-light); }
.orbit-ring-3 { width: 340px; height: 340px; border-style: dashed; border-color: var(--border); opacity: 0.5; }

.agent-node {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.04em;
}
.agent-a {
  background: var(--rose);
  color: white;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 8px 32px rgba(196, 64, 79, 0.35);
}
.agent-b {
  background: var(--charcoal);
  color: white;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.connection-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 100px;
  background: linear-gradient(to bottom, var(--rose), transparent);
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: center top;
  opacity: 0;
}

/* ── HOW IT WORKS ── */
.howitworks {
  background: var(--charcoal);
  color: white;
  padding: 100px 48px;
}

.hiw-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 64px;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.step-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--rose);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.step h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: white;
}

.step p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}

.step-divider {
  width: 1px;
  background: rgba(255,255,255,0.12);
  height: 120px;
  margin: 0 40px;
  align-self: center;
}

/* ── FEATURES ── */
.features {
  padding: 100px 48px;
  background: var(--bg);
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-row--alt {
  direction: rtl;
}
.feature-row--alt > * {
  direction: ltr;
}

.feature-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 16px;
}

.feature-row h3 {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.feature-row p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Calendar widget */
.calendar-widget {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.cw-header {
  margin-bottom: 20px;
}
.cw-month {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--charcoal);
}

.cw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}
.cw-day {
  font-size: 13px;
  color: var(--fg-muted);
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
}
.cw-label { font-size: 11px; font-weight: 500; color: var(--border); letter-spacing: 0.08em; text-transform: uppercase; }

.cw-event {
  background: var(--rose-light);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cw-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
}
.cw-event-info { display: flex; flex-direction: column; }
.cw-event-title { font-size: 12px; font-weight: 500; color: var(--rose-dark); }
.cw-event-time { font-size: 11px; color: var(--fg-muted); }

/* ── MANIFESTO ── */
.manifesto {
  background: var(--rose);
  color: white;
  padding: 100px 48px;
}

.manifesto-inner {
  max-width: 800px;
  margin: 0 auto;
}

.manifesto blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.55;
  font-weight: 400;
  color: white;
  position: relative;
  padding-left: 32px;
}
.manifesto blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
}

/* ── CLOSING ── */
.closing {
  background: var(--bg-alt);
  padding: 100px 48px;
  text-align: center;
}

.closing-inner {
  max-width: 640px;
  margin: 0 auto;
}

.closing h2 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 24px;
}

.closing p {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ── FOOTER ── */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.4);
  padding: 40px 48px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}
.footer-tagline { font-size: 0.875rem; }
.footer-note { font-size: 0.8125rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { padding: 80px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .agent-orbit { width: 240px; height: 240px; }
  .orbit-ring-1 { width: 120px; height: 120px; }
  .orbit-ring-2 { width: 190px; height: 190px; }
  .orbit-ring-3 { width: 240px; height: 240px; }

  .steps-grid { grid-template-columns: 1fr; gap: 40px; }
  .step-divider { display: none; }
  .howitworks { padding: 80px 24px; }

  .feature-row, .feature-row--alt { grid-template-columns: 1fr; direction: ltr; gap: 40px; }
  .features { padding: 80px 24px; }

  .manifesto { padding: 80px 24px; }
  .manifesto blockquote { font-size: 1.25rem; }

  .closing { padding: 80px 24px; }
  .closing h2 { font-size: 2rem; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 375px) {
  .hero-text h1 { font-size: 2.25rem; }
  .closing h2 { font-size: 1.75rem; }
}

/* ══════════════════════════════════════════
   APP — onboarding, chat, match reveal
   ══════════════════════════════════════════ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Auth / Signup ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.auth-card .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.auth-card .tagline {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  margin-bottom: 36px;
}

.auth-card input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--rose);
}

.auth-card button {
  width: 100%;
  padding: 14px;
  background: var(--rose);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-card button:hover { background: var(--rose-dark); }

.auth-error {
  color: var(--rose);
  font-size: 0.875rem;
  margin-top: -8px;
  margin-bottom: 12px;
}

/* ── Onboarding Chat ── */
.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
}

.chat-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

.chat-header .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal);
}

.chat-header .status-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--rose-light);
  color: var(--rose-dark);
  font-weight: 500;
}

.chat-header .status-badge.done {
  background: #d4edda;
  color: #155724;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 68%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.chat-message.user {
  background: var(--rose);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-message.ai {
  background: var(--bg-alt);
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message .sender-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.chat-input-area {
  padding: 20px 32px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 0.9375rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--rose);
}

.chat-input-area button {
  padding: 12px 24px;
  background: var(--rose);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.chat-input-area button:disabled {
  background: var(--border);
  cursor: not-allowed;
}

/* ── Profile Complete Banner ── */
.profile-complete-banner {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: white;
  padding: 20px 32px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ── Match Reveal ── */
.match-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.match-card {
  background: white;
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  text-align: center;
}

.match-card .match-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 20px;
}

.match-card .match-score {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 8px;
}

.match-card .match-label {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.match-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.match-card p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 32px;
}

.match-card .cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--rose);
  color: white;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.match-card .simulate-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--charcoal);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif;
}

/* ── Dashboard ── */
.dashboard-page {
  min-height: 100vh;
  background: var(--bg);
}

.dashboard-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header .brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--charcoal);
}

.dashboard-header .user-email {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.dashboard-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 32px;
}

.dashboard-section {
  margin-bottom: 48px;
}

.dashboard-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 24px;
}

.match-row {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  gap: 20px;
}

.match-score-pill {
  background: var(--rose-light);
  color: var(--rose-dark);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.match-info {
  flex: 1;
}

.match-info .match-name {
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.match-info .match-date {
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--fg-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 8px;
}