/* =========================================================
   Macedo Clínicas — duas identidades visuais
   [data-mode="odonto"]   → clínico, geométrico, azul-marinho
   [data-mode="estetica"] → editorial, orgânico, nude + champagne
   ========================================================= */

/* ---------- Fontes da marca ----------
   Baru Sans (títulos) é uma fonte comercial. Para usá-la no site:
   1) coloque o arquivo licenciado em assets/fonts/BaruSans-Bold.woff2
   2) descomente a linha url(...) abaixo.
   Enquanto isso, o site usa a Archivo (Google Fonts), que é parecida. */
@font-face {
  font-family: "Baru Sans";
  src: local("Baru Sans Bold"), local("BaruSans-Bold")
       /* , url("assets/fonts/BaruSans-Bold.woff2") format("woff2") */;
  font-weight: 700 800;
  font-display: swap;
}

/* Guia da marca: Azul Escuro #1F3457 · Dourado #B99A61 · Branco #F5F5F5 · Preto #454545 */
:root {
  --brand-blue: #1f3457;
  --brand-gold: #b99a61;
  --brand-gold-ink: #8a6d3b; /* dourado escurecido p/ textos pequenos (contraste AA) */
  --brand-white: #f5f5f5;
  --brand-black: #454545;
}

:root,
[data-mode="odonto"] {
  --bg: #eef3f9;
  --bg-2: #e3eaf3;
  --surface: #ffffff;
  --ink: var(--brand-blue);
  --ink-2: var(--brand-black);
  --primary: var(--brand-blue);
  --primary-2: #2b4775;
  --on-primary: var(--brand-white);
  --accent: var(--brand-gold);
  --accent-ink: var(--brand-gold-ink);
  --accent-soft: #e4ebf4;
  --star: var(--brand-gold);
  --line: rgba(31, 52, 87, 0.1);
  --shadow: 0 24px 60px -28px rgba(31, 52, 87, 0.38);
  --shadow-sm: 0 8px 24px -14px rgba(31, 52, 87, 0.3);

  --font-display: "Baru Sans", "Archivo", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.03em;
  --display-leading: 1.04;
  --h1-size: clamp(2.6rem, 5.4vw, 4.6rem);
  --h2-size: clamp(2rem, 3.6vw, 3rem);
  --em-style: normal;

  --radius: 22px;
  --radius-sm: 14px;
  --btn-radius: 14px;
  --btn-case: none;
  --btn-tracking: 0;

  --hero-shape-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
  --hero-shape-bg: linear-gradient(160deg, #2b4775 0%, #1f3457 70%);
  --photo-radius: 38% 62% 32% 68% / 30% 30% 70% 70%;
}

[data-mode="estetica"] {
  --bg: #f8f1eb;
  --bg-2: #f1e3d8;
  --surface: #fffaf6;
  --ink: #3a2520;
  --ink-2: #7a5f57;
  --primary: #8a5242;
  --primary-2: #a86a56;
  --on-primary: #fffaf6;
  --accent: var(--brand-gold);
  --accent-ink: var(--brand-gold-ink);
  --accent-soft: #f0ddd1;
  --star: var(--brand-gold);
  --line: rgba(58, 37, 32, 0.12);
  --shadow: 0 24px 60px -30px rgba(138, 82, 66, 0.4);
  --shadow-sm: 0 8px 24px -16px rgba(138, 82, 66, 0.35);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.01em;
  --display-leading: 1.02;
  --h1-size: clamp(3rem, 6.4vw, 5.6rem);
  --h2-size: clamp(2.4rem, 4.4vw, 3.7rem);
  --em-style: italic;

  --radius: 30px;
  --radius-sm: 20px;
  --btn-radius: 999px;
  --btn-case: uppercase;
  --btn-tracking: 0.14em;

  --hero-shape-radius: 999px 999px 36px 36px;
  --hero-shape-bg: linear-gradient(180deg, #ecd3c4 0%, #e2bba7 100%);
  --photo-radius: 999px 999px 30px 30px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

/* Largura do conteúdo: margem lateral de 16px (celular) até 64px, limite de 1480px */
.container { width: min(1480px, 100% - 2 * clamp(16px, 4vw, 64px)); margin-inline: auto; }

[data-mode="odonto"] body { font-weight: 500; }

/* Mostrar/ocultar conteúdo por área */
[data-mode="odonto"] [data-show="estetica"],
[data-mode="estetica"] [data-show="odonto"] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; line-height: 1.2;
  border-radius: var(--btn-radius);
  border: 1.5px solid transparent;
  font-weight: 600; font-size: 0.95rem;
  text-transform: var(--btn-case);
  letter-spacing: var(--btn-tracking);
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease, color .25s ease;
  white-space: nowrap;
}
[data-mode="estetica"] .btn { font-size: 0.78rem; font-weight: 500; padding: 12px 22px; }
.btn svg { width: 16px; height: 16px; transition: transform .25s ease; }
.btn:hover svg { transform: translate(3px, -3px); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-2); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 80px; }

/* Logo oficial: a cor vem do tema (azul da marca na odonto, terracota na estética) */
.logo { display: flex; align-items: center; color: #1f3457; flex-shrink: 0; transition: opacity .2s; }
[data-mode="estetica"] .logo { color: var(--primary); }
.logo:hover { opacity: .85; }
.logo-h { width: 176px; aspect-ratio: 234 / 56; height: auto; display: block; }
.logo-v { width: 150px; aspect-ratio: 170 / 117; height: auto; display: block; }

.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { font-size: 0.92rem; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .2s; white-space: nowrap; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

/* ---------- Seletor de área ---------- */
.mode-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.mode-switch::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px; background: var(--primary);
  transition: transform .5s cubic-bezier(.7, 0, .2, 1), background-color .5s;
}
[data-mode="estetica"] .mode-switch::before { transform: translateX(100%); }
.mode-switch button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; line-height: 1.2; border: 0; background: none; cursor: pointer;
  font-size: 0.86rem; font-weight: 600; border-radius: 999px;
  color: var(--ink-2); transition: color .4s;
  font-family: "Quicksand", system-ui, sans-serif; font-weight: 700;
}
.mode-switch button[aria-checked="true"] { color: var(--on-primary); }
.mode-switch svg { width: 17px; height: 17px; }
.mode-switch .short { display: none; }
.mode-switch[hidden] { display: none !important; }

.header-cta { padding: 9px 16px; font-size: 0.88rem; }
[data-mode="estetica"] .header-cta { padding: 10px 18px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
}
[data-mode="odonto"] .hero::before {
  background-image: radial-gradient(rgba(31, 52, 87, .14) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 60% 70% at 80% 40%, #000 0%, transparent 70%);
}
[data-mode="estetica"] .hero::before {
  background:
    radial-gradient(ellipse 45% 55% at 85% 30%, rgba(226, 187, 167, .55), transparent 70%),
    radial-gradient(ellipse 35% 40% at 5% 90%, rgba(184, 138, 90, .18), transparent 70%);
}

.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 48px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
[data-mode="estetica"] .eyebrow { font-weight: 500; letter-spacing: 0.26em; }

.hero h1 { font-size: var(--h1-size); margin: 20px 0 22px; color: var(--ink); }
.hero h1 em, h2 em { font-style: var(--em-style); color: var(--primary); position: relative; white-space: nowrap; }
[data-mode="odonto"] .hero h1 em,
[data-mode="odonto"] h2 em { color: var(--accent-ink); }
[data-mode="odonto"] .hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.06em; height: .2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14C50 4 140 2 197 10' fill='none' stroke='%23b99a61' stroke-width='5' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
[data-mode="estetica"] .hero h1 em { color: var(--primary); font-weight: 500; }

.hero-lead { font-size: 1.12rem; color: var(--ink-2); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 40px; }
.avatars { display: flex; }
.avatars img {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg); margin-left: -12px;
}
.avatars img:first-child { margin-left: 0; }
.hero-proof .stars { color: var(--star); display: flex; gap: 2px; }
.hero-proof .stars svg { width: 15px; height: 15px; }
.hero-proof small { display: block; color: var(--ink-2); font-size: 0.85rem; }

/* Foto do hero */
.hero-visual { position: relative; height: 580px; display: grid; place-items: end center; }
.hero-shape {
  position: absolute; bottom: 0; left: 50%; translate: -50% 0;
  width: 86%; aspect-ratio: 1 / 1.02;
  border-radius: var(--hero-shape-radius); background: var(--hero-shape-bg);
}
[data-mode="odonto"] .hero-shape { animation: morph 14s ease-in-out infinite; }
[data-mode="estetica"] .hero-shape { width: 74%; aspect-ratio: 1 / 1.3; }
[data-mode="estetica"] .hero-shape::after {
  content: ""; position: absolute; inset: -16px; border-radius: inherit;
  border: 1px solid var(--accent); translate: 14px -14px; opacity: .7;
}
[data-mode="odonto"] .hero-shape::after {
  content: ""; position: absolute; inset: -22px; border-radius: inherit;
  border: 1.5px dashed rgba(185, 154, 97, .55);
  animation: spin 40s linear infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; }
  50% { border-radius: 56% 44% 52% 48% / 44% 56% 44% 56%; }
}
@keyframes spin { to { rotate: 360deg; } }

.hero-photo {
  position: relative; z-index: 1; width: 92%; max-width: 520px;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .12));
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}
[data-mode="estetica"] .hero-photo { width: 80%; }


/* ---------- Hero · Odontologia (split assimétrico) ----------
   Texto sobre o fundo claro; painel azul preso à borda direita da tela, com uma
   curva grande no canto inferior esquerdo (ecoa o círculo do símbolo da marca).
   --px / --py (-1 a 1) vêm do mouse (script.js) e movem a foto de leve. */
.hero-s {
  position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(600px, calc(100vh - 80px), 820px); margin-bottom: 64px;
}
.hero-s-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 46%;
  background: var(--brand-blue); border-bottom-left-radius: 240px; overflow: hidden;
}
.hero-s-mark { /* símbolo da marca, grande, esmaecido e cortado pela borda */
  position: absolute; right: -18%; top: 4%; width: 118%; max-width: 820px; aspect-ratio: 1;
  color: var(--brand-white); opacity: .08; pointer-events: none;
}
.hero-s-photo {
  position: absolute; bottom: 0; left: 50%; translate: -50% 0;
  height: 94%; width: auto; max-width: none; pointer-events: none;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .25));
  transform: translate3d(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 5px), 0);
  transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}

.hero-s-inner { position: relative; z-index: 2; }
.hero-s-copy { width: min(52%, 640px); padding: 56px 0; }
.hero-s-copy h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.8rem); line-height: 1.03; letter-spacing: -0.035em; color: var(--ink);
}
.hero-s-copy h1 em { font-style: normal; color: var(--accent-ink); }
.hero-s-lead { margin-top: 22px; max-width: 460px; font-size: 1.08rem; color: var(--ink-2); }
.hero-s-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-s-facts {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 40px;
}
.hero-s-facts li { display: flex; flex-direction: column; gap: 4px; line-height: 1.25; }
.hero-s-facts strong { font-size: .95rem; font-weight: 700; color: var(--ink); }
.hero-s-facts span { font-size: .82rem; color: var(--ink-2); }
.hero-s-stars { color: var(--brand-gold) !important; letter-spacing: 2px; }
.hero-s-facts .nw { white-space: nowrap; }

/* Entrada (também na troca de área) */
.replay .hero-s-panel { animation: panel-in 1s cubic-bezier(.2, .7, .2, 1) both; }
.replay .hero-s-photo { animation: photo-in 1.1s cubic-bezier(.2, .7, .2, 1) both .2s; }
@keyframes panel-in { from { opacity: 0; translate: 40px 0; } }

/* Notebook pequeno / tablet deitado: mantém o split, mas a foto não corta os ombros
   e os fatos quebram em linhas em vez de espremer as colunas */
@media (max-width: 1260px) {
  .hero-s-photo { height: min(94%, 50vw); }
  .hero-s-facts { display: flex; flex-wrap: wrap; gap: 18px 36px; margin-top: 44px; }
}
@media (max-width: 1099px) {
  .hero-s { min-height: clamp(560px, calc(100vh - 80px), 720px); }
  .hero-s-panel { width: 42%; border-bottom-left-radius: 180px; }
  .hero-s-copy { width: 55%; padding: 48px 0; }
  .hero-s-copy h1 { font-size: clamp(2.4rem, 4.6vw, 3.2rem); }
  .hero-s-lead { font-size: 1rem; }
  .hero-s-actions { margin-top: 28px; }
  .hero-s-facts { margin-top: 36px; gap: 16px 28px; }
}

/* Tablet em pé e celular: painel com a foto em cima (curva no canto inferior
   esquerdo, como no desktop) e texto embaixo — foto, título e CTA na 1ª tela */
@media (max-width: 899px) {
  .hero-s { flex-direction: column; align-items: stretch; min-height: 0; margin-bottom: 32px; }
  .hero-s-panel {
    position: relative; inset: auto; width: 100%;
    height: clamp(300px, 52vw, 440px); border-radius: 0 0 0 clamp(90px, 18vw, 160px);
  }
  .hero-s-photo { height: 96%; }
  .hero-s-mark { width: 78%; right: -16%; top: -14%; }
  .hero-s-copy { width: 100%; max-width: 620px; margin-inline: auto; padding: 36px 0 8px; text-align: center; }
  .hero-s-copy h1 { font-size: clamp(2.2rem, 6.4vw, 3rem); }
  .hero-s-lead { margin-inline: auto; }
  .hero-s-actions, .hero-s-facts { justify-content: center; }
}
@media (max-width: 640px) {
  .hero-s-panel { height: 300px; border-radius: 0 0 0 96px; }
  .hero-s-photo { height: 100%; left: 56%; }
  .hero-s-mark { width: 120%; right: -46%; top: -18%; }
  .hero-s-copy { padding: 26px 0 0; text-align: left; }
  .hero-s-copy h1 { font-size: clamp(2rem, 9.2vw, 2.5rem); line-height: 1.06; }
  .hero-s-lead { margin: 14px 0 0; font-size: .98rem; }
  .hero-s-actions { margin-top: 22px; gap: 10px; }
  .hero-s-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-s-facts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px;
    margin-top: 32px; padding-top: 0;
  }
  .hero-s-facts li:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
}

/* ---------- Seções ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { font-size: var(--h2-size); margin-top: 14px; }
.section-head p { color: var(--ink-2); margin-top: 16px; font-size: 1.05rem; }
.section-head .eyebrow::after { content: ""; width: 28px; height: 1.5px; background: currentColor; }

/* Diferenciais */
.features { padding-top: 24px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border-radius: var(--radius); padding: 30px 26px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
/* Subida suave no hover. O seletor .js ... [data-reveal] garante que a
   transição de entrada ao rolar não substitua a do hover. */
.features-grid .feature,
.js .features-grid .feature[data-reveal] {
  transition: transform .6s cubic-bezier(.22, .61, .36, 1), box-shadow .6s cubic-bezier(.22, .61, .36, 1),
              opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1);
}
.feature:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--primary); margin-bottom: 22px;
}
[data-mode="estetica"] .feature-icon { border-radius: 50%; background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 10px; letter-spacing: -0.01em; }
[data-mode="estetica"] .feature h3 { font-size: 1.55rem; }
.feature p { color: var(--ink-2); font-size: 0.93rem; }

/* Quem somos
   A foto (atendimento-recorte.webp) tem fundo transparente; o degradê vem do quadro. */
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); align-items: center; }
.about-media {
  border-radius: 24px 120px 24px 120px; overflow: hidden; isolation: isolate;
  background: linear-gradient(172deg, #233a5c 0%, #2d4974 45%, #3d63a0 100%);
  aspect-ratio: 1 / 1.05; max-height: 640px;
}
[data-mode="estetica"] .about-media {
  border-radius: 999px 999px 30px 30px; aspect-ratio: 4 / 5;
  background: linear-gradient(172deg, #3a2520 0%, #5e382e 50%, #8a5242 100%);
}
.about-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 75% bottom;
}

.about-text { max-width: 600px; }
.about-text h2 { font-size: var(--h2-size); margin: 14px 0 24px; }
.about-text p { color: var(--ink-2); font-size: 1.04rem; }
.about-text p + p { margin-top: 14px; }

.about-text .btn { margin-top: 34px; }

/* Tratamentos */
.treatments { background: var(--bg-2); }
[data-mode="estetica"] .treatments { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 30%, var(--bg-2) 70%, var(--bg) 100%); }
.treat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.treat {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); padding: 32px 30px 28px;
  border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: transform .4s ease, box-shadow .4s ease, color .4s ease;
}
.treat::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--primary-2), var(--primary));
  opacity: 0; transition: opacity .4s ease;
}
.treat:hover { transform: translateY(-6px); box-shadow: var(--shadow); color: var(--on-primary); }
.treat:hover::before { opacity: 1; }
.treat:hover p { color: color-mix(in srgb, var(--on-primary) 78%, transparent); }
.treat:hover .treat-icon { background: rgba(255, 255, 255, .14); color: var(--on-primary); border-color: transparent; }
.treat:hover .treat-link { color: var(--on-primary); }
.treat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.treat-icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--primary); transition: all .4s ease;
}
[data-mode="estetica"] .treat-icon { border-radius: 50%; background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.treat-icon svg { width: 28px; height: 28px; }
.treat h3 { font-size: 1.3rem; margin-bottom: 10px; }
[data-mode="estetica"] .treat h3 { font-size: 1.75rem; }
.treat p { color: var(--ink-2); font-size: 0.94rem; transition: color .4s; flex-grow: 1; }
.treat-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  font-size: 0.88rem; font-weight: 600; color: var(--primary); transition: color .4s;
}
.treat-link svg { width: 16px; height: 16px; transition: transform .25s; }
.treat-link:hover svg { transform: translateX(4px); }

/* Depoimentos — mural de cartões que sobem sozinhos (loop montado no script.js) */
.reviews-layout {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr);
  gap: clamp(40px, 5vw, 88px); align-items: center;
}
.reviews-intro h2 { font-size: var(--h2-size); margin: 14px 0 18px; }
.reviews-intro > p { color: var(--ink-2); font-size: 1.04rem; max-width: 420px; }
.reviews-intro .btn { margin-top: 30px; }
.reviews-intro .reviews-rating { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 0.86rem; color: var(--ink-2); }
.reviews-rating .stars { display: flex; gap: 2px; color: var(--star); }
.reviews-rating .stars svg { width: 14px; height: 14px; }

.reviews-wall {
  --wall-h: 600px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  height: var(--wall-h); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.reviews-col { min-width: 0; }
/* espaçamento por margem (não gap) para o loop de -50% fechar exato */
.reviews-track > .review { margin-bottom: 18px; }
/* duração e atraso de cada coluna vêm do script.js (velocidade constante) */
.reviews-wall.is-looping .reviews-track { animation: reviews-up var(--dur, 60s) linear infinite; animation-delay: var(--delay, 0s); }
.reviews-wall:hover .reviews-track { animation-play-state: paused; }
@keyframes reviews-up { to { transform: translateY(-50%); } }

.review {
  margin: 0; padding: 26px 22px 22px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.review blockquote { margin: 0 0 18px; font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }
[data-mode="estetica"] .review blockquote { font-family: var(--font-display); font-style: italic; font-size: 1.22rem; line-height: 1.4; color: var(--ink); }
.review figcaption { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.review figcaption::before { content: ""; width: 24px; height: 1.5px; background: var(--accent); margin-bottom: 8px; }
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--primary);
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
}
.review figcaption strong { font-size: 0.95rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.review .stars { display: flex; gap: 2px; color: var(--star); }
.review .stars svg { width: 13px; height: 13px; }

/* Consultório */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 4.2; }
[data-mode="estetica"] .gallery figure:nth-child(2) { border-radius: 999px 999px var(--radius) var(--radius); }
.gallery figure:nth-child(2) { translate: 0 40px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s cubic-bezier(.2, .7, .2, 1); }
.gallery figure:hover img { scale: 1.06; }
.gallery figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px);
  font-size: 0.82rem; font-weight: 600;
}

/* Contato — card branco: formulário à esquerda, painel com horários e contato à direita */
.contact { padding: 112px 0; }
.contact-card {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
  gap: clamp(32px, 5vw, 80px); align-items: stretch;
  padding: clamp(28px, 4.5vw, 64px);
  background: var(--surface); border-radius: calc(var(--radius) + 6px);
}
.contact-main h2 { font-size: var(--h2-size); }
.contact-lead { color: var(--ink-2); font-size: 1rem; max-width: 460px; margin: 12px 0 32px; }

.contact-aside { display: flex; }
.aside-photo {
  position: relative; margin: 0; flex: 1; min-height: 360px; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-2);
}
.aside-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aside-photo img[data-show="odonto"] { object-position: center 72%; }
.aside-photo img[data-show="estetica"] { object-position: center 42%; }
.aside-photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 64px 24px 22px; color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 28, 46, .6) 40%, rgba(18, 28, 46, .85) 100%);
}
[data-mode="estetica"] .aside-photo figcaption { background: linear-gradient(180deg, transparent 0%, rgba(40, 24, 20, .55) 40%, rgba(40, 24, 20, .82) 100%); }
.aside-photo .stars { display: flex; gap: 2px; color: var(--brand-gold); margin-bottom: 6px; }
.aside-photo .stars svg { width: 14px; height: 14px; }
.aside-photo blockquote { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
[data-mode="estetica"] .aside-photo blockquote { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.4rem; line-height: 1.3; }
.aside-photo-name { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, .78); }
.contact-form { margin: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label, .chips legend { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.field .optional { font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: 10px; outline: none; font-size: 0.95rem; line-height: 1.4;
  border: 1px solid transparent; background: var(--bg);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 65%, transparent); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input[aria-invalid="true"] { border-color: #c2453a; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23707a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field input, .field select { height: 44px; padding-block: 0; }
.field textarea { resize: vertical; min-height: 96px; }
[data-mode="estetica"] .field input, [data-mode="estetica"] .field select, [data-mode="estetica"] .field textarea { border-radius: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.chips legend { padding: 0; margin-bottom: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: var(--bg); font-size: 0.86rem; font-weight: 600;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-block { width: 100%; justify-content: center; margin-top: 4px; padding-block: 13px; }
.btn .btn-ico { width: 18px; height: 18px; }
.btn:hover .btn-ico { transform: none; }
.form-note {
  display: flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 0.8rem; color: var(--ink-2);
}
.form-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Footer — fundo na cor da marca, 4 colunas de links, linha com logo e o nome gigante cortado no pé */
.site-footer {
  --ft-fg: #f5f5f5;
  --ft-muted: rgba(245, 245, 245, .66);
  --ft-line: rgba(245, 245, 245, .14);
  position: relative; overflow: hidden;
  padding: 80px 0 0;
  background: var(--brand-blue); color: var(--ft-fg);
}
[data-mode="estetica"] .site-footer { background: #3a2520; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.site-footer h4 {
  margin: 0 0 16px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: var(--ft-muted);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer li { font-size: 0.92rem; line-height: 1.35; font-weight: 600; color: var(--ft-fg); }
.site-footer li.muted { margin-top: -6px; font-weight: 500; color: var(--ft-muted); }
.site-footer li a { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.site-footer li a:hover { color: var(--brand-gold); }
.site-footer .ext { width: 13px; height: 13px; transition: transform .2s; }
.site-footer li a:hover .ext { transform: translate(2px, -2px); }

.footer-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 32px;
  margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ft-line);
}
.footer-rt, .footer-copy { font-size: 0.82rem; color: var(--ft-muted); }
.footer-rt strong { font-weight: 600; color: var(--ft-fg); }
.footer-rt { margin: 0; }
.footer-copy { margin-left: auto; }

/* logo grande e suave no pé, cortada embaixo */
.footer-word {
  display: block; width: min(1480px, 100% - 2 * clamp(16px, 4vw, 64px)); margin: 48px auto 0; padding-bottom: clamp(32px, 4vw, 56px);
  color: rgba(245, 245, 245, .1); transition: color .3s;
}
.footer-word:hover { color: rgba(245, 245, 245, .16); }
.footer-word svg { display: block; width: 100%; aspect-ratio: 234 / 56; }

/* WhatsApp flutuante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
  transition: transform .25s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Animações de entrada ---------- */
.js [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }

.replay [data-intro] { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.replay [data-intro="2"] { animation-delay: .08s; }
.replay [data-intro="3"] { animation-delay: .16s; }
.replay [data-intro="4"] { animation-delay: .24s; }
.replay [data-intro="5"] { animation-delay: .32s; }
.replay .hero-photo { animation: photo-in 1.1s cubic-bezier(.2, .7, .2, 1) both .1s; }
.replay .treat-grid > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; translate: 0 26px; } }
@keyframes photo-in { from { opacity: 0; translate: 0 40px; scale: .96; } }

/* ---------- Transição entre identidades ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* Fallback para navegadores sem View Transitions */
.mode-wipe {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  clip-path: circle(0 at var(--x) var(--y));
}

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

/* ---------- Responsivo ---------- */
@media (max-width: 1260px) {
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 0.86rem; }
  .header-inner { gap: 16px; }
  .logo-h { width: 150px; }
}

@media (max-width: 1080px) {
  .header-cta { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px 32px; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 16px 16px; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .menu-toggle { display: inline-flex; }
  .mode-switch { margin-left: auto; }

  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { height: 460px; order: -1; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-proof { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-media { max-width: 520px; width: 100%; margin-inline: auto; }
  .treat-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-layout { grid-template-columns: 1fr; }
  .reviews-intro { text-align: center; }
  .reviews-intro > p { margin-inline: auto; }
  .reviews-intro .reviews-rating { justify-content: center; }
  .reviews-wall { --wall-h: 520px; }
  .contact-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-copy { margin-left: 0; }
  html { scroll-padding-top: 130px; }
  .header-inner { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .logo-h { width: 150px; }
  .menu-toggle { width: 40px; height: 40px; margin-left: auto; }
  .mode-switch { order: 3; width: 100%; margin-left: 0; }
  .mode-switch button { padding: 9px 12px; }

  .section { padding: 72px 0; }
  .hero-visual { height: 380px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .features-grid, .treat-grid { grid-template-columns: 1fr; }
  [data-mode="odonto"] .about-media { border-radius: 18px 80px 18px 80px; }
  .gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin-inline: -16px; padding: 0 16px 8px; scrollbar-width: none;
  }
  .gallery figure { flex: 0 0 78%; scroll-snap-align: center; }
  .gallery figure:nth-child(2) { translate: none; }
  .reviews-wall { --wall-h: 460px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .reviews-track > .review { margin-bottom: 12px; }
  .review { padding: 20px 14px 18px; }
  .review blockquote { font-size: 0.86rem; }
  [data-mode="estetica"] .review blockquote { font-size: 1.05rem; }
  .contact { padding-top: 72px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 18px; }
  .aside-photo { min-height: 300px; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}
