/* ============ Merchat landing — design tokens ============ */
:root {
  --ink: #11241c;
  --ink-soft: #3d544a;
  --cream: #faf6ef;
  --cream-deep: #f1ead9;
  --green: #0b3d2e;
  --green-deep: #072b20;
  --lime: #c5f467;
  --lime-soft: #e4fbb0;
  --white: #ffffff;
  --radius: 18px;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow: 0 18px 50px -18px rgba(11, 61, 46, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; }
h1 em, h2 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--lime) 0%, #8ee05f 100%);
  border-radius: 0.3em;
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.container { width: min(1120px, 92vw); margin-inline: auto; }
.container-narrow { width: min(760px, 92vw); }
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-sub { color: var(--ink-soft); max-width: 46ch; margin-top: 0.8rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--lime-soft);
  border: 1px solid rgba(11, 61, 46, 0.15);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.1rem;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px) scale(1.015); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn-primary { background: var(--green); color: var(--white); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--green); border: 1.5px solid rgba(11, 61, 46, 0.35); }
.btn-ghost:hover { border-color: var(--green); background: rgba(11, 61, 46, 0.05); }
.btn-lime { background: var(--lime); color: var(--green-deep); box-shadow: 0 18px 50px -18px rgba(197, 244, 103, 0.5); }
.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.btn-block { justify-content: center; width: 100%; }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11, 61, 46, 0.08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; }
.nav nav { display: flex; gap: 1.6rem; }
.nav nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav nav a:hover { color: var(--green); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--green);
  text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; color: var(--green); }

/* ============ Hero ============ */
.hero { position: relative; padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 50ch; margin-top: 1.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-note { margin-top: 1.2rem; font-size: 0.9rem; color: var(--ink-soft); }
.hero-blob {
  position: absolute;
  top: -180px;
  right: -220px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--lime-soft) 0%, rgba(197, 244, 103, 0.25) 45%, transparent 70%);
  filter: blur(8px);
  z-index: -1;
  animation: blob-drift 14s ease-in-out infinite alternate;
}
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 50px) scale(1.12); }
}

/* ---- Phone / chat demo ---- */
.phone {
  background: var(--green-deep);
  border-radius: 34px;
  padding: 0.9rem;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  max-width: 380px;
  justify-self: center;
  width: 100%;
  transform: rotate(1.6deg);
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem 0.8rem;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
}
.phone-name small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--lime); }
.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-deep);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
}
.chat {
  background: #e9e2d4;
  border-radius: 24px;
  padding: 1rem 0.85rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 360px;
}
.bubble {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
}
.chat.play .bubble { animation: bubble-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
.chat.play .bubble:nth-child(1) { animation-delay: 0.4s; }
.chat.play .bubble:nth-child(2) { animation-delay: 1.5s; }
.chat.play .bubble:nth-child(3) { animation-delay: 2.4s; }
.chat.play .bubble:nth-child(4) { animation-delay: 3.8s; }
.chat.play .bubble:nth-child(5) { animation-delay: 5s; }
.chat.play .bubble.typing { animation-delay: 6s; }
@keyframes bubble-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.from-customer { align-self: flex-end; background: #d3f8c0; border-bottom-right-radius: 4px; }
.from-bot { align-self: flex-start; background: var(--white); border-bottom-left-radius: 4px; }
.product-card { display: flex; gap: 0.6rem; align-items: flex-start; }
.pc-img {
  font-size: 1.7rem;
  background: var(--cream-deep);
  border-radius: 10px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pc-body { display: flex; flex-direction: column; gap: 0.15rem; }
.pc-body s { color: #97a39b; font-size: 0.8rem; }
.pc-body b { color: var(--green); }
.pc-btn {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0a7a5c;
  border-top: 1px solid #eee7da;
  padding-top: 0.35rem;
}
.bubble.typing { display: inline-flex; gap: 4px; align-self: flex-start; background: var(--white); padding: 0.75rem 0.9rem; }
.bubble.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa79f;
  animation: typing-dot 1.1s infinite ease-in-out;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* ============ Marquee ============ */
.marquee { background: var(--green); overflow: hidden; padding: 0.9rem 0; transform: rotate(-1deg) scale(1.02); }
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.marquee-track i { color: var(--lime); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Features ============ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.8rem;
}
.feature {
  background: var(--white);
  border: 1px solid rgba(11, 61, 46, 0.08);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.f-icon {
  font-size: 1.6rem;
  background: var(--lime-soft);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.93rem; color: var(--ink-soft); }

/* ============ Steps (dark) ============ */
.section-dark { background: var(--green-deep); color: var(--cream); border-radius: 42px; margin-inline: max(0.8rem, 2vw); }
.section-dark .eyebrow { background: rgba(197, 244, 103, 0.14); color: var(--lime); border-color: rgba(197, 244, 103, 0.3); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.8rem;
  list-style: none;
  counter-reset: step;
}
.step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
}
.step-n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--green-deep);
  background: var(--lime);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.93rem; color: rgba(250, 246, 239, 0.75); }

/* ============ Pricing ============ */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 1.4rem;
  margin-top: 2.8rem;
}
.plan {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(11, 61, 46, 0.1);
  border-radius: 24px;
  padding: 2.1rem 1.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan-featured { background: var(--green); color: var(--cream); border-color: var(--green); }
.plan-badge {
  position: absolute;
  top: -14px;
  right: 22px;
  background: var(--lime);
  color: var(--green-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
.plan h3 { font-size: 1.5rem; }
.plan-tag { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.2rem; }
.plan-featured .plan-tag { color: rgba(250, 246, 239, 0.7); }
.plan-price { font-family: var(--font-display); margin-top: 1.2rem; font-weight: 600; }
.plan-price span { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; }
.plan-alt { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.plan-featured .plan-alt { color: rgba(250, 246, 239, 0.7); }
.plan ul { list-style: none; display: grid; gap: 0.55rem; margin-bottom: 1.8rem; }
.plan li { padding-left: 1.6rem; position: relative; font-size: 0.95rem; }
.plan li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; color: #0a7a5c; }
.plan-featured li::before { color: var(--lime); }
.plan-featured .btn-primary { background: var(--lime); color: var(--green-deep); }
.plans-note { text-align: center; margin-top: 2rem; font-size: 0.92rem; color: var(--ink-soft); }

/* ============ FAQ ============ */
.section-tint { background: var(--cream-deep); }
.faq { margin-top: 2.4rem; display: grid; gap: 0.8rem; }
.faq details {
  background: var(--white);
  border: 1px solid rgba(11, 61, 46, 0.1);
  border-radius: 14px;
  padding: 1.05rem 1.3rem;
}
.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--green); transition: transform 0.25s ease; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ============ Final CTA + footer ============ */
.cta-final { text-align: center; }
.cta-final h2 { margin-bottom: 2rem; }
.footer { border-top: 1px solid rgba(11, 61, 46, 0.1); padding: 2.4rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.footer nav a:hover { color: var(--green); }
.footer p { font-size: 0.85rem; color: var(--ink-soft); }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone { transform: rotate(0deg); }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .nav nav { display: none; }
}
@media (max-width: 600px) {
  .features, .steps { grid-template-columns: 1fr; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chat .bubble { opacity: 1; transform: none; animation: none !important; }
  .marquee-track, .hero-blob, .bubble.typing span { animation: none !important; }
  .btn, .feature, .plan { transition: none; }
}
