:root {
  --bg: #F1EEE6;
  --bg-alt: #E8E2D4;
  --surface: #FBFAF6;
  --text: #262B23;
  --text-muted: #5B6055;
  --primary: #3A5245;
  --primary-strong: #24362C;
  --primary-tint: #DCE5DC;
  --accent: #8C5B67;
  --accent-tint: #E6D6D8;
  --border: #DAD3C2;
  --shadow: 0 20px 40px -28px rgba(36, 54, 44, 0.35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A211C;
    --bg-alt: #212820;
    --surface: #232B24;
    --text: #EBE8DF;
    --text-muted: #AEB4A6;
    --primary: #93B8A2;
    --primary-strong: #C4DBC9;
    --primary-tint: #2B372E;
    --accent: #D6A2AC;
    --accent-tint: #3A2C2E;
    --border: #384038;
    --shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1A211C;
  --bg-alt: #212820;
  --surface: #232B24;
  --text: #EBE8DF;
  --text-muted: #AEB4A6;
  --primary: #93B8A2;
  --primary-strong: #C4DBC9;
  --primary-tint: #2B372E;
  --accent: #D6A2AC;
  --accent-tint: #3A2C2E;
  --border: #384038;
  --shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

img { max-width: 100%; height: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--primary-strong);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: clamp(18px, 5vw, 48px);
}

/* ---------- Header ---------- */
/* Cabeçalho sempre creme (mesma cor do fundo de assets/logo.jpg), independente do tema.
   As variáveis são redefinidas aqui com valores claros fixos, então tudo dentro dele
   (links, botão "Agendar", menu mobile) fica escuro e legível nos dois temas. */
.site-header {
  --logo-cream: #E1D7CD;
  --bg: var(--logo-cream);
  --bg-alt: #D6CBBF;
  --surface: var(--logo-cream);
  --text: #262B23;
  --text-muted: #4E5349;
  --primary: #3A5245;
  --primary-strong: #24362C;
  --accent: #7A4A56;
  --border: #C8BBAD;
  --shadow: 0 20px 40px -28px rgba(36, 54, 44, 0.35);
  color-scheme: light;
  color: var(--text);

  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--logo-cream);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px clamp(18px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
.brand img { height: 38px; width: auto; display: block; }
@media (min-width: 560px) {
  .brand img { height: 44px; }
}

.nav-links {
  display: none;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.nav-links a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-muted);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--primary-strong); border-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--surface); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

.nav-mobile { display: inline-block; position: relative; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { border-color: var(--accent); color: var(--accent); }
.nav-mobile-panel {
  position: absolute;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-width: 190px;
}
.nav-mobile-panel a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-mobile-panel a:hover { background: var(--bg-alt); }

@media (min-width: 1100px) {
  .nav-links { display: flex; }
  .nav-mobile { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 96px) clamp(48px, 7vw, 76px);
}
.hero-grid {
  display: grid;
  gap: clamp(32px, 6vw, 56px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.18;
  font-style: italic;
  font-weight: 400;
}
.hero p.lede {
  margin-top: 20px;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.hero-ctas {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}
.hero-art svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .ring-1 { animation: breathe 9s ease-in-out infinite; transform-origin: center; }
  .ring-2 { animation: breathe 9s ease-in-out infinite 0.6s; transform-origin: center; }
  .ring-3 { animation: breathe 9s ease-in-out infinite 1.2s; transform-origin: center; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(52px, 8vw, 88px); }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 5vw, 44px); }
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
}
.section-head .eyebrow { margin-bottom: 10px; }
.section-head p { color: var(--text-muted); margin-top: 12px; }

/* Sobre */
.sobre-grid {
  display: grid;
  gap: clamp(28px, 5vw, 52px);
  align-items: start;
}
@media (min-width: 860px) {
  .sobre-grid { grid-template-columns: 0.85fr 1.15fr; }
}
.avatar-photo {
  display: block;
  width: min(100%, 260px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin-inline: auto;
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--primary-tint);
  box-shadow: var(--shadow);
}
.sobre-copy p { margin: 0 0 16px; color: var(--text); }
.sobre-copy p:last-child { margin-bottom: 0; }
.credentials {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}
.credentials li {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-tint);
  padding: 8px 14px;
  border-radius: 999px;
}
.sobre-copy p.registro {
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

/* Cards (Psicanálise / TRG) */
.approach-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 760px) {
  .approach-grid.two { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 32px);
}
.card h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: 12px; }
.card p { color: var(--text-muted); margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* Atendimentos */
.atendimento-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) {
  .atendimento-grid { grid-template-columns: repeat(3, 1fr); }
}
.atendimento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.atendimento-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.atendimento-item p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* Depoimentos */
/* Celular: carrossel horizontal com snap (o próximo card aparece "espiando" à direita).
   A partir de 760px: 3 colunas lado a lado. */
.depo-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 84%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding-bottom: 12px;
  scrollbar-width: thin;
}
@media (min-width: 760px) {
  .depo-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    overflow: visible;
    padding-bottom: 0;
  }
}
.depo-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.depo-quote {
  position: relative;
  margin: 0;
  padding-left: 18px;
}
.depo-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.card .depo-quote p {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--primary-strong);
  margin: 0;
}
.card .depo-quote-full p { font-size: 1.05rem; }
.depo-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.depo-more { font-family: inherit; }
.card p.depo-name {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-strong);
  margin: 0;
}

.depo-dialog {
  width: min(680px, calc(100% - 24px));
  max-width: none;
  max-height: min(86vh, 86dvh);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.depo-dialog::backdrop { background: rgba(20, 26, 22, 0.55); }
.depo-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.depo-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(20px, 4vw, 28px) clamp(20px, 4vw, 32px) 16px;
  border-bottom: 1px solid var(--border);
}
.depo-dialog-head .eyebrow { margin-bottom: 6px; }
.depo-dialog-head h3 { font-size: 1.35rem; font-weight: 500; }
.depo-close {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.depo-close:hover { border-color: var(--accent); color: var(--accent); }
.depo-dialog-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px clamp(20px, 4vw, 32px) clamp(24px, 4vw, 32px);
}
.depo-dialog-body p { margin: 0 0 14px; color: var(--text); }
.depo-dialog-body p:last-child { margin-bottom: 0; }
body:has(.depo-dialog[open]) { overflow: hidden; }

/* Formulário de contato */
.contact-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: transparent;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.contact-form p.form-status { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.contact-form p.form-status:empty { display: none; }
.contact-form p.form-status.is-success { color: var(--primary); font-weight: 600; }
.contact-form p.form-status.is-error { color: var(--accent); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 74ch; }
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 20px;
}
details.faq-item summary {
  padding-block: 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item p { color: var(--text-muted); margin: 0 0 18px; }

/* Contato */
.contato-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  gap: clamp(24px, 4vw, 40px);
}
@media (min-width: 800px) {
  .contato-panel { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.contato-panel h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-style: italic; font-weight: 400; }
.contato-panel p { color: var(--text-muted); }
.contato-actions { display: flex; flex-direction: column; gap: 12px; }
.contato-actions .btn { width: 100%; }
.contact-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.contact-email { user-select: all; overflow-wrap: anywhere; }
.contato-panel p.contact-note { font-size: 0.9rem; margin-bottom: 0; }

footer {
  padding-block: 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 18px; }
.footer-inner a { text-decoration: none; color: var(--text-muted); }
.footer-inner a:hover { color: var(--accent); }

/* Floating WhatsApp */
.float-whatsapp {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  .ring-1, .ring-2, .ring-3 { animation: none; }
}
