/* =========================================================
   CONFIA - estilos do site
   Layout: faixas de largura total, conteúdo centralizado
   em 1120px; hero em duas colunas (formulário + exemplo).
   ========================================================= */

/* ---------- 1. CORES E FONTES (tema claro) ----------
   Mude uma cor aqui e ela muda no site inteiro. */
:root {
  --fundo: #F5F6F8;          /* fundo da página */
  --superficie: #FFFFFF;     /* cartões e caixas */
  --tinta: #171B24;          /* texto principal */
  --tinta-suave: #5B6170;    /* texto secundário */
  --linha: #E1E4EA;          /* bordas finas */
  --laranja: #F2661C;        /* cor da marca */
  --laranja-texto: #C24E0E;  /* laranja para texto (mais legível) */
  --laranja-claro: #FFEADD;  /* fundo laranja bem suave */
  --verde: #18925F;          /* "verificado" */
  --estrela: #E8A100;        /* estrelas */

  --fonte-titulo: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --fonte-texto: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --raio: 14px;
  --sombra: 0 1px 2px rgba(23, 27, 36, .06), 0 12px 32px -12px rgba(23, 27, 36, .18);
}

/* ---------- 2. TEMA ESCURO ----------
   Usado quando o celular/computador está no modo escuro. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #101318; --superficie: #191D25; --tinta: #EEF0F4; --tinta-suave: #A2A8B5;
    --linha: #2A2F3A; --laranja: #FF7330; --laranja-texto: #FF9A61; --laranja-claro: #3A2316;
    --verde: #3FC58D; --estrela: #F5B82E;
    --sombra: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #101318; --superficie: #191D25; --tinta: #EEF0F4; --tinta-suave: #A2A8B5;
  --linha: #2A2F3A; --laranja: #FF7330; --laranja-texto: #FF9A61; --laranja-claro: #3A2316;
  --verde: #3FC58D; --estrela: #F5B82E;
  --sombra: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- 3. BASE ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--fonte-texto);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--fonte-titulo); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; border-radius: 6px; }

/* Caixa central que limita a largura e cria a margem lateral */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.estreito { max-width: 760px; }

/* Etiqueta pequena acima dos títulos */
.etiqueta {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--laranja-texto);
}

/* ---------- 4. BOTÕES ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 .95rem var(--fonte-texto);
  padding: .65rem 1.1rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s;
}
.botao:active { transform: scale(.98); }
.botao-cheio { background: var(--laranja); color: #fff; }
.botao-cheio:hover { background: var(--laranja-texto); }
.botao-contorno { border-color: var(--tinta); }
.botao-contorno:hover { background: var(--tinta); color: var(--fundo); }
.botao-texto:hover { color: var(--laranja-texto); }
.botao-branco { background: #fff; color: #171B24; }
.botao-grande { padding: .9rem 1.5rem; font-size: 1.05rem; }

.chip { font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.chip-exemplo { background: var(--linha); color: var(--tinta-suave); }

/* ---------- 5. CABEÇALHO ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--fundo); }
.topo {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--fundo) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linha);
}
.topo-linha { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.marca { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.45rem var(--fonte-titulo); letter-spacing: -0.02em; }
.selo { width: 34px; height: 34px; }
.selo-fundo { fill: var(--laranja); }

.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu > a { text-decoration: none; font-weight: 500; color: var(--tinta-suave); }
.menu > a:hover { color: var(--tinta); }
.menu-botoes { display: flex; gap: .4rem; }

.menu-abrir { display: none; background: none; border: 0; padding: 8px; cursor: pointer; flex-direction: column; gap: 5px; }
.menu-abrir span { display: block; width: 24px; height: 2px; background: var(--tinta); border-radius: 2px; }

/* ---------- 6. HERO (destaque do topo) ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grade { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hero-texto { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.hero-sub { font-size: 1.1rem; color: var(--tinta-suave); max-width: 52ch; }

/* Formulário de pedido */
.pedido {
  margin-top: .6rem; display: flex; flex-direction: column; gap: .5rem;
  background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio);
  padding: 1.25rem; box-shadow: var(--sombra);
}
.pedido label, .urgencia legend { font-size: .85rem; font-weight: 600; }
.pedido input, .pedido select {
  width: 100%; font: inherit; color: var(--tinta); background: var(--fundo);
  border: 1.5px solid var(--linha); border-radius: 10px; padding: .7rem .8rem;
}
.pedido input:focus, .pedido select:focus { outline: none; border-color: var(--laranja); }
.pedido-linha { display: grid; grid-template-columns: 1.3fr 1fr; gap: .75rem; margin-top: .3rem; }
.pedido-campo { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }

.urgencia { border: 0; padding: 0; margin: .3rem 0 .4rem; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.urgencia legend { margin-bottom: .5rem; }
.urg-opcao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  font: inherit; color: var(--tinta); text-align: left; cursor: pointer;
  background: var(--fundo); border: 1.5px solid var(--linha); border-radius: 10px; padding: .6rem .8rem;
}
.urg-opcao small { color: var(--tinta-suave); }
.urg-opcao.ativo { border-color: var(--laranja); background: var(--laranja-claro); }
.pedido-nota { font-size: .85rem; color: var(--tinta-suave); text-align: center; }

/* Cartão de exemplo ao lado */
.demo {
  background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio);
  padding: 1.25rem; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .5rem; min-width: 0;
}
.demo-topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.demo-status { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--tinta-suave); }
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 var(--verde); animation: pulso 1.8s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.demo-categoria { font-size: .8rem; font-weight: 600; color: var(--laranja-texto); margin-top: .4rem; }
.demo-titulo { font-size: 1.35rem; font-weight: 600; overflow-wrap: anywhere; }
.demo-info { font-size: .9rem; color: var(--tinta-suave); }
.urg-tag { font-weight: 600; color: var(--tinta); }

.respostas { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.resposta {
  display: grid; grid-template-columns: 44px 1fr auto; gap: .75rem; align-items: center;
  padding: .75rem; border: 1px solid var(--linha); border-radius: 12px; background: var(--fundo);
  animation: entrar .35s ease-out;
}
@keyframes entrar { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--cor, #5B6170); }
.resposta-nome { font-weight: 700; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.verificado { font-size: .72rem; font-weight: 600; color: var(--verde); }
.resposta-meta { font-size: .82rem; color: var(--tinta-suave); }
.estrelas { color: var(--estrela); letter-spacing: 1px; }
.nivel-pill { font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: var(--laranja-claro); color: var(--laranja-texto); white-space: nowrap; }

/* ---------- 7. SEÇÕES ---------- */
.secao { padding-block: clamp(3rem, 7vw, 5.5rem); }
.secao-alt { background: var(--superficie); border-block: 1px solid var(--linha); }
.secao-cabeca { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2rem; max-width: 640px; }
.secao-cabeca h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
.secao-sub { color: var(--tinta-suave); }

/* Abas cliente / prestador */
.abas { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--superficie); border: 1px solid var(--linha); border-radius: 999px; margin-bottom: 1.8rem; flex-wrap: wrap; }
.aba { font: 600 .95rem var(--fonte-texto); color: var(--tinta-suave); background: none; border: 0; padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer; }
.aba.ativo { background: var(--tinta); color: var(--fundo); }

.passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.passos li { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); }
.passos h3 { font-size: 1.2rem; font-weight: 600; }
.passos p { color: var(--tinta-suave); }
.passo-num { font: 800 2.4rem var(--fonte-titulo); color: var(--laranja); line-height: 1; }

/* Segmentos de serviço */
.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--linha); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.segmento { background: var(--superficie); padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.segmento h3 { font-size: 1.15rem; font-weight: 600; }
.segmento ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.segmento li { font-size: .85rem; padding: .3rem .65rem; border-radius: 999px; background: var(--fundo); border: 1px solid var(--linha); }

/* Confiança e níveis */
.confianca-grade { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.confianca-texto { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.confianca-texto h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
.garantias { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.garantias li { padding-left: 1.6rem; position: relative; color: var(--tinta-suave); }
.garantias li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--verde); font-weight: 800; }
.garantias strong { color: var(--tinta); }

.niveis { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.4rem; box-shadow: var(--sombra); min-width: 0; }
.niveis-titulo { font-weight: 700; margin-bottom: 1rem; }
.niveis ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.niveis li { display: grid; grid-template-columns: 110px 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; }
.niveis b { font-size: .95rem; }
.niveis small { grid-column: 2; color: var(--tinta-suave); font-size: .82rem; }
.nivel-barra { grid-row: span 2; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--laranja) calc(var(--n) * 20%), var(--linha) 0); }

/* Parceiros */
.filtros { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.filtro { font: 600 .88rem var(--fonte-texto); color: var(--tinta); background: var(--fundo); border: 1.5px solid var(--linha); padding: .45rem .9rem; border-radius: 999px; cursor: pointer; }
.filtro.ativo { border-color: var(--laranja); background: var(--laranja-claro); color: var(--laranja-texto); }
.lojas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.lojas li { display: grid; grid-template-columns: 48px 1fr auto; gap: .8rem; align-items: center; padding: .9rem 1rem; background: var(--fundo); border: 1px solid var(--linha); border-radius: 12px; }
.lojas .pos { font: 800 1.3rem var(--fonte-titulo); color: var(--laranja); font-variant-numeric: tabular-nums; }
.lojas div { display: flex; flex-direction: column; min-width: 0; }
.lojas small { color: var(--tinta-suave); }

/* Chamada para prestadores */
.chamada { background: var(--laranja); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.chamada-grade { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.chamada-grade > div { display: flex; flex-direction: column; gap: .5rem; max-width: 620px; min-width: 0; }
.chamada h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
.chamada p { opacity: .92; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.post { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); }
.post-tag { font-size: .75rem; font-weight: 700; color: var(--laranja-texto); text-transform: uppercase; letter-spacing: .08em; }
.post h3 { font-size: 1.15rem; font-weight: 600; }
.post-em-breve { margin-top: auto; font-size: .85rem; color: var(--tinta-suave); }

/* Depoimentos (estado vazio) */
.vazio { padding: 2rem; border: 1.5px dashed var(--linha); border-radius: var(--raio); color: var(--tinta-suave); text-align: center; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--linha); }
.faq details { border-bottom: 1px solid var(--linha); padding-block: 1.1rem; }
.faq summary { font-weight: 600; font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--laranja); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: .6rem; color: var(--tinta-suave); max-width: 65ch; }

/* ---------- 8. RODAPÉ ---------- */
.rodape { border-top: 1px solid var(--linha); padding-block: 2rem; }
.rodape-grade { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.marca-rodape { font-size: 1.2rem; }
.marca-rodape .selo { width: 28px; height: 28px; }
.rodape-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.rodape-links a { text-decoration: none; color: var(--tinta-suave); }
.rodape-copy { font-size: .85rem; color: var(--tinta-suave); }

/* ---------- 9. CELULAR E TABLET ---------- */
@media (max-width: 900px) {
  .hero-grade, .confianca-grade { grid-template-columns: 1fr; }
  .segmentos, .posts { grid-template-columns: 1fr 1fr; }
  .passos { grid-template-columns: 1fr; }

  /* Menu vira gaveta */
  .menu-abrir { display: flex; }
  .menu {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--superficie); border-bottom: 1px solid var(--linha);
    padding: .5rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px));
  }
  .menu.aberto { display: flex; }
  .menu > a { padding: .8rem 0; border-bottom: 1px solid var(--linha); }
  .menu-botoes { margin-top: .8rem; }
}
@media (max-width: 560px) {
  .segmentos, .posts, .pedido-linha { grid-template-columns: 1fr; }
  .niveis li { grid-template-columns: 70px 1fr; }
  .lojas li { grid-template-columns: 36px 1fr; }
  .lojas .chip { grid-column: 2; justify-self: start; }
  .resposta { grid-template-columns: 40px 1fr; }
  .resposta .nivel-pill { grid-column: 2; justify-self: start; }
  .avatar { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
