/* Seção de crianças, elementos decorativos e animações */

/* ---------- Barra de progresso de leitura ---------- */
.progresso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; background: var(--rose); transform: scaleX(0); transform-origin: left; }

/* ---------- Ramos decorativos ---------- */
.abertura { position: relative; }
.abertura-texto, .retrato, .arco { position: relative; z-index: 1; }
.abertura-ramo { display: none; position: absolute; z-index: 0; color: var(--salvia-clara); transform-origin: 50% 100%; }
@media (min-width: 860px) {
  .abertura-ramo { display: block; width: 300px; height: 390px; right: calc(var(--margem) + 250px); top: 150px; rotate: -24deg; }
}
.sobre { position: relative; overflow: hidden; }
.sobre-texto { position: relative; z-index: 1; }
.sobre-ramo { position: absolute; z-index: 0; color: #46634F; width: 340px; height: 440px; right: -70px; bottom: -60px; transform-origin: 50% 100%; opacity: .55; }
@media (min-width: 860px) { .sobre-ramo { width: 460px; height: 600px; right: 6%; bottom: -90px; opacity: 1; } }

/* ---------- Faixa em movimento ---------- */
.faixa-movel { background: var(--mata); color: var(--rose-claro); overflow: hidden; padding: 18px 0; }
.trilho { display: flex; width: max-content; }
.trilho-grupo { display: flex; align-items: center; flex: none; }
.trilho-grupo span { font-family: var(--titulo); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1; white-space: nowrap; }
.trilho-grupo svg { width: 34px; height: 20px; margin: 0 clamp(20px, 3vw, 40px); fill: var(--salvia); flex: none; }

/* ---------- Crianças ---------- */
.criancas { background: var(--salvia-clara); display: grid; gap: clamp(40px, 6vw, 72px); }
.faixa.criancas > * { max-width: none; margin: 0; }
.criancas h2 { color: var(--mata); max-width: 15ch; }
.criancas-texto > p { margin-top: 22px; max-width: 50ch; }
.criancas-temas { margin: 34px 0 36px; display: grid; }
.criancas-temas div { padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--salvia) 60%, transparent); }
.criancas-temas dt { font-weight: 600; }
.criancas-temas dd { margin: 2px 0 0; color: var(--texto-suave); max-width: 46ch; }

.dentinhos { background: var(--branco); border-radius: 28px; padding: clamp(22px, 3.4vw, 40px); align-self: start; }
.dentinhos-titulo { font-family: var(--titulo); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; color: var(--mata); margin-bottom: 18px; }
.dentinhos-idades span { min-height: 42px; padding: 0 16px; font-size: .9375rem; background: var(--papel); border-color: var(--salvia-clara); }
.dentinhos-idades label:hover span { border-color: var(--salvia); }
.dentinhos-palco { display: grid; gap: 8px 28px; align-items: center; margin-top: 22px; }
#boca-svg { width: 100%; max-width: 300px; margin: 0 auto; overflow: visible; }
.dentinhos-fase { font-family: var(--titulo); font-size: 1.75rem; line-height: 1.1; color: var(--rose); margin-bottom: 8px; }
.dentinhos-fala p { max-width: 36ch; }
.dentinhos-legenda { margin-top: 16px; font-size: .875rem; color: var(--texto-suave); display: flex; align-items: center; gap: 6px; }
.bolinha { width: 14px; height: 14px; border-radius: 5px; display: inline-block; border: 1.5px solid var(--salvia); background: var(--branco); }
.bolinha.perm { background: var(--rose); border-color: var(--rose); margin-left: 12px; }
.dentinhos-nota { margin-top: 20px; font-size: .875rem; color: var(--texto-suave); }
@media (min-width: 560px) { .dentinhos-palco { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); } }
@media (min-width: 1000px) {
  .criancas { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
  .faixa.criancas { padding-left: max(var(--margem), calc((100vw - var(--largura)) / 2)); padding-right: max(var(--margem), calc((100vw - var(--largura)) / 2)); }
}

.gengiva { fill: none; stroke: var(--rose-claro); stroke-width: 36; stroke-linecap: round; stroke-linejoin: round; }
.dentinho { transform-box: fill-box; transform-origin: center; fill: var(--branco); stroke: var(--salvia); stroke-width: 1.6; opacity: 0; transform: scale(.2); }
.dentinho.nasceu { opacity: 1; transform: none; }
.dentinho.permanente { fill: var(--rose); stroke: var(--rose); }

/* ---------- Detalhes de interação ---------- */
.botao { transition: background-color .2s, color .2s, transform .2s; }
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(0); }
.lista-tratamentos h3 { transition: color .25s, translate .25s; }
.lista-tratamentos li:hover h3 { color: var(--rose); translate: 10px 0; }
.galeria .foto img { transition: scale .7s cubic-bezier(.2, .7, .2, 1); }
.galeria .foto:hover img { scale: 1.05; }

/* ---------- Movimento (só para quem não pediu redução) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .dentinho { transition: transform .5s cubic-bezier(.3, 1.7, .5, 1), opacity .25s, fill .3s, stroke .3s; transition-delay: calc(var(--ordem, 0) * 45ms); }

  .trilho { animation: correr 38s linear infinite; }
  .faixa-movel:hover .trilho { animation-play-state: paused; }
  @keyframes correr { to { transform: translateX(-50%); } }

  .abertura-ramo, .sobre-ramo { animation: balanco 9s ease-in-out infinite alternate; }
  .sobre-ramo { animation-duration: 11s; }
  @keyframes balanco { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }

  /* Entradas ao rolar: só valem quando o script marca a página */
  .anima [data-revela] { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--atraso, 0ms); }
  .anima [data-revela].visto { opacity: 1; transform: none; }

  /* Título da abertura: palavra por palavra */
  .anima .palavra { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
  .anima .palavra > span { display: inline-block; transform: translateY(110%); animation: subir .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.15s + var(--p) * 90ms); }
  @keyframes subir { to { transform: none; } }
  .anima .abertura-apoio, .anima .abertura-acoes, .anima .registro { opacity: 0; animation: surgir .9s ease forwards; }
  .anima .abertura-apoio { animation-delay: .9s; }
  .anima .abertura-acoes { animation-delay: 1.05s; }
  .anima .registro { animation-delay: 1.2s; }
  @keyframes surgir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .anima .retrato { animation: abrir 1.3s cubic-bezier(.2, .7, .2, 1) .35s both; }
  .anima .retrato img { animation: assentar 1.8s cubic-bezier(.2, .7, .2, 1) .35s both; }
  @keyframes abrir { from { clip-path: inset(100% 0 0 0 round 10px); } to { clip-path: inset(0 0 0 0 round 10px); } }
  @keyframes assentar { from { transform: scale(1.14); } to { transform: none; } }

  .lista-duvidas details[open] p { animation: surgir .4s ease; }
}

/* Largura de leitura na seção sobre */
.faixa.sobre > .sobre-texto { max-width: 620px; font-size: 1.125rem; }

/* ---------- Logo da marca ---------- */
.marca-img { height: 46px; width: auto; }
.rodape-logo { height: 118px; width: auto; margin-bottom: 22px; }
.chamada-logo { height: 84px; width: auto; margin: 0 auto 26px; }
@media (min-width: 860px) { .marca-img { height: 52px; } }

/* ---------- Fotos do ensaio ---------- */
.retrato { aspect-ratio: 4 / 5; }
.retrato img { object-position: center top; }
.sobre-foto { position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: 10px; max-width: 420px; width: 100%; background: #47634F; }
.faixa.sobre { display: grid; gap: 40px; }
@media (min-width: 860px) {
  .faixa.sobre { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: clamp(40px, 6vw, 96px); align-items: center; }
}

/* ---------- Textos com mais de um parágrafo ---------- */
.lista-tratamentos div p + p { margin-top: 12px; }
.criancas-texto > p + p { margin-top: 14px; }
.criancas-temas dd + dd { margin-top: 10px; }
.sobre blockquote p { font-size: clamp(1.25rem, 2.1vw, 1.625rem); }

/* ---------- Títulos em caixa alta, fonte Marcellus (pedido da Dra. Juliana, 20/11) ---------- */
h1, h2 { font-weight: 400; text-transform: uppercase; letter-spacing: .035em; line-height: 1.16; }
h1 { font-size: clamp(1.875rem, 4.3vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 2.9vw, 2.25rem); }
.lista-tratamentos h3 { font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.3; }
.trilho-grupo span { font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(1.0625rem, 1.9vw, 1.375rem); }
.onde address strong, .dentinhos-titulo, .dentinhos-fase, .marca-nome { font-weight: 400; letter-spacing: .01em; }
.lista-passos li::before { font-weight: 400; font-size: 2.5rem; }
.sobre blockquote p { font-weight: 400; letter-spacing: 0; line-height: 1.4; font-size: clamp(1.1875rem, 1.9vw, 1.5rem); }
.dentinhos-titulo { font-size: clamp(1.3125rem, 2.1vw, 1.625rem); }
.dentinhos-fase { font-size: 1.4375rem; line-height: 1.2; }
.onde address strong { font-size: 1.5rem; }
.retrato img { object-position: center top; }

/* ---------- Seção da família (pedido da Dra. Juliana, 20/11) ---------- */
.faixa.familia { display: grid; gap: 36px; align-items: center; }
.faixa.familia > * { max-width: none; margin: 0; }
.familia-texto { max-width: 560px; }
.familia-texto p { margin-top: 22px; font-size: 1.125rem; color: var(--texto-suave); }
.familia-foto { aspect-ratio: 4 / 5; border-radius: 10px; width: 100%; max-width: 420px; }
.familia-foto img { object-position: center top; }
@media (min-width: 860px) {
  .faixa.familia { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); column-gap: clamp(40px, 6vw, 96px); }
  .familia-foto { justify-self: end; }
  .faixa.familia { padding-left: max(var(--margem), calc((100vw - var(--largura)) / 2)); padding-right: max(var(--margem), calc((100vw - var(--largura)) / 2)); }
}

/* ---------- Galeria: cadeira como principal, mais placa e letreiro ---------- */
.galeria .foto-principal { grid-column: 1 / -1; aspect-ratio: 1 / 1; }
.galeria .foto-placa { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.galeria .foto-letreiro img { object-position: left center; }
@media (min-width: 860px) {
  .galeria .foto-principal { grid-column: auto; aspect-ratio: auto; height: 440px; }
  .galeria .foto-placa { grid-column: 2 / span 2; aspect-ratio: 3 / 2; height: auto; }
  .galeria .foto-larga { aspect-ratio: auto; height: auto; align-self: stretch; }
}

/* ---------- Avaliação: foto do atendimento ao lado dos passos (pedido da Dra. Juliana, 20/11) ---------- */
.passos-foto { aspect-ratio: 4 / 5; border-radius: 10px; width: 100%; max-width: 420px; margin-bottom: clamp(28px, 5vw, 44px); }
.passos-foto img { object-position: center 35%; }
@media (min-width: 1000px) {
  .faixa.passos { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: clamp(40px, 6vw, 96px); align-items: start; padding-left: max(var(--margem), calc((100vw - var(--largura)) / 2)); padding-right: max(var(--margem), calc((100vw - var(--largura)) / 2)); }
  .faixa.passos > * { max-width: none; margin-left: 0; margin-right: 0; grid-column: 2; }
  .faixa.passos > .passos-foto { grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; align-self: center; }
  .faixa.passos .lista-passos { grid-template-columns: repeat(2, 1fr); }
  .faixa.passos .cabeca, .faixa.passos .cabeca h2 { max-width: none; }
}

/* ---------- Rodapé: contatos com ícone, sem sublinhado (20/11) ---------- */
.rodape-titulo { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rose-claro); margin-bottom: 14px; }
.rodape-horario { margin-top: 12px; opacity: .8; }
.rodape-contatos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rodape .rodape-contatos a { display: flex; align-items: center; gap: 14px; padding: 8px 0; text-decoration: none; min-height: 44px; }
.rodape-contatos svg { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: background-color .25s, border-color .25s, color .25s; }
.rodape-contatos span { display: grid; line-height: 1.3; font-weight: 500; }
.rodape-contatos small { font-size: .75rem; font-weight: 400; letter-spacing: .04em; opacity: .7; }
.rodape-contatos a:hover svg, .rodape-contatos a:focus-visible svg { background: var(--rose-claro); border-color: var(--rose-claro); color: var(--mata); }
@media (min-width: 760px) { .rodape { align-items: start; } }
