:root {
  --bg: #fbfaf7;
  --bg-alt: #f2efe8;
  --surface: #ffffff;
  --text: #1b1f1d;
  --muted: #5c645f;
  --border: #e2ddd2;
  --accent: #0f766e;
  --accent-hover: #0b5f58;
  --accent-soft: #e5f3f0;
  --on-accent: #ffffff;
  --error: #b3261e;
  --error-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 24px rgba(20, 30, 25, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121514;
    --bg-alt: #181c1a;
    --surface: #1e2321;
    --text: #eef1ef;
    --muted: #a3aca7;
    --border: #2d3431;
    --accent: #3fbfae;
    --accent-hover: #63cfc1;
    --accent-soft: #14302c;
    --on-accent: #04201c;
    --error: #ff8a80;
    --error-soft: #3a1f1d;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .1em .4em;
  border-radius: 6px;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text); text-decoration: none; }
/* Logo (brand/make_logo.py in the app repo): colors follow the theme. */
.brand-logo { display: block; height: 30px; width: auto; }
.lg-fill { fill: var(--accent); }
.lg-on { stroke: var(--on-accent); }
.lg-te { stroke: var(--accent); }
.lg-rest { stroke: var(--text); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 599px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 600; font-size: 1rem;
  color: var(--on-accent); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding: 64px 0 56px; }
@media (min-width: 800px) { .hero { padding: 104px 0 88px; } }
.hero-inner > h1 { max-width: 820px; }
.eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: .85rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
}
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
@media (max-width: 479px) { .hero-actions .btn { width: 100%; } }
.fine { font-size: .9rem; color: var(--muted); }

/* Hero chat demo: copy and chat side by side on desktop, chat below the copy on phones. */
.hero-chat { margin-top: 48px; }
@media (min-width: 900px) {
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
  .hero-chat { margin-top: 0; padding: 0 16px; }
}

/* WhatsApp chat demo, ported from the app's components/home/ChatDemo.tsx.
   Fixed colors on purpose: it looks like WhatsApp in both themes, as in the app. */
.chat-demo {
  position: relative; width: 100%; max-width: 24rem; margin: 0 auto; padding: .5rem;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(11, 79, 74, .1);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.chat-head {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
  background: #075e54; color: #fff; border-radius: 1.6rem 1.6rem 0 0;
}
.chat-avatar {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255, 255, 255, .2); font-size: .875rem; line-height: 1.25rem; font-weight: 700;
}
.chat-who { flex: 1; min-width: 0; }
.chat-name { display: block; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.chat-status { display: block; font-size: .75rem; line-height: 1rem; color: rgba(255, 255, 255, .7); }
.chat-body {
  display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem;
  height: 26rem; overflow: hidden; padding: 1rem .75rem;
  background: #ece5dd; border-radius: 0 0 1.6rem 1.6rem;
}
.chat-msg {
  max-width: 82%; padding: .5rem .75rem; border-radius: .75rem;
  font-size: 13px; line-height: 1.375; color: #262626;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
}
.chat-msg b { font-weight: 600; }
.chat-msg-shop { align-self: flex-end; background: #d9fdd3; border-top-right-radius: .25rem; }
.chat-msg-customer { align-self: flex-start; background: #fff; border-top-left-radius: .25rem; }
.chat-card {
  display: block; margin-bottom: .375rem; padding: .375rem .5rem;
  background: rgba(255, 255, 255, .7); border-left: 4px solid #0f766e; border-radius: .5rem;
}
.chat-card-title { display: block; font-size: .75rem; line-height: 1rem; font-weight: 600; color: #171717; }
.chat-card-sub { display: block; font-size: 11px; color: #737373; }
.chat-time { display: inline-block; margin-left: .5rem; transform: translateY(.125rem); font-size: 10px; color: #737373; }
.chat-ticks { margin-left: .125rem; color: #00a6f4; }
.chat-typing { display: flex; gap: .25rem; padding: .75rem; }
.chat-typing span {
  width: .375rem; height: .375rem; border-radius: 50%; background: #a1a1a1;
  animation: chat-bounce 1s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 120ms; }
.chat-typing span:nth-child(3) { animation-delay: 240ms; }
@keyframes chat-bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); }
  50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); }
}
.chat-badge {
  position: absolute; display: none; padding: .5rem .75rem;
  background: #fff; border-radius: 1rem;
  font-size: .75rem; line-height: 1rem; font-weight: 600; color: #262626;
  box-shadow: 0 0 0 1px #e5e5e5, 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
}
@media (min-width: 640px) { .chat-badge { display: block; } }
.chat-badge-paid { left: -1rem; top: 6rem; }
.chat-badge-amount { display: block; font-size: 1rem; line-height: 1.5rem; color: #0f766e; }
.chat-badge-agenda { right: -2.5rem; bottom: 1.5rem; animation-delay: 1.5s; }
.chat-badge-sub { display: block; font-size: 11px; font-weight: 400; color: #737373; }

@keyframes home-pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.home-pop { animation: home-pop 280ms ease-out both; }
@keyframes home-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.home-float { animation: home-float 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .home-pop, .home-float, .chat-typing span { animation: none; }
}
.center { text-align: center; }

/* Sections */
.section { padding: 64px 0; scroll-margin-top: 64px; }
@media (min-width: 800px) { .section { padding: 88px 0; } }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); margin-bottom: 28px; }
.section h2 + .steps, .section h2 + .benefits { margin-top: 28px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step p { color: var(--muted); margin: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-weight: 700;
}

/* Benefits */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px 32px; }
@media (min-width: 640px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
.benefits li { padding-left: 18px; border-left: 3px solid var(--accent); }
.benefits p { color: var(--muted); margin: 0; }

/* Plans */
.offer {
  margin: 0 0 28px; padding: 12px 16px;
  background: var(--accent-soft); color: var(--text);
  border-radius: 10px; font-size: .98rem;
}
.offer strong { color: var(--accent); }
.plans { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px 24px;
}
.plan-featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan-tag {
  position: absolute; top: -13px; left: 24px; margin: 0;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  background: var(--accent); color: var(--on-accent);
  padding: 3px 10px; border-radius: 999px;
}
.plan h3 { font-size: 1.25rem; margin-bottom: .3em; }
.price-was { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.4; }
.price-was s { text-decoration-thickness: 1.5px; }
.discount {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  font-size: .78rem; font-weight: 700; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.price { margin: 0 0 .4em; }
.price .amount { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; }
.price .per { color: var(--muted); font-size: .95rem; }
.plan-desc { color: var(--muted); font-size: .97rem; }
.plan-features { list-style: none; padding: 0; margin: 4px 0 20px; flex: 1; }
.plan-features li { position: relative; padding: 6px 0 6px 26px; font-size: .97rem; }
.plan-features li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.plan-offer { font-size: .88rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; }

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0; font-weight: 600; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { color: var(--muted); margin: -4px 0 18px; }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* Form */
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
@media (min-width: 640px) { .form { padding: 32px; } }
.field { margin-bottom: 14px; min-width: 0; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field-note { font-size: .92rem; color: var(--muted); margin: 4px 0 10px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
[aria-invalid="true"] { border-color: var(--error); background: var(--error-soft); }
.error { color: var(--error); font-size: .88rem; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-size: .97rem; }
.form-status.is-success { background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent); }
.form-status.is-error { background: var(--error-soft); color: var(--text); border: 1px solid var(--error); }

/* Plan sign-up dialog */
.plan-dialog {
  width: min(440px, calc(100% - 32px)); padding: 0;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.plan-dialog::backdrop { background: rgba(10, 15, 12, .55); }
.plan-dialog-body { position: relative; padding: 28px 24px 24px; }
.plan-dialog h2 { font-size: 1.5rem; }
.plan-dialog .eyebrow { margin-bottom: 12px; }
.plan-dialog .btn { margin-top: 6px; }
.dialog-close {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.dialog-close:hover { background: var(--bg-alt); color: var(--text); }

/* Legal pages */
.legal h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin-bottom: .25em; }
.legal h2 { font-size: 1.25rem; margin: 2em 0 .5em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .5em; }
.legal-note { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--border); padding-left: 12px; }
.legal-links { margin-top: 2.5em; }
.form-legal { font-size: .85rem; color: var(--muted); margin: 10px 0 0; text-align: center; }
.form-legal a, .footer-inner a { color: inherit; }

/* WhatsApp contact */
:root { --wa: #25d366; --wa-dark: #128c4a; }
.wa-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; --wa-fg: var(--wa);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .15s, background-color .15s;
}
.wa-fab:hover { background: var(--wa-dark); --wa-fg: var(--wa-dark); transform: scale(1.05); }
.wa-fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--wa) 50%, transparent); outline-offset: 3px; }
@media (min-width: 800px) {
  .wa-fab { right: 28px; bottom: 28px; width: 72px; height: 72px; }
  .wa-fab svg { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { transition: none; } .wa-fab:hover { transform: none; } }
.wa-inline {
  display: flex; align-items: center; gap: 12px;
  margin: -8px 0 20px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-size: .98rem; line-height: 1.4;
}
.wa-inline:hover { border-color: var(--wa); }
.wa-inline-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--wa); color: #fff; --wa-fg: var(--wa);
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: .92rem; }
/* Keep the floating WhatsApp button from covering the end of the page on phones. */
@media (max-width: 799px) { .site-footer { padding-bottom: 96px; } }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.muted { color: var(--muted); }
