/* Frank — apresentação digital do imóvel. Mobile-first, sem dependências. */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #1b1916;
  --ink-2: #57524a;
  --line: #e6e1d8;
  --accent: #1b1916;
  --accent-ink: #ffffff;
  --sand: #efe9df;
  --ok: #2f6f4f;
  --pending: #8a5a12;
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --dock-h: 72px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 1.45rem; margin-bottom: 14px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.note { margin-top: 10px; }
.wordmark { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; }

/* ---------- pré-visualização (só operador) ---------- */
.preview-bar { position: sticky; top: 0; z-index: 40; background: #7a1f1f; color: #fff; font: 600 .75rem/1.3 var(--sans); letter-spacing: .04em; text-align: center; padding: 6px 12px; }

.review-panel { background: #fff7e6; border-bottom: 2px solid #7a1f1f; padding: 10px 16px; font-size: .9rem; }
.review-panel summary { cursor: pointer; font-weight: 600; }
.review-panel form { display: grid; gap: 10px; margin-top: 10px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.review-item { display: grid; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.review-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }
.review-item.is-reserve { opacity: .75; }
.review-item.is-rec { outline: 2px solid #1f8f55; }
.review-room { margin: 12px 0; }
.review-room h4 { margin: 0 0 6px; font: 700 .95rem var(--sans); }
.review-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.flag { color: #a12a2a; font-weight: 600; }
.review-video { aspect-ratio: 3 / 4; display: grid; place-items: center; background: #222; color: #fff; border-radius: 6px; }
.privacy-ok { background: #fff; border: 1px solid #7a1f1f; border-radius: 8px; padding: 8px; }
.review-panel input[name=note], .review-panel button { font: inherit; padding: 8px 10px; }
.review-panel button { background: #7a1f1f; color: #fff; border: 0; border-radius: 8px; justify-self: start; }

/* ---------- barra superior discreta ---------- */
.topbar {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 0; color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.topbar .wordmark { font-size: 1.05rem; }
.topbar-sub { font-size: .75rem; opacity: .85; }
.badge-demo {
  margin-left: auto; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255, 255, 255, .92); color: var(--ink); padding: 3px 9px; border-radius: 99px;
  text-shadow: none;
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 86svh; display: flex; align-items: flex-end; overflow: hidden; background: #2a2724; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,.05) 45%, rgba(0,0,0,.72) 100%); }
.hero-body { position: relative; z-index: 2; color: #fff; padding: 0 var(--gutter) 34px; width: 100%; max-width: 760px; }
.eyebrow { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.hero-title { font-size: clamp(1.9rem, 7.5vw, 3.2rem); line-height: 1.08; }
.hero-price { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 14px 0 2px; font-weight: 600; letter-spacing: -0.01em; }
.hero-specs { margin: 0; opacity: .95; }
.hero-ctas { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.btn {
  border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 600; font-size: 1rem;
  min-height: 48px; transition: transform .12s ease, background .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.hero .btn-primary { background: #fff; color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); backdrop-filter: blur(6px); }
.btn-soft { background: var(--sand); color: var(--ink); }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }

/* ---------- conteúdo ---------- */
.content { max-width: 1040px; margin: 0 auto; padding: 8px 0 calc(var(--dock-h) + 24px); }
.block { padding: 30px var(--gutter) 6px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }

.highlights ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.highlights li {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex: none; }

/* galeria: faixa com scroll-snap no celular, grade no desktop */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 6px; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.g-item { position: relative; padding: 0; border: 0; background: var(--sand); border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; aspect-ratio: 4 / 3; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-label { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; padding: 3px 9px; border-radius: 99px; }

.video video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 9 / 16; max-height: 78svh; object-fit: contain; margin: 0 auto; }
.video { margin: 0; }
.video figcaption { margin-top: 8px; }
.video-placeholder { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--ink-2); background: var(--surface); }

.about p { font-size: 1.05rem; margin: 0; color: var(--ink-2); }

.sheet { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sheet div { background: var(--surface); padding: 12px 14px; }
.sheet dt { font-size: .78rem; color: var(--ink-2); }
.sheet dd { margin: 2px 0 0; font-weight: 600; }
.sheet div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sub-h { font: 600 1rem var(--sans); margin: 22px 0 10px; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; font-size: .9rem; }
.tag-pending { font-size: .7rem; font-weight: 600; color: var(--pending); background: #f7ecd9; border-radius: 99px; padding: 1px 7px; white-space: nowrap; }

.loc-label { font-size: 1.1rem; font-weight: 600; margin: 0 0 4px; }
.map { margin: 14px 0 6px; border-radius: var(--radius); overflow: hidden; background: var(--sand); min-height: 64px; display: flex; align-items: center; justify-content: center; }
.map iframe { width: 100%; height: 280px; border: 0; display: block; }
.nearby { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.nearby li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-2); }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 12px; color: var(--ink-2); }

.visit { margin-top: 18px; }
.visit > .btn { width: 100%; max-width: 360px; }
.visit-fallback { margin-top: 18px; }
.visit-fallback summary { cursor: pointer; color: var(--ink-2); font-size: .92rem; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.visit-fallback[open] summary { margin-bottom: 10px; }
.ask-card { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; text-align: left; background: var(--surface); border: 1px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; min-height: 64px; }
.ask-card > span:last-child { display: grid; gap: 2px; }
.visit-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.visit-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; }
.visit-form input { font: inherit; font-weight: 400; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 48px; }
.form-msg { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: #a12a2a; }
.alt-contact { margin-top: 14px; }

.footer { text-align: center; padding: 26px var(--gutter) calc(var(--dock-h) + 34px); color: var(--ink-2); font-size: .85rem; border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }

/* ---------- dock fixo (celular) ---------- */
.dock {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line); backdrop-filter: blur(10px);
}
.dock-price { display: grid; line-height: 1.15; margin-right: auto; }
.dock-price strong { font-size: 1.05rem; }
.dock-price span { font-size: .75rem; color: var(--ink-2); }
.dock .btn { padding: 12px 18px; }
.btn-icon { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: #1f8f55; flex: none; }

/* ---------- Beatriz ---------- */
.beatriz {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: min(78svh, 640px);
  display: flex; flex-direction: column; background: var(--surface); border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom);
}
.beatriz[hidden] { display: none; }
.bz-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bz-head div { display: grid; line-height: 1.2; }
.bz-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.bz-close { margin-left: auto; border: 0; background: none; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; }
.bz-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; }
.msg.bz { background: var(--bg); border-top-left-radius: 4px; }
.msg.me { background: var(--ink); color: #fff; margin-left: auto; border-top-right-radius: 4px; }
.msg.typing { color: var(--ink-2); font-style: italic; }
.msg-wa { display: inline-block; margin-top: 8px; background: #1f8f55; color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 99px; font-weight: 600; }
.bz-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.bz-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font-size: .88rem; min-height: 40px; }
.bz-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.bz-form input { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 99px; min-height: 48px; background: var(--bg); }
.bz-form button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.2rem; }

/* ---------- lightbox ---------- */
.lightbox { padding: 0; border: 0; background: #000; width: 100vw; height: 100svh; max-width: 100vw; max-height: 100svh; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: 86svh; object-fit: contain; }
.lb-close, .lb-prev, .lb-next { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; }
.lb-next { right: 10px; top: 50%; }
.lb-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; margin: 0; font-size: .9rem; }

/* ---------- páginas neutras ---------- */
.neutral { display: grid; place-items: center; min-height: 100svh; text-align: center; }
.neutral-box { padding: 24px; max-width: 420px; }
.neutral .wordmark { font-size: 1.6rem; margin: 0 0 12px; }
.neutral-h { font-size: 1.4rem; margin-bottom: 8px; }

/* ---------- tablet / desktop ---------- */
@media (min-width: 700px) {
  :root { --gutter: 32px; }
  .highlights ul { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .gallery { grid-auto-columns: 46%; }
  .sheet { grid-template-columns: repeat(3, 1fr); }
  .sheet div:last-child:nth-child(odd) { grid-column: auto; }
  .sheet { background: var(--surface); }
  .sheet div { box-shadow: 0 0 0 .5px var(--line); }
  .visit-form { grid-template-columns: 1fr 1fr; }
  .visit-form label:nth-child(3), .visit-form button, .form-msg { grid-column: 1 / -1; }
  .ask-card { max-width: 520px; }
  .visit-form button { justify-self: start; }
}
@media (min-width: 1000px) {
  .hero { min-height: 82vh; }
  .hero-body { padding-left: max(var(--gutter), calc((100vw - 1040px) / 2 + var(--gutter))); padding-bottom: 56px; max-width: none; }
  .hero-body > * { max-width: 720px; }
  .topbar { padding-left: max(var(--gutter), calc((100vw - 1040px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - 1040px) / 2 + var(--gutter))); }
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
  .gallery .g-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .video video { max-width: 420px; }
  .dock { left: auto; right: 24px; bottom: 24px; border-radius: 99px; border: 1px solid var(--line); padding: 8px 8px 8px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
  .content { padding-bottom: 60px; }
  .footer { padding-bottom: 110px; }
  .beatriz { left: auto; right: 24px; bottom: 24px; width: 400px; height: min(640px, calc(100vh - 48px)); border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
