/* =========================================================
   Luciene Jokoski · LP para cuidadores de pessoas autistas
   Paleta: off-white quente, verde sálvia profundo, terracota.
   Mobile-first. WCAG 2.2 AA. Movimento reduzido respeitado.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #FAF7F2;            /* off-white quente */
  --bg-tint: #F1ECE3;       /* faixa alternada */
  --surface: #FFFFFF;
  --border: #E4DDD2;

  --primary: #3F5F4F;       /* verde sálvia profundo: 6,7:1 sobre --bg */
  --primary-hover: #334E40;
  --primary-soft: #DCE5DD;  /* fundo de ícone e destaque suave */
  --primary-soft-2: #EEF2EC;

  --secondary: #9A4F36;     /* terracota: 5,5:1 sobre --bg */
  --secondary-soft: #F3E3DB;

  --text: #2B2E2A;          /* grafite: 13:1 sobre --bg */
  --text-muted: #5A5F5A;    /* 6,2:1 sobre --bg */
  --on-primary: #FFFFFF;    /* 7,2:1 sobre --primary */

  --focus: #9A4F36;
  --whatsapp: #187A42;      /* verde do botão flutuante, 5,3:1 com branco */

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(43, 46, 42, 0.07);
  --shadow-hover: 0 10px 30px rgba(43, 46, 42, 0.11);

  --font-head: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1120px;
  --gutter: 16px;
  --header-h: 68px;
}

/* Fallbacks métricos: reduzem o salto de layout enquanto a fonte web carrega */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Segoe UI");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ---------- Reset leve ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw + 0.5rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw + 0.6rem, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
p, li, dd { text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--primary-hover); }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }

/* ---------- Foco visível (teclado) ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .menu-toggle:focus-visible, .whatsapp-float:focus-visible, summary:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* ---------- Utilitários ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 760px; }
.center { text-align: center; }
.center p, .center li { text-align: center; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 0.75rem;
  text-align: inherit;
}
.lead { font-size: 1.125rem; color: var(--text); }
.small { font-size: 0.9rem; color: var(--text-muted); }
.note {
  margin: 2rem auto 0;
  max-width: 62ch;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--secondary);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Botões ---------- */
.btn {
  hyphens: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.btn-icon { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 14px rgba(63, 95, 79, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-soft-2); color: var(--primary-hover); }
.btn-lg { min-height: 54px; padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn-sm { min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

/* Estado de carregamento (ao abrir o WhatsApp) */
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .btn-icon { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: 0 2px 12px rgba(43, 46, 42, 0.05); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.brand-mark { width: 38px; height: 38px; color: var(--primary); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.brand-sub { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-reg { display: none; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-cta { display: none; white-space: nowrap; }

.menu-toggle {
  width: 48px; height: 48px;
  display: inline-grid; place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; color: var(--text); }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; padding: 0.5rem var(--gutter) 1rem; }
.site-nav li { text-align: left; hyphens: none; -webkit-hyphens: none; }
.site-nav li a:not(.btn) {
  display: block;
  padding: 0.85rem 0.25rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.site-nav li a:not(.btn):hover { color: var(--primary); }
.nav-cta-mobile { padding-top: 1rem; }
.nav-cta-mobile .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 1.5rem 0 3rem; }
.hero-grid { display: grid; gap: 1.75rem; }
.hero-copy { order: 1; }
.hero-photo { order: 2; margin: 0; }
.hero-photo img {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: var(--primary-soft);  /* espaço reservado enquanto carrega */
}
.hero-caption { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 0.75rem; }
.hero .lead { max-width: 56ch; }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0 1.25rem; }
.hero-actions .btn { width: 100%; }
.accent { color: var(--primary); }
.trust-list {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.trust-list li { display: inline-flex; align-items: center; gap: 0.4rem; text-align: left; hyphens: none; }
.trust-list svg { width: 18px; height: 18px; color: var(--primary); flex: none; }

/* ---------- Seções ---------- */
.section { padding: 3.5rem 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { text-align: left; }
.section-intro { color: var(--text-muted); font-size: 1.05rem; }

/* Identificação */
.ident-grid { list-style: none; display: grid; gap: 0.75rem; }
.ident-card {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-align: left;
  font-size: 1.02rem;
}
.ident-card .dot { width: 10px; height: 10px; margin-top: 0.55em; border-radius: 50%; background: var(--secondary); flex: none; }
.ident-closing {
  margin: 1.75rem auto 0;
  max-width: 62ch;
  font-family: var(--font-head);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--primary);
  text-align: center;
}

/* Cards (como ajuda) */
.cards-grid { display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card h3 { margin-top: 0.85rem; }
.card p { margin-bottom: 0; color: var(--text-muted); }
.card-icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}
.card-icon svg { width: 24px; height: 24px; }

/* Sobre */
.about-grid { display: grid; gap: 2rem; align-items: start; }
.about-photo { margin: 0; }
.about-photo img {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: var(--primary-soft);
}
.about-sub { color: var(--secondary); font-weight: 600; margin-top: -0.25rem; text-align: left; }
.facts { display: grid; gap: 0.6rem; margin: 1.5rem 0 0; }
.facts div {
  display: grid; grid-template-columns: 112px 1fr; gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; padding-top: 0.15rem; }
.facts dd { margin: 0; text-align: left; }

/* Como funciona */
.steps { list-style: none; display: grid; gap: 1rem; counter-reset: passo; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.3rem;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
}
.step h3 { margin-top: 0.8rem; }
.step p { margin-bottom: 0; color: var(--text-muted); }
#como-funciona .center { margin-top: 2rem; }

/* Serviços */
.services-grid { display: grid; gap: 1rem; }
.service {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin: 0 0 0.9rem;
  max-width: 100%;
}
.service .limit {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}
.service .limit strong { color: var(--secondary); }

/* Para quem é */
.fit-grid { display: grid; gap: 1rem; }
.fit {
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.fit h3 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.fit h3 svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; flex: none; }
.fit-yes h3 svg { background: var(--primary-soft); color: var(--primary); }
.fit-no h3 svg { background: var(--secondary-soft); color: var(--secondary); }
.fit ul { list-style: none; display: grid; gap: 0.6rem; }
.fit li { position: relative; padding-left: 1.1rem; text-align: left; }
.fit li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.6;
}
.fit-no { background: var(--bg); }

/* FAQ */
.faq { display: grid; gap: 0.6rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem;
  font-weight: 600;
  min-height: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-right: 4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--primary); }
.faq-body { padding: 0 1.1rem 1.1rem; color: var(--text-muted); }
.faq-body p { margin: 0; }

/* CTA final */
.cta-final {
  background: var(--primary);
  color: var(--on-primary);
  padding: 4rem 0;
}
.cta-final h2, .cta-final .lead { color: var(--on-primary); }
.cta-final .lead { opacity: 0.92; max-width: 52ch; margin-inline: auto; }
.cta-final .btn-primary {
  background: var(--bg);
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.cta-final .btn-primary:hover { background: #fff; color: var(--primary-hover); }
.cta-final .small { color: var(--on-primary); opacity: 0.85; margin-top: 1rem; }
.cta-final .btn:focus-visible { outline-color: #fff; }

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.site-footer p { text-align: left; }
.footer-grid { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-brand { font-family: var(--font-head); font-size: 1.2rem; color: var(--text); font-weight: 600; margin-bottom: 0.4rem; }
.footer-title { font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.footer-links { list-style: none; display: grid; gap: 0.5rem; }
.footer-links a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; min-height: 32px; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-links svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.emergency {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
}
.emergency p { margin: 0; color: var(--text); }
.emergency strong { color: var(--secondary); }
.footer-legal { font-size: 0.85rem; }
.footer-copy { font-size: 0.85rem; margin: 0; }

/* ---------- Botão flutuante ---------- */
.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 8px 24px rgba(24, 122, 66, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float.is-visible { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.whatsapp-float:hover { background: #126335; }

/* ---------- Revelação ao rolar (só com JS e sem movimento reduzido) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .card:hover, .btn-primary:hover { transform: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .brand-reg { display: inline; }
  .brand-sub { white-space: normal; overflow: visible; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
  .ident-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .fit-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul { display: flex; gap: 0.25rem; padding: 0; }
  .site-nav li a:not(.btn) { padding: 0.5rem 0.7rem; border: 0; border-radius: 8px; white-space: nowrap; font-size: 0.95rem; }
  .site-nav li a:not(.btn):hover { background: var(--primary-soft-2); }
  .nav-cta-mobile { display: none; }

  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 3rem; }
  .hero-photo img { max-width: 440px; }
  .section { padding: 5rem 0; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 0.8fr 1.2fr; gap: 3.5rem; align-items: center; }
  .whatsapp-float { right: 24px; bottom: 24px; }
}

/* ---------- Página de privacidade ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
