/* Cuidador+ — mesmas cores e fontes do app (src/ui/theme.ts, assets/brand/README.md) */
:root {
  --bg: #F6F3EE; --surface: #FFFFFF; --ink: #1B2528; --muted: #55616A;
  --line: #E3DED5; --line-strong: #CFC8BC;
  --primary: #0E6B5F; --primary-soft: #E3F1EE; --primary-ink: #0A4F46;
  --gold: #F5C977; --gold-ink: #A96D20;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Atkinson Hyperlegible', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; border-radius: 8px; }

/* Topo */
.top { max-width: 1080px; margin: 0 auto; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 22px/1 var(--display); text-decoration: none; color: var(--ink); }
.brand img { border-radius: 9px; }
.top-link { font-weight: 700; font-size: 16px; text-decoration: none; padding: 10px 14px; border-radius: 12px; }
.top-link:hover { background: var(--primary-soft); }

/* Tipografia */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(36px, 6.4vw, 56px); margin: 8px 0 16px; text-wrap: balance; }
h2 { text-wrap: balance; }
h2 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; }
h3 { font-size: 21px; margin: 0 0 6px; }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }

/* Blocos */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; }
section { padding: 40px 0; }
.band { background: var(--primary-soft); border-radius: var(--radius); padding: 32px 20px; margin: 16px 0; }

/* Abertura */
.hero { display: grid; gap: 28px; align-items: center; padding-top: 16px; }
.phone { justify-self: center; width: min(320px, 82vw); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 32px; padding: 10px; box-shadow: 0 18px 40px rgba(27, 37, 40, 0.10); }
.phone img { display: block; border-radius: 24px; }

/* Botões das lojas */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 22px; border-radius: 14px; font: 700 18px/1.2 var(--body); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn[aria-disabled="true"] { cursor: default; }
.btn small { display: block; font-weight: 400; font-size: 14px; opacity: 0.9; }
.btn svg { flex: none; }
.note { font-size: 15px; color: var(--muted); margin: 0; }

/* Benefícios: lista com linhas, não cartões */
.feats { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.feats li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.feats h3 { font-size: 23px; margin-bottom: 4px; }
.feats p { margin: 0; color: var(--muted); max-width: 40em; }

/* Passos */
.steps { display: grid; gap: 20px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: passo; }
.steps li { counter-increment: passo; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(passo); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font: 600 18px/1 var(--display); margin-bottom: 10px; }
.steps p { margin: 0 0 14px; color: var(--muted); }
.steps img { display: block; border-radius: 14px; border: 1px solid var(--line); }

/* Planos */
.plans { display: grid; gap: 14px; margin-top: 20px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.plan.premium { border: 2px solid var(--primary); }
.plan ul { margin: 8px 0 0; padding-left: 22px; }
.plan li { margin: 4px 0; }
.tag { display: inline-block; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* Perguntas */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style-position: outside; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Chamada final */
.final { text-align: center; }
.final .stores { justify-content: center; }

/* Páginas legais (geradas por build.mjs) */
.doc { max-width: 720px; padding-top: 8px; padding-bottom: 40px; }
.doc h1 { font-size: 32px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
code { font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }

/* Rodapé */
footer { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 15px; text-align: center; border-top: 1px solid var(--line); }

/* Telas maiores */
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 40px; padding-top: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; border-top: 2px solid var(--primary); }
  .feats li { border-bottom: 0; }
  .plans { grid-template-columns: 1fr 1fr; }
  .band { padding: 40px; }
}
@media (max-width: 480px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td:first-child { font-weight: bold; padding-bottom: 0; }
  .stores .btn { width: 100%; }
}

/* Toque nos botões: resposta imediata */
.btn { transition: background-color 150ms ease, transform 100ms ease; }
a.btn:active { transform: scale(0.98); }
.top-link { transition: background-color 150ms ease; }

/* Perguntas: o sinal gira ao abrir */
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center/14px 2px no-repeat, linear-gradient(currentColor, currentColor) center/2px 14px no-repeat; color: var(--primary); transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.faq details[open] summary::after { transform: rotate(135deg); }

/* ===== Celular vivo: o ciclo do app (lembrete → dado → família avisada) ===== */
.phone.live { padding: 10px; }
.screen { position: relative; overflow: hidden; border-radius: 24px; background: var(--bg); padding: 22px 16px 72px; font-family: var(--body); color: var(--ink); }
.s-date { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.s-title { margin: 2px 0 14px; font: 600 26px/1.1 var(--display); }
.s-next { position: relative; background: var(--surface); border: 2px solid var(--primary); border-radius: 16px; padding: 12px 14px; }
.s-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.s-pill { background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.s-who { font-size: 12px; color: var(--muted); }
.s-med { margin: 8px 0 0; font-weight: 700; font-size: 17px; }
.s-done { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; background: #E6F4EC; color: #1D7044; font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 999px; opacity: 0; transform: scale(0.85); }
.s-done path { stroke-dasharray: 16; stroke-dashoffset: 16; }
.s-label { margin: 16px 0 8px; font-weight: 700; font-size: 13px; color: var(--muted); }
.s-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.s-item b { font-variant-numeric: tabular-nums; }
.s-item span { flex: 1; }
.s-item em { font-style: normal; font-weight: 700; font-size: 11px; color: #1D7044; background: #E6F4EC; padding: 3px 8px; border-radius: 999px; }
.s-item.muted { color: var(--muted); opacity: 0.7; }
.notif { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 24px rgba(27, 37, 40, 0.14); transform: translateY(-130%); z-index: 2; }
.notif img { border-radius: 7px; }
.notif b { display: block; font-size: 13px; }
.notif span { font-size: 12px; color: var(--muted); }
.s-toast { position: absolute; left: 50%; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 14px; border-radius: 999px; transform: translate(-50%, 160%); white-space: nowrap; box-shadow: 0 8px 20px rgba(14, 107, 95, 0.28); }
.s-dots { display: inline-flex; }
.s-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--primary); background: var(--gold); margin-left: -4px; }
.s-dots i:first-child { margin-left: 0; background: #F6F3EE; }

/* Linha do tempo de 9 s, compartilhada pelos elementos */
@keyframes notif { 0%, 8% { transform: translateY(-130%); } 14%, 34% { transform: translateY(0); } 40%, 100% { transform: translateY(-130%); } }
@keyframes card { 0%, 38% { border-color: var(--primary); background: var(--surface); } 46%, 92% { border-color: #1D7044; background: #F3FAF6; } 100% { border-color: var(--primary); background: var(--surface); } }
@keyframes done { 0%, 40% { opacity: 0; transform: scale(0.85); } 46%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.85); } }
@keyframes check { 0%, 44% { stroke-dashoffset: 16; } 52%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 16; } }
@keyframes toast { 0%, 56% { transform: translate(-50%, 160%); } 62%, 88% { transform: translate(-50%, 0); } 94%, 100% { transform: translate(-50%, 160%); } }
.phone.live.playing .notif { animation: notif 9s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.phone.live.playing .s-next { animation: card 9s ease infinite; }
.phone.live.playing .s-done { animation: done 9s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.phone.live.playing .s-done path { animation: check 9s ease-out infinite; }
.phone.live.playing .s-toast { animation: toast 9s cubic-bezier(0.16, 1, 0.3, 1) infinite; }

/* Menos movimento: mostra o estado final, parado */
@media (prefers-reduced-motion: reduce) {
  .phone.live .notif, .phone.live .s-next, .phone.live .s-done, .phone.live .s-done path, .phone.live .s-toast { animation: none !important; }
  .s-done { opacity: 1; transform: none; }
  .s-done path { stroke-dashoffset: 0; }
  .s-next { border-color: #1D7044; background: #F3FAF6; }
  .s-toast { transform: translate(-50%, 0); }
  .btn, .faq summary::after { transition: none; }
}

/* Materiais grátis (/materiais, gerada por build.mjs) */
.doc .mats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 20px; }
.doc .mats li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 18px; align-items: center; }
.mats img { display: block; justify-self: center; max-height: 280px; width: auto; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px rgba(27, 37, 40, 0.08); }
.doc .mats h2 { margin: 0 0 6px; }
.mats p { margin: 0 0 16px; color: var(--muted); }
.mats .note { margin: 10px 0 0; }
.doc .final { margin-top: 32px; }
.doc .final p { margin: 0 0 20px; color: var(--muted); }
.doc .final h2 { margin-top: 0; }
@media (max-width: 480px) {
  .mats .btn { width: 100%; }
}
@media (min-width: 640px) {
  .doc .mats li { grid-template-columns: 220px 1fr; }
  .mats img { max-height: 220px; }
}

/* Formulário opcional de contato em /materiais */
.lead-box { margin-top: 32px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px 20px; }
.doc .lead-box h2 { margin: 0 0 8px; }
.lead-box > p { margin: 0 0 20px; color: var(--muted); }
.f-field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.f-field > label:not(.choice), .f-field legend { display: block; font-weight: 700; margin: 0 0 6px; padding: 0; }
.f-field input:not([type]), .f-field input[type="text"] { width: 100%; min-height: 54px; padding: 12px 14px; font: 18px/1.3 var(--body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px; }
.f-field input:focus-visible, .choice input:focus-visible, .consent input:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 2px; }
.f-field input::placeholder { color: #8A949B; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; margin: 0 0 8px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input, .consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--primary); }
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 16px; font-size: 16px; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 2px; }
.f-error { margin: 6px 0 0; color: #A2341F; font-weight: 700; font-size: 16px; }
.consent + .f-error { margin: -8px 0 16px; }
.f-status { margin: 12px 0 0; color: var(--muted); font-size: 16px; min-height: 1.4em; }
.lead-box .btn[disabled] { opacity: 0.6; cursor: progress; }
.lead-done h2 { margin-top: 0; }
.lead-done p { color: var(--muted); margin: 0; }
.lead-done:focus { outline: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 0 0 12px; }
@media (max-width: 480px) {
  .lead-box .btn { width: 100%; }
}
