:root {
    --bg: #ffffff;
    --bg-soft: #f4f7f5;
    --surface: #ffffff;
    --text: #12201a;
    --muted: #5b6b63;
    --border: #e1e8e4;
    --brand: #16a34a;
    --brand-strong: #0f7a37;
    --brand-soft: #e7f6ec;
    --accent: #f59e0b;
    --danger: #d32f2f;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(18, 32, 26, 0.08);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1411;
        --bg-soft: #121c17;
        --surface: #16211c;
        --text: #e8f0ec;
        --muted: #9db0a6;
        --border: #24332c;
        --brand: #22c55e;
        --brand-strong: #4ade80;
        --brand-soft: #143222;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        color-scheme: dark;
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
}
a { color: var(--brand-strong); }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Topo */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.3px; }
.logo-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); display: inline-block; position: relative; }
.logo-pin::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); }
.nav { display: none; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }
@media (min-width: 760px) { .nav { display: flex; } }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* Seções */
section { padding: 56px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-strong); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; }
h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -1px; margin: 16px 0; }
h2 { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.5px; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.hero { padding: 48px 0 40px; background: radial-gradient(1200px 400px at 50% -10%, var(--brand-soft), transparent 70%); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.hero-grid > * { min-width: 0; }
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; }
    .hero h1 { font-size: clamp(36px, 3.4vw, 46px); }
}
.badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--brand); border-radius: 999px; padding: 3px 8px; line-height: 1; }
.badge-orange { background: var(--accent); }

.steps, .features { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } .features { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 10px; }
.feature-ico { font-size: 22px; margin-bottom: 8px; }
.soft { background: var(--bg-soft); }

/* Planos */
.plans { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan.recommended { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.plan-name { font-size: 18px; font-weight: 800; }
.plan-price { font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.plan-price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan-old { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.plan-promo { align-self: flex-start; }
.plan-save { color: var(--brand-strong); font-weight: 700; font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 6px; font-size: 15px; }
.plan li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.plan .btn { margin-top: auto; }
.skeleton { color: transparent; background: var(--bg-soft); border-radius: 8px; }

.notice { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 16px 18px; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* Formulários */
.form { display: grid; gap: 16px; }
.form fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0; display: grid; gap: 14px; background: var(--surface); }
.form legend { font-weight: 800; padding: 0 6px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field-error { font-size: 13px; color: var(--danger); font-weight: 600; min-height: 0; }
.alert { border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert-ok { background: var(--brand-soft); color: var(--brand-strong); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { margin-top: 3px; }
.plan-choice { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .plan-choice { grid-template-columns: 1fr 1fr; } }
.plan-option { border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; gap: 2px; font-weight: 400; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plan-option b { font-size: 16px; }

.narrow { max-width: 640px; }
.keybox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(20px, 5vw, 28px); font-weight: 800; letter-spacing: 1px; background: var(--bg-soft); border: 1px dashed var(--brand); border-radius: 12px; padding: 16px; text-align: center; word-break: break-all; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal { padding-top: 32px; }

/* ===== Demonstração animada (public/js/demo.js) =====
   Visual genérico com a paleta do LeadPin; sempre clara, como uma captura de tela. */
.lp-demo-wrap { min-width: 0; }
.lp-demo { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; background: #ffffff; }
.lp-demo-caption { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
[data-demo] { position: relative; width: 100%; overflow: hidden; }
.lpd-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #12201a; background: #ffffff; line-height: 1.35; }
.lpd-bar { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #f1f4f2; border-bottom: 1px solid #e1e8e4; }
[data-layout="compact"] .lpd-bar { height: 30px; }
.lpd-dot { width: 10px; height: 10px; border-radius: 50%; background: #d3dbd6; }
.lpd-address { margin-left: 10px; flex: 1; height: 18px; border-radius: 9px; background: #ffffff; border: 1px solid #e1e8e4; font-size: 10px; color: #5b6b63; display: flex; align-items: center; padding: 0 10px; }
.lpd-screen { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; }
.lpd-map, .lpd-chat { position: absolute; inset: 0; }
.lpd-streets { position: absolute; inset: 0; width: 100%; height: 100%; }

.lpd-pin { position: absolute; width: 0; height: 0; }
.lpd-pin-head { position: absolute; left: -9px; top: -24px; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #16a34a; box-shadow: 0 2px 4px rgba(18,32,26,.25); transition: transform .2s; }
.lpd-pin-head::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #ffffff; }
.lpd-pin-label { position: absolute; left: 12px; top: -26px; white-space: nowrap; font-size: 10px; font-weight: 700; background: #ffffff; border-radius: 6px; padding: 2px 6px; box-shadow: 0 1px 3px rgba(18,32,26,.18); }
.lpd-pin.is-active .lpd-pin-head { transform: rotate(-45deg) scale(1.25); background: #0f7a37; }
.lpd-pin.is-active .lpd-pin-label { background: #0f7a37; color: #ffffff; }

.lpd-panel { position: absolute; left: 0; top: 0; bottom: 0; width: 190px; background: #ffffff; box-shadow: 4px 0 14px rgba(18,32,26,.12); opacity: 0; }
[data-layout="compact"] .lpd-panel { width: 170px; }
.lpd-photo { height: 84px; background: linear-gradient(135deg, #cfe9d8, #a7d8b8 55%, #e7f6ec); }
.lpd-panel-body { padding: 10px 12px; display: grid; gap: 5px; }
.lpd-panel-name { font-size: 14px; font-weight: 800; }
.lpd-stars { color: #f59e0b; font-size: 12px; letter-spacing: 1px; }
.lpd-panel-phone { font-size: 11px; color: #5b6b63; display: flex; align-items: center; gap: 6px; }
.lpd-phone-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.lpd-panel-lines { display: grid; gap: 6px; margin-top: 6px; }
.lpd-panel-lines span { height: 7px; border-radius: 4px; background: #eef3ef; }
.lpd-panel-lines span:nth-child(2) { width: 80%; }
.lpd-panel-lines span:nth-child(3) { width: 60%; }

.lpd-card { position: absolute; right: 14px; bottom: 14px; width: 270px; background: #ffffff; border: 2px solid #16a34a; border-radius: 12px; padding: 10px 12px 12px; box-shadow: 0 8px 22px rgba(22,163,74,.28), 0 0 0 4px rgba(22,163,74,.12); opacity: 0; }
[data-layout="compact"] .lpd-card { left: 12px; right: 12px; width: auto; }
.lpd-card-head { display: flex; align-items: center; gap: 6px; }
.lpd-card-name { flex: 1; font-size: 13px; font-weight: 800; }
.lpd-badge { font-size: 9px; font-weight: 800; letter-spacing: .5px; color: #ffffff; background: #16a34a; border-radius: 999px; padding: 3px 6px; line-height: 1; }
.lpd-card-phone { font-size: 11px; color: #5b6b63; margin-top: 2px; }
.lpd-card-label { font-size: 9px; font-weight: 800; color: #5b6b63; margin-top: 8px; margin-bottom: 3px; letter-spacing: .3px; text-transform: uppercase; }
.lpd-msgbox { position: relative; font-size: 11.5px; border: 1px solid #e1e8e4; border-radius: 8px; padding: 6px 8px; background: #ffffff; }
.lpd-msg-ghost { visibility: hidden; }
.lpd-msg-typed { position: absolute; inset: 6px 8px; }
.lpd-caret { display: inline-block; width: 1.5px; height: 1.05em; background: #16a34a; vertical-align: -2px; margin-left: 1px; }
.lpd-cta { margin-top: 9px; background: #16a34a; color: #ffffff; font-size: 12px; font-weight: 800; text-align: center; border-radius: 999px; padding: 8px 10px; transition: background-color .15s; }
.lpd-cta.is-pressed, .lpd-send.is-pressed { background: #0f7a37; transform: scale(.97); }

.lpd-chat { display: flex; flex-direction: column; background: #f4f7f5; opacity: 0; visibility: hidden; }
.lpd-chat-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #ffffff; border-bottom: 1px solid #e1e8e4; }
.lpd-avatar { width: 26px; height: 26px; border-radius: 50%; background: #e7f6ec; color: #0f7a37; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lpd-chat-name { flex: 1; font-size: 13px; font-weight: 800; }
.lpd-contacted { font-size: 10px; font-weight: 800; color: #0f7a37; background: #e7f6ec; border: 1px solid #b9e3c7; border-radius: 999px; padding: 3px 8px; opacity: 0; }
.lpd-chat-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; }
.lpd-bubble { align-self: flex-end; max-width: 72%; background: #e7f6ec; border: 1px solid #b9e3c7; border-radius: 12px 12px 3px 12px; padding: 7px 10px 6px; font-size: 11.5px; box-shadow: 0 1px 2px rgba(18,32,26,.1); opacity: 0; }
.lpd-ticks { display: block; text-align: right; font-size: 10px; color: #0f7a37; font-weight: 800; margin-top: 2px; opacity: 0; }
.lpd-chat-input { display: flex; align-items: flex-end; gap: 8px; padding: 9px 12px; background: #ffffff; border-top: 1px solid #e1e8e4; }
.lpd-input-field { flex: 1; min-height: 30px; font-size: 11.5px; border: 1px solid #e1e8e4; border-radius: 15px; padding: 7px 12px; background: #ffffff; }
.lpd-placeholder { color: #9db0a6; }
.lpd-send { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #16a34a; color: #ffffff; font-size: 13px; display: flex; align-items: center; justify-content: center; }

.lpd-cursor { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; pointer-events: none; }
.lpd-cursor svg { position: absolute; left: -5px; top: -2px; transform-origin: 5px 2px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.lpd-ripple { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: #16a34a; opacity: 0; }
.lpd-fade { position: absolute; inset: 0; background: #ffffff; pointer-events: none; z-index: 6; }

/* Pagamento Pix */
.pix-card { display: grid; gap: 12px; justify-items: center; text-align: center; }
.pix-qr { width: 240px; height: 240px; max-width: 100%; image-rendering: pixelated; background: #ffffff; border-radius: 12px; border: 1px solid var(--border); }
.pix-code { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 10px; padding: 10px; text-align: left; max-height: 96px; overflow: auto; }
.pix-timer { font-size: 15px; color: var(--muted); }
.pix-timer b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ===== Modal de confirmação e toasts (js/common.js) ===== */
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.lp-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(12, 20, 16, 0.5); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .15s ease; }
.lp-modal-overlay.is-visible { opacity: 1; }
.lp-modal { width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(12, 20, 16, 0.25); padding: 20px; transform: translateY(8px); transition: transform .15s ease; }
.lp-modal-overlay.is-visible .lp-modal { transform: none; }
.lp-modal-title { font-size: 19px; margin: 0 0 10px; letter-spacing: -0.2px; }
.lp-modal-text { margin: 0 0 8px; color: var(--muted); overflow-wrap: anywhere; }
.lp-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.lp-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1100; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.lp-toast { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 12px; box-shadow: 0 10px 30px rgba(12, 20, 16, 0.18); padding: 12px 14px; font-size: 14px; line-height: 1.4; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.lp-toast.is-visible { opacity: 1; transform: none; }
.lp-toast-icon { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--brand); }
.lp-toast--error { border-left-color: var(--danger); }
.lp-toast--error .lp-toast-icon { background: var(--danger); }
.lp-toast--info { border-left-color: #3b82f6; }
.lp-toast--info .lp-toast-icon { background: #3b82f6; }
.lp-toast--warning { border-left-color: var(--accent); }
.lp-toast--warning .lp-toast-icon { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .lp-modal-overlay, .lp-modal, .lp-toast { transition: none; } }
