:root {
  --bg: #f8fafc; --card: #fff; --text: #0f172a; --muted: #475569; --line: #e2e8f0; --soft: #f1f5f9;
  --accent: #16a34a; --accent-strong: #128a3e; --accent-soft: #e5f6eb; --danger: #c0392b; --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 8px 24px rgba(16, 24, 20, .06);
}
/* Site público só no modo claro. */
.theme-btn { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
header.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; flex: 1; letter-spacing: -.02em; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 22px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.theme-btn { border: 1px solid var(--line); background: var(--soft); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer;   display: inline-grid; place-items: center; color: var(--muted); transition: color .2s, background .2s, border-color .2s; }
  .theme-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
  .theme-btn svg { display: block; }

.hero { padding: 72px 0 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 520px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.phone { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); max-width: 380px; justify-self: center; width: 100%; }
.phone .bar { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.phone .bar i { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-style: normal; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; margin: 6px 0; font-size: 14px; }
.msg.in { background: var(--soft); border: 1px solid var(--line); }
.msg.out { background: var(--accent-soft); margin-left: auto; }
.msg small { display: block; font-size: 11px; color: var(--muted); }

section.block { padding: 56px 0; }
section.block h2 { font-size: clamp(26px, 3.5vw, 34px); margin: 0 0 8px; letter-spacing: -.02em; text-align: center; }
section.block .sub { color: var(--muted); text-align: center; margin: 0 auto 36px; max-width: 620px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.feature b { display: block; font-size: 17px; margin: 10px 0 6px; } .feature span { color: var(--muted); font-size: 15px; }
.feature .ic { font-size: 26px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps div { padding: 22px; border-radius: 16px; border: 1px dashed var(--line); }
.steps div::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 4px; } .steps span { color: var(--muted); font-size: 15px; }
.final { text-align: center; background: var(--accent); color: #fff; border-radius: 24px; padding: 48px 24px; margin: 24px 0 56px; }
.final h2 { margin: 0 0 10px; font-size: clamp(26px, 3.5vw, 34px); } .final p { margin: 0 0 24px; opacity: .9; }
.final .btn { background: #fff; color: var(--accent-strong); }
footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; text-align: center; }

/* entrar / cadastro */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; padding: 9px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth h1 { font-size: 22px; margin: 0 0 4px; } .auth .sub { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.auth label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.auth input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); color: var(--text); font: inherit; }
.auth input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); background: var(--card); }
.auth .btn { width: 100%; margin-top: 20px; }
.auth form { display: none; } .auth form.on { display: block; }
.msgbox { margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 14px; display: none; }
.msgbox.err { display: block; background: var(--danger-soft); color: var(--danger); }
.msgbox.ok { display: block; background: var(--accent-soft); color: var(--accent-strong); }
.small-note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 16px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hide-sm { display: none; } }

/* preço */
.price-card { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.price-head { grid-row: span 3; padding: 32px 28px; background: linear-gradient(160deg, #0f3d26 0%, #07120c 100%); color: #fff; display: flex; flex-direction: column; gap: 10px; }
.price-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: rgba(74,222,128,.15); color: #86efac; border: 1px solid rgba(74,222,128,.3); }
.price { font-size: 60px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-top: 8px; }
.price small { font-size: 22px; font-weight: 700; vertical-align: top; margin-right: 4px; opacity: .8; }
.price span { font-size: 17px; font-weight: 600; opacity: .7; letter-spacing: 0; }
.price-head p { margin: 0 0 12px; color: rgba(220,252,231,.8); }
.price-head .btn { margin-top: auto; background: #22c55e; } .price-head .btn:hover { background: #16a34a; }
.price-list { list-style: none; margin: 0; padding: 32px 28px 12px; display: grid; gap: 12px; align-content: start; }
.price-list li { display: flex; gap: 10px; } .price-list li::before { content: '✓'; color: var(--accent); font-weight: 800; }
.price-extra { grid-column: 2; margin: 0 28px 28px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 14.5px; }
.price-note { text-align: center; color: var(--muted); font-size: 13.5px; margin: 16px auto 0; max-width: 560px; }
@media (max-width: 760px) { .price-card { grid-template-columns: 1fr; } .price-head { grid-row: auto; } .price-extra { grid-column: 1; } }

/* calculadora de atendimentos */
.calc { grid-column: 2; padding: 28px 28px 14px; border-bottom: 1px solid var(--line); }
.calc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.calc-top label { font-weight: 700; font-size: 15px; }
.calc-hint { font-size: 12px; color: var(--muted); }
.calc-slider { position: relative; height: 96px; }
.calc-slider output { position: absolute; top: 14px; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.calc-slider output::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: var(--accent); transform: rotate(45deg); }
.calc-slider input { position: absolute; left: 0; right: 0; top: 50px; width: 100%; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: ew-resize; --fill: 0%; }
.calc-slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill)); }
.calc-slider input::-moz-range-track { height: 6px; border-radius: 99px; background: var(--line); }
.calc-slider input::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.calc-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--card); border: 5px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.calc-slider input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 5px solid var(--accent); }
.calc-slider input:focus-visible { outline: none; }
.calc-slider input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.calc-scale { position: absolute; left: 4px; right: 4px; top: 78px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-break { font-size: 13.5px; color: var(--muted); padding: 4px 0 18px; min-height: 42px; }
.price b#pVal { font-weight: 900; font-variant-numeric: tabular-nums; }
.custom-price { font-size: 34px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; display: block; }
.price-card .price-list { grid-column: 2; }
@media (max-width: 760px) { .price-card .price-list, .calc { grid-column: 1; } }

/* FAQ em formato de conversa do WhatsApp: pergunta = mensagem do cliente, resposta = Twenny */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; padding: 24px; border-radius: 24px; background: color-mix(in srgb, var(--accent) 5%, var(--soft)); border: 1px solid var(--line);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.faq details { display: grid; gap: 10px; }
.faq summary { list-style: none; cursor: pointer; justify-self: start; max-width: 85%; display: inline-flex; align-items: center; gap: 12px; padding: 11px 14px 11px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: border-color .2s, transform .15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft) center / 12px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary:active { transform: scale(.99); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq .ans { justify-self: end; max-width: 85%; padding: 12px 16px; border-radius: 18px 4px 18px 18px; background: linear-gradient(180deg, #22c55e, #16a34a); color: #fff; line-height: 1.55;
  box-shadow: 0 6px 18px -6px rgba(22,163,74,.55); position: relative; }
.faq .ans::after { content: '✓✓'; display: block; text-align: right; font-size: 11px; letter-spacing: -2px; opacity: .75; margin-top: 2px; }
.faq details[open] .ans { animation: bubbleIn .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.96); transform-origin: right top; } }
@media (prefers-reduced-motion: reduce) { .faq details[open] .ans { animation: none; } }
@media (max-width: 600px) { .faq { padding: 14px; } .faq summary, .faq .ans { max-width: 94%; } }
#precos { padding-top: 0; margin-top: -30vh; position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { #precos { margin-top: 0; } }

/* Cartões de recursos com brilho que segue o mouse (borda + halo), na cor da marca */
.features { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { position: relative; isolation: isolate; overflow: hidden; --gx: -500px; --gy: -500px; transition: transform .25s; }
.feature::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--gx) var(--gy), var(--glow) 0%, color-mix(in srgb, var(--glow) 55%, transparent) 25%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.feature::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--gx) var(--gy), color-mix(in srgb, var(--glow) 18%, transparent), transparent 60%); }
.features.lit .feature::before, .features.lit .feature::after { opacity: 1; }
.feature:hover { transform: translateY(-2px); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--glow); background: color-mix(in srgb, var(--glow) 12%, transparent); border: 1px solid color-mix(in srgb, var(--glow) 28%, transparent); font-size: 0; }
@media (prefers-reduced-motion: reduce) { .feature { transition: none; } .feature:hover { transform: none; } }

/* Uma cor de brilho por cartão (o ícone acompanha) */
.feature { --glow: #22c55e; }
.feature:nth-child(2) { --glow: #3b82f6; }
.feature:nth-child(3) { --glow: #a855f7; }
.feature:nth-child(4) { --glow: #f43f5e; }
.feature:nth-child(5) { --glow: #f59e0b; }
.feature:nth-child(6) { --glow: #06b6d4; }

/* régua: marcas posicionadas pelo valor */
.calc-scale { left: 0; right: 0; display: block; height: 14px; }
.calc-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.calc-scale span:last-child { transform: translateX(-80%); }
/* Mensal / Anual */
.billing { display: inline-grid; grid-template-columns: auto auto; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); margin-bottom: 18px; }
.billing button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; padding: 7px 14px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.billing button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.billing em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 99px; margin-left: 4px; }
.pYear { margin: -6px 0 10px !important; font-size: 13px; color: rgba(220,252,231,.75) !important; min-height: 18px; }
.pYear s { opacity: .7; }
.plan-chip { margin: -6px 0 6px; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13.5px; font-weight: 600; }

/* "Teste a Twenny" (hero) e ícone flutuante do WhatsApp */
.hero-cta { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-cta small { color: var(--muted); font-size: 13px; }
.wa-btn { font-size: 17px; padding: 14px 26px; border-radius: 14px; box-shadow: 0 10px 30px rgba(22, 163, 74, .35); }

/* Chat do site com a Twenny */
.tw-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 60px; height: 60px; border: 0; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); transition: transform .2s; }
.tw-fab:hover { transform: scale(1.07); }
.tw-fab.on { transform: rotate(-8deg) scale(.95); }
.tw-chat { position: fixed; right: 20px; bottom: 92px; z-index: 70; width: 370px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.tw-chat[hidden] { display: none; }
.tw-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #128c4a; color: #fff; }
.tw-head b { display: block; font-size: 15px; }
.tw-head small { font-size: 12px; opacity: .85; }
.tw-head div { flex: 1; }
.tw-head button { background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.tw-av { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #128c4a; display: grid; place-items: center; font-weight: 800; }
.tw-msgs { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--soft); }
.tw-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.tw-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.tw-msg.me { align-self: flex-end; background: #16a34a; color: #fff; border-bottom-right-radius: 4px; }
.tw-msg.tw-err { color: var(--danger, #c0392b); }
.tw-cta { display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 10px; background: #16a34a; color: #fff; font-weight: 700; text-decoration: none; }
.tw-typing { display: flex; gap: 4px; padding: 12px 14px; }
.tw-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: twDot 1s infinite ease-in-out; }
.tw-typing i:nth-child(2) { animation-delay: .15s; } .tw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes twDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tw-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--card); }
.tw-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 22px; padding: 10px 14px; font: inherit; font-size: 14.5px; background: var(--soft); color: var(--text); outline: none; }
.tw-form input:focus { border-color: #16a34a; }
.tw-form button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center; cursor: pointer; }
@media (max-width: 600px) {
  .tw-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .tw-chat { right: 8px; left: 8px; bottom: 78px; width: auto; max-width: none; height: calc(100vh - 100px); }
}
.tw-msg.tw-btn { padding: 6px; background: transparent; border: 0; }
.tw-msg.tw-btn .tw-cta { margin-top: 0; padding: 10px 18px; font-size: 15px; }
