/* Alto Padrão Imóveis — CSS único, sem webfonts e sem JS (Core Web Vitals: LCP/CLS/INP). */
:root {
  --papel: #f7f4ee;
  --superficie: #ffffff;
  --tinta: #1c1a17;
  --tinta-suave: #5f584e;
  --ouro: #8a6a3b;
  --ouro-claro: #efe6d6;
  --linha: #e2dccf;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --largura: 72rem;
  --raio: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 1.0625rem/1.65 var(--sans);
}
img, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--ouro); text-underline-offset: .18em; }
a:hover { color: var(--tinta); }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); margin-top: 2.4rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 72ch; }

.pular { position: absolute; left: -999px; top: 0; background: var(--tinta); color: #fff; padding: .6rem 1rem; z-index: 10; }
.pular:focus { left: 1rem; }

/* Topo */
.topo { background: var(--tinta); color: #fff; }
.topo__interno { max-width: var(--largura); margin: 0 auto; padding: .9rem 1rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; justify-content: space-between; }
.marca { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.25rem; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.menu a { color: #e9e2d5; text-decoration: none; font-size: .95rem; }
.menu a:hover, .menu a[aria-current="page"] { color: #fff; text-decoration: underline; }

/* Trilha */
.trilha { max-width: var(--largura); margin: 0 auto; padding: .9rem 1rem 0; font-size: .875rem; color: var(--tinta-suave); }
.trilha ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.trilha li + li::before { content: "/"; margin: 0 .5rem; color: var(--linha); }

/* Conteúdo */
.conteudo { max-width: var(--largura); margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.cabecalho-pagina { padding: 1rem 0 .5rem; }
.abertura { padding: 2.5rem 0 1rem; border-bottom: 1px solid var(--linha); }
.lead { font-size: 1.16rem; color: var(--tinta); }
.meta, .fonte { font-size: .875rem; color: var(--tinta-suave); }
.fonte { margin-top: .6rem; }
.aviso { border-left: 3px solid var(--ouro); background: var(--ouro-claro); padding: .8rem 1rem; font-size: .95rem; }

.acoes { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.botao { display: inline-block; padding: .7rem 1.3rem; border-radius: var(--raio); background: var(--tinta); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.botao:hover { background: var(--ouro); color: #fff; }
.botao--sec { background: transparent; color: var(--tinta); border: 1px solid var(--tinta); }
.botao--sec:hover { background: var(--tinta); }

/* Grades e cards */
.grade { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.grade--pessoas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.card { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: var(--ouro-claro); }
.card__corpo, .card--texto { padding: 1.1rem 1.2rem 1.2rem; }
.card__tipo { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: .4rem; }
.card__titulo { font-size: 1.2rem; margin: 0 0 .8rem; }
.card__titulo a { color: var(--tinta); text-decoration: none; }
.card__titulo a:hover { color: var(--ouro); text-decoration: underline; }
.card__tec { font-size: .85rem; color: var(--ouro); margin: .8rem 0 0; }
.card--pessoa { flex-direction: row; gap: 1rem; padding: 1.1rem; align-items: flex-start; }
.card--pessoa img { width: 96px; height: 96px; aspect-ratio: 1; border-radius: 50%; flex: none; }

/* Fatos (dl) */
.fatos { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem 1rem; margin: 0; }
.fatos div { border-top: 1px solid var(--linha); padding-top: .35rem; }
.fatos dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-suave); }
.fatos dd { margin: 0; font-weight: 600; }
.fatos--grande { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); background: var(--superficie); border: 1px solid var(--linha); padding: 1rem 1.2rem; border-radius: var(--raio); }
.fatos--grande dd { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }

.lista-fatos { padding-left: 1.2rem; max-width: 72ch; }
.lista-fatos li { margin-bottom: .45rem; }
.etiquetas { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.etiquetas li { background: var(--ouro-claro); padding: .25rem .7rem; border-radius: 999px; font-size: .9rem; }

/* Tabelas nativas */
.tabela-rolagem { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--superficie); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; padding: .8rem 1rem; font-weight: 600; font-family: var(--serif); font-size: 1.05rem; }
th, td { padding: .6rem 1rem; border-top: 1px solid var(--linha); text-align: left; vertical-align: top; }
thead th { background: var(--tinta); color: #fff; font-weight: 600; font-size: .85rem; border-top: 0; }
tbody th { font-weight: 600; }
tr.grupo th { background: var(--ouro-claro); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
tfoot th, tfoot td { font-weight: 700; border-top: 2px solid var(--tinta); }

/* Imóvel */
.ficha__imagem { margin: 1rem 0 0; }
.ficha__imagem img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--raio); background: var(--ouro-claro); }
.ficha__imagem figcaption { font-size: .85rem; color: var(--tinta-suave); margin-top: .4rem; }
.selo-vendido { display: inline-block; margin: 0 0 .6rem; padding: .25rem .7rem; background: var(--tinta); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-radius: var(--raio); }
.card--vendido img { filter: grayscale(.35); }
.contato { margin-top: 2.5rem; padding: 1.4rem; background: var(--tinta); color: #f3eee4; border-radius: var(--raio); }
.contato h2 { margin-top: 0; color: #fff; }
.contato a:not(.botao) { color: #e6cfa4; }
.contato .botao { background: #e6cfa4; color: var(--tinta); }
.contato .botao--sec { background: transparent; color: #fff; border-color: #fff; }

/* Vídeo */
.video { margin: 1rem 0; }
.video__quadro { aspect-ratio: 16 / 9; background: #000; border-radius: var(--raio); overflow: hidden; }
.video__quadro iframe { width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: .9rem; color: var(--tinta-suave); margin-top: .5rem; max-width: 72ch; }

.videos__grade { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.video figcaption span, .video figcaption strong { display: block; margin-bottom: .25rem; }
.video figcaption strong { color: var(--tinta); font-size: 1rem; }
.lista-videos { padding-left: 1.2rem; max-width: 72ch; }
.lista-videos li { margin-bottom: 1rem; }
.lista-videos span { display: block; }

/* Respostas rápidas por seção (query fan-out) */
.rapidas { margin: 1.2rem 0; padding: 1rem 1.2rem; background: var(--superficie); border: 1px solid var(--linha); border-left: 3px solid var(--ouro); border-radius: var(--raio); max-width: 72ch; }
.rapidas__titulo { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: .5rem; }
.rapidas dl { margin: 0; }
.rapidas dt { font-weight: 600; margin-top: .7rem; }
.rapidas dt:first-child { margin-top: 0; }
.rapidas dd { margin: .15rem 0 0; }

/* FAQ sempre visível (sem accordion) */
.faq__grupo { margin-top: 1.8rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--sans); color: var(--ouro); }
.faq__item h4 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin: 0 0 .4rem; }
.faq__item { border-top: 1px solid var(--linha); padding-top: 1rem; }
.faq__item h3 { margin-bottom: .4rem; }

/* Artigo */
.artigo > section, .artigo > nav, .artigo > aside { max-width: 48rem; }
.sumario { background: var(--superficie); border: 1px solid var(--linha); padding: 1rem 1.4rem; border-radius: var(--raio); margin-top: 1.5rem; }
.sumario h2 { margin-top: 0; font-size: 1.2rem; }
.resumo { border-left: 3px solid var(--ouro); padding-left: 1.2rem; }
.resumo h2 { margin-top: 1rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); color: var(--tinta-suave); }
.autor { margin-top: 2.5rem; }

/* Perfil */
.perfil__topo { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.perfil__topo img { border-radius: 50%; width: 160px; height: 160px; }

/* Rodapé */
.rodape { background: var(--tinta); color: #d9d2c4; font-size: .92rem; }
.rodape__interno { max-width: var(--largura); margin: 0 auto; padding: 2.5rem 1rem 1rem; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.rodape h2 { color: #fff; font-size: 1.1rem; margin-top: 0; }
.rodape a { color: #e6cfa4; }
.rodape ul { list-style: none; padding: 0; margin: 0; }
.rodape li { margin-bottom: .4rem; }
.rodape address { font-style: normal; }
.rodape__nota { max-width: var(--largura); margin: 0 auto; padding: 1rem; border-top: 1px solid #3a352e; font-size: .8rem; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  th, td { padding: .5rem .7rem; }
  .card--pessoa { flex-direction: column; }
}

@media print {
  .topo, .rodape, .contato, .video, .pular { display: none; }
  body { background: #fff; }
}
.faq__mais { font-size: .9rem; color: var(--tinta-suave); }

/* Pilar: mapa e chamadas */
.mapa { margin: 1rem 0; }
.mapa img { width: 100%; height: auto; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); }
.mapa figcaption { font-size: .85rem; color: var(--tinta-suave); margin-top: .5rem; max-width: 72ch; }
.pilar section, .pilar nav { max-width: 56rem; }
.chamada { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--ouro-claro); border-left: 3px solid var(--ouro); border-radius: var(--raio); }
.chamada h2 { margin-top: 0; font-size: 1.2rem; }
.chamada p { margin-bottom: 0; }

/* ===== Celular ===== */
.barra-contato { display: none; }
.mapa__partes { display: none; }

@media (max-width: 48rem) {
  body { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  .barra-contato {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: 1.5fr 1fr; gap: .6rem;
    padding: .55rem .8rem calc(.55rem + env(safe-area-inset-bottom));
    background: var(--tinta); border-top: 1px solid #3a352e;
  }
  .barra-contato__botao {
    display: flex; align-items: center; justify-content: center; min-height: 48px;
    border-radius: var(--raio); background: #e6cfa4; color: var(--tinta);
    font-weight: 700; text-decoration: none;
  }
  .barra-contato__botao--sec { background: transparent; color: #fff; border: 1px solid #fff; }
}

@media (max-width: 40rem) {
  /* cabeçalho: marca + menu em uma linha rolável */
  .topo__interno { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: .6rem 1rem 0; }
  .topo nav { min-width: 0; }
  .topo nav { margin: 0 -1rem; padding: 0 1rem; overflow-x: auto; scrollbar-width: none;
              -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
  .topo nav::-webkit-scrollbar { display: none; }
  .menu { flex-wrap: nowrap; gap: 0 1.2rem; white-space: nowrap; }
  .menu a { display: inline-block; padding: .7rem 0; }
  .menu a[aria-current="page"] { text-decoration: none; border-bottom: 2px solid var(--ouro); }
  .marca { padding: .15rem 0; }

  /* tipografia e espaçamento */
  body { font-size: 1rem; line-height: 1.6; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.32rem; margin-top: 1.8rem; }
  .lead { font-size: 1.04rem; }
  .abertura { padding: 1.25rem 0 .75rem; }
  .conteudo { padding: 1rem 1rem 3rem; }
  .trilha { padding-top: .7rem; font-size: .8rem; }
  .acoes { flex-direction: column; }
  .acoes li, .acoes .botao { width: 100%; }
  .botao { text-align: center; padding: .85rem 1rem; }
  .grade, .grade--pessoas { gap: 1rem; grid-template-columns: 1fr; }
  .fatos--grande { grid-template-columns: repeat(2, 1fr); padding: .8rem .9rem; }
  .fatos--grande dd { font-size: 1.12rem; }
  .fatos { grid-template-columns: repeat(2, 1fr); }
  .card--pessoa { flex-direction: row; }
  .card--pessoa img { width: 72px; height: 72px; }
  .sumario { padding: .9rem 1rem; }
  .rodape a { display: inline-block; padding: .25rem 0; }
  .contato { padding: 1rem; }

  /* mapa: duas metades empilhadas, sem rolagem lateral (cada uma cobre ~55% da faixa) */
  .mapa .mapa__inteiro { display: none; }
  .mapa__partes { display: grid; gap: .6rem; }
  .mapa__parte { overflow: hidden; aspect-ratio: 660 / 442; border: 1px solid var(--linha);
                 border-radius: var(--raio); background: var(--papel); }
  .mapa .mapa__parte img { display: block; width: 181.8%; max-width: none; height: auto; border: 0; border-radius: 0; }
  .mapa .mapa__parte--leste img { margin-left: -81.8%; }

  /* tabelas com 3+ colunas viram cartões (rótulos vêm de data-label) */
  .tabela-rolagem:has(> table.empilhar) { border: 0; background: transparent; overflow: visible; }
  table.empilhar, table.empilhar tbody, table.empilhar tfoot, table.empilhar tr,
  table.empilhar th, table.empilhar td { display: block; width: auto; }
  table.empilhar thead { position: absolute; width: 1px; height: 1px; overflow: hidden;
                         clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  table.empilhar caption { display: block; padding: 0 0 .6rem; font-size: 1rem; }
  table.empilhar tr { background: var(--superficie); border: 1px solid var(--linha);
                      border-radius: var(--raio); margin: 0 0 .7rem; padding: .6rem .85rem .5rem;
                      display: grid; grid-template-columns: 1fr 1fr; column-gap: .9rem; }
  table.empilhar th[scope="row"] { grid-column: 1 / -1; padding: 0 0 .4rem; margin-bottom: .2rem;
                                   border: 0; border-bottom: 1px solid var(--linha);
                                   font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
  table.empilhar td { padding: .3rem 0; border: 0; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
  table.empilhar td.longo { grid-column: 1 / -1; }
  table.empilhar td::before { content: attr(data-label); display: block; font-size: .72rem;
                              letter-spacing: .02em; color: var(--tinta-suave); line-height: 1.3; }
  table.empilhar tfoot tr { background: var(--ouro-claro); }
}
