/* ==========================================================================
   Candian Imóveis · site novo · base.css
   Tokens da marca, reset, tipografia, botão, cabeçalho, formulário, rodapé.
   Cores e fontes vêm de identidade-visual/tokens (CSS público do site atual).
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca (do site atual) */
  --verde-profundo: #093B2E;
  --verde-floresta: #194D33;
  --verde-secao: #17473B;
  --verde-hover: #0F503F;
  --verde-icone: #0E2B2E;
  --lima: #8CF95F;
  --lima-oliva: #96CA2D;
  --branco: #fff;
  /* Extensão nossa: branco esverdeado para alternar seções claras (não existe no site atual) */
  --papel: #F2F6EF;

  --tinta: var(--verde-profundo);
  --tinta-suave: #3D574E;
  --texto-escuro-suave: rgba(255, 255, 255, .8);
  --linha-clara: rgba(9, 59, 46, .16);
  --linha-escura: rgba(255, 255, 255, .18);
  --erro-escuro: #FFB4A8;

  --f-texto: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-apoio: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;

  --raio-pilula: 100px;
  --raio: 22px;
  --largura: 1320px; /* uma largura só para o topo e todas as seções: tudo alinha com a logo e com o botão do menu */
  --gutter: clamp(20px, 4vw, 40px);
  --espaco-secao: clamp(72px, 10vw, 136px);
  --alt-topo: 76px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --foco: var(--lima);
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--alt-topo) + 16px);
  scrollbar-color: var(--verde-floresta) var(--verde-icone);
}
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: clamp(1rem, .96rem + .18vw, 1.0625rem);
  line-height: 1.62;
  color: var(--tinta);
  background: var(--verde-icone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: var(--lima); color: var(--verde-profundo); }
input, textarea { caret-color: var(--verde-floresta); }
input[type="checkbox"] { accent-color: var(--verde-floresta); }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 4px; }

/* ::-webkit-scrollbar só em Chrome/Safari; os demais usam scrollbar-color acima */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--verde-icone); }
::-webkit-scrollbar-thumb { background: var(--verde-floresta); border: 3px solid var(--verde-icone); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--verde-hover); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pular {
  position: fixed; left: 16px; top: -80px; z-index: 200;
  background: var(--lima); color: var(--verde-profundo); font-weight: 700;
  padding: 12px 18px; border-radius: var(--raio-pilula); text-decoration: none;
  transition: top .25s var(--ease-out);
}
.pular:focus { top: 16px; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--largura)); margin-inline: auto; }

.secao { position: relative; padding-block: var(--espaco-secao); overflow-x: clip; }
.secao--clara { background: var(--branco); color: var(--tinta); --foco: var(--verde-profundo); }
.secao--papel { background: var(--papel); color: var(--tinta); --foco: var(--verde-profundo); }
.secao--profunda { background: var(--verde-profundo); color: #fff; --foco: var(--lima); }
.secao--floresta { background: var(--verde-floresta); color: #fff; --foco: var(--lima); }
.secao--secao { background: var(--verde-secao); color: #fff; --foco: var(--lima); }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 1.2rem + 4.2vw, 4.1rem); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(1.95rem, 1.25rem + 2.9vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.7rem); letter-spacing: -.02em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem); line-height: 1.55; max-width: 56ch; }
.suave { color: var(--tinta-suave); }
.secao--profunda .suave, .secao--floresta .suave, .secao--secao .suave { color: var(--texto-escuro-suave); }

/* Ênfase: lima neon no escuro; marca-texto lima atrás de texto verde no claro (lima como texto no branco não passa no contraste) */
.neon { color: var(--lima); }
.marca {
  background: linear-gradient(transparent 56%, var(--lima) 56% 94%, transparent 94%);
  padding-inline: .1em; margin-inline: -.1em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.itálico-caps { font-style: italic; text-transform: uppercase; }

/* ---------- animação de entrada ---------- */
.js .rev {
  opacity: 0; transform: translateY(30px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
@media (min-width: 960px) { /* deslocamento lateral só onde há folga; no celular geraria rolagem horizontal */
  .js .rev--esq { transform: translateX(-34px); }
  .js .rev--dir { transform: translateX(34px); }
}
.js .rev.is-in { opacity: 1; transform: none; }
/* o recorte fica na <img> (e não na moldura) para o IntersectionObserver enxergar a moldura */
.js .rev-foto img { clip-path: inset(0 0 100% 0); }
.js .rev-foto.is-in img { clip-path: inset(0 0 0 0); }
.js .rev-foto img { transition: clip-path 1.2s var(--ease-io), transform 1.4s var(--ease-out), filter .6s; }

/* ---------- botão (pílula + ícone do WhatsApp) ---------- */
.btn {
  --bg: var(--lima); --fg: var(--verde-profundo); --varre: var(--verde-icone); --fg-h: var(--lima);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 9px 28px 9px 9px;
  border: 0; border-radius: var(--raio-pilula);
  background: var(--bg); color: var(--fg);
  font: 700 .8125rem/1.15 var(--f-apoio); letter-spacing: .05em; text-transform: uppercase; text-align: left;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55);
  transition: color .4s var(--ease-out), transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--varre);
  clip-path: circle(0% at 30px 50%);
  transition: clip-path .6s var(--ease-out);
}
.btn:hover, .btn:focus-visible { color: var(--fg-h); transform: translateY(-2px); box-shadow: 0 18px 32px -14px rgba(0, 0, 0, .6), 0 0 0 2px var(--fg-h); }
.btn:hover::before, .btn:focus-visible::before { clip-path: circle(160% at 30px 50%); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: .12s; }
.btn__icone {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--verde-icone);
  transition: background .4s var(--ease-out), transform .6s var(--ease-out);
}
.btn__icone img { width: 22px; height: 22px; filter: invert(1); transition: filter .3s; }
.btn:hover .btn__icone { background: var(--lima); transform: rotate(-14deg) scale(1.08); }
.btn:hover .btn__icone img { filter: none; }
.btn__seta { flex: none; width: 18px; height: 18px; margin-left: 2px; transition: transform .5s var(--ease-out); }
.btn:hover .btn__seta { transform: translateX(5px); }

.btn--escuro { --bg: var(--verde-icone); --fg: var(--lima); --varre: var(--lima); --fg-h: var(--verde-profundo); }
.btn--escuro .btn__icone { background: var(--lima); }
.btn--escuro .btn__icone img { filter: none; }
.btn--escuro:hover .btn__icone { background: var(--verde-icone); }
.btn--escuro:hover .btn__icone img { filter: invert(1); }

.btn--sm { min-height: 46px; padding: 6px 20px 6px 6px; gap: 10px; font-size: .75rem; }
.btn--sm .btn__icone { width: 34px; height: 34px; }
.btn--sm .btn__icone img { width: 19px; height: 19px; }
.btn--sm::before { clip-path: circle(0% at 23px 50%); }
.btn--sm:hover::before, .btn--sm:focus-visible::before { clip-path: circle(160% at 23px 50%); }

.btn--cheio { width: 100%; justify-content: center; padding-right: 22px; }
.btn--cheio::before { clip-path: circle(0% at 30px 50%); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

.link-linha {
  display: inline-block; text-decoration: none; font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 3px; transition: background-size .45s var(--ease-out), color .3s;
}
.link-linha:hover { background-size: 0 2px; background-position: 100% 100%; }

/* ---------- cabeçalho ---------- */
.topo {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: #fff;
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s;
}
.topo__in {
  width: min(100% - 2 * var(--gutter), var(--largura)); margin-inline: auto;
  min-height: var(--alt-topo);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  transition: min-height .4s var(--ease-out);
}
.topo.is-scrolled { background: rgba(9, 59, 46, .9); box-shadow: 0 1px 0 var(--linha-escura), 0 12px 30px -20px rgba(0, 0, 0, .6); }
@supports (backdrop-filter: blur(1px)) {
  .topo.is-scrolled { background: rgba(9, 59, 46, .78); backdrop-filter: blur(14px) saturate(1.3); }
}
.topo.is-scrolled .topo__in { min-height: 64px; }
.logo { display: block; flex: none; }
.logo img { width: clamp(120px, 12vw, 158px); height: auto; transition: transform .5s var(--ease-out); }
.logo:hover img { transform: scale(1.04); }
.topo__leitura {
  display: none; align-items: center; gap: 8px;
  font: 600 .6875rem/1 var(--f-apoio); letter-spacing: .14em; text-transform: uppercase; color: var(--lima-oliva);
  white-space: nowrap;
}
.topo__leitura svg { width: 16px; height: 16px; flex: none; }
.topo__nav { display: none; margin-left: auto; gap: clamp(14px, 2.2vw, 30px); }
.topo__nav a {
  position: relative; padding-block: 6px;
  font: 400 .875rem/1 var(--f-apoio); text-decoration: none; color: #fff;
}
.topo__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--lima-oliva); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.topo__nav a:hover::after, .topo__nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.topo .btn { margin-left: auto; }
@media (min-width: 900px) {
  .topo__nav { display: flex; }
  .topo .btn { margin-left: 0; }
}
@media (min-width: 1180px) { .topo__leitura { display: inline-flex; } }
@media (max-width: 420px) {
  .topo .btn--sm { font-size: 0; gap: 0; padding: 6px; min-height: 46px; }
  .topo .btn--sm .btn__seta { display: none; }
}

/* ---------- formulário de contato ---------- */
.lead-form { display: grid; gap: 14px; }
.lead-form__campos { display: grid; gap: 14px; }
@media (min-width: 560px) { .lead-form__campos { grid-template-columns: 1fr 1fr; } }
.campo { display: grid; gap: 7px; }
.campo label {
  font: 600 .75rem/1 var(--f-apoio); letter-spacing: .08em; text-transform: uppercase;
  color: var(--texto-escuro-suave);
}
.campo input {
  width: 100%; height: 58px; padding: 0 24px;
  border: 2px solid transparent; border-radius: var(--raio-pilula);
  background: #fff; color: var(--verde-profundo);
  font-size: 1.0625rem; font-weight: 500;
  transition: border-color .3s, box-shadow .3s, transform .4s var(--ease-out);
}
.campo input::placeholder { color: #5B7168; opacity: 1; }
.campo input:hover { border-color: rgba(140, 249, 95, .6); }
.campo input:focus { outline: none; border-color: var(--lima); box-shadow: 0 0 0 4px rgba(140, 249, 95, .28); transform: translateY(-1px); }
.campo input[aria-invalid="true"] { border-color: var(--erro-escuro); }
.campo__erro { min-height: 1.2em; font-size: .875rem; line-height: 1.3; color: var(--erro-escuro); font-weight: 600; }
.lead-form__status { font-size: .9375rem; color: var(--erro-escuro); font-weight: 600; }
.lead-form__status a { color: #fff; }
.lead-form__nota { font-size: .8125rem; line-height: 1.5; color: var(--texto-escuro-suave); max-width: 52ch; }
.lead-form__nota a { color: #fff; }

/* ---------- moldura de foto (zoom + curvas de nível no hover) ---------- */
.foto-moldura { position: relative; overflow: hidden; border-radius: var(--raio); background: var(--verde-floresta); }
.foto-moldura img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out), filter .6s; }
.foto-moldura::after { /* curvas de nível por cima da foto, aparecem no hover */
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: url("../img/contornos.svg") center / cover; transition: opacity .7s var(--ease-out);
}
.foto-moldura:hover img { transform: scale(1.05); }
.foto-moldura:hover::after { opacity: .55; }
.foto-moldura figcaption {
  position: absolute; left: 16px; bottom: 16px; z-index: 1; max-width: calc(100% - 32px);
  padding: 9px 16px; border-radius: var(--raio-pilula); background: var(--lima); color: var(--verde-profundo);
  font: 700 .75rem/1.2 var(--f-apoio); letter-spacing: .04em;
}

/* ---------- botão flutuante de WhatsApp ---------- */
.zap-flutuante {
  position: fixed; right: clamp(14px, 2.4vw, 28px); bottom: clamp(14px, 2.4vw, 28px); z-index: 90;
  display: inline-flex; align-items: center; gap: 0; max-width: 58px; overflow: hidden;
  height: 58px; padding: 9px; border-radius: var(--raio-pilula);
  background: var(--lima); color: var(--verde-profundo); text-decoration: none;
  font: 700 .8125rem/1 var(--f-apoio); white-space: nowrap;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
  transition: max-width .6s var(--ease-out), gap .6s var(--ease-out), padding .6s var(--ease-out), transform .4s var(--ease-out);
}
.zap-flutuante .btn__icone { width: 40px; height: 40px; }
/* só aparece depois do hero, para não cobrir o botão do formulário */
.js .zap-flutuante:not(.is-on) { opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(18px); }
.js .zap-flutuante { transition-property: max-width, gap, padding, transform, opacity, visibility; }
.zap-flutuante__txt { opacity: 0; transition: opacity .3s var(--ease-out); }
.zap-flutuante:hover .zap-flutuante__txt, .zap-flutuante:focus-visible .zap-flutuante__txt { opacity: 1; transition-delay: .15s; }
.zap-flutuante:hover, .zap-flutuante:focus-visible { max-width: 240px; gap: 12px; padding-right: 22px; transform: translateY(-3px); }
.zap-flutuante:hover .btn__icone { background: var(--lima); }
@media (prefers-reduced-motion: no-preference) {
  .zap-flutuante::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(140, 249, 95, .55);
    animation: pulso 2.8s var(--ease-out) infinite;
  }
  @keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(140, 249, 95, .5); } 70%, 100% { box-shadow: 0 0 0 20px rgba(140, 249, 95, 0); } }
}

/* ---------- rodapé ---------- */
.rodape { background: var(--verde-icone); color: var(--texto-escuro-suave); padding-block: clamp(56px, 8vw, 96px) 28px; --foco: var(--lima); }
.rodape__grade { display: grid; gap: 44px; }
@media (min-width: 900px) { .rodape__grade { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 56px; } }
.rodape__marca img { width: 190px; margin-bottom: 22px; }
.rodape__marca p { max-width: 36ch; font-size: .9375rem; }
.rodape__insta { display: inline-block; margin-top: 18px; color: var(--lima); font-weight: 700; text-decoration: none; }
.rodape h3 { font: 700 .75rem/1 var(--f-apoio); letter-spacing: .14em; text-transform: uppercase; color: var(--lima-oliva); margin-bottom: 20px; }
.rodape li { margin-bottom: 11px; font-size: .9375rem; }
.rodape a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease-out), color .3s; }
.rodape a:hover { color: #fff; background-size: 100% 1px; }
.rodape address { font-style: normal; }
.rodape address p + p { margin-top: 12px; }
.rodape__fim {
  margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--linha-escura);
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: .8125rem;
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
