/* Fontes hospedadas no próprio site (licença OFL: Cormorant Garamond e Inter, via Google Fonts). Só o subconjunto latino (cobre o português). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(../assets/fonts/cormorant-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(../assets/fonts/cormorant-italic-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../assets/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* CeliDigital — tokens do design system base (neutro).
   Identidade de cada cliente entra SOMENTE sobrescrevendo estas variáveis
   (ver temas/ e exemplo.html). Nenhum componente deve ter cor/fonte fixa. */

:root {
  /* Cores semânticas */
  --cor-fundo: #ffffff;
  --cor-superficie: #f5f5f4;
  --cor-texto: #1a1a1a;
  --cor-texto-suave: #55555a;
  --cor-borda: #dcdcdc;
  --cor-primaria: #2f4f6f;
  --cor-primaria-texto: #ffffff;
  --cor-acento: #b4553a;
  --cor-foco: #1d6fe0;
  --cor-sucesso: #2a7a4b;
  --cor-erro: #b3261e;

  /* Tipografia */
  --fonte-titulo: Georgia, "Times New Roman", serif;
  --fonte-corpo: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fonte-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --texto-xs: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
  --texto-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);
  --texto-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --texto-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --texto-xl: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem);
  --texto-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --texto-hero: clamp(2.75rem, 1.8rem + 5vw, 6rem);
  --altura-linha: 1.6;
  --altura-linha-titulo: 1.1;

  /* Espaçamento (escala de 4px) */
  --esp-1: 0.25rem;
  --esp-2: 0.5rem;
  --esp-3: 0.75rem;
  --esp-4: 1rem;
  --esp-6: 1.5rem;
  --esp-8: 2rem;
  --esp-12: 3rem;
  --esp-16: 4rem;
  --esp-24: 6rem;
  --calha: clamp(1rem, 4vw, 2.5rem);
  --largura-max: 1200px;
  --largura-texto: 65ch;

  /* Forma e profundidade */
  --raio-sm: 6px;
  --raio-md: 12px;
  --raio-lg: 20px;
  --raio-pilula: 999px;
  --sombra-sm: 0 1px 2px rgb(0 0 0 / 0.08);
  --sombra-md: 0 6px 20px rgb(0 0 0 / 0.1);

  /* Movimento */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-suave: cubic-bezier(0.4, 0, 0.2, 1);
  --duracao-rapida: 150ms;
  --duracao: 300ms;
  --duracao-lenta: 700ms;

  /* Camadas */
  --z-base: 1;
  --z-topo: 50;
  --z-modal: 100;
}

/* Tema escuro opcional: <html data-tema="escuro"> */
:root[data-tema="escuro"] {
  --cor-fundo: #101112;
  --cor-superficie: #1a1c1e;
  --cor-texto: #f2f2f0;
  --cor-texto-suave: #b4b4b8;
  --cor-borda: #34373a;
  --cor-primaria: #8fb2d6;
  --cor-primaria-texto: #101112;
  --sombra-sm: 0 1px 2px rgb(0 0 0 / 0.5);
  --sombra-md: 0 6px 20px rgb(0 0 0 / 0.5);
}
/* CeliDigital — reset e base. Depende de tokens.css. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-corpo);
  font-size: var(--texto-base);
  line-height: var(--altura-linha);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--fonte-titulo);
  line-height: var(--altura-linha-titulo);
  text-wrap: balance;
}
h1 { font-size: var(--texto-2xl); }
h2 { font-size: var(--texto-xl); }
h3 { font-size: var(--texto-lg); }

p { margin: 0; } /* sem text-wrap: pretty: deixava o 1º layout lento (medido, ver planejamento.md) */

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }

/* Foco visível para teclado */
:focus-visible {
  outline: 3px solid var(--cor-foco);
  outline-offset: 3px;
}

/* Âncoras não ficam escondidas atrás de topo fixo */
[id] { scroll-margin-top: 5rem; }

/* Movimento reduzido: respeita a preferência do usuário em todo o sistema */
@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;
  }
}
/* CeliDigital — utilitários e padrões de interface. Depende de tokens.css e base.css. */

/* Layout */
.container { width: min(var(--largura-max), 100% - 2 * var(--calha)); margin-inline: auto; }
.texto-medida { max-width: var(--largura-texto); }
.secao { padding-block: var(--esp-16); }
.pilha { display: flex; flex-direction: column; gap: var(--pilha-gap, var(--esp-4)); }
.linha { display: flex; flex-wrap: wrap; align-items: center; gap: var(--linha-gap, var(--esp-4)); }
.grade { display: grid; gap: var(--esp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.centro { text-align: center; }

/* Texto */
.texto-suave { color: var(--cor-texto-suave); }
.texto-sm { font-size: var(--texto-sm); }
.texto-hero { font-size: var(--texto-hero); line-height: var(--altura-linha-titulo); }
.sobretitulo {
  font-family: var(--fonte-mono);
  font-size: var(--texto-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cor-texto-suave);
}

/* Acessibilidade */
.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;
}
.pular-conteudo {
  position: absolute; left: var(--esp-4); top: -4rem; z-index: var(--z-modal);
  padding: var(--esp-2) var(--esp-4); background: var(--cor-primaria);
  color: var(--cor-primaria-texto); border-radius: var(--raio-sm);
}
.pular-conteudo:focus { top: var(--esp-4); }

/* Botão (ex.: CTA de agendamento/WhatsApp) */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2);
  min-height: 2.75rem; padding: var(--esp-3) var(--esp-6);
  border: 1px solid transparent; border-radius: var(--raio-pilula);
  background: var(--cor-primaria); color: var(--cor-primaria-texto);
  font-weight: 600; text-decoration: none;
  transition: transform var(--duracao-rapida) var(--ease), box-shadow var(--duracao) var(--ease);
}
.botao:hover { transform: translateY(-1px); box-shadow: var(--sombra-md); }
.botao--contorno { background: transparent; color: var(--cor-texto); border-color: var(--cor-borda); }
.botao--acento { background: var(--cor-acento); }

/* Cartão */
.cartao {
  padding: var(--esp-6); background: var(--cor-superficie);
  border: 1px solid var(--cor-borda); border-radius: var(--raio-md);
}
/* Tema Ventura Odontologia: só sobrescreve variáveis do design system base. */
:root {
  --cor-fundo: #171412;
  --cor-superficie: #211d1a;
  --cor-texto: #f6f1ee;
  --cor-texto-suave: #b9aeaa;
  --cor-borda: #3a3330;
  --cor-primaria: #8f5a5e;
  --cor-primaria-texto: #ffffff;
  --cor-acento: #d8a7aa;
  --cor-foco: #f0c4c7;
  --fonte-titulo: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --fonte-corpo: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --raio-md: 18px;
  --rosa-marca: #9c666a;
  --whatsapp: #25d366;
}
/* Página Ventura Odontologia. Usa só variáveis do design system + tema.css. */

em { font-style: italic; color: var(--cor-acento); }
.sobretitulo { color: var(--cor-acento); }

/* ——— Logo (recorta a margem transparente do arquivo) ——— */
.logo { display: block; flex: none; width: 140px; aspect-ratio: 3.2 / 1; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo--grande { width: clamp(150px, 22vw, 230px); }

/* A logo rosé do arquivo tem pouco contraste no fundo escuro: clareia só nos fundos escuros. */
.topo .logo img, .hero__marca img, .rodape .logo img { filter: brightness(1.7) saturate(1.1); }
@media (min-width: 900px) {
  .cena--final { max-width: min(24rem, 28vw); }
  .cena--final h2 { font-size: clamp(1.8rem, 1rem + 2.4vw, 3rem); }
}

.botao--sm { min-height: 2.5rem; padding: var(--esp-2) var(--esp-4); font-size: var(--texto-sm); }
.botao--whats { background: var(--whatsapp); color: #0b2e17; }

/* ——— Topo e botão flutuante (entram ao fim do hero) ——— */
.topo {
  position: fixed; z-index: var(--z-topo); top: 16px; left: 50%;
  width: min(1100px, 100% - 32px);
  display: flex; align-items: center; gap: var(--esp-6);
  padding: 6px 10px 6px 18px; border-radius: var(--raio-pilula);
  background: rgb(23 20 18 / 0.72); border: 1px solid var(--cor-borda);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transform: translate(-50%, -20px);
  transition: opacity var(--duracao) var(--ease), transform var(--duracao) var(--ease);
}
.topo[data-visivel="true"] { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.topo__nav { display: none; margin-left: auto; gap: var(--esp-6); font-size: var(--texto-sm); }
.topo__nav a { text-decoration: none; color: var(--cor-texto-suave); }
.topo__nav a:hover { color: var(--cor-texto); }
.topo .botao { margin-left: auto; }
@media (min-width: 900px) { .topo__nav { display: flex; } .topo .botao { margin-left: 0; } }

.flutuante {
  position: fixed; z-index: var(--z-topo); right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  padding: var(--esp-3) var(--esp-4); border-radius: var(--raio-pilula);
  background: var(--whatsapp); color: #0b2e17; font-weight: 600; text-decoration: none;
  box-shadow: var(--sombra-md);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity var(--duracao) var(--ease), transform var(--duracao) var(--ease);
}
.flutuante[data-visivel="true"] { opacity: 1; pointer-events: auto; transform: none; }

/* ——— Hero: seção alta com palco preso; JS escreve as variáveis de progresso ——— */
.hero { position: relative; height: 340vh; background: #0c0a09; }
@media (max-width: 899px) { .hero { height: 280vh; } }
.hero__palco { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__midia { position: absolute; inset: 0; }
.hero__poster, .hero__video, .hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
}
.hero__video { opacity: 0; transition: opacity var(--duracao) var(--ease); }
.hero__video.pronto { opacity: 1; }
.hero__canvas { display: none; }
.hero--seq .hero__canvas { display: block; }
.hero--seq .hero__video { display: none; }
.hero--seq .hero__poster { object-fit: contain; object-position: 50% 36%; transform: scale(1.35); transform-origin: 50% 36%; }
.hero__veu {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgb(10 8 7 / 0.8), transparent 42%),
    linear-gradient(to right, rgb(10 8 7 / 0.45), transparent 55%);
}
.hero__marca { position: absolute; z-index: 2; top: 20px; left: var(--calha); }
.hero__role {
  position: absolute; z-index: 2; bottom: 18px; left: 0; right: 0; text-align: center;
  font-family: var(--fonte-mono); font-size: var(--texto-xs); letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--cor-texto-suave);
}

.cena {
  position: absolute; z-index: 2; left: var(--calha); right: var(--calha); bottom: 16vh; max-width: 34rem;
  opacity: 0; pointer-events: none; will-change: opacity, transform, filter;
}
.cena h1 { font-size: clamp(2.6rem, 1.6rem + 5vw, 5.5rem); line-height: 1.02; }
.cena h2 { font-size: clamp(2rem, 1.2rem + 3.5vw, 4rem); line-height: 1.05; }
.cena .sobretitulo { margin-bottom: var(--esp-3); }
.cena p.texto-suave { margin-top: var(--esp-4); }
.cena--abre { margin-inline: auto; max-width: 46rem; text-align: center; bottom: 18vh; }
.cena--baixo { bottom: 10vh; }
.cena--final { bottom: 12vh; }
.cena__acoes { margin-top: var(--esp-6); }

.hero__trilha {
  position: absolute; z-index: 2; right: var(--calha); top: 50%; transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--esp-2); text-align: right;
  font-family: var(--fonte-mono); font-size: var(--texto-xs); letter-spacing: 0.14em; text-transform: uppercase;
}
.hero__trilha li { color: var(--cor-texto-suave); opacity: 0.45; transition: opacity var(--duracao) var(--ease); }
.hero__trilha li.ativo { opacity: 1; color: var(--cor-texto); }
.hero__trilha li.ativo::after { content: " ●"; color: var(--cor-acento); }
@media (max-width: 599px) { .hero__trilha { display: none; } }

/* ——— Tratamentos: fileira horizontal presa ——— */
.trat { position: relative; background: var(--cor-fundo); }
.trat__palco {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(20px, 4vh, 44px); padding: 72px 0 36px;
}
.trat__cabeca h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem); max-width: 22ch; margin-top: var(--esp-2); }
.trat__janela { overflow: hidden; padding-left: var(--calha); }
.trat__fila { display: flex; gap: 20px; width: max-content; margin: 0; padding: 0; list-style: none; will-change: transform; }
.card {
  flex: none; width: clamp(260px, 76vw, 340px); overflow: hidden;
  background: var(--cor-superficie); border: 1px solid var(--cor-borda); border-radius: var(--raio-md);
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__corpo { display: flex; flex-direction: column; gap: var(--esp-2); padding: 18px; }
.card__num { font-family: var(--fonte-mono); font-size: var(--texto-xs); color: var(--cor-acento); }
.card h3 { font-size: 1.6rem; }
.card p { font-size: var(--texto-sm); color: var(--cor-texto-suave); }
.card__tag {
  align-self: flex-start; font-size: var(--texto-xs); padding: 4px 10px;
  border: 1px solid var(--cor-borda); border-radius: var(--raio-pilula); color: var(--cor-texto-suave);
}
.card__link { margin-top: var(--esp-2); color: var(--cor-acento); text-decoration: none; font-weight: 500; font-size: var(--texto-sm); }
.card__link:hover { text-decoration: underline; }
.trat__barra { height: 2px; background: var(--cor-borda); }
.trat__barra span { display: block; height: 100%; background: var(--cor-acento); transform-origin: left; transform: scaleX(0); }

/* ——— Sobre ——— */
.sobre__grade { display: grid; gap: var(--esp-8); align-items: center; }
.sobre__foto { width: 100%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: var(--raio-lg); }
.sobre h2, .duvidas h2, .contato h2 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.5rem); }
.chips { display: flex; flex-wrap: wrap; gap: var(--esp-2); list-style: none; margin: 0; padding: 0; }
.chips li { font-size: var(--texto-sm); padding: 6px 14px; border: 1px solid var(--cor-borda); border-radius: var(--raio-pilula); }
@media (min-width: 800px) { .sobre__grade { grid-template-columns: 0.8fr 1.2fr; gap: var(--esp-16); } }

/* ——— FAQ ——— */
.duvidas__grade { display: grid; gap: var(--esp-8); }
.faq details { border-bottom: 1px solid var(--cor-borda); }
.faq summary {
  display: flex; justify-content: space-between; gap: var(--esp-4); align-items: center;
  padding: var(--esp-4) 0; cursor: pointer; list-style: none; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--cor-acento); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: var(--esp-4); color: var(--cor-texto-suave); max-width: var(--largura-texto); }
@media (min-width: 900px) {
  .duvidas__grade { grid-template-columns: 1fr 1.6fr; gap: var(--esp-16); }
  .duvidas__grade > header { align-self: start; position: sticky; top: 110px; }
}

/* ——— Páginas de texto (Privacidade, Termos) ——— */
.legal { max-width: 46rem; display: grid; gap: var(--esp-4); }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.legal h2 { font-size: 1.5rem; margin-top: var(--esp-6); }
.legal ul { padding-left: 1.25rem; display: grid; gap: var(--esp-2); }
.legal a, .rodape a { color: var(--cor-acento); }

/* ——— Contato e rodapé ——— */
.contato__caixa {
  display: grid; gap: var(--esp-8); padding: clamp(24px, 5vw, 56px);
  background: var(--cor-superficie); border: 1px solid var(--cor-borda); border-radius: var(--raio-lg);
}
.contato__dados { font-style: normal; display: grid; gap: var(--esp-4); align-content: center; color: var(--cor-texto-suave); }
.contato__dados strong { color: var(--cor-texto); }
.contato__dados a { color: var(--cor-acento); }
@media (min-width: 800px) { .contato__caixa { grid-template-columns: 1.4fr 1fr; } }

.rodape { border-top: 1px solid var(--cor-borda); padding-block: var(--esp-12); }
.rodape__caixa { display: flex; flex-direction: column; gap: var(--esp-4); }
@media (min-width: 700px) { .rodape__caixa { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ——— Aviso de cookies ——— */
.cookies {
  position: fixed; z-index: var(--z-modal); left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 46rem; margin-inline: auto;
  display: grid; gap: var(--esp-4); padding: var(--esp-4) var(--esp-6);
  background: var(--cor-superficie); border: 1px solid var(--cor-borda); border-radius: var(--raio-md);
  box-shadow: var(--sombra-md);
}
.cookies[hidden] { display: none; }
.cookies__texto { font-size: var(--texto-sm); color: var(--cor-texto-suave); }
.cookies__texto strong { color: var(--cor-texto); }
.cookies__texto a { color: var(--cor-acento); }
.cookies__acoes { display: flex; gap: var(--esp-3); justify-content: flex-end; }
@media (min-width: 700px) { .cookies { grid-template-columns: 1fr auto; align-items: center; } }
.link-botao { background: none; border: 0; padding: 0; font: inherit; color: var(--cor-acento); text-decoration: underline; cursor: pointer; }

/* ——— Celular: menos efeitos caros para a rolagem do hero ficar fluida ——— */
@media (max-width: 899px) {
  .cena { will-change: opacity, transform; }
  .topo { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(23 20 18 / 0.94); }
}
