/* Costa Odontologia & Saúde — estilos compartilhados */
:root {
  --musgo: #475A56;
  --musgo-fundo: #3A4A46;
  --musgo-claro: #5B6E69;
  --tinta: #22302C;
  --suave: #56625E;
  --nevoa: #F2F2F0;
  --linha: #D8DDDA;
  --branco: #FFFFFF;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --largura: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--branco);
  color: var(--tinta);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--musgo); outline-offset: 3px; border-radius: 4px; }
.fundo-musgo :focus-visible { outline-color: var(--branco); }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.7rem, 5.6vw, 4.7rem); line-height: 0.98; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.65rem; line-height: 1.15; font-weight: 400; }
p { margin: 0 0 1em; max-width: 64ch; }

.envoltorio { max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter); }
.secao { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.secao-nevoa { background: var(--nevoa); }
.fundo-musgo { background: var(--musgo); color: var(--branco); }
.intro { color: var(--suave); font-size: 1.15rem; }
.fundo-musgo .intro { color: rgba(255,255,255,.82); }
.cabeca-secao { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.cabeca-secao h2, h2 + .intro { margin-bottom: .6rem; }
h2 + .intro { margin-top: .6rem; }

.pular { position: absolute; left: -999px; top: 0; background: var(--branco); padding: .6rem 1rem; z-index: 99; }
.pular:focus { left: 1rem; top: 1rem; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem; border-radius: 999px;
  font: 500 1rem/1 var(--sans); text-decoration: none;
  background: var(--musgo); color: var(--branco);
  border: 1px solid var(--musgo);
  transition: background .25s, color .25s;
}
.botao:hover { background: var(--musgo-fundo); }
.botao svg { width: 20px; height: 20px; flex: none; }
.botao-claro { background: var(--branco); color: var(--musgo-fundo); border-color: var(--branco); }
.botao-claro:hover { background: var(--nevoa); }
.link-texto { font-weight: 500; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- topo ---------- */
.topo { position: relative; z-index: 5; }
.topo .envoltorio { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.marca img { width: 132px; height: auto; }
.menu { display: flex; align-items: center; gap: 2rem; font-size: .97rem; }
.menu a { text-decoration: none; opacity: .88; }
.menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.menu .botao { opacity: 1; padding: .7rem 1.2rem; }
.menu .botao:hover { text-decoration: none; }
@media (max-width: 900px) { .menu a:not(.botao) { display: none; } }

/* ---------- hero ---------- */
.hero { background: var(--musgo); color: var(--branco); overflow: hidden; }
.hero-grade {
  display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: end; padding-top: clamp(1rem, 3vw, 2.5rem);
}
.hero-texto { align-self: center; padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 span { display: block; }
.hero-sub { font-size: 1.2rem; color: rgba(255,255,255,.85); max-width: 34ch; margin-bottom: 2.2rem; }
.hero-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; }
.hero-acoes .link-texto { color: var(--branco); }
.hero-foto { align-self: end; }
.hero-foto img {
  width: 100%; height: min(66vh, 580px); min-height: 380px; object-fit: cover; object-position: 50% 15%;
  border-radius: 999px 999px 0 0;
}
.hero-dados { border-top: 1px solid rgba(255,255,255,.22); background: var(--musgo-fundo); }
.hero-dados .envoltorio { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-dados p { margin: 0; padding: 1.3rem 1.5rem; font-size: .95rem; color: rgba(255,255,255,.86); }
.hero-dados p:first-child { padding-left: 0; }
.hero-dados p + p { border-left: 1px solid rgba(255,255,255,.14); }
.hero-dados strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; color: var(--branco); line-height: 1.2; }

/* uma única entrada orquestrada no carregamento */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span, .hero-sub, .hero-acoes { animation: subir .9s cubic-bezier(.22,1,.36,1) both; }
  .hero h1 span:nth-child(2) { animation-delay: .08s; }
  .hero-sub { animation-delay: .18s; }
  .hero-acoes { animation-delay: .26s; }
  .hero-foto img { animation: revelar 1.2s cubic-bezier(.22,1,.36,1) .1s both; }
}
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes revelar { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (max-width: 820px) {
  .hero-grade { grid-template-columns: 1fr; }
  .hero-texto { padding-bottom: 0; }
  .hero-foto { max-width: 340px; margin: 0 auto; width: 100%; }
  .hero-dados .envoltorio { grid-template-columns: 1fr; }
  .hero-dados p { padding: 1rem 0; }
  .hero-dados p + p { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
}

/* ---------- seletor de caso ---------- */
.caso { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.opcoes { border: 0; padding: 0; margin: 0; display: grid; gap: .75rem; align-content: start; }
.opcoes legend { font-size: .95rem; color: var(--suave); margin-bottom: .9rem; padding: 0; }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao label {
  display: grid; grid-template-columns: 22px 1fr; gap: 1rem; align-items: center;
  padding: 1.25rem 1.4rem; border-radius: 18px; cursor: pointer;
  background: var(--branco); border: 1px solid var(--linha);
  transition: border-color .2s, background .2s;
}
.opcao label:hover { border-color: var(--musgo-claro); }
.opcao .marcador { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--musgo); position: relative; }
.opcao .marcador::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--musgo); transform: scale(0); transition: transform .2s; }
.opcao .rotulo { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; }
.opcao .rotulo small { display: block; font-family: var(--sans); font-size: .92rem; color: var(--suave); margin-top: .2rem; }
.opcao input:checked + label { border-color: var(--musgo); box-shadow: inset 0 0 0 1px var(--musgo); }
.opcao input:checked + label .marcador::after { transform: scale(1); }
.opcao input:focus-visible + label { outline: 2px solid var(--musgo); outline-offset: 3px; }

.resposta {
  background: var(--musgo); color: var(--branco); border-radius: 28px;
  padding: clamp(1.6rem, 4vw, 2.8rem); display: flex; flex-direction: column;
}
.resposta [hidden] { display: none; }
.resposta .desenho { background: var(--musgo-fundo); border-radius: 18px; padding: 1.2rem 1rem .4rem; margin-bottom: 1.8rem; }
.resposta .desenho svg { width: 100%; height: auto; max-height: 220px; }
.resposta h3 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 300; margin-bottom: .8rem; }
.resposta p { color: rgba(255,255,255,.86); }
.resposta .botao { margin-top: auto; align-self: flex-start; }
.resposta .ressalva { font-size: .88rem; color: rgba(255,255,255,.68); margin: 1rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .painel:not([hidden]) { animation: aparecer .45s ease both; }
}
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 860px) { .caso { grid-template-columns: 1fr; } }

/* ---------- antes e depois ---------- */
.antes-depois { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: center; }
.antes-depois figure { margin: 0; }
.antes-depois img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; }
.antes-depois figcaption { font-size: .95rem; color: var(--suave); margin-top: .7rem; }
.antes-depois .texto-caso h2 { margin-bottom: 1rem; }
@media (max-width: 860px) {
  .antes-depois { grid-template-columns: 1fr 1fr; }
  .antes-depois .texto-caso { grid-column: 1 / -1; }
}

/* ---------- dentista ---------- */
.dentista { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.dentista img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 28px; }
.dentista h2 { margin-bottom: 1.2rem; }
.cro { font-size: .95rem; color: var(--suave); }
@media (max-width: 860px) { .dentista { grid-template-columns: 1fr; } }

/* ---------- tratamentos ---------- */
.tratamentos { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 6vw, 5rem); margin: 0; }
.tratamentos > div { padding: 1.5rem 0; border-top: 1px solid var(--linha); display: grid; grid-template-columns: 64px 1fr; column-gap: 1.3rem; align-content: start; }
.tratamentos .icone {
  grid-row: span 2; width: 64px; height: 64px; padding: 8px; border-radius: 50%;
  background: var(--nevoa); fill: none; stroke: var(--musgo); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.tratamentos dt { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; margin-bottom: .35rem; }
.tratamentos dt a { text-underline-offset: 5px; text-decoration-thickness: 1px; }
.tratamentos dd { margin: 0; color: var(--suave); max-width: 46ch; }
@media (max-width: 720px) { .tratamentos { grid-template-columns: 1fr; } }

/* ---------- clínica ---------- */
.clinica-fotos { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1rem, 2.5vw, 1.6rem); margin-top: 2.5rem; }
.clinica-fotos img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; aspect-ratio: 4 / 3; }
.clinica-fotos img:last-child { aspect-ratio: auto; }
@media (max-width: 720px) { .clinica-fotos { grid-template-columns: 1fr; } .clinica-fotos img:last-child { aspect-ratio: 4 / 3; } }

/* ---------- avaliações ---------- */
.avaliacoes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 4rem); margin: 0 0 2.5rem; }
.avaliacoes blockquote { margin: 0; }
.avaliacoes blockquote p { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.1rem); line-height: 1.2; font-weight: 300; margin-bottom: 1rem; }
.avaliacoes cite { font-style: normal; font-size: .95rem; color: rgba(255,255,255,.78); }
.nota { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.2); }
.nota p { margin: 0; color: rgba(255,255,255,.86); }
.nota .link-texto { color: var(--branco); }
@media (max-width: 720px) { .avaliacoes { grid-template-columns: 1fr; } }

/* ---------- perguntas ---------- */
.perguntas { max-width: 820px; }
.perguntas details { border-top: 1px solid var(--linha); }
.perguntas details:last-child { border-bottom: 1px solid var(--linha); }
.perguntas summary {
  list-style: none; cursor: pointer; padding: 1.4rem 2.5rem 1.4rem 0; position: relative;
  font-family: var(--serif); font-size: 1.6rem; line-height: 1.2;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: 12px; height: 12px;
  border-right: 1.5px solid var(--musgo); border-bottom: 1.5px solid var(--musgo);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s;
}
.perguntas details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.perguntas details > div { padding: 0 0 1.4rem; color: var(--suave); }

/* ---------- como chegar ---------- */
.chegar { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.chegar address { font-style: normal; font-size: 1.15rem; margin-bottom: 1.6rem; }
.horarios { border-collapse: collapse; width: 100%; max-width: 380px; margin-bottom: 2rem; }
.horarios th, .horarios td { text-align: left; padding: .55rem 0; border-bottom: 1px solid var(--linha); font-weight: 400; }
.horarios td { text-align: right; color: var(--suave); }
.chegar .acoes { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.mapa { border-radius: 28px; overflow: hidden; background: var(--nevoa); aspect-ratio: 4 / 3.4; }
.mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
.regiao { font-size: .97rem; color: var(--suave); margin-top: 1.6rem; }
@media (max-width: 860px) { .chegar { grid-template-columns: 1fr; } }

/* ---------- chamada final e rodapé ---------- */
.chamada { text-align: left; }
.chamada h2 { max-width: 18ch; margin-bottom: 1.2rem; }
.chamada .botao { margin-top: .8rem; }
.rodape { background: var(--musgo-fundo); color: rgba(255,255,255,.82); font-size: .95rem; padding: 3.5rem 0 6rem; }
.rodape .envoltorio { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 2rem; }
.rodape img { width: 150px; height: auto; margin-bottom: 1rem; }
.rodape h3 { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--branco); margin-bottom: .6rem; }
.rodape ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.rodape a { text-underline-offset: 3px; }
.rodape p { margin-bottom: .4rem; }
@media (max-width: 760px) { .rodape .envoltorio { grid-template-columns: 1fr; } }

/* barra do WhatsApp no celular */
.barra-whats { display: none; }
@media (max-width: 720px) {
  .barra-whats {
    display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
    border-top: 1px solid var(--linha);
  }
  .barra-whats .botao { width: 100%; justify-content: center; }
}
