/* ==========================================================================
   habitahub · template de anúncio de imóvel avulso (mockup)
   Reproduz os tokens do app real (globals.css): paleta Sapphire/navy + neumorphism.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,600&display=swap');

:root {
  /* paleta (igual ao habitahub) */
  --sapphire: #3C507D;
  --royal: #16315E;
  --swan: #16315E;     /* texto principal (navy) */
  --shell: #5E709A;    /* texto secundario */
  --quicksand: #C9A24B;/* dourado (acentos, preco, links) */
  --quicksand-dark: #A8842F;
  --grafite: #E4E9F3;  /* fundo da pagina */
  --card: #F6F8FC;     /* fundo de card */
  --border: #D2DAEA;
  --ink: var(--swan);
  --gold: var(--quicksand);

  /* sombras neumorficas (derivadas da superficie grafite) */
  --sh-light: #ffffff;
  --sh-dark: #c4cde0;
  --out-sm: -5px -5px 12px var(--sh-light), 6px 6px 14px var(--sh-dark);
  --out-md: -7px -7px 16px var(--sh-light), 9px 9px 20px var(--sh-dark);
  --out-lg: -10px -10px 24px var(--sh-light), 14px 14px 30px var(--sh-dark);
  --in-sm: inset -3px -3px 7px var(--sh-light), inset 4px 4px 9px var(--sh-dark);
  --in-md: inset -5px -5px 11px var(--sh-light), inset 6px 6px 13px var(--sh-dark);

  --radius-card: 20px;
  --maxw: 1160px;
  --green: #2F7D54;
  --green-bg: #E5F2EB;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--grafite);
  color: var(--swan);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem;
  font-weight: 800; color: var(--quicksand-dark);
}
.muted { color: var(--shell); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(228,233,243,0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { font-weight: 900; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--royal); }
.brand b { color: var(--quicksand); }
.crumbs { font-size: 0.82rem; color: var(--shell); font-weight: 600; }
.crumbs a:hover { color: var(--swan); }
.topbar .spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 800; font-size: 0.92rem; border: 0; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; color: var(--royal);
  background: var(--card); box-shadow: var(--out-sm); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { box-shadow: var(--in-sm); transform: none; }
.btn-gold { background: linear-gradient(180deg,#D9B45F,#C9A24B); color: #2A2208; box-shadow: var(--out-sm); }
.btn-wa { background: linear-gradient(180deg,#2EE06E,#1FB457); color: #053018; box-shadow: var(--out-sm); }
.choice { display: grid; gap: 10px; margin: 6px 0 14px; }
.choice label { display: flex; gap: 11px; align-items: flex-start; background: var(--grafite); box-shadow: var(--in-sm); border-radius: 12px; padding: 13px 15px; cursor: pointer; }
.choice input { margin-top: 3px; accent-color: var(--quicksand-dark); }
.choice .t { font-weight: 800; font-size: 0.92rem; }
.choice .d { font-size: 0.8rem; color: var(--shell); font-weight: 600; }
.linkbox { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid #B9C5DB; border-radius: 10px; padding: 8px 8px 8px 13px; }
.linkbox code { flex: 1; font-size: 0.78rem; color: var(--sapphire); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 0.82rem; }

/* ---------- hero gallery (mosaico) ---------- */
.hero { padding: 18px 0 8px; }
.gallery {
  display: grid; gap: 10px; border-radius: var(--radius-card); overflow: hidden;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr; grid-auto-flow: dense;
  height: clamp(280px, 52vw, 520px);
}
.gallery a { position: relative; overflow: hidden; background: var(--border); }
.gallery a img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery .g-cover { grid-row: 1 / span 2; }
.gallery .more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(22,49,94,0.55); color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .02em;
}
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 110px; }
  .gallery .g-cover { grid-column: 1 / span 2; grid-row: 1; }
  .gallery a:nth-child(n+4) { display: none; }
}

/* ---------- cabecalho do imovel ---------- */
.head { padding: 26px 0 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800;
  padding: 6px 12px; border-radius: 999px; background: #E4EAF6; color: var(--sapphire);
}
.badge.verde { background: var(--green-bg); color: var(--green); }
.badge.gold { background: #F6ECD2; color: var(--quicksand-dark); }
.head h1 { font-size: clamp(1.55rem, 3.6vw, 2.4rem); line-height: 1.1; margin: 4px 0 6px; font-weight: 900; letter-spacing: -0.02em; }
.head .loc { color: var(--shell); font-weight: 700; font-size: 1rem; }
.priceline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.price { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; color: var(--quicksand-dark); letter-spacing: -0.02em; }
.price small { font-size: 0.95rem; color: var(--shell); font-weight: 700; }
.m2 { font-size: 0.9rem; color: var(--shell); font-weight: 700; }
.prop-pill { font-size: 0.78rem; font-weight: 800; color: var(--green); background: var(--green-bg); padding: 5px 11px; border-radius: 999px; }

/* stats rapidos */
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.stat {
  display: flex; align-items: center; gap: 10px; background: var(--card); box-shadow: var(--out-sm);
  border-radius: 14px; padding: 11px 16px; min-width: 96px;
}
.stat .ic { color: var(--sapphire); display: grid; place-items: center; }
.stat .n { font-weight: 900; font-size: 1.05rem; line-height: 1; }
.stat .l { font-size: 0.72rem; color: var(--shell); font-weight: 700; }

/* ---------- destaques ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.chip {
  font-size: 0.82rem; font-weight: 700; color: var(--royal);
  background: var(--card); box-shadow: var(--out-sm); border-radius: 999px; padding: 9px 15px;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip .ic { color: var(--quicksand-dark); }

/* ---------- layout principal ---------- */
.main { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 30px 0 60px; }
@media (min-width: 980px) { .main { grid-template-columns: 1fr 360px; gap: 36px; align-items: start; } }

.section { margin-bottom: 30px; }
.section > h2 {
  font-size: 1.25rem; font-weight: 900; letter-spacing: -0.01em; margin: 0 0 4px;
}
.section > .sub { color: var(--shell); font-weight: 600; font-size: 0.9rem; margin-bottom: 16px; }

.card {
  background: var(--card); box-shadow: var(--out-md); border-radius: var(--radius-card); padding: 22px;
}

/* ficha tecnica */
.ficha { display: grid; gap: 22px; }
.ficha .grupo h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--quicksand-dark); margin: 0 0 10px; font-weight: 800; }
.ficha-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; }
@media (min-width: 640px) { .ficha-grid { grid-template-columns: repeat(3, 1fr); } }
.ficha-grid .it { background: var(--card); padding: 12px 14px; }
.ficha-grid .it .l { font-size: 0.72rem; color: var(--shell); font-weight: 700; }
.ficha-grid .it .v { font-size: 0.96rem; color: var(--swan); font-weight: 800; margin-top: 2px; }

/* descricao */
.desc { white-space: pre-line; color: #2C3E66; font-size: 1.02rem; line-height: 1.7; }

/* lazer / predio */
.lazer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .lazer-grid { grid-template-columns: repeat(3, 1fr); } }
.lazer-item { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 0.92rem; color: var(--royal); }
.lazer-item .ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--grafite); box-shadow: var(--in-sm); color: var(--sapphire); }
.predio-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.predio-meta .pm { font-size: 0.88rem; }
.predio-meta .pm .l { color: var(--shell); font-weight: 700; font-size: 0.74rem; }
.predio-meta .pm .v { font-weight: 800; }

/* valores / confianca */
.valores-top { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-bottom: 18px; }
.valores-top .b { background: var(--grafite); box-shadow: var(--in-sm); border-radius: 12px; padding: 13px 16px; }
.valores-top .b .l { font-size: 0.74rem; color: var(--shell); font-weight: 700; }
.valores-top .b .v { font-size: 1.15rem; font-weight: 900; color: var(--swan); }
.trust { display: grid; gap: 10px; }
.trust .t { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; font-size: 0.94rem; }
.trust .t.no { color: var(--shell); font-weight: 600; }
.trust .ic { flex: none; margin-top: 1px; }
.tags-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-size: 0.78rem; font-weight: 700; background: var(--grafite); box-shadow: var(--in-sm); color: var(--royal); padding: 6px 12px; border-radius: 999px; }

/* localizacao */
.perto { display: grid; gap: 9px; margin-bottom: 18px; }
.perto .p { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.92rem; padding: 9px 0; border-bottom: 1px solid var(--border); }
.perto .p:last-child { border-bottom: 0; }
.perto .p .t { color: var(--quicksand-dark); font-weight: 800; font-size: 0.84rem; }
.mapwrap { border-radius: 14px; overflow: hidden; box-shadow: var(--in-sm); border: 1px solid var(--border); }
.mapwrap iframe { width: 100%; height: 280px; border: 0; display: block; filter: saturate(0.9); }
.map-note { font-size: 0.76rem; color: var(--shell); margin-top: 8px; font-weight: 600; }
.serve { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.serve .s { font-size: 0.8rem; font-weight: 700; color: var(--sapphire); background: #E4EAF6; padding: 7px 13px; border-radius: 999px; }

/* ---------- coluna direita: lead ---------- */
.aside { position: relative; }
@media (min-width: 980px) { .aside-inner { position: sticky; top: 80px; display: grid; gap: 16px; } }
.lead {
  background: var(--card); box-shadow: var(--out-lg); border-radius: var(--radius-card); padding: 22px;
}
.lead .price { font-size: 1.7rem; }
.lead h3 { font-size: 1.08rem; font-weight: 900; margin: 14px 0 4px; }
.lead p.s { color: var(--shell); font-size: 0.86rem; font-weight: 600; margin: 0 0 16px; }
.field { width: 100%; background: #fff; border: 1px solid #B9C5DB; border-radius: 10px; padding: 12px 14px; font: inherit; font-weight: 600; color: var(--swan); margin-bottom: 10px; }
.field::placeholder { color: rgba(94,112,154,0.6); }
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,0.25); }
.lead .legal { font-size: 0.72rem; color: var(--shell); margin-top: 12px; line-height: 1.5; }
.share { display: flex; gap: 8px; }
.share .btn { flex: 1; }
.seal {
  display: flex; gap: 12px; align-items: center; background: var(--card); box-shadow: var(--out-sm);
  border-radius: 14px; padding: 14px 16px; font-size: 0.82rem; font-weight: 700; color: var(--royal);
}
.seal .ic { color: var(--green); flex: none; }

/* completude (mock painel do dono) */
.meter-card { background: var(--card); box-shadow: var(--out-sm); border-radius: 16px; padding: 16px 18px; }
.meter-card .top { display: flex; justify-content: space-between; align-items: baseline; }
.meter-card .pct { font-weight: 900; color: var(--quicksand-dark); font-size: 1.3rem; }
.bar { height: 10px; border-radius: 999px; background: var(--grafite); box-shadow: var(--in-sm); margin: 10px 0 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#D9B45F,#C9A24B); }

/* perguntas (Q&A publico) */
.qa { display: grid; gap: 14px; }
.qa .q { background: var(--grafite); box-shadow: var(--in-sm); border-radius: 14px; padding: 14px 16px; }
.qa .q .ask { font-weight: 800; color: var(--swan); font-size: 0.95rem; display: flex; gap: 8px; align-items: flex-start; }
.qa .q .who { color: var(--shell); font-weight: 700; font-size: 0.74rem; margin-top: 5px; }
.qa .q .ans { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); font-size: 0.93rem; color: #2C3E66; font-weight: 600; line-height: 1.55; }
.qa .q .ans .by { display: flex; align-items: center; gap: 6px; font-size: 0.73rem; font-weight: 800; color: var(--quicksand-dark); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.qa-cta { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.qa-empty { color: var(--shell); font-weight: 600; font-size: 0.82rem; }

/* chat modal (mock, via :target) */
.chat { position: fixed; inset: 0; background: rgba(16,28,54,0.55); display: none; align-items: flex-end; justify-content: center; z-index: 95; }
@media (min-width: 640px) { .chat { align-items: center; padding: 24px; } }
.chat:target { display: flex; }
.chat .panel { background: var(--grafite); width: 100%; max-width: 440px; border-radius: 20px 20px 0 0; box-shadow: var(--out-lg); overflow: hidden; max-height: 86vh; display: flex; flex-direction: column; }
@media (min-width: 640px) { .chat .panel { border-radius: 20px; } }
.chat .ph { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); font-weight: 800; }
.chat .ph .x { margin-left: auto; font-size: 1.6rem; color: var(--shell); line-height: 1; }
.chat .cbody { padding: 18px; overflow: auto; display: grid; gap: 10px; }
.bub { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
.bub.them { background: var(--card); box-shadow: var(--out-sm); border-bottom-left-radius: 4px; }
.bub.me { background: linear-gradient(180deg,#D9B45F,#C9A24B); color: #2A2208; margin-left: auto; border-bottom-right-radius: 4px; }
.chat .ipt { display: flex; gap: 8px; padding: 13px 16px; border-top: 1px solid var(--border); }
.chat .cnote { font-size: 0.72rem; color: var(--shell); padding: 0 18px 14px; font-weight: 600; line-height: 1.5; }

/* painel: como funciona (passos) */
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .num { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(180deg,#D9B45F,#C9A24B); color: #2A2208; }
.step .st { font-weight: 800; font-size: 0.92rem; }
.step .sd { font-size: 0.82rem; color: var(--shell); font-weight: 600; margin-top: 3px; line-height: 1.45; }

/* painel: linhas de pergunta (uma por linha, valor ou botao a direita) */
.grp-where { font-size: 0.76rem; color: var(--shell); font-weight: 700; margin: -6px 0 14px; }
.grp-where b { color: var(--quicksand-dark); }
.qlist { display: flex; flex-direction: column; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.qrow:last-child { border-bottom: 0; }
.qrow .mk { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; }
.qrow.done .mk { background: var(--green-bg); color: var(--green); }
.qrow.todo .mk { background: #F6ECD2; color: var(--quicksand-dark); }
.qrow .ql { flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; color: var(--swan); }
.qrow.todo .ql { color: var(--shell); }
.qrow .val { flex: none; max-width: 46%; text-align: right; font-size: 0.85rem; font-weight: 800; color: var(--royal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow .resp { flex: none; font-size: 0.78rem; font-weight: 800; color: #2A2208; background: linear-gradient(180deg,#D9B45F,#C9A24B); padding: 7px 15px; border: 0; border-radius: 999px; box-shadow: var(--out-sm); cursor: pointer; }
.qrow .resp:active { box-shadow: var(--in-sm); }

/* painel: pergunta em accordion (abre pra responder) */
.qac { border-bottom: 1px solid var(--border); }
.qac:last-child { border-bottom: 0; }
.qac > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 6px; border-radius: 10px; }
.qac > summary::-webkit-details-marker { display: none; }
.qac > summary:hover { background: rgba(255,255,255,0.55); }
.qac[open] > summary { background: rgba(255,255,255,0.6); }
.qac .mk { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: #F6ECD2; color: var(--quicksand-dark); }
.qac.done .mk { background: var(--green-bg); color: var(--green); }
.qac .mk .i-on { display: none; }
.qac.done .mk .i-off { display: none; }
.qac.done .mk .i-on { display: block; }
.qac .ql { flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; color: var(--swan); }
.qac .state { flex: none; max-width: 40%; text-align: right; font-size: 0.82rem; font-weight: 800; color: var(--shell); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qac.done .state { color: var(--royal); }
.qac .chev { flex: none; color: var(--shell); display: grid; place-items: center; transition: transform .2s; }
.qac[open] .chev { transform: rotate(180deg); }
.qbody { padding: 4px 6px 16px 42px; }
.why { font-size: 0.8rem; color: var(--shell); font-weight: 600; margin-bottom: 11px; line-height: 1.45; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill span { display: inline-block; padding: 8px 15px; border-radius: 999px; background: var(--grafite); box-shadow: var(--in-sm); font-size: 0.84rem; font-weight: 700; color: var(--royal); transition: .12s; }
.pill input:checked + span { background: linear-gradient(180deg,#D9B45F,#C9A24B); color: #2A2208; box-shadow: var(--out-sm); }
.pill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.qin { margin-top: 2px; max-width: 280px; }
.moeda { display: flex; align-items: center; gap: 8px; }
.moeda span { font-weight: 800; color: var(--shell); }

/* painel do dono: caixa de perguntas */
.pend { display: flex; gap: 10px; align-items: flex-start; background: var(--grafite); box-shadow: var(--in-sm); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; }
.pend .dot { width: 9px; height: 9px; border-radius: 99px; background: var(--quicksand); flex: none; margin-top: 6px; }
.pend .dot.done { background: var(--green); }
.pend .q2 { font-weight: 800; font-size: 0.9rem; }
.pend .meta2 { font-size: 0.76rem; color: var(--shell); font-weight: 700; margin-top: 2px; }
.pend .acts { margin-top: 8px; display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------- rodape ---------- */
.foot { border-top: 1px solid var(--border); padding: 28px 0; color: var(--shell); font-size: 0.84rem; font-weight: 600; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.denunciar { color: var(--shell); font-weight: 700; font-size: 0.8rem; }
.denunciar:hover { color: #B4453B; }

/* ---------- lightbox via :target ---------- */
.lb { position: fixed; inset: 0; background: rgba(16,28,54,0.92); display: none; align-items: center; justify-content: center; z-index: 90; padding: 24px; }
.lb:target { display: flex; }
.lb img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; object-fit: contain; }
.lb .x { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 2rem; font-weight: 800; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.4rem; font-weight: 800; padding: 12px; opacity: .85; }
.lb .prev { left: 12px; } .lb .next { right: 12px; }

/* landing index */
.idx-grid { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 30px 0 60px; }
@media (min-width: 760px) { .idx-grid { grid-template-columns: 1fr 1fr; } }
.idx-card { background: var(--card); box-shadow: var(--out-md); border-radius: var(--radius-card); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.idx-card:hover { transform: translateY(-3px); box-shadow: var(--out-lg); }
.idx-card img { width: 100%; height: 230px; object-fit: cover; }
.idx-card .b { padding: 18px 20px 22px; }
.idx-card .b h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; }
.idx-card .b .price { font-size: 1.35rem; }
