/*
 * As cores vêm de variáveis CSS aplicadas por assets/js/themes.js.
 * Os valores abaixo são o fallback (paleta "suelen", modo claro) caso o JavaScript não rode.
 */
:root {
  --bg: #f4efe9; --surface: #fbf8f4; --surface2: #eee7e1; --border: #e2d8cb;
  --text: #33394f; --heading: #002455; --muted: #676b7a;
  --primary: #002455; --on-primary: #ffffff; --gold: #9a7c33;

  --font-serif: "Cinzel", Georgia, "Times New Roman", serif;
  --font-sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --header-h: 76px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 18px 40px -24px rgb(0 20 60 / 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 { color: var(--heading); margin: 0; line-height: 1.2; font-weight: 400; }
p { margin: 0; }
a { color: var(--primary); }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--gold); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.icon { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* logo: troca de arquivo conforme o modo */
.logo { display: inline-block; }
.logo img { width: 100%; height: auto; }
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }

/* ---------- cabeçalho ---------- */

.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.header.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom-color: var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand .logo { width: 132px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--text); text-decoration: none; font-size: 0.95rem; padding: 6px 12px; border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover { color: var(--heading); background: var(--surface2); }

.controls { display: flex; align-items: center; gap: 10px; }
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.segmented button {
  border: 0; background: transparent; color: var(--muted);
  width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segmented button:hover { color: var(--heading); }
.segmented button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

.menu-btn {
  display: none; border: 1px solid var(--border); background: var(--surface); color: var(--heading);
  width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center;
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 24px -14px var(--primary); }
.btn-primary:hover { box-shadow: 0 14px 28px -14px var(--primary); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }

/* ---------- animação ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */

.hero { position: relative; padding: 56px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 16%, transparent), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero-grid > * { min-width: 0; }

.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--gold); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.eyebrow::before, .kicker::before { content: ""; width: 32px; height: 1px; background: var(--gold); }

.hero-title {
  font-family: var(--font-serif); font-weight: 500; letter-spacing: 0.02em;
  font-size: clamp(2.8rem, 7vw, 5rem); margin-top: 18px;
}
.hero-lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 300; max-width: 540px; margin-top: 22px; color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--muted); font-size: 0.95rem; }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.hero-visual { display: flex; justify-content: center; }
.emblem { position: relative; width: min(100%, 440px); aspect-ratio: 1; display: grid; place-items: center; }
.blob {
  position: absolute; inset: 0;
  border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, transparent), color-mix(in srgb, var(--gold) 6%, transparent));
  animation: morph 16s ease-in-out infinite alternate;
}
@keyframes morph {
  0% { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; transform: rotate(0deg); }
  50% { border-radius: 45% 55% 42% 58% / 56% 44% 56% 44%; }
  100% { border-radius: 52% 48% 60% 40% / 42% 54% 46% 58%; transform: rotate(12deg); }
}
.emblem-circle {
  position: relative; width: 84%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.emblem-circle::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); pointer-events: none;
}
.logo-hero { position: relative; width: 74%; }

/* ---------- seções ---------- */

.section { padding: 104px 0; }
.section-alt { background: var(--surface2); }
[data-theme="dark"] .section-alt { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .kicker::after { content: ""; width: 32px; height: 1px; background: var(--gold); }
.section-head h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 14px; }
.section-intro { margin-top: 18px; font-size: 1.08rem; font-weight: 300; }

.prose p + p { margin-top: 18px; }

/* sobre */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.facts {
  display: grid; gap: 14px; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.facts li { display: flex; align-items: center; gap: 16px; font-size: 1.05rem; color: var(--heading); }
.fact-icon {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); flex-shrink: 0;
}

/* psicanálise */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 36px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.card-icon {
  width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--on-primary);
}
.card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin: 22px 0 10px; }

/* quando buscar */
.reasons-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.reasons-grid .section-head { margin-bottom: 0; }
.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reasons li {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--heading);
}
.reasons li .icon { color: var(--gold); }
.emergency {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px 18px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--gold) 60%, var(--border)); color: var(--muted); font-size: 0.95rem;
}
.emergency .icon { color: var(--gold); margin-top: 4px; }

/* como funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 32px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step-num { font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; color: var(--gold); }
.step h3 { font-family: var(--font-serif); font-size: 1.2rem; margin: 18px 0 8px; }

/* contato */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 880px; margin: 0 auto; }
.contact-card {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); transition: border-color 0.3s ease, transform 0.3s var(--ease);
}
.contact-card:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); transform: translateY(-2px); }
.contact-card.featured { background: var(--primary); border-color: var(--primary); }
.contact-card.featured .contact-label, .contact-card.featured .contact-value { color: var(--on-primary); }
.contact-card.featured .contact-icon { background: color-mix(in srgb, var(--on-primary) 15%, transparent); color: var(--on-primary); }
.contact-icon {
  width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); flex-shrink: 0;
}
.contact-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.contact-label { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-value { color: var(--heading); font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.contact-value:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-value::after { content: ""; position: absolute; inset: 0; }
.contact-card { position: relative; }
.icon-action {
  position: relative; z-index: 1; border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-action:hover { color: var(--gold); border-color: var(--gold); }

/* rodapé */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--border); background: var(--surface); text-align: center; }
.footer-inner { display: grid; justify-items: center; gap: 14px; font-size: 0.95rem; }
.logo-footer { width: 180px; margin-bottom: 8px; }
.footer strong { color: var(--heading); font-weight: 700; }

/* WhatsApp flutuante */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff; box-shadow: 0 12px 28px -10px rgb(0 0 0 / 0.45);
  opacity: 0; transform: translateY(20px) scale(0.9); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { transform: scale(1.06); }

/* ---------- responsivo ---------- */

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1.05rem; border-radius: 10px; }
  .controls { margin-left: auto; }
  .header { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .hero-grid, .about-grid, .reasons-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { order: -1; }
  .emblem { width: min(100%, 320px); }
  .cards, .steps { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  :root { --header-h: 68px; }
  .brand .logo { width: 112px; }
  .header-cta { display: none; }
  .hero { padding: 24px 0 72px; }
  .emblem { width: min(100%, 260px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .section { padding: 72px 0; }
  .reasons, .contact-grid { grid-template-columns: 1fr; }
  .facts { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
