/* ===========================================================
   Instaladora Jaraguá — LP de campanha
   Direção visual: v3 (cantos macios, sombras difusas, uma família tipográfica)
   Paleta travada: petróleo #123C4A · âmbar #EFA524 · cru #F4F1EA · grafite #5F5E5A
   CTA: verde WhatsApp escurecido #0B8043 (texto branco, 5,02:1)
   =========================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var-latin.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --petroleo: #123C4A;
  --petroleo-esc: #0d2d38;
  --ambar: #EFA524;
  --cru: #F4F1EA;
  --cru-fundo: #faf8f2;
  --grafite: #5F5E5A;
  --branco: #ffffff;
  --borda: #e4dfd2;
  --borda-forte: #ddd7c7;
  --wa: #0B8043;      /* branco sobre este verde dá 5,02:1 — passa em AA */
  --wa-esc: #096B38;  /* hover, 6,62:1 */

  --fonte: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --largura: 600px;
  --pad: 20px;

  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--petroleo-esc);
  font-family: var(--fonte);
  color: var(--petroleo);
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.pagina {
  max-width: var(--largura);
  margin: 0 auto;
  background: var(--cru);
  overflow: hidden;
  padding-bottom: 0;
}

/* --- blocos --- */
.bloco { padding: 46px var(--pad) 48px; }
.bloco--claro  { background: var(--cru); }
.bloco--branco { background: var(--branco); }
.bloco--escuro { background: var(--petroleo); color: var(--cru); }

/* --- tipografia --- */
h1, h2 { font-weight: 900; letter-spacing: -.3px; }
h1 {
  font-size: clamp(31px, 8.4vw, 38px);
  line-height: 1.04;
  letter-spacing: -.5px;
  margin: 0;
}
h2 {
  font-size: clamp(24px, 6.4vw, 28px);
  line-height: 1.08;
  margin: 0 0 20px;
  text-align: center;
}
/* quando há subtítulo logo abaixo, o título cede espaço para os dois lerem juntos */
h2:has(+ .subtitulo) { margin-bottom: 10px; }
/* subtítulo de seção */
.subtitulo {
  margin: 0 0 24px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--grafite);
  text-align: center;
}
.bloco--escuro .subtitulo { color: rgba(244,241,234,.8); }
.destaque { color: var(--ambar); }

/* --- topo --- */
.topo {
  background: var(--petroleo);
  padding: 16px var(--pad);
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(244,241,234,.14);
}
.marca { display: flex; align-items: center; gap: 10px; }
.marca__simbolo {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--ambar); color: var(--petroleo);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.marca__nome { display: flex; flex-direction: column; line-height: 1.05; font-weight: 900; font-size: 15px; letter-spacing: .6px; }
.marca__nome span:first-child { color: var(--cru); }
.marca__nome span:last-child  { color: var(--ambar); }
.topo__wa {
  margin-left: auto;                  /* o topo não usa mais space-between */
  width: 44px; height: 44px;          /* alvo de toque mínimo confortável */
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wa); color: var(--branco);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, transform .12s ease;
}
.topo__wa:hover { background: var(--wa-esc); }
.topo__wa:active { transform: scale(.94); }

/* --- hero --- */
.hero h1 { text-align: center; }
.hero__sub { font-size: 16px; line-height: 1.55; color: rgba(244,241,234,.9); margin: 16px 0 0; text-align: center; }
.hero__foto {
  margin: 24px 0 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0f3441;
  border: 1px solid rgba(244,241,234,.18);
}
.hero__foto img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.hero__assinatura {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(244,241,234,.18);
  font-size: 13px; font-weight: 400; letter-spacing: .2px;
  color: rgba(244,241,234,.9);
  text-align: center;
}
.hero__nota, .cta-nota { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--ambar); margin: 12px 0 0; }

/* --- CTA WhatsApp --- */
.cta {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: var(--branco);
  text-decoration: none;
  font-weight: 800; font-size: clamp(17px, 4.4vw, 19px);
  padding: 19px 20px; min-height: 60px;
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(11,128,67,.34);
  transition: transform .12s ease, background-color .15s ease;
  text-align: center;
}
.cta:hover { background: var(--wa-esc); }
.cta:active { transform: scale(.98); }
.cta svg { flex-shrink: 0; }

/* --- 2. problemas (cards) --- */
.casos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.caso {
  margin: 0;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(18,60,74,.06);
}
.caso img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.caso figcaption { font-size: 14px; font-weight: 700; line-height: 1.3; padding: 12px 14px; text-align: center; }

/* --- 3. sobre --- */
#sobre h2 { margin-bottom: 34px; }
.sobre__foto { margin: 0 0 20px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid rgba(244,241,234,.18); background: #0f3441; }
.sobre__foto img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.sobre__foto figcaption {
  font-size: 11.5px; line-height: 1.5; color: rgba(244,241,234,.55);
  padding: 11px 14px; border-top: 1px solid rgba(244,241,234,.12);
  text-align: center;
}
.sobre__texto p {
  font-size: 15.5px; line-height: 1.6; opacity: .9; margin: 0 0 14px;
  text-align: justify;
  hyphens: auto;              /* sem hifenização, justificar em coluna estreita abre buracos */
  -webkit-hyphens: auto;
}
.sobre__texto p:last-child { margin-bottom: 0; }

/* --- 4. serviços: carrossel de 2 linhas, rolagem horizontal, sem JS --- */
#servicos { padding-top: 74px; }              /* afasta da seção Sobre */
#servicos h2 { font-size: clamp(28px, 7.6vw, 34px); }

.obras {
  display: grid;
  grid-auto-flow: column;                        /* preenche de cima para baixo, depois avança */
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: calc((100% - 12px) / 2);    /* 2 cards visíveis por vez */
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--borda-forte) transparent;
}
.obras::-webkit-scrollbar { height: 6px; }
.obras::-webkit-scrollbar-track { background: transparent; }
.obras::-webkit-scrollbar-thumb { background: var(--borda-forte); border-radius: 3px; }

.obra {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--borda-forte);
  scroll-snap-align: start;
}
.obra img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }

.obras__dica {
  font-size: 12.5px; color: var(--grafite); margin: 10px 0 0;
  display: flex; align-items: center; gap: 6px;
}
/* no desktop as 10 obras cabem na tela: não há o que arrastar */
@media (min-width: 900px) { .obras__dica { display: none; } }

/* --- 5. marcas (marquee em CSS puro) --- */
.marcas__faixa {
  overflow: hidden;
  /* esmaece as bordas para o loop não "cortar" logo */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marcas__trilho {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marcas-desliza 20s linear infinite;
}
/* cada grupo carrega o próprio espaçamento final, para o loop fechar exato em -50% */
.marcas__grupo { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.marcas__faixa:hover .marcas__trilho { animation-play-state: paused; }
.marcas__trilho img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}
@keyframes marcas-desliza {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* o trilho tem o conteúdo duplicado */
}

/* --- 6. cobertura --- */
.area { list-style: none; margin: 0; padding: 0; }
.area li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(244,241,234,.15); }
.area li:last-child { border-bottom: 0; }
.area li svg { color: var(--ambar); flex-shrink: 0; }
.area__cidade { font-weight: 800; font-size: 17px; }
.area__tag { margin-left: auto; font-size: 11.5px; color: rgba(244,241,234,.55); font-weight: 700; letter-spacing: 1px; }
.area__nota { font-size: 14.5px; opacity: .85; margin: 20px auto 0; line-height: 1.5; text-align: center; max-width: 46ch; }

/* --- FAQ (<details> nativo: zero JS) --- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--r-md); }
.faq summary {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px; cursor: pointer; list-style: none;
  font-size: 15.5px; font-weight: 700; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
/* interruptor: OFF = pergunta fechada, ON = aberta.
   min-width fixo para a troca de OFF (3 letras) por ON (2) não mexer no layout. */
.faq summary::after {
  content: "OFF"; flex-shrink: 0;
  min-width: 46px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--borda-forte);
  background: #e7e2d5; color: var(--grafite);
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px;
  box-shadow: inset 0 1px 2px rgba(18,60,74,.1);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.faq details[open] summary::after {
  content: "ON";
  background: var(--ambar); color: var(--petroleo);
  border-color: var(--ambar);
  box-shadow: none;
}
.faq p { font-size: 14.5px; color: var(--grafite); line-height: 1.55; margin: 0 16px 16px; }

/* --- 8. fechamento --- */
/* o espaço da barra fixa é reservado aqui, e não na .pagina: assim ele fica
   sobre o petróleo do rodapé em vez de virar uma faixa cru no fim da página */
#fechamento { padding-top: 60px; padding-bottom: 96px; }
#fechamento h2 { margin-bottom: 14px; }
#fechamento .subtitulo { margin-bottom: 34px; max-width: 44ch; margin-inline: auto; }
#fechamento .cta { margin-top: 0; }
#fechamento .cta-nota { margin-top: 18px; }

.final__contato { text-align: center; margin-top: 38px; }
.final__contato a { font-weight: 900; font-size: clamp(18px, 5.4vw, 21px); color: var(--cru); text-decoration: none; letter-spacing: .3px; }
.final__horario { font-size: 13.5px; opacity: .75; margin: 10px 0 0; }
.rodape {
  border-top: 1px solid rgba(244,241,234,.15);
  margin-top: 52px; padding-top: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.rodape__marca { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; letter-spacing: .6px; margin: 0 0 4px; }
.rodape a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(244,241,234,.3); }
.rodape a:hover { border-bottom-color: var(--ambar); color: var(--ambar); }
.rodape__direitos { margin-top: 10px; opacity: .5 !important; font-size: 11.5px !important; }
.rodape__marca span { width: 24px; height: 24px; border-radius: 7px; background: var(--ambar); color: var(--petroleo); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rodape p { font-size: 12.5px; opacity: .7; margin: 0; line-height: 1.5; }

/* --- barra fixa de CTA --- */
.barra-fixa {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--largura);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(13,45,56,.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(244,241,234,.12);
  z-index: 50;
}
.barra-fixa .cta { margin-top: 0; padding: 16px 20px; min-height: 54px; font-size: 17px; border-radius: 12px; box-shadow: none; }
.barra-fixa { transition: transform .28s ease, opacity .28s ease; }
/* recolhida ao chegar no CTA final; visibility entra depois da transição
   para o link não continuar focável por teclado enquanto está escondido */
.barra-fixa--oculta {
  transform: translate(-50%, 130%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform .28s ease, opacity .28s ease, visibility 0s .28s;
}

/* --- foco visível --- */
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; border-radius: 4px; }
.bloco--escuro a:focus-visible { outline-color: var(--cru); }

/* --- desktop --- */
@media (min-width: 900px) {
  :root { --largura: 940px; --pad: 44px; }
  .bloco { padding: 60px var(--pad) 64px; }
  #fechamento { padding-top: 84px; padding-bottom: 64px; }  /* sem barra fixa no desktop */
  /* o id tem precedência sobre .bloco, então o desktop precisa repetir a regra */
  #servicos { padding-top: 92px; }
  .pagina { padding-bottom: 0; }
  /* no desktop a foto ocupa as duas linhas; o CTA volta para baixo do texto */
  .hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-areas: "texto foto" "acao foto";
    grid-template-rows: auto 1fr;
    column-gap: 44px;
    align-items: start;
  }
  .hero__col  { grid-area: texto; min-width: 0; }
  .hero__foto { grid-area: foto; margin-top: 0; }
  .hero__acao { grid-area: acao; }
  /* no desktop a coluna fica ao lado da foto: texto centralizado ficaria solto */
  .hero h1, .hero__sub { text-align: left; }
  h1 { font-size: 44px; }
  /* no desktop cabem 5 colunas × 2 linhas = as 10 obras sem precisar rolar */
  .obras { grid-auto-columns: calc((100% - 48px) / 5); }
  /* no desktop a foto vai para a esquerda e o texto ocupa a coluna da direita;
     sem isso a foto ficava solta à esquerda com o texto largo demais embaixo */
  #sobre {
    display: grid;
    grid-template-columns: 380px 1fr;
    /* as linhas 1fr em cima e embaixo absorvem a sobra por igual,
       centrando o par título+texto na altura da foto */
    grid-template-areas: "foto ." "foto titulo" "foto texto" "foto .";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 48px;
  }
  #sobre h2 { grid-area: titulo; text-align: left; margin-bottom: 18px; }
  .sobre__foto { grid-area: foto; max-width: 380px; margin-bottom: 0; }
  .sobre__texto { grid-area: texto; }
  /* corpo maior: a coluna ficou mais estreita e a leitura é a distância de desktop */
  .sobre__texto p { font-size: 20px; line-height: 1.65; }
  .sobre__foto figcaption { font-size: 13px; line-height: 1.55; padding: 13px 16px; }
  .casos { grid-template-columns: repeat(4, 1fr); }
  .barra-fixa { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  /* a faixa de marcas não "pisca": para de vez e vira rolagem manual */
  .marcas__trilho { animation: none !important; }
  .marcas__faixa { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
