:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --border: #DDE3D6;
  --border-subtle: #ECF0E8;
  --ink: #1F2933;
  --ink-light: #2D3D4A;
  --text-2: #5A6470;
  --text-3: #96A0A8;
  --accent: #A3B18A;
  --accent-light: #E4EBD9;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-light); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-light); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 72px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--accent-light);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: #7d8f60; }
.lede {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 32rem;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.85rem; color: var(--text-3); }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.closet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.closet-item strong { display: block; font-size: 0.95rem; }
.closet-item span { font-size: 0.8rem; color: var(--text-3); }
.closet-item > div:nth-child(2) { flex: 1; }
.swatch { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; }
.tag {
  background: var(--accent-light);
  color: #55663d;
  font-size: 0.72rem !important;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.match-banner {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 10px; }
.section-sub { color: var(--text-2); font-size: 1.05rem; margin-bottom: 44px; max-width: 38rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.section-alt .card { background: var(--bg); }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { font-size: 0.93rem; color: var(--text-2); }
.icon { font-size: 1.6rem; margin-bottom: 12px; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent-light);
  color: #55663d;
  font-weight: 700;
  margin-bottom: 14px;
}

.pro-pill {
  display: inline-block;
  vertical-align: middle;
  background: var(--ink);
  color: #fff;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  margin-left: 6px;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  align-items: start;
}
.price-card { padding: 34px; position: relative; }
.price-card h3 { font-size: 1.5rem; margin-bottom: 6px; }
.price-tag { font-size: 1.5rem; font-weight: 700; margin-bottom: 22px; font-family: 'Fraunces', Georgia, serif; }
.price-tag span { font-size: 0.9rem; font-weight: 500; color: var(--text-3); font-family: 'Public Sans', sans-serif; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.checks li {
  padding-left: 28px;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-2);
}
.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #55663d;
  font-weight: 700;
}
.checks li strong { color: var(--ink); }
.price-note { font-size: 0.8rem; color: var(--text-3); }
.price-card-pro {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.ribbon {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--accent);
  color: #2b331d;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.sparkle { font-style: normal; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--text-3);
}
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 22px 18px; color: var(--text-2); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; }
.cta-inner { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9d2c4; margin: 10px 0 26px; }
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  line-height: 0;
  border-radius: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.cta-note { font-size: 0.85rem; color: #96a390 !important; margin-top: 20px !important; }

/* ---------- Footer ---------- */
.footer { padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.3);
  z-index: 90;
  transition: transform 0.15s ease;
}
.chat-fab:hover { transform: scale(1.06); }

.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(31, 41, 51, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 95;
}
.chat-panel[hidden] { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink);
  color: #fff;
}
.chat-header strong { display: block; font-size: 0.98rem; }
.chat-status { font-size: 0.75rem; color: #b9c4b0; }
.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-bot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.msg-user {
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.msg-error { background: #fdf0ee; border: 1px solid #ecc8c1; color: #8c2f1b; align-self: flex-start; }

.typing {
  display: inline-flex;
  gap: 5px;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 14px 16px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text-3);
  animation: bounce 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}
.chat-input-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg);
}
.chat-input-row input:focus { border-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0; }
  .footer-inner { flex-direction: column; gap: 6px; }
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal .updated {
  color: var(--text-3);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; font-family: 'Public Sans', sans-serif; font-weight: 700; }
.legal p, .legal li { color: var(--ink-light); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 16px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal strong { color: var(--ink); }

/* Summary callout at the top of each legal page */
.legal-summary {
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 8px;
}
.legal-summary p:last-child { margin-bottom: 0; }

/* Data tables — scroll rather than break the page on narrow screens */
.legal-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 520px; }
.legal th, .legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.legal th { font-weight: 700; color: var(--ink); background: var(--surface); }

.legal-nav { margin-bottom: 24px; font-size: 0.9rem; }
.legal-nav a { color: var(--text-2); text-decoration: none; }
.legal-nav a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 640px) {
  .legal { padding: 36px 18px 56px; }
  .legal h1 { font-size: 1.8rem; }
  .footer-inner { flex-direction: column; gap: 8px; }
}
