/* ==========================================================================
   Mater · Clínica Perinatal
   base.css · reset, componentes compartilhados e utilitários
   Depende de tokens.css. Carregue tokens.css primeiro.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset enxuto
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   2. Acessibilidade
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: var(--ring) solid var(--rose-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  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;
  top: -100%;
  left: var(--sp-4);
  z-index: 100;
  padding: var(--sp-3) var(--sp-4);
  background: var(--cream-2);
  color: var(--ink);
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 var(--sp-4);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--muted-strong);
  max-width: 34em;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.wrap--text { max-width: var(--wrap-text); }

.section { padding-block: var(--section-y); }

.section--tint  { background: var(--accent-tint); }
.section--card  { background: var(--cream-2); border-block: 1px solid var(--line); }

.section--contrast {
  background: var(--sage-deep);
  color: var(--cream);
}
.section--contrast .eyebrow { color: var(--cream); opacity: 0.75; }
.section--contrast .lead    { color: var(--cream); opacity: 0.9; }

.section__head { margin-bottom: var(--sp-6); }

/* Filete decorativo com o coração da logo, usado entre seções */
.rule {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-block: var(--sp-6);
  color: var(--accent);
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.rule svg { width: 14px; height: 14px; flex: none; }

/* --------------------------------------------------------------------------
   5. Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  min-height: 52px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

/* Primário: --rose-deep com texto branco · 5.02:1 */
.btn--primary {
  background: var(--rose-deep);
  color: #FFFFFF;
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: #974E41; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--rose-deep);
  border-color: var(--rose-deep);
}
.btn--ghost:hover { background: var(--rose-tint); }

.btn--on-contrast {
  background: var(--cream);
  color: var(--sage-deep);
}
.btn--on-contrast:hover { background: #FFFFFF; transform: translateY(-1px); }

.btn__icon { width: 20px; height: 20px; flex: none; }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.header {
  position: relative;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
  padding-block: var(--sp-3);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

/* Wordmark em texto, não em imagem: zero requisição, zero CLS, LCP melhor.
   Ver README sobre o arquivo de logo original. */
.wordmark { display: flex; flex-direction: column; line-height: 1; }

.wordmark__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--rose);
  letter-spacing: 0.01em;
}

.wordmark__sub {
  font-family: var(--font-label);
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-top: 3px;
}

.header__crp {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted-strong);
}

.header__actions { display: flex; align-items: center; gap: var(--sp-4); }

.header .btn {
  padding: var(--sp-3) var(--sp-5);
  min-height: 44px;
  font-size: 0.9375rem;
}

@media (max-width: 48rem) {
  .header__crp { display: none; }
}

/* Em tela estreita o botão do header vira só o ícone: o rótulo quebrava em
   duas linhas e engordava o header. O CTA completo fica na barra fixa e no
   hero. O nome acessível vem do aria-label no link. */
@media (max-width: 30rem) {
  .header .btn__label { display: none; }
  .header .btn { padding-inline: var(--sp-4); }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(3rem, 2rem + 5vw, 5.5rem);
  background:
    radial-gradient(70rem 40rem at 78% -10%, var(--accent-tint) 0%, transparent 62%),
    var(--cream);
}

.hero__grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

.hero__title { margin-bottom: var(--sp-5); }
.hero__sub   { margin-bottom: var(--sp-6); }
.hero__cta   { margin-bottom: var(--sp-6); }

/* No mobile a imagem vem DEPOIS do texto: quem chega do anúncio precisa ler a
   headline e ver o botão sem rolar. No desktop ela volta para a coluna ao lado. */
@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-8); }
}

/* --------------------------------------------------------------------------
   8. Selos de confiança
   -------------------------------------------------------------------------- */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
}

.trust__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted-strong);
}

.trust__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   9. Slot de foto (a preencher · ver README)
   -------------------------------------------------------------------------- */
.photo-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(60% 60% at 50% 40%, var(--cream-2) 0%, var(--accent-tint) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Mais baixa no mobile, para não comer a primeira tela. */
@media (max-width: 55.99rem) {
  .hero__figure.photo-slot { aspect-ratio: 3 / 2; }
}

.photo-slot__mark { width: 58%; max-width: 260px; opacity: 0.85; }

/* width explícito: dentro de um grid com justify-items:start o slot tentaria
   se dimensionar pelo conteúdo, e o conteúdo tem largura percentual. Sem isto
   ele colapsa para a espessura da borda. */
.photo-slot--round {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.photo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   10. Checklist "Você se reconhece?"
   -------------------------------------------------------------------------- */
.checklist {
  display: grid;
  gap: var(--sp-3);
}

@media (min-width: 48rem) {
  .checklist { grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.checklist__icon {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  color: var(--accent-deep);
}

/* --------------------------------------------------------------------------
   11. Bloco educativo
   -------------------------------------------------------------------------- */
.edu__body { display: grid; gap: var(--sp-4); max-width: 38em; }
.edu__body p { color: var(--muted-strong); }
.section--contrast .edu__body p { color: var(--cream); opacity: 0.92; }

/* --------------------------------------------------------------------------
   12. Como funciona
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--sp-4);
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
}

.steps__item {
  position: relative;
  padding: var(--sp-5);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps__num {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-text);
}

/* --------------------------------------------------------------------------
   13. Sobre a Bianca
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
  justify-items: center;
}

@media (min-width: 48rem) {
  .about__grid { grid-template-columns: 240px 1fr; gap: var(--sp-7); justify-items: start; }
}

.about__credential {
  font-family: var(--font-label);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-top: var(--sp-4);
}

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: var(--sp-3); max-width: 46rem; }

.faq__item {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }

.faq__chevron {
  flex: none;
  width: 18px; height: 18px;
  color: var(--accent-deep);
  transition: transform 0.2s ease;
}
.faq__item[open] .faq__chevron { transform: rotate(180deg); }

.faq__a {
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--muted-strong);
}

/* --------------------------------------------------------------------------
   15. CTA final
   -------------------------------------------------------------------------- */
.cta-final { text-align: center; }
.cta-final .lead { margin-inline: auto; }
.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--sage-deep);
  color: var(--cream);
  padding-block: var(--sp-7) var(--sp-6);
}

/* O CTA final também é verde-sálvia profundo. Sem este filete os dois blocos
   viram uma mancha só de cor. O rodapé é irmão de <main>, não da seção, então
   um seletor de irmão adjacente não pegaria: fica incondicional. */
.footer { border-top: 1px solid rgba(249, 246, 240, 0.2); }

.footer a { color: var(--cream); }

.footer__grid {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 48rem) {
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; gap: var(--sp-7); }
}

.footer .wordmark__name { color: var(--cream); }
.footer .wordmark__sub  { color: var(--cream); opacity: 0.7; }

.footer__title {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: var(--sp-3);
}

.footer__list { display: grid; gap: var(--sp-2); font-size: var(--fs-small); }
.footer__list a { text-decoration: none; }
.footer__list a:hover { text-decoration: underline; }

.footer__link-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer__link-icon svg { width: 16px; height: 16px; flex: none; }

.footer__crisis {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(249, 246, 240, 0.1);
  border: 1px solid rgba(249, 246, 240, 0.22);
  border-radius: var(--radius);
  font-size: var(--fs-small);
}

.footer__legal {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(249, 246, 240, 0.18);
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   17. WhatsApp fixo no mobile
   -------------------------------------------------------------------------- */
.sticky-wa {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
  background: rgba(249, 246, 240, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.sticky-wa .btn { width: 100%; }

/* Só no mobile. No desktop o CTA do hero e o final dão conta. */
@media (min-width: 48rem) {
  .sticky-wa { display: none; }
}

/* Respiro para o conteúdo não ficar embaixo da barra fixa */
@media (max-width: 47.99rem) {
  body { padding-bottom: 84px; }
}

/* --------------------------------------------------------------------------
   18. Página de texto corrido (política de privacidade)
   -------------------------------------------------------------------------- */
.prose { max-width: var(--wrap-text); }
.prose h2 { margin-top: var(--sp-7); margin-bottom: var(--sp-4); }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose ul { margin-bottom: var(--sp-4); color: var(--muted-strong); }
.prose ul { list-style: disc; padding-left: var(--sp-5); }
.prose li { margin-bottom: var(--sp-2); }
.prose a { color: var(--rose-deep); }
.prose strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   19. Equipe (Bianca + Júlia)
   -------------------------------------------------------------------------- */
.team { display: grid; gap: var(--sp-5); }

@media (min-width: 48rem) {
  .team { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}

.team__card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--sp-4) var(--sp-5);
  align-items: start;
  padding: var(--sp-5);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.team__photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%; /* foca o rosto no corte redondo */
  border: 2px solid var(--accent-tint);
}

.team__head { grid-column: 2; }
.team__name { font-family: var(--font-display); font-size: 1.375rem; color: var(--rose); line-height: 1.1; }
.team__crp {
  font-family: var(--font-label);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-top: var(--sp-2);
}
.team__bio { grid-column: 1 / -1; color: var(--muted-strong); font-size: var(--fs-small); }

/* Aviso de pendência (ex.: CRP da Júlia). Fica visível para não publicar sem. */
.pending {
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #FBECC9;
  color: #7A5B12;
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   20. Mapa de clusters (navegação da página pilar)
   -------------------------------------------------------------------------- */
.cluster-nav { display: grid; gap: var(--sp-4); }

@media (min-width: 40rem) { .cluster-nav { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .cluster-nav { grid-template-columns: 1fr 1fr 1fr; } }

.cluster-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.cluster-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.cluster-card__eyebrow {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.cluster-card__title { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.cluster-card__desc { font-size: var(--fs-small); color: var(--muted-strong); }
.cluster-card__more {
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--rose-deep);
}

/* Cluster ainda não publicado: card apagado, sem link. */
.cluster-card.is-soon { opacity: 0.62; cursor: default; }
.cluster-card.is-soon .cluster-card__more { color: var(--muted-strong); font-weight: 500; }

/* --------------------------------------------------------------------------
   21. Página de subnicho (SEO)
   -------------------------------------------------------------------------- */
/* Bloco "espelho emocional": fala em primeira pessoa a dor do subnicho. */
.mirror { max-width: 40em; display: grid; gap: var(--sp-4); }
.mirror p { color: var(--ink); font-size: var(--fs-lead); }

/* Callout de nomeação clínica: onde a autoridade de psicóloga aparece. */
.callout {
  max-width: 42em;
  padding: var(--sp-5) var(--sp-6);
  background: var(--accent-tint);
  border-left: 3px solid var(--accent-deep);
  border-radius: var(--radius);
}
.callout__label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--sp-2);
}
.callout p { color: var(--ink); }
.callout p + p { margin-top: var(--sp-3); }

/* Links internos para a página-mãe e páginas-irmãs: o que faz o cluster de SEO. */
.related { display: grid; gap: var(--sp-3); }
.related__list { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.related__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink);
  font-size: var(--fs-small);
  transition: border-color 0.15s ease;
}
.related__link:hover { border-color: var(--accent); }
.related__link svg { width: 15px; height: 15px; color: var(--accent-deep); flex: none; }
