:root {
  --cream: #faf8f4;
  --ink: #1a1817;
  --muted: #6b6560;
  --accent: #c66b3d;
  --accent-dark: #a15630;
  --surface: #ffffff;
  --surface-alt: #f0ebe3;
  --border: #e8e3dc;
  --radius: 12px;
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── nav ─────────────────────────────────────────────────────── */
.site-nav { padding: 1.5rem 0; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
  text-decoration: none; color: var(--ink);
}
.nav-inner nav { display: flex; gap: 1.75rem; align-items: center; }
.nav-inner nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  transition: color .15s;
}
.nav-inner nav a:hover { color: var(--ink); }
.nav-inner nav a.btn { color: white; }
@media (max-width: 600px) {
  .nav-inner nav a:not(.btn) { display: none; }
}

/* ─── buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem;
  border-radius: var(--radius); font-weight: 500; font-size: 1rem;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background .15s, transform .15s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; text-align: center; }

/* ─── hero ────────────────────────────────────────────────────── */
.hero { padding: 3rem 0 6rem; }
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 3.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .hero { padding: 4rem 0 7rem; }
}
.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede {
  font-size: 1.15rem; color: var(--muted);
  margin-bottom: 2rem; max-width: 32rem;
}
.fine-print {
  font-size: 0.85rem; color: var(--muted);
  margin-top: 0.85rem;
}

/* ─── chat demo ───────────────────────────────────────────────── */
.chat-window {
  background: var(--surface);
  border-radius: 18px;
  box-shadow:
    0 30px 60px -25px rgba(30, 20, 10, 0.18),
    0 2px 6px rgba(30, 20, 10, 0.04);
  overflow: hidden;
  border: 1px solid var(--border);
}
.chat-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem;
  background: #fbfaf7;
}
.chat-header .dot { width: 11px; height: 11px; border-radius: 50%; background: #e6e1da; }
.chat-header .dot:nth-child(1) { background: #f56a5f; }
.chat-header .dot:nth-child(2) { background: #f5c04f; }
.chat-header .dot:nth-child(3) { background: #61c554; }
.chat-title {
  margin-left: 0.75rem;
  font-size: 0.85rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.messages {
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
  min-height: 380px;
}
.msg {
  max-width: 85%;
  opacity: 0;
  animation: popIn .4s cubic-bezier(.2, .7, .3, 1) forwards;
}
.msg p {
  padding: 0.65rem 0.95rem;
  border-radius: 18px;
  font-size: 0.95rem; line-height: 1.45;
}
.msg-out { align-self: flex-end; }
.msg-out p {
  background: var(--accent); color: white;
  border-bottom-right-radius: 5px;
}
.msg-in { align-self: flex-start; }
.msg-in p {
  background: var(--surface-alt); color: var(--ink);
  border-bottom-left-radius: 5px;
}

.msg:nth-child(1) { animation-delay: 0.4s; }
.msg:nth-child(2) { animation-delay: 1.1s; }
.msg:nth-child(3) { animation-delay: 2.0s; }
.msg:nth-child(4) { animation-delay: 2.8s; }
.msg:nth-child(5) { animation-delay: 3.7s; }
.msg:nth-child(6) { animation-delay: 4.5s; }

.msg.typing p {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 0.85rem 1rem;
}
.msg.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted); opacity: 0.4;
  animation: bounce 1.3s infinite;
}
.msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.msg.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0);    opacity: 0.35; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* ─── how it works ────────────────────────────────────────────── */
.how { padding: 5rem 0; border-top: 1px solid var(--border); }
.how h2, .pricing h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  text-align: center;
  font-weight: 600;
  margin-bottom: 3rem;
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}
.step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600; color: var(--accent);
  margin-bottom: 1rem;
}
.steps h3 {
  font-size: 1.15rem; font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.steps p { color: var(--muted); }

/* ─── examples (before/after) ─────────────────────────────────── */
.examples { padding: 5rem 0; border-top: 1px solid var(--border); }
.examples h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  text-align: center;
  font-weight: 600;
}
.examples-sub {
  text-align: center; color: var(--muted);
  margin-top: 1rem; margin-bottom: 3.5rem;
}
.ba-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 960px;
  margin: 0 auto;
}
.ba-item figcaption {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.ba {
  position: relative;
  aspect-ratio: 1400 / 900;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px -25px rgba(30, 20, 10, 0.2);
  cursor: ew-resize;
  user-select: none;
  background: var(--surface-alt);
  touch-action: none; /* let our pointer handlers win on touch */
}
.ba-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.ba-before-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  will-change: clip-path;
}
.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  background: white;
  transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(30, 20, 10, 0.2);
  pointer-events: none;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  border: 0;
  box-shadow: 0 4px 14px rgba(30, 20, 10, 0.25);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: ew-resize;
  transition: transform .15s, box-shadow .15s;
}
.ba-handle:hover { box-shadow: 0 6px 18px rgba(30, 20, 10, 0.3); }
.ba-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.ba-handle svg { display: block; }
.ba-label {
  position: absolute;
  top: 0.9rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.ba-label-before {
  left: 0.9rem;
  background: rgba(26, 24, 23, 0.7);
  color: white;
}
.ba-label-after {
  right: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

/* ─── pricing ─────────────────────────────────────────────────── */
.pricing { padding: 5rem 0 6rem; border-top: 1px solid var(--border); }
.pricing-sub {
  text-align: center; color: var(--muted);
  margin-top: -2rem; margin-bottom: 3rem;
}
.price-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px -20px rgba(30, 20, 10, 0.1);
}
.price { text-align: center; margin-bottom: 2rem; }
.price .currency {
  font-size: 1.5rem; color: var(--muted);
  vertical-align: top;
  position: relative; top: 0.6rem;
}
.price .amount {
  font-size: 4rem; font-weight: 700;
  letter-spacing: -0.04em;
}
.price .period { font-size: 1.05rem; color: var(--muted); }
.features { list-style: none; margin-bottom: 2rem; }
.features li {
  padding: 0.55rem 0 0.55rem 1.75rem;
  position: relative;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.features li:last-child { border-bottom: 0; }
.features li::before {
  content: "";
  position: absolute;
  left: 0; top: 1rem;
  width: 0.75rem; height: 0.4rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ─── /start page ─────────────────────────────────────────────── */
.start-main { padding: 3rem 0 6rem; }
.start-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px -20px rgba(30, 20, 10, 0.1);
}
.start-card h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.start-card .lede {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(198, 107, 61, 0.15);
}
.field input.has-error {
  border-color: #c04646;
  background: #fdf5f4;
}
.field-error {
  display: block;
  min-height: 1.2em;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #c04646;
}
.form-error {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  background: #fdf5f4;
  color: #c04646;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}
.start-card .fine-print {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.start-success { text-align: center; }
.success-check {
  width: 60px; height: 60px;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(198, 107, 61, 0.12);
  color: var(--accent);
}
.start-success .btn { margin-top: 1rem; }

/* ─── footer ──────────────────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
footer a { text-decoration: none; color: var(--muted); transition: color .15s; }
footer a:hover { color: var(--ink); }
