/* ==========================================================================
   Camada "apple-design" deste cliente. Carregar DEPOIS de style.css.
   O sincronizar.py não mexe neste arquivo. Princípios: resposta no toque,
   molas sem quique, material translúcido só no cabeçalho, tipografia com
   espaçamento por tamanho, e alternativas para movimento, transparência e contraste.
   ========================================================================== */

/* ---- 1. Variáveis -------------------------------------------------------- */
body {
  --fonte-serif: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --raio: 1.5rem;
  /* mola criticamente amortecida (resposta 0,4 s), sem quique */
  --mola: cubic-bezier(0.22, 1, 0.36, 1);
  --mola: linear(0, 0.186, 0.465, 0.682, 0.821, 0.903, 0.949, 0.974, 0.987, 0.993, 0.997, 0.999, 1);
  --linha-clara: color-mix(in srgb, var(--cor-texto-claro) 12%, transparent);
}

/* ---- 2. Tipografia ------------------------------------------------------- */
body { font-size: 1.0625rem; line-height: 1.55; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .nome-responsavel { font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.028em; line-height: 1.08; margin-bottom: 2.25rem; }
h3 { font-size: 1.3rem; letter-spacing: -0.014em; line-height: 1.2; }
p { text-wrap: pretty; }
.rodape, .funcao { font-size: 0.9375rem; letter-spacing: 0.01em; }
section[id] { scroll-margin-top: 4rem; }

/* ---- 3. Cabeçalho: camada translúcida com o conteúdo passando por baixo -- */
.cabecalho { position: sticky; top: 0; background: transparent; border-bottom: 0; min-height: 4.25rem; }
.cabecalho::before { /* o material fica num pseudo-elemento para o menu não herdar o contexto do blur */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--cor-fundo) 74%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.cabecalho::after { /* borda de rolagem: sombra suave no lugar da linha fixa */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1.25rem;
  background: linear-gradient(rgba(0, 0, 0, 0.22), transparent);
  opacity: 0; pointer-events: none;
}
.cabecalho.rolou::after { opacity: 1; }
.marca { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.menu a { background: none; font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.005em; }
.menu a:hover { color: var(--cor-destaque); }
.js .menu-botao { border-color: var(--linha-clara); background: color-mix(in srgb, var(--cor-texto-claro) 8%, transparent); font-weight: 600; font-size: 0.9375rem; }

/* ---- 4. Topo ------------------------------------------------------------- */
.topo {
  min-height: calc(88svh - 4.25rem); align-items: center;
  background-image:
    radial-gradient(60rem 36rem at 80% 0%, color-mix(in srgb, var(--cor-destaque) 26%, transparent), transparent 70%),
    radial-gradient(48rem 30rem at 0% 100%, color-mix(in srgb, var(--cor-destaque) 10%, transparent), transparent 70%);
}
.topo-centro { background-image: radial-gradient(64rem 40rem at 50% -5%, color-mix(in srgb, var(--cor-destaque) 28%, transparent), transparent 70%); }
.topo::before { content: none; }
.marca-dagua { display: none; }
.topo h1 { font-size: clamp(2.75rem, 7.5vw, 5.5rem); letter-spacing: -0.038em; line-height: 1.02; max-width: 14ch; }
.topo-centro h1 { max-width: 16ch; }
.lead { font-size: clamp(1.1875rem, 2vw, 1.4375rem); letter-spacing: -0.008em; line-height: 1.45; max-width: 36ch; color: color-mix(in srgb, var(--cor-texto-claro) 82%, transparent); }

/* ---- 5. Botões: resposta imediata ao pressionar -------------------------- */
.btn-whatsapp, .btn-mapa, .menu .menu-cta, .js .menu-botao, .wa-flutuante { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn-whatsapp { min-height: 52px; padding: 0 2rem; letter-spacing: -0.005em; }
.btn-mapa { font-weight: 600; }
.wa-flutuante { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

/* ---- 6. Cartões e superfícies -------------------------------------------- */
.servicos li {
  border: 0; padding: 2.25rem 2rem 2rem;
  box-shadow: inset 0 1px 0 var(--linha-clara), 0 18px 40px -24px rgba(0, 0, 0, 0.45);
}
.servicos li::before { content: none; }
.icone { stroke-width: 1.4; margin-bottom: 1.5rem; }
.servicos p { color: color-mix(in srgb, var(--cor-texto-claro) 80%, transparent); }
.foto {
  background-image: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.09), transparent 65%);
  box-shadow: inset 0 1px 0 var(--linha-clara);
}
.passos { gap: 1rem; }
.passos li, .js .passos li { padding: 1.75rem; border-radius: var(--raio); background: color-mix(in srgb, var(--cor-texto-claro) 6%, transparent); }
.passos li::before { position: static; display: block; margin-bottom: 1.25rem; font-weight: 600; font-size: 2.25rem; letter-spacing: -0.03em; }
.passos p { margin-bottom: 0; }
.nome-responsavel { font-size: 2rem; letter-spacing: -0.022em; line-height: 1.15; }

/* Dúvidas: lista agrupada num único bloco. */
#faq .conteudo, #contato .conteudo { max-width: 46rem; }
details, details:last-of-type { max-width: none; border: 0; padding: 0 1.5rem; background: rgba(255, 255, 255, 0.7); }
details + details { border-top: 1px solid color-mix(in srgb, var(--cor-texto) 12%, transparent); }
details:first-of-type { border-radius: var(--raio) var(--raio) 0 0; }
details:last-of-type { border-radius: 0 0 var(--raio) var(--raio); }
summary { display: flex; align-items: center; min-height: 3.75rem; padding-block: 0.75rem; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.008em; }
summary::after { top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; }
details p { margin: 0; padding-bottom: 1.25rem; }
summary:active { opacity: 0.6; }

.chamado { text-align: center; background-image: radial-gradient(52rem 28rem at 50% 115%, color-mix(in srgb, var(--cor-destaque) 28%, transparent), transparent 70%); }
.chamado h2 { font-size: clamp(2.25rem, 6vw, 4.25rem); letter-spacing: -0.035em; line-height: 1.04; max-width: 16ch; margin-inline: auto; }
.chamado p { margin-inline: auto; }
address { padding: 1.75rem 1.5rem 0.75rem; border-radius: var(--raio); background: rgba(255, 255, 255, 0.7); }
.rodape { border-top: 1px solid var(--linha-clara); padding-bottom: 6rem; }

/* ---- 7. Responsivo ------------------------------------------------------- */
@media (max-width: 959.98px) { /* abaixo disto os links não cabem numa linha */
  .js .menu-botao { display: inline-block; }
  /* O menu nasce do botão e volta para ele (mesmo caminho na entrada e na saída). */
  .js .menu {
    display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; position: absolute; top: calc(100% + 0.5rem); right: 0.75rem;
    width: min(20rem, calc(100vw - 1.5rem)); max-height: calc(100svh - 6rem); overflow-y: auto;
    padding: 0.75rem 1.25rem 1.25rem; gap: 0; border-radius: var(--raio);
    background: color-mix(in srgb, var(--cor-fundo) 97%, var(--cor-texto-claro));
    box-shadow: inset 0 1px 0 var(--linha-clara), 0 24px 60px -12px rgba(0, 0, 0, 0.55);
    transform-origin: top right; opacity: 0; scale: 0.92; filter: blur(6px); visibility: hidden;
  }
  .js .menu.aberto { opacity: 1; scale: 1; filter: blur(0); visibility: visible; }
  .js .menu a { padding: 0.75rem 0; font-size: 1.0625rem; }
  .js .menu .menu-cta { align-self: stretch; width: auto; text-align: center; margin-top: 0.5rem; padding: 0.85rem 1.25rem; }
}
@media (min-width: 960px) {
  .menu, .js .menu { gap: 0.25rem 1.1rem; }
}
@media (min-width: 768px) {
  .passos li, .js .passos li { padding: 2rem 1.75rem; }
  address { padding: 2rem 2rem 1rem; }
}

/* ---- 8. Movimento -------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .topo h1, .topo .lead, .topo .btn-whatsapp { animation: surgir 0.7s var(--mola) backwards; }
  .topo .lead { animation-delay: 0.08s; }
  .topo .btn-whatsapp { animation-delay: 0.14s; }
  .wa-flutuante { animation: surgir 0.5s var(--mola) 0.4s backwards; }
  .cabecalho::after { transition: opacity 0.25s ease; }

  /* Transições partem do valor atual: dá para interromper e inverter no meio. */
  .js .menu { transition: opacity 0.25s ease, scale 0.4s var(--mola), filter 0.25s ease, visibility 0.25s; }
  .btn-whatsapp, .btn-mapa, .menu .menu-cta, .js .menu-botao, .wa-flutuante {
    transition: scale 0.4s var(--mola), transform 0.4s var(--mola), filter 0.2s, background-color 0.2s, color 0.2s;
  }
  .wa-flutuante:hover { transition: scale 0.4s var(--mola), transform 0.4s var(--mola); }

  .js .servicos .icone { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .servicos li.visivel .icone { animation: none; }
  .js .foto::after { content: none; }
  .js .servicos li, .js .foto { opacity: 0; translate: 0 1.25rem; }
  .js .servicos li.visivel, .js .foto.visivel { opacity: 1; translate: 0 0; transition: opacity 0.5s ease, translate 0.7s var(--mola); }
  .js .passos li { opacity: 0; transform: translateY(1.25rem); }
  .js .passos li.visivel { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.7s var(--mola); }

  /* Abrir e fechar as dúvidas pelo mesmo caminho (onde o navegador permitir). */
  details { interpolate-size: allow-keywords; }
  details::details-content { height: 0; overflow: clip; transition: height 0.4s var(--mola), content-visibility 0.4s allow-discrete; }
  details[open]::details-content { height: auto; }
  details[open] p { animation: none; }
}
@keyframes surgir { from { opacity: 0; translate: 0 1rem; filter: blur(6px); } }

/* O toque responde na hora (vale também com movimento reduzido). */
.btn-whatsapp:active, .btn-mapa:active, .menu .menu-cta:active, .js .menu-botao:active, .wa-flutuante:active,
.pressionado { scale: 0.96; filter: brightness(0.94); transition-duration: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  .js .menu { transition: opacity 0.2s ease, visibility 0.2s; scale: 1; filter: none; }
  .btn-whatsapp:active, .btn-mapa:active, .menu .menu-cta:active, .js .menu-botao:active, .wa-flutuante:active, .pressionado { scale: 1; }
}
@media (prefers-reduced-transparency: reduce) {
  .cabecalho::before { background: var(--cor-fundo); -webkit-backdrop-filter: none; backdrop-filter: none; }
  details, details:last-of-type, address { background: #fff; }
}
@media (prefers-contrast: more) {
  .cabecalho::before { background: var(--cor-fundo); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .cabecalho { border-bottom: 1px solid var(--cor-texto-claro); }
  .servicos li, .passos li, .js .menu { outline: 1px solid var(--cor-texto-claro); }
  details, details:last-of-type, address { background: #fff; outline: 1px solid var(--cor-texto); }
  .lead, .servicos p { color: var(--cor-texto-claro); }
}

/* Espaço sem foto: rótulo visível. A foto, quando existir, cobre o texto. */
.foto::before {
  content: "Imagem"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--cor-texto-claro) 75%, transparent);
}
