:root {
  --ink: #14201c;
  --ink-2: #1d2c27;
  --ivory: #f6f2ea;
  --paper: #fbf9f5;
  --sand: #e9e1d3;
  --brass: #b8924f;
  --brass-2: #a07d3f;
  --text: #1e2522;
  --muted: #66706b;
  --line: #ddd5c6;
  --line-dark: rgba(246, 242, 234, 0.14);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r: 6px;
  --r-lg: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 300; }
h1 em { font-style: italic; color: var(--brass-2); }
h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 300; }
h3 { font-size: 24px; }
p { margin: 0 0 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass-2); margin-bottom: 16px;
}
.eyebrow--light { color: var(--brass); }
.lead { font-size: 18px; color: var(--muted); max-width: 52ch; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r);
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--brass { background: var(--brass); color: #fff; }
.btn--brass:hover { background: var(--brass-2); }
.btn--ink { background: var(--ink); color: var(--ivory); }
.btn--ink:hover { background: var(--ink-2); }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }
.btn--light { color: var(--ivory); border-color: var(--line-dark); }
.btn--light:hover { border-color: var(--ivory); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--solid, .nav--open { background: rgba(251, 249, 245, 0.96); border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--ink); color: var(--brass);
  font: 400 17px/1 var(--serif); letter-spacing: .04em; border-radius: 50%;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-weight: 700; font-size: 15px; }
.brand__text small { font-size: 12px; color: var(--muted); }
.nav__links { display: flex; gap: 24px; }
.nav__links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 12px 10px; }
.nav__toggle span { display: block; height: 1.5px; background: var(--text); margin: 6px 0; transition: transform .2s var(--ease); }
.nav--open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav--open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.nav__mobile { display: none; }

@media (max-width: 920px) {
  .nav__links, .nav__inner > .btn { display: none; }
  .nav__toggle { display: block; }
  .nav--open .nav__mobile { display: flex; flex-direction: column; padding: 8px 24px 24px; }
  .nav__mobile a { padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
}

/* ---------- Hero ---------- */
.hero { padding: 152px 0 96px; background: linear-gradient(180deg, var(--ivory), var(--paper)); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 48px; }
.hero__proof { list-style: none; padding: 32px 0 0; margin: 0; display: flex; gap: 48px; border-top: 1px solid var(--line); }
.hero__proof li { display: flex; flex-direction: column; }
.hero__proof strong { font: 300 40px/1 var(--serif); }
.hero__proof span { font-size: 13px; color: var(--muted); margin-top: 8px; }

.hero__art { position: relative; }
.plan { width: 100%; height: auto; stroke: var(--ink); stroke-width: 2.5; }
.plan path, .plan rect { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s var(--ease) forwards .3s; }
.plan .plan__outer { stroke-width: 5; }
.plan .plan__thin { stroke-width: 1; stroke: var(--brass); }
.plan .plan__gap { stroke: var(--ivory); stroke-width: 7; animation-delay: 1.6s; }
.plan text { fill: var(--muted); stroke: none; font: 600 9px var(--sans); letter-spacing: .18em; opacity: 0; animation: fade .8s forwards 2.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.hero__card {
  position: absolute; left: -24px; bottom: -24px;
  display: flex; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 20px; box-shadow: 0 12px 32px -16px rgba(20, 32, 28, .25);
}
.hero__card strong { display: block; font-size: 14px; }
.hero__card small { color: var(--muted); font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3f8f5f; box-shadow: 0 0 0 4px rgba(63, 143, 95, .18); flex: none; }

@media (max-width: 920px) {
  .hero { padding: 120px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__card { left: 8px; bottom: -16px; }
  .hero__proof { gap: 24px; justify-content: space-between; }
  .hero__proof strong { font-size: 32px; }
}

/* ---------- Seções ---------- */
.section { padding: 112px 0; }
.section--soft { background: var(--ivory); }
.section--ink { background: var(--ink); color: var(--ivory); }
.section--ink p { color: rgba(246, 242, 234, .72); }
.section__head { max-width: 640px; margin-bottom: 56px; }
@media (max-width: 720px) { .section { padding: 80px 0; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .3s var(--ease); }
.card:hover { border-color: #c9bfae; transform: translateY(-3px); }
.card__media {
  position: relative; aspect-ratio: 4 / 3;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tint) 70%, #fff) 0%, var(--tint) 100%);
}
.card__media::after {
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 24px 24px;
}
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.tag { position: absolute; z-index: 2; top: 16px; left: 16px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 4px; }
.tag--3d { left: auto; right: 16px; background: var(--ink); color: var(--brass); }
.card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: 4px; }
.specs { list-style: none; padding: 0; margin: 16px 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.specs li { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.price { font: 400 26px/1 var(--serif); }
.card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Tour ---------- */
.tour { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; }
.ticks li { padding: 10px 0 10px 28px; position: relative; border-bottom: 1px solid var(--line-dark); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 18px; width: 12px; height: 7px; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }
.tour__preview {
  position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-lg);
  background: radial-gradient(circle at 50% 40%, #2a3b35, var(--ink-2) 70%);
  border: 1px solid var(--line-dark); overflow: hidden; text-decoration: none;
}
.tour__play {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--brass); color: #fff; font-weight: 600; font-size: 14px;
  padding: 12px 22px; border-radius: 999px; transition: background-color .2s;
}
.tour__preview:hover .tour__play { background: var(--brass-2); }
.iso { position: absolute; left: 50%; top: 44%; width: 0; height: 0; transform: rotateX(58deg) rotateZ(-45deg); transform-style: preserve-3d; animation: spin 18s linear infinite; }
.iso > div { position: absolute; transform-style: preserve-3d; }
.iso__floor { width: 240px; height: 240px; left: -120px; top: -120px; background: repeating-linear-gradient(90deg, #a77b4f 0 22px, #9a7046 22px 24px); }
.iso__wall { background: #e9e1d3; }
.iso__wall--a { width: 240px; height: 110px; left: -120px; top: -120px; transform-origin: top; transform: rotateX(-90deg); }
.iso__wall--b { width: 110px; height: 240px; left: -120px; top: -120px; transform-origin: left; transform: rotateY(90deg); background: #d8cfbf; }
.iso__rug { width: 120px; height: 80px; left: -40px; top: -30px; background: #c7b79c; border-radius: 4px; transform: translateZ(1px); }
.iso__sofa { width: 130px; height: 44px; left: -60px; top: -100px; background: #3c5a4e; transform: translateZ(22px); box-shadow: 0 0 0 0 transparent; border-radius: 6px; }
.iso__plant { width: 30px; height: 30px; left: 70px; top: -100px; background: #4b7a4f; border-radius: 50%; transform: translateZ(40px); }
@keyframes spin { to { transform: rotateX(58deg) rotateZ(315deg); } }
@media (max-width: 920px) { .tour { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 80px; align-items: center; }
.about__photo { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(160deg, #2b3d36, var(--ink)); }
.about__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.about__mono { position: absolute; inset: 0; display: grid; place-items: center; font: 300 140px/1 var(--serif); color: var(--brass); opacity: .5; }
.about__photo figcaption {
  position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px;
  background: rgba(251, 249, 245, .95); border-radius: var(--r); padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px;
}
.about__photo figcaption span { color: var(--muted); font-size: 13px; }
.creds { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.creds li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.creds strong { font-weight: 600; }
.creds span { color: var(--muted); }
@media (max-width: 920px) { .about { grid-template-columns: 1fr; gap: 48px; } .about__photo { max-width: 420px; } }
@media (max-width: 480px) { .creds li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Serviços ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.service { background: var(--paper); padding: 32px 28px; }
.service__n { font: 400 14px var(--serif); color: var(--brass-2); }
.service h3 { margin: 24px 0 8px; }
.service p { color: var(--muted); font-size: 15px; margin: 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 2px solid var(--ink); font-size: 15px; }
.steps li::before { content: "Etapa " counter(s); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-2); }
.steps span { color: var(--muted); }
@media (max-width: 1000px) { .services, .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services, .steps { grid-template-columns: 1fr; } }

/* ---------- Depoimentos ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { margin: 0; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.quote p { font: 300 20px/1.45 var(--serif); margin: 0; }
.quote cite { font-style: normal; font-size: 14px; color: var(--muted); }
@media (max-width: 920px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Contato ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 32px 0 0; }
.contact__list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
.contact__list span { color: rgba(246, 242, 234, .6); font-size: 14px; }
.contact__list a { text-decoration: none; font-weight: 600; }
.contact__list a:hover { color: var(--brass); }
.form { background: var(--paper); color: var(--text); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 16px var(--sans); color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-height: 48px;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(184, 146, 79, .25); }
.field input[aria-invalid] { border-color: #b4483c; }
.field__err { color: #b4483c; font-size: 13px; min-height: 0; }
.field__err:empty { display: none; }
@media (max-width: 920px) { .contact { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- Footer / flutuante ---------- */
.footer { padding: 32px 0; border-top: 1px solid var(--line); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgba(0,0,0,.35);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .plan path, .plan rect { animation: none; stroke-dashoffset: 0; }
  .plan text { animation: none; opacity: 1; }
  .iso { animation: none; }
  * { transition-duration: 0s !important; }
}

/* ---------- Cards vindos da API ---------- */
a.card__media { display: block; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card--sold .card__media img { filter: grayscale(.7); }
.card--sold .price { color: var(--muted); }

/* ---------- Página do imóvel ---------- */
.page-imovel { background: var(--paper); }
.imv { padding-top: 96px; padding-bottom: 96px; }
.imv__loading { padding: 96px 0; }
.imv__empty { padding: 96px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.imv__gallery {
  position: relative; display: grid; gap: 8px; border-radius: var(--r-lg); overflow: hidden;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; margin-bottom: 40px;
}
.imv__gallery--1 { grid-template-columns: 1fr; grid-template-rows: 460px; }
.imv__gallery--2 { grid-template-columns: 2fr 1fr; grid-template-rows: 460px; }
.imv__gallery--3 { grid-template-columns: 2fr 1fr; }
.imv__gallery--4 { grid-template-columns: 2fr 1fr 1fr; }
.imv__gallery > :first-child { grid-row: 1 / span 2; }
.imv__gallery--1 > :first-child, .imv__gallery--2 > :first-child { grid-row: auto; }
.imv__gallery--4 > :nth-child(4) { grid-column: 2 / span 2; }
.imv__shot { padding: 0; border: 0; cursor: zoom-in; background: #ddd; overflow: hidden; }
.imv__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.imv__shot:hover img { transform: scale(1.03); }
.imv__noimg { grid-column: 1 / -1; grid-row: 1 / -1; background: linear-gradient(160deg, #3b5248, var(--ink)); min-height: 320px; }
.imv__more { position: absolute; right: 16px; bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; font: 600 14px var(--sans); cursor: pointer; }
.imv__grid { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.imv__main h1 { font-size: clamp(32px, 4vw, 48px); }
.imv__specs { list-style: none; padding: 24px 0; margin: 8px 0 32px; display: flex; flex-wrap: wrap; gap: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.imv__specs li { display: flex; flex-direction: column; }
.imv__specs strong { font: 300 32px/1 var(--serif); }
.imv__specs span { font-size: 13px; color: var(--muted); margin-top: 6px; }
.imv__tours { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 40px; }
.imv__tour { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.imv__tour:hover { border-color: var(--ink); transform: translateY(-2px); }
.imv__tour strong { font: 400 20px var(--serif); }
.imv__tour span { font-size: 14px; color: var(--muted); }
.imv__tour--main { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.imv__tour--main span { color: rgba(246,242,234,.7); }
.imv__tour--main strong::after { content: " →"; color: var(--brass); }
.imv__desc { font-size: 17px; line-height: 1.75; max-width: 68ch; }
.imv__side { position: sticky; top: 96px; }
.imv__box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.imv__price { font: 400 36px/1.1 var(--serif); }
@media (max-width: 920px) {
  .imv__grid { grid-template-columns: 1fr; gap: 32px; }
  .imv__side { position: static; }
  .imv__gallery, .imv__gallery--3, .imv__gallery--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 120px; }
  .imv__gallery > :first-child { grid-column: 1 / -1; grid-row: auto; }
  .imv__gallery > :nth-child(n+4) { display: none; }
  .imv__gallery--4 > :nth-child(4) { grid-column: auto; }
  .imv__gallery--1, .imv__gallery--2 { grid-template-rows: 280px; }
  .imv__gallery--2 { grid-template-columns: 1fr; }
  .imv__gallery--2 > :nth-child(2) { display: none; }
}

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,14,12,.95); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100% - 32px); max-height: calc(100% - 96px); object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 20px; color: rgba(255,255,255,.7); font-size: 14px; }
