/* ============================================================
   Dr. Rodrigo Vivan — Endodontia microscópica · folha de estilos
   Tipografia: Newsreader (serifada, títulos) + Instrument Sans (texto/UI)
   Paleta monocromática: #FFFFFF · #F7F7F5 · #E9E9E6 · #242424 · #111111
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FFFFFF;
  color: #111111;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #111111; text-decoration: none; }
a:hover { color: #6F6F6C; }
::selection { background: #111111; color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--accent, #111111); outline-offset: 3px; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
button { font-family: inherit; }

:root {
  --accent: #111111;
  --white: #FFFFFF;
  --soft: #F7F7F5;
  --gray: #E9E9E6;
  --graphite: #242424;
  --black: #111111;
}

.is-dark { --accent: rgba(255,255,255,.75); }
.is-dark a:hover { color: #FFFFFF; }

.noscroll::-webkit-scrollbar { height: 0; width: 0; }

@keyframes heroDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -3%, 0) scale(1.07); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.hero-drift { animation: heroDrift 24s ease-in-out infinite alternate; }
.hero-drift--cta { animation: heroDrift 26s ease-in-out infinite alternate; }
.rise-in { animation: riseIn 1s cubic-bezier(.2,.7,.2,1) both; }
.rise-in--delay { animation: riseIn 1s .15s cubic-bezier(.2,.7,.2,1) both; }
.rise-in--fast { animation: riseIn .35s ease both; }
.rise-in--menu { animation: riseIn .3s ease both; }

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid rgba(17,17,17,.1);
  transition: background .5s ease, backdrop-filter .5s ease, border-color .5s ease;
}
.site-header__row {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  height: clamp(64px, 6vw, 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: clamp(18px, 2.2vw, 34px);
  align-items: center;
  transition: height .45s ease;
}
.site-header--hero { background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.site-header--hero .site-header__row { height: clamp(74px, 8vw, 104px); }
.nav-link, .menu-toggle-label { color: #111111; transition: color .4s ease; }
.site-header--hero .nav-link, .site-header--hero .menu-toggle-label { color: #FFFFFF; }
/* Logo oficial: preto no cabeçalho claro, branco sobre a foto do topo, prata original no rodapé */
.logo-img { filter: brightness(0); transition: filter .4s ease, height .45s ease; }
.site-header--hero .logo-img { filter: brightness(0) invert(1); }

.nav-cluster { display: flex; align-items: center; }
.nav-cluster--left { justify-content: flex-end; }
.nav-cluster--right { justify-content: flex-start; }
.menu-toggle {
  align-items: center; gap: 10px; background: none; border: 0; padding: 12px 0; cursor: pointer;
  font: 500 12px/1 'Instrument Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  display: none;
}
.menu-toggle-bars { display: block; width: 20px; height: 9px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.desk-nav { display: flex; gap: clamp(16px, 1.7vw, 26px); align-items: center; }
.nav-link { font: 500 12px/1 'Instrument Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.nav-item { position: relative; }
.nav-trigger {
  display: flex; align-items: center; gap: 7px; background: none; border: 0; padding: 12px 0; cursor: pointer;
  font: 500 12px/1 'Instrument Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: inherit; white-space: nowrap;
}
.nav-trigger .caret { font-size: 9px; opacity: .7; }
.logo-link { display: flex; align-items: center; justify-content: center; }
/* Assinatura tipográfica provisória — trocar pelo logotipo oficial (monograma RV) quando for enviado */
.logo-text { font: 400 clamp(21px, 1.9vw, 27px)/1 "Newsreader", serif; letter-spacing: .01em; color: #111111; white-space: nowrap; transition: color .4s ease; }
.site-header--hero .logo-text { color: #FFFFFF; }
.logo-link:hover .logo-text { color: inherit; }
.logo-img { height: clamp(36px, 3.4vw, 46px); width: auto; display: block; }
.site-header--hero .logo-img { height: clamp(44px, 4.2vw, 58px); }

.dropdown {
  display: none;
  position: absolute; top: 100%; left: -22px; background: #FFFFFF; border: 1px solid #E2E2DE; padding: 10px 0;
  box-shadow: 0 18px 40px -30px rgba(17,17,17,.4);
}
.dropdown.is-open { display: block; }
.dropdown--trat { width: 300px; }
.dropdown--dent { width: 320px; }
.dropdown a { display: block; padding: 11px 22px; font-size: 14px; letter-spacing: .01em; }
.dropdown a:hover { background: #F7F7F5; color: #111111; }
.dropdown a.dropdown__cta {
  margin-top: 6px; padding: 13px 22px 6px; border-top: 1px solid #E9E9E6;
  font: 500 11px/1 'Instrument Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #6F6F6C;
}
.dropdown a.dropdown__cta:hover { background: none; }
.dropdown__person { display: block; padding: 12px 22px; }
.dropdown__person:hover { background: #F7F7F5; }
.dropdown__person-name { display: block; font-size: 14px; color: #111111; }
.dropdown__person-meta { display: block; margin-top: 3px; font-size: 12px; color: #6F6F6C; }

.mobile-nav { display: none; background: #FFFFFF; border-top: 1px solid #E2E2DE; padding: 18px clamp(20px, 4vw, 64px) 30px; }
.mobile-nav.is-open { display: block; }
.mobile-nav__list li a { display: block; padding: 16px 0; border-bottom: 1px solid #E9E9E6; font: 400 22px/1.2 'Newsreader', serif; }
.mobile-nav__list li:last-child a { border-bottom: 0; }
.mobile-nav__cta {
  display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 18px 24px;
  background: #111111; color: #FFFFFF; font: 500 12px/1 'Instrument Sans', sans-serif; letter-spacing: .12em; text-transform: uppercase;
}

@media (max-width: 1099px) {
  .desk-nav { display: none !important; }
  .menu-toggle { display: flex; }
  /* Sem os menus de desktop, "menu + logo" vira um único bloco centralizado
     em vez de ocupar as duas colunas laterais da grade (isso deixava o
     conjunto puxado para a esquerda, com todo o espaço vazio sobrando à direita). */
  .site-header__row { display: flex; justify-content: center; align-items: center; gap: clamp(14px, 3vw, 22px); }
  .nav-cluster--left { flex: 0 0 auto; justify-content: flex-end; }
}

/* ---------------------------------------------------------------
   Hover utilities (ported from the design's per-element hover states)
   --------------------------------------------------------------- */
.hv-scale { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.hv-scale:hover { transform: scale(1.015); }
.hv-scale-sm { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.hv-scale-sm:hover { transform: scale(1.012); }
.hv-lighten:hover { color: #F7F7F5; }
.hv-soft-bg:hover { background: #F7F7F5; }
.hv-gap { transition: gap .3s ease; }
.hv-gap:hover { gap: 18px; }
.hv-gap-lg { transition: gap .3s ease, border-color .3s ease; }
.hv-gap-lg:hover { gap: 20px; }
.hv-gap-lg.hv-border-accent:hover { border-color: var(--accent, #111111); }
.hv-dark:hover { color: #111111; }
.hv-accent-bg { transition: background .35s ease, color .35s ease; }
.hv-accent-bg:hover { background: #242424 !important; color: #FFFFFF !important; }
/* Botão claro sobre fundo escuro */
.hv-light-btn { transition: background .35s ease, color .35s ease; }
.hv-light-btn:hover { background: #E9E9E6 !important; color: #111111 !important; }
.hv-accent-bg-ink { transition: background .35s ease, color .35s ease; }
.hv-accent-bg-ink:hover { background: var(--accent, #111111); color: #FFFFFF; }
.hv-dark-bg { transition: background .35s ease, color .35s ease; }
.hv-dark-bg:hover { background: #111111; color: #FFFFFF; }
.hv-dark-bg-border { transition: background .3s ease, border-color .3s ease, color .3s ease; }
.hv-dark-bg-border:hover { background: #111111; border-color: #111111; color: #FFFFFF; }
.hv-social { transition: background .3s ease, color .3s ease; }
.hv-social:hover { background: #F7F7F5; color: #111111; }
.hv-cream-bg { transition: background .35s ease; }
.hv-cream-bg:hover { background: #111111; }
.hv-btn-cta { transition: background .35s ease, color .35s ease; }
.hv-btn-cta:hover { background: #FFFFFF; color: #111111 !important; border-color: #FFFFFF; }

/* ---------------------------------------------------------------
   Credibilidade (abas com crossfade de imagem)
   --------------------------------------------------------------- */
.cred-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.cred-img.is-active { opacity: 1; }
.cred-tab { color: #8A8A87; }
.cred-tab:hover { color: #111111; }
.cred-tab.is-active { color: #111111; }
.cred-panel { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.cred-panel.is-active { opacity: 1; }

/* ---------------------------------------------------------------
   FAQ (acordeão)
   --------------------------------------------------------------- */
.faq-q { color: #6F6F6C; border-bottom: 2px solid transparent; transition: color .35s ease; }
.faq-q:hover { color: #111111; }
.faq-q.is-active { color: #111111; border-bottom-color: #111111; }
.faq-a { display: none; }
.faq-a.is-active { display: block; }

/* ---------------------------------------------------------------
   Formulário de contato
   --------------------------------------------------------------- */
.field input, .field textarea {
  border: 1px solid #DEDEDA; background: #FFFFFF; font-family: inherit; font-size: 15px; color: #111111;
}
.field input:focus, .field textarea:focus { border-color: var(--accent, #111111); }
.form-note { margin-top: 14px; font-size: 13px; color: #6F6F6C; display: none; }
.form-note.is-visible { display: block; }

/* ---------------------------------------------------------------
   Camada responsiva — sobrescreve apenas o grid do layout base
   --------------------------------------------------------------- */
[data-mob] { display: none; }
@media (max-width: 1023px) {
  [style*="repeat(12"] { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  [style*="grid-column: span 7"], [style*="grid-column: span 6"], [style*="grid-column: span 5"],
  [style*="grid-column: span 4"], [style*="grid-column: 6 /"], [style*="grid-column: 7 /"],
  [style*="grid-column: 8 /"], [style*="grid-column: 9 /"], [style*="grid-column: 11 /"] { grid-column: 1 / -1 !important; }
  [style*="65fr"] { grid-template-columns: 1fr !important; }
  [style*="auto minmax"] { grid-template-columns: 1fr !important; }
  [style*="auto minmax"] > [aria-hidden="true"] { display: none !important; }
  [style*="auto minmax"] > li { grid-column: 1 !important; grid-row: auto !important; }
  aside[style*="sticky"] { position: static !important; }
  [style*="repeat(4, minmax"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  section[aria-label="Apresentação"] [style*="1.15fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-column: 6 / span 8"] { margin-right: 0 !important; }
}
@media (max-width: 1099px) {
  [data-desk] { display: none !important; }
  [data-mob] { display: flex; }
}
@media (max-width: 719px) {
  [style*="repeat(12"], [style*="repeat(3, minmax"], [style*="repeat(4, minmax"],
  [style*="grid-template-columns: repeat(2, minmax"], [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-column: span 2"] { grid-column: 1 / -1 !important; }
  [style*="flex: 0 0 76%"] { flex: 0 0 88% !important; }
  section[aria-label="Apresentação"] { min-height: 620px !important; }
  h1 { letter-spacing: -.01em !important; }
  section[aria-labelledby="proc-t"] ol { grid-template-columns: 1fr !important; }
  section[aria-labelledby="proc-t"] ol > li { grid-column: 1 !important; grid-row: auto !important; }
  section[aria-labelledby="proc-t"] ol > li[aria-hidden] { display: none !important; }
}

/* ---------------------------------------------------------------
   Rodapé — grid próprio (não usa os seletores de atributo acima),
   com breakpoints explícitos para logo, textos e ícones sociais.
   --------------------------------------------------------------- */
.site-footer { background: #111111; color: #F7F7F5; padding: clamp(60px, 7vw, 96px) 0 40px; }
.site-footer__inner { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.site-footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); }
.site-footer__brand { grid-column: span 5; }
.site-footer__brand img { height: 92px; width: auto; display: block; }
.site-footer__brand p { margin-top: 20px; font-size: 15px; line-height: 1.6; color: rgba(247,247,245,.66); }
.site-footer__brand address { margin-top: 20px; font-style: normal; font-size: 15px; line-height: 1.7; color: rgba(247,247,245,.66); }
.site-footer__nav { grid-column: 7 / span 3; }
.site-footer__nav ul { display: flex; flex-direction: column; gap: 12px; }
.site-footer__nav a { color: rgba(247,247,245,.78); font-size: 15px; }
.site-footer__social { grid-column: 10 / span 3; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.site-footer__social a {
  width: 42px; height: 42px; border: 1px solid rgba(247,247,245,.28); display: flex; align-items: center;
  justify-content: center; border-radius: 50%; color: rgba(247,247,245,.85); transition: background .3s ease, color .3s ease;
}
.site-footer__social a:hover { background: #F7F7F5; color: #111111; }
.site-footer__bottom {
  margin-top: clamp(44px, 5vw, 72px); padding-top: 24px; border-top: 1px solid rgba(247,247,245,.14);
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
}
.site-footer__bottom p, .site-footer__bottom a { font-size: 13px; color: rgba(247,247,245,.5); }

@media (max-width: 1023px) {
  .site-footer__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-footer__brand, .site-footer__nav, .site-footer__social { grid-column: 1 / -1; }
}
@media (max-width: 719px) {
  .site-footer__grid { grid-template-columns: 1fr; row-gap: 32px; }
  .site-footer__brand { grid-column: 1; order: 1; }
  .site-footer__nav { grid-column: 1; order: 2; }
  .site-footer__social { grid-column: 1; order: 3; justify-content: flex-start; }
}

/* ---------------------------------------------------------------
   Botão fixo do WhatsApp — presente em todas as páginas
   --------------------------------------------------------------- */
.whatsapp-fab {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 100;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(17,17,17,.55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.whatsapp-fab:hover { transform: scale(1.07); box-shadow: 0 14px 34px -6px rgba(17,17,17,.6); color: #fff; }
.whatsapp-fab svg { width: 30px; height: 30px; display: block; fill: #fff; }
@media (max-width: 719px) {
  .whatsapp-fab { width: 52px; height: 52px; }
  .whatsapp-fab svg { width: 27px; height: 27px; }
}

/* ---------------------------------------------------------------
   Prévia — espaços reservados para conteúdo que ainda vai chegar
   --------------------------------------------------------------- */
/* Bloco de foto pendente (substituir por <img> quando a foto real chegar) */
.ph {
  position: relative; width: 100%; height: 100%; background: #E9E9E6;
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 18px 20px;
}
.ph::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(17,17,17,.08); pointer-events: none;
}
.ph span { position: relative; font: 500 10px/1.4 "Instrument Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #6F6F6C; }

/* Capa tipográfica provisória do livro */
.book-cover {
  aspect-ratio: 3/4; background: #111111; color: #FFFFFF; padding: clamp(28px, 3.2vw, 48px);
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 60px -40px rgba(17,17,17,.6);
}
.book-cover__title { font: 300 clamp(28px, 3vw, 44px)/1.05 "Newsreader", serif; letter-spacing: -.015em; }
.book-cover__sub { margin-top: 14px; font: italic 300 clamp(15px, 1.2vw, 18px)/1.35 "Newsreader", serif; color: rgba(255,255,255,.72); }
.book-cover__authors { font: 500 10px/1.6 "Instrument Sans", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.65); }

/* Chamada "em breve / vamos conversar" usada nas páginas internas */
.soon {
  border: 1px solid #E2E2DE; background: #FFFFFF; padding: clamp(28px, 3.4vw, 48px);
  display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between;
}
.soon__tag { font: 500 10px/1 "Instrument Sans", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #6F6F6C; }
.soon__title { margin-top: 14px; font: 300 clamp(22px, 2.2vw, 31px)/1.16 "Newsreader", serif; max-width: 28ch; }
.soon__text { margin-top: 12px; font-size: 15px; line-height: 1.65; color: #4A4A48; max-width: 58ch; }

/* Mapa incorporado */
.map-embed { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.85) contrast(1.02); }
