/* JoyFlow — landing page. Sem dependências: só CSS. Cores iguais às do app. */
:root {
  --brand: #4f5bd5;
  --brand-dark: #3f49b8;
  --brand-soft: #eceefe;
  --ink: #1d2530;
  --ink-soft: #4a5566;
  --muted: #6b7686;
  --line: #e3e6eb;
  --bg: #ffffff;
  --bg-alt: #f5f6f9;
  --dark: #171d26;
  --green: #1baf7a;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(20, 30, 45, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; cursor: pointer; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(79, 91, 213, .45); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79, 91, 213, .35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

/* Navegação */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand-logo { width: 30px; height: 30px; color: var(--brand); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--brand); }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; background: transparent; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 64px 0 56px; background: radial-gradient(1000px 500px at 85% -10%, var(--brand-soft), transparent 70%), radial-gradient(700px 400px at -10% 110%, #e6f7f0, transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .8em; }
.hl { color: var(--brand); }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; color: var(--ink-soft); font-size: .92rem; }
.hero-proof li { display: flex; align-items: center; gap: 6px; }
.hero-proof svg, .ticks svg { width: 18px; height: 18px; color: var(--green); flex: none; }

/* Quadro demonstrativo */
.demo { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--dark); color: #c9d1dc; font-size: .82rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.demo-title { margin-left: 10px; font-weight: 600; color: #fff; }
.demo-hint { margin-left: auto; opacity: .7; }
.demo-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; background: linear-gradient(135deg, #5b67e0, #8a5bd5); min-height: 330px; }
.demo-list { background: #eef0f4; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.demo-list h3 { font-size: .85rem; display: flex; justify-content: space-between; margin: 0 0 8px; color: var(--ink); }
.count { color: var(--muted); font-weight: 600; }
.demo-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 60px; border-radius: 8px; transition: background .15s; }
.demo-cards.is-over { background: rgba(79, 91, 213, .12); }
.demo-card { background: #fff; border-radius: 8px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(20, 30, 45, .1); cursor: grab; user-select: none; touch-action: none; font-size: .84rem; transition: box-shadow .15s, transform .15s; }
.demo-card:hover { box-shadow: 0 4px 10px rgba(20, 30, 45, .14); }
.demo-card p { margin: 6px 0 4px; font-weight: 600; line-height: 1.3; }
.demo-card small { color: var(--muted); }
.demo-card .cover { height: 54px; margin: -9px -10px 8px; border-radius: 8px 8px 0 0; background: linear-gradient(135deg, #1baf7a 0 40%, #eda100 40% 70%, #2a78d6 70%); }
.demo-card.is-dragging { position: fixed; z-index: 100; pointer-events: none; transform: rotate(3deg); box-shadow: 0 14px 30px rgba(20, 30, 45, .3); cursor: grabbing; }
.demo-card.is-done p { text-decoration: line-through; color: var(--muted); }
.placeholder { border: 2px dashed rgba(79, 91, 213, .45); border-radius: 8px; background: rgba(79, 91, 213, .06); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 700; color: #fff; }
.t-blue { background: #2a78d6; } .t-pink { background: #d4558e; } .t-amber { background: #c98a00; } .t-green { background: #158f63; }

/* Faixa de chips */
.chips-band { background: var(--dark); padding: 18px 0; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.chips span { color: #dfe4ec; border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px; padding: 5px 14px; font-size: .86rem; }

/* Seções */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.05rem; }

/* Recursos */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.f-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; margin-bottom: 14px; }

/* Tour */
.tour { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tour-tabs { display: flex; gap: 4px; padding: 8px; background: var(--dark); overflow-x: auto; }
.tour-tabs button { flex: 1; min-width: max-content; border: 0; background: transparent; color: #c9d1dc; padding: 10px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.tour-tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.tour-panel { padding: 28px; }
.tour-cap { text-align: center; color: var(--ink-soft); margin: 20px 0 0; }

.mock-cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid #c9ced6; border-radius: 10px; overflow: hidden; }
.mock-cal .wd { background: var(--bg-alt); text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 6px 0; border-bottom: 1px solid #c9ced6; }
.mock-cal .day { min-height: 76px; border-right: 1px solid #d8dce2; border-bottom: 1px solid #d8dce2; padding: 4px 6px; font-size: .75rem; cursor: pointer; transition: background .15s; }
.mock-cal .day:nth-child(7n) { border-right: 0; }
.mock-cal .day:hover { background: var(--brand-soft); }
.mock-cal .day.sun { background: #eee; }
.mock-cal .day.sun .n { color: #d33; }
.mock-cal .day.out { opacity: .4; }
.mock-cal .n { font-weight: 700; color: var(--ink-soft); }
.mock-cal .ev { display: block; margin-top: 3px; padding: 2px 5px; border-radius: 4px; color: #fff; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mock-chat { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: .92rem; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.msg.show { opacity: 1; transform: none; }
.msg b { display: block; font-size: .75rem; color: var(--muted); }
.msg p { margin: 2px 0 0; }
.msg.them { background: var(--bg-alt); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.me b { color: rgba(255, 255, 255, .75); }
.msg.file { display: flex; gap: 12px; align-items: center; background: var(--brand-dark); }
.msg.file small { opacity: .8; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 14px; background: var(--bg-alt); border-radius: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.mock-todo { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; display: flex; flex-direction: column; gap: 8px; }
.mock-todo li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.mock-todo label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 180px; }
.mock-todo input { width: 18px; height: 18px; accent-color: var(--brand); }
.mock-todo input:checked + * , .mock-todo li.done label { color: var(--muted); text-decoration: line-through; }
.cat { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.c-pink { background: #fbe4ee; color: #a3305f; } .c-blue { background: #e1edfb; color: #1d5aa6; } .c-green { background: #dcf5ea; color: #136b4b; } .c-amber { background: #fdf0d2; color: #8a5a00; }
.ref { font-size: .8rem; text-decoration: none; }
.todo-progress { max-width: 620px; margin: 14px auto 0; height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.todo-progress span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }

.mock-rep { max-width: 680px; margin: 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.kpis div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.kpis strong { display: block; font-size: 1.5rem; }
.kpis .warn { color: #c24141; }
.kpis span { font-size: .8rem; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.bars div { flex: 1; height: var(--h); background: var(--brand); border-radius: 6px 6px 0 0; position: relative; transform-origin: bottom; animation: grow .8s ease both; }
.bars span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } }

/* Clientes */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split p { color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.roles { display: grid; gap: 12px; }
.role { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.role p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.badge { flex: none; min-width: 118px; text-align: center; padding: 4px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.b-brand { background: var(--brand-soft); color: var(--brand-dark); } .b-green { background: #dcfce7; color: #166534; } .b-amber { background: #fff1c7; color: #8a5a00; } .b-violet { background: #ede9fe; color: #5b21b6; }

/* Comparativo */
.compare { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .93rem; }
.compare thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.compare tbody th { font-weight: 600; }
.compare tr:last-child > * { border-bottom: 0; }
.compare td svg { display: inline-block; vertical-align: -4px; width: 20px; height: 20px; }
.compare .us { background: rgba(79, 91, 213, .06); font-weight: 600; color: var(--brand-dark); }
.compare thead .us { color: var(--brand); }
.yes { color: var(--green); } .no { color: #c24141; }
.muted { color: var(--muted); }

/* Passos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps li > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }
.steps p { color: var(--ink-soft); margin: 0; }

/* Planos */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan-featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 6px; }
.price strong { font-size: 2.2rem; letter-spacing: -.03em; }
.price span { color: var(--muted); }
.plan-desc { color: var(--ink-soft); }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; flex: 1; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plans-note { text-align: center; color: var(--muted); margin: 26px 0 0; font-size: .92rem; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; background: #fff; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 6px; }

/* CTA e rodapé */
.cta { background: linear-gradient(135deg, var(--brand), #7b4fd5); color: #fff; padding: 80px 0; text-align: center; }
.cta p { color: rgba(255, 255, 255, .85); font-size: 1.1rem; margin-bottom: 28px; }
.footer { background: var(--dark); color: #9aa5b5; padding: 32px 0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer .brand { color: #fff; }
.footer nav { display: flex; gap: 18px; }
.footer nav a { color: #c9d1dc; text-decoration: none; }
.footer p { margin: 0 0 0 auto; }

/* Animação de entrada */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .msg { opacity: 1; transform: none; transition: none; }
  .bars div, .typing i { animation: none; }
}

/* Responsivo */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .features, .plans, .steps { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid #f0f1f3; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .features, .plans, .steps { grid-template-columns: 1fr; }
  .demo-board { grid-template-columns: repeat(3, minmax(150px, 1fr)); overflow-x: auto; }
  .demo-hint { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .tour-panel { padding: 18px 12px; }
  .mock-cal .day { min-height: 54px; padding: 3px; }
  .mock-cal .ev { font-size: 0; height: 6px; padding: 0; }
  .role { flex-direction: column; align-items: flex-start; }
  .footer p { margin-left: 0; }
}

/* Contato */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info p:not(.eyebrow) { color: var(--ink-soft); }
.wa-card { display: flex; align-items: center; gap: 14px; margin: 24px 0; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.wa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #25d366; }
.wa-card strong { display: block; }
.wa-card small { color: var(--muted); font-size: .95rem; }
.wa-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #25d366; color: #fff; flex: none; }
.wa-ico svg { width: 26px; height: 26px; }
.wa-go { margin-left: auto; font-size: 1.3rem; color: #1a9e4f; }
.contact-form { display: grid; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.contact-form label span { color: #c24141; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; font: inherit; font-weight: 400; color: var(--ink); padding: 11px 12px; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 91, 213, .2); }
.contact-form [aria-invalid="true"] { border-color: #c24141; box-shadow: 0 0 0 3px rgba(194, 65, 65, .15); }
.contact-form .btn { justify-self: start; }
.contact-form .btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: .92rem; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: #157a52; }
.form-status.err { color: #c24141; }

/* Botão flutuante do WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 99px; background: #25d366; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 26px rgba(20, 30, 45, .25); transition: transform .15s, box-shadow .15s; }
.wa-float:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 32px rgba(20, 30, 45, .3); }
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 18px; }
  .wa-float { padding: 14px; right: 16px; bottom: 16px; }
  .wa-float span { display: none; }
}
