/* =========================================================
   CASA DOM IMÓVEIS — LP ÔNIX 2 (imóveis prontos, tablóide)
   Paleta oficial da marca: creme, dourado, azul-claro, azul-escuro, chumbo
   ========================================================= */

:root {
  --creme: #F7F1EA;
  --dourado: #BDA280;
  /* dourado escurecido para TEXTO pequeno — o --dourado original tem só 2,17:1 sobre creme.
     Este atinge 4,81:1 sobre creme e 5,4:1 sobre branco (mínimo WCAG AA é 4,5:1). */
  --dourado-texto: #80663F;
  --azul-claro: #BAC8D1;
  --azul-escuro: #364D6F;
  --chumbo: #606062;
  --vermelho: #C1272D;
  --vermelho-escuro: #9E1F24;
  --branco: #FFFFFF;

  --font-titulo: 'Poppins', sans-serif;
  --font-texto: 'Inter', sans-serif;

  --radius: 18px;
  --shadow: 0 12px 30px rgba(54, 77, 111, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-texto);
  color: var(--chumbo);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-titulo); color: var(--azul-escuro); margin: 0 0 .5em; }
p { line-height: 1.65; margin: 0 0 1em; }
a { color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-titulo);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  letter-spacing: .3px;
}
.btn--vermelho {
  background: linear-gradient(180deg, var(--vermelho), var(--vermelho-escuro));
  color: #fff;
  box-shadow: 0 10px 24px rgba(193, 39, 45, .35);
}
.btn--vermelho:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(193, 39, 45, .42); }
.btn--sm { padding: .65em 1.4em; font-size: .85rem; white-space: nowrap; }
.btn--lg { padding: 1.05em 2.4em; font-size: 1.05rem; }
.btn--full { width: 100%; padding: 1.1em 1.4em; font-size: 1.05rem; }
.btn--card { padding: .7em 1.1em; font-size: .85rem; width: 100%; }

/* ===================== CABEÇALHO ===================== */
.topo {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 234, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(54, 77, 111, .1);
}
.topo__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topo__marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
/* a logo já traz o CRECI embaixo (padrão do manual de marca) */
.topo__logo { height: 46px; width: auto; }
@media (max-width: 620px) {
  .topo__inner { padding: .7rem 1rem; gap: .6rem; }
  .topo__logo { height: 34px; }
  .topo .btn--sm { font-size: .72rem; padding: .55em .9em; }
}
@media (max-width: 380px) {
  .topo__logo { height: 28px; }
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  /* empreendimento ao fundo + véu da marca: escuro onde fica o texto, aberto onde fica a logo */
  background-color: var(--azul-escuro);
  background-image:
    linear-gradient(100deg,
      rgba(20, 30, 47, .96) 0%,
      rgba(24, 36, 55, .94) 34%,
      rgba(31, 46, 69, .90) 55%,
      rgba(45, 64, 94, .62) 74%,
      rgba(54, 77, 111, .40) 100%),
    url('../img/hero-empreendimento.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: var(--creme);
  padding: 5.5rem 1.5rem;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  text-align: left;
}
.hero__content { flex: 1 1 480px; }
.hero__eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dourado);
  font-weight: 600;
  margin-bottom: 1.2rem;
}
/* sobre o azul escuro do hero o dourado tem contraste suficiente; o problema é só sobre creme */
.hero__title {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: .7em;
}
.hero__lead {
  color: var(--azul-claro);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 0 2rem;
}
/* informação de destaque acima do formulário — NÃO é botão, é um selo de credibilidade */
.destaque-atendimento {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  margin: 0 auto 1.1rem;
  padding: .5em 1.2em;
  border: 1px solid rgba(122,95,61,.38);
  border-radius: 999px;
  background: rgba(189,162,128,.14);
  /* tom próprio: o fundo dourado clareia o creme e derrubaria o contraste do --dourado-texto */
  color: #745A37;
  font-family: var(--font-titulo);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .4px;
}
.destaque-atendimento svg { width: 15px; height: 15px; flex: 0 0 auto; }
.destaque-atendimento strong { font-weight: 800; }

/* ---- showcase: logo em destaque com brilho ---- */
/* a logo do manual é um bloco largo (marca + CRECI embaixo), então o palco é largo e o brilho elíptico */
.hero__showcase {
  position: relative;
  flex: 0 0 auto;
  width: 400px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__glow {
  position: absolute;
  inset: -10% -14%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(189,162,128,.55) 0%, rgba(189,162,128,.26) 48%, transparent 72%);
  filter: blur(22px);
  animation: pulsarGlow 4s ease-in-out infinite;
}
@keyframes pulsarGlow {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.1); opacity: 1; }
}
/* palco 3D: dá perspectiva para a logo girar 360° como uma moeda, sem ficar de cabeça para baixo */
.hero__logo-palco {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
}
.hero__logo-big {
  width: 100%;
  filter: brightness(0) invert(1) drop-shadow(0 8px 26px rgba(0,0,0,.35));
  transform-style: preserve-3d;
  animation: girar360 7s cubic-bezier(.55,.05,.25,1) infinite;
}
/* gira 360° e descansa: chama atenção sem embrulhar o estômago de quem lê */
@keyframes girar360 {
  0%   { transform: rotateY(0deg); }
  45%  { transform: rotateY(360deg); }
  100% { transform: rotateY(360deg); }
}
.hero__sparkle {
  position: absolute;
  color: var(--dourado);
  font-size: 1.2rem;
  animation: brilhar 2.6s ease-in-out infinite;
}
.hero__sparkle--1 { top: 6%; left: 8%; animation-delay: .2s; }
.hero__sparkle--2 { bottom: 8%; right: 4%; animation-delay: 1s; font-size: .9rem; }
.hero__sparkle--3 { top: 48%; right: -4%; animation-delay: 1.8s; font-size: .8rem; }
@keyframes brilhar {
  0%, 100% { opacity: .2; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 900px) {
  /* hero compacto: logo + headline + CTA precisam caber na primeira tela do celular */
  .hero { padding: 1.6rem 1.5rem 2.6rem; }
  /* no celular o texto fica centralizado sobre a imagem, então o véu precisa ser vertical e mais fechado */
  .hero {
    background-position: 62% center;
    background-image:
      linear-gradient(180deg,
        rgba(20, 30, 47, .95) 0%,
        rgba(26, 39, 59, .91) 45%,
        rgba(26, 39, 59, .94) 100%),
      url('../img/hero-empreendimento.jpg');
  }
  .hero__inner { flex-direction: column; text-align: center; gap: .9rem; }
  /* a logo vem ANTES do texto, senão cai abaixo da dobra (pedido R1) */
  .hero__showcase { order: -1; width: min(300px, 82vw); height: 78px; }
  .hero__eyebrow { margin-bottom: .7rem; font-size: .72rem; }
  .hero__title { font-size: 1.65rem; margin-bottom: .5em; }
  .hero__lead { font-size: .95rem; margin: 0 auto 1.2rem; }
  .destaque-atendimento { font-size: .74rem; padding: .45em .95em; }
}

/* respeita quem desativou animações no sistema */
@media (prefers-reduced-motion: reduce) {
  .hero__glow, .hero__logo-big, .hero__sparkle { animation: none; }
  .hero__logo-big { transform: none; }
  .hero__sparkle { opacity: .7; }
  html { scroll-behavior: auto; }
}

/* ===================== PATRIMÔNIO ===================== */
.patrimonio {
  padding: 4.5rem 1.5rem;
  background-color: var(--creme);
  background-image:
    radial-gradient(rgba(54, 77, 111, .09) 1.5px, transparent 1.5px),
    linear-gradient(180deg, rgba(186, 200, 209, .45), rgba(247, 241, 234, 0) 65%);
  background-size: 20px 20px, 100% 100%;
}
.patrimonio__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.2rem;
  text-align: left;
  background: var(--branco);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem 2.4rem;
}
.patrimonio__icon {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--branco);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dourado);
}
.patrimonio__icon svg { width: 42px; height: 42px; }
.patrimonio__icon { color: var(--dourado-texto); }
.patrimonio__texto h2 { font-size: 1.7rem; }
.patrimonio__texto p { font-size: 1.05rem; }
@media (max-width: 640px) {
  .patrimonio__inner { flex-direction: column; text-align: center; gap: 1.2rem; }
}

/* ===================== TABLÓIDE DE IMÓVEIS ===================== */
.tabloide { padding: 3rem 1.5rem 4rem; }
.tabloide__header { max-width: 1180px; margin: 0 auto 1.8rem; text-align: center; }
.tabloide__header h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.filtros { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.filtro {
  border: 1.5px solid var(--azul-claro);
  background: transparent;
  color: var(--azul-escuro);
  font-family: var(--font-texto);
  font-weight: 600;
  font-size: .85rem;
  padding: .55em 1.3em;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.filtro:hover { border-color: var(--dourado); }
.filtro.is-active { background: var(--azul-escuro); border-color: var(--azul-escuro); color: #fff; }

/* grade tablóide: todos os imóveis à vista, sem rolagem lateral */
.tabloide__grade {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.6rem 1.4rem;
  /* espaço para a sombra dos cards (0 12px 30px) não ser cortada */
  padding: .5rem .2rem 1.2rem;
}

.card-imovel {
  background: var(--branco);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
  /* mantém todos os botões alinhados na base, independente do tamanho do título */
  display: flex;
  flex-direction: column;
  align-self: stretch;  /* todos os cards com a mesma altura */
}
.card-imovel:hover { transform: translateY(-4px); }
.card-imovel[data-hide="true"] { display: none; }

.card-imovel__foto {
  position: relative;
  aspect-ratio: 4 / 3;
  flex: 0 0 auto;   /* a caixa manda na altura, não a imagem */
  overflow: hidden;
  background: linear-gradient(135deg, var(--azul-claro), var(--dourado));
}
/* imagem fora do fluxo: foto em pé ou deitada, o card mantém sempre a mesma altura */
.card-imovel__foto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-imovel__foto.is-missing img { display: none; }
.card-imovel__foto.is-missing::after {
  content: "Casa Dom Imóveis";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-titulo); font-weight: 600; font-size: .95rem;
  text-align: center; padding: 1rem;
}
.selo {
  position: absolute;
  top: .8rem;
  left: .8rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .3px;
  padding: .4em .9em;
  border-radius: 999px;
  text-transform: uppercase;
}
/* selo dos disponíveis: discreto, na cor da marca — é o vermelho do VENDIDO
   que precisa saltar, e ele só salta se os outros forem calmos */
.selo--pronto { background: var(--azul-escuro); color: #fff; }

/* TARJA DE VENDIDO: faixa vermelha atravessando a foto.
   É a prova de escassez da página — imóvel que já foi. */
.card-imovel__foto--vendido img { filter: brightness(.58) saturate(.8); }
.tarja-vendido {
  position: absolute;
  top: 50%;
  left: -6%;
  right: -6%;
  transform: translateY(-50%) rotate(-7deg);
  background: var(--vermelho);
  color: #fff;
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-align: center;
  padding: .38em 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  pointer-events: none;
}

.card-imovel__body {
  padding: 1.2rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.card-imovel__body h3 { font-size: 1.02rem; margin-bottom: .35em; line-height: 1.3; }
.card-imovel__body p { font-size: .85rem; color: var(--chumbo); margin-bottom: 1rem; }
.card-imovel__body .btn--card { margin-top: auto; }

@media (max-width: 620px) {
  .tabloide__grade { grid-template-columns: 1fr; gap: 1.3rem; }
}

/* ===================== CONFIANÇA ===================== */
.confianca {
  background: var(--creme);
  padding: 5.5rem 1.5rem;
}
/* disposição horizontal: foto de um lado, texto do outro */
.confianca__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}
.confianca__eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dourado-texto);
  font-weight: 700;
  padding-bottom: .55em;
  border-bottom: 2px solid var(--dourado-texto);
  margin-bottom: 1.3rem;
}
.confianca__inner h2 { color: var(--azul-escuro); font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.confianca__inner p { font-size: 1.02rem; color: var(--chumbo); }
.confianca__foto {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.confianca__foto img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .confianca { padding: 3.5rem 1.5rem; }
  .confianca__inner { grid-template-columns: 1fr; gap: 1.8rem; text-align: center; }
  .confianca__foto { aspect-ratio: 16 / 9; }
}

/* ===================== FORMULÁRIO / CONVERSÃO ===================== */
.conversao { padding: 5rem 1.5rem; background: var(--creme); }
.conversao__inner { max-width: 640px; margin: 0 auto; text-align: center; }
.conversao__inner h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.conversao__sub { font-size: 1rem; margin-bottom: 2rem; }

.form { text-align: left; background: var(--branco); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
/* honeypot: fora da tela, sem display:none (robôs ignoram campos ocultos assim) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.1rem; }
.field label, .field__label { display: block; font-size: .82rem; font-weight: 600; color: var(--azul-escuro); margin-bottom: .4em; }
.field input, .field select {
  width: 100%;
  padding: .8em .9em;
  border: 1.5px solid var(--azul-claro);
  border-radius: 10px;
  font-family: var(--font-texto);
  font-size: .95rem;
  background: var(--creme);
  color: var(--chumbo);
}
.field input:focus, .field select:focus { border-color: var(--azul-escuro); }
/* foco visível — indispensável para quem navega por teclado */
.field input:focus-visible,
.field select:focus-visible,
.consent input:focus-visible,
.radio input:focus-visible,
.btn:focus-visible,
.filtro:focus-visible,
a:focus-visible {
  outline: 3px solid var(--azul-escuro);
  outline-offset: 2px;
}
.hero .btn:focus-visible, .topo .btn:focus-visible { outline-color: #fff; }

.radios { display: flex; gap: 1.4rem; }
.radio { display: flex; align-items: center; gap: .4em; font-size: .9rem; font-weight: 500; cursor: pointer; }

.consent { display: flex; align-items: flex-start; gap: .6em; font-size: .78rem; color: var(--chumbo); margin: .6rem 0 1.3rem; cursor: pointer; }
.consent input { margin-top: .2em; }
.consent a { color: var(--azul-escuro); text-decoration: underline; }

.form__feedback { margin-top: .9rem; font-size: .9rem; font-weight: 600; text-align: center; min-height: 1.2em; }
.form__feedback.ok { color: #2e7d4f; }
.form__feedback.erro { color: var(--vermelho); }

/* ===================== RODAPÉ ===================== */
.footer { background: #2b3c57; color: var(--azul-claro); padding: 3rem 1.5rem 2rem; }
.footer__inner { max-width: 700px; margin: 0 auto; text-align: center; }
.footer__logo { height: 44px; margin: 0 auto 1.2rem; filter: brightness(0) invert(1); }
.footer__info p { font-size: .88rem; margin-bottom: .4em; }
.footer__info a { text-decoration: underline; }
.footer__disclaimer { font-size: .72rem; font-style: italic; opacity: .75; margin-top: 1rem; }
.footer__copy { font-size: .78rem; opacity: .6; margin-top: 1.2rem; margin-bottom: 0; }
