/* IMOB GLOBAL — protótipo navegável. Direção em 03-design/design.md. */
:root {
  --fundo: #0A1628;
  --sup: #12233B;
  --sup-alta: #1A3050;
  --linha: #26405F;
  --ouro: #C9A464;
  --ouro-claro: #E2C68F;
  --texto: #F3F5F8;
  --texto-2: #9DADC2;
  --verde: #3CC48A;
  --ambar: #F2B84B;
  --raio-foto: 16px;
  --raio-ctrl: 12px;
  --topo: 56px;
  --abas: 68px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--texto);
  background: #06101E;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { display: flex; justify-content: center; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ouro-claro); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--fundo);
  position: relative;
  overflow-x: hidden;
}
@media (min-width: 600px) {
  body { padding: 24px 0; }
  #app { min-height: 860px; border-radius: 28px; box-shadow: 0 0 0 1px var(--linha); }
}

/* Tipografia */
h1 { font-size: 22px; line-height: 28px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 0; }
p { margin: 0; }
.corpo { font-size: 15px; line-height: 22px; }
.leg { font-size: 13px; line-height: 18px; color: var(--texto-2); }
.preco { font-size: 22px; font-weight: 700; color: var(--ouro-claro); }
.ouro { color: var(--ouro); }
.verde { color: var(--verde); }

/* Topo fino */
.topo {
  position: sticky; top: 0; z-index: 5;
  height: var(--topo);
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  background: rgba(10, 22, 40, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha);
}
.topo h1 { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icone-btn {
  width: 44px; height: 44px; border: 0; background: none; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; position: relative; color: var(--texto);
}
.icone-btn:active { background: var(--sup-alta); }
.ponto { position: absolute; top: 9px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--ouro); color: var(--fundo); font-size: 10px; font-weight: 700;
  display: grid; place-items: center; }

/* Conteúdo */
.tela { padding: 20px 20px 32px; display: flex; flex-direction: column; gap: 20px; }
.com-abas .tela { padding-bottom: calc(var(--abas) + 28px); }
.bloco { display: flex; flex-direction: column; gap: 10px; }
.linha-h { display: flex; align-items: center; gap: 10px; }
.entre { justify-content: space-between; }

/* Botões */
.btn {
  min-height: 50px; padding: 0 18px; border-radius: var(--raio-ctrl);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; cursor: pointer; border: 1px solid transparent; width: 100%;
  text-align: center;
}
.btn-ouro { background: var(--ouro); color: #0A1628; }
.btn-ouro:active { background: var(--ouro-claro); }
.btn-linha { background: transparent; border-color: var(--linha); color: var(--texto); }
.btn-linha:active { background: var(--sup-alta); }
.btn-peq { min-height: 38px; font-size: 13px; padding: 0 12px; width: auto; border-radius: 10px; }
.btn[disabled] { opacity: 0.45; }

/* Abas segmentadas */
.segmento { display: flex; background: var(--sup); border-radius: 12px; padding: 4px; gap: 4px; }
.segmento button {
  flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--texto-2);
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.segmento button[aria-pressed="true"] { background: var(--sup-alta); color: var(--texto); }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--linha);
  background: none; color: var(--texto); font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--ouro); border-color: var(--ouro); color: #0A1628; }
.etiqueta { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  padding: 4px 9px; border-radius: 8px; background: var(--sup-alta); color: var(--texto-2); }
.etiqueta.ok { background: rgba(60, 196, 138, 0.14); color: var(--verde); }
.etiqueta.esp { background: rgba(242, 184, 75, 0.14); color: var(--ambar); }

/* Formulário */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label, .rotulo { font-size: 13px; color: var(--texto-2); font-weight: 600; }
.campo input, .campo select, .campo textarea {
  min-height: 48px; padding: 12px 14px; border-radius: var(--raio-ctrl);
  background: var(--sup); border: 1px solid var(--linha); outline: none; font-size: 15px; width: 100%;
}
.campo textarea { min-height: 88px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--ouro); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contador { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.contador .linha-h button { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--linha);
  background: var(--sup); font-size: 20px; cursor: pointer; }
.contador output { min-width: 24px; text-align: center; font-weight: 700; }
.marcar { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.marcar input { width: 22px; height: 22px; accent-color: var(--ouro); flex: none; margin: 0; }
input[type=range] { width: 100%; accent-color: var(--ouro); }

/* Listas com divisória */
.lista { display: flex; flex-direction: column; }
.lista > * { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linha); }
.lista > *:last-child { border-bottom: 0; }
.lista .fim { margin-left: auto; color: var(--texto-2); flex: none; }
.meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.meio strong { font-size: 15px; }
.miniatura { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.avatar { width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; flex: none; }

/* Imóvel */
.foto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--raio-foto); background: var(--sup); }
.anuncio { display: flex; flex-direction: column; gap: 10px; }
.anuncio .sobre { display: flex; flex-direction: column; gap: 4px; }
.dados { display: flex; flex-wrap: wrap; gap: 14px; color: var(--texto-2); font-size: 14px; }
.dados span { display: inline-flex; align-items: center; gap: 6px; }
.galeria { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px;
  scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
.galeria img { flex: none; width: 86%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--raio-foto);
  scroll-snap-align: start; }
.favorito { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 22px; border: 0;
  background: rgba(10, 22, 40, 0.7); display: grid; place-items: center; cursor: pointer; color: var(--texto); }
.favorito[aria-pressed="true"] { color: #FF6B81; }
.rel { position: relative; }

/* O selo: autorizado pelo proprietário */
.selo {
  border: 1px solid var(--ouro); border-radius: var(--raio-foto); padding: 16px;
  background: linear-gradient(160deg, rgba(201, 164, 100, 0.16), rgba(201, 164, 100, 0.02) 60%);
  display: flex; flex-direction: column; gap: 12px;
}
.selo-cab { display: flex; gap: 12px; align-items: center; }
.selo-cab svg { flex: none; color: var(--ouro); }
.selo-cab strong { font-size: 15px; display: block; }
.selo .lista > * { padding: 10px 0; }

/* Barra de abas */
.abas {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; z-index: 6;
  height: var(--abas); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(10, 22, 40, 0.97); border-top: 1px solid var(--linha); padding-bottom: env(safe-area-inset-bottom);
}
.abas a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--texto-2); }
.abas a[aria-current="page"] { color: var(--ouro); }
@media (min-width: 600px) { .abas { bottom: 24px; border-radius: 0 0 28px 28px; } }

/* Entrada */
.entrada { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 600px) { .entrada { min-height: 860px; } }
.entrada-foto { position: relative; height: 46vh; min-height: 300px; }
.entrada-foto img { width: 100%; height: 100%; object-fit: cover; }
.entrada-foto::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0) 32%, rgba(10, 22, 40, 0) 55%, var(--fundo) 100%); }
.marca { position: absolute; top: 20px; left: 20px; z-index: 1; display: flex; align-items: center; gap: 10px; }
.marca b { font-size: 18px; letter-spacing: 0.04em; color: var(--ouro); }
.marca small { display: block; font-size: 12px; color: var(--texto); }
.entrada .tela { flex: 1; margin-top: -40px; position: relative; z-index: 1; gap: 16px; }
.entrada h1 { font-size: 30px; line-height: 36px; }
.rodape { text-align: center; font-size: 13px; color: var(--ouro); padding-top: 8px; }

/* Destaques do início */
.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--linha);
  border-radius: 14px; overflow: hidden; }
.numeros a { background: var(--sup); padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.numeros b { font-size: 24px; }
.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.atalhos a { background: var(--sup); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  min-height: 92px; font-weight: 700; font-size: 14px; }
.atalhos svg { color: var(--ouro); }

/* Conversa */
.conversa { display: flex; flex-direction: column; gap: 10px; }
.bolha { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 21px; }
.bolha.robo { background: var(--sup); border-top-left-radius: 4px; align-self: flex-start; }
.bolha.eu { background: var(--ouro); color: #0A1628; border-top-right-radius: 4px; align-self: flex-end; }
.bolha a { color: var(--ouro-claro); font-weight: 700; }
.enviar { display: flex; gap: 8px; }
.enviar input { flex: 1; min-height: 48px; padding: 0 14px; border-radius: 24px; background: var(--sup);
  border: 1px solid var(--linha); outline: none; }
.enviar button { width: 48px; height: 48px; border-radius: 24px; border: 0; background: var(--ouro); color: #0A1628;
  display: grid; place-items: center; cursor: pointer; flex: none; }

/* Arte de divulgação */
.arte { border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); margin: 0 auto; width: 100%; }
.arte.stories { max-width: 260px; aspect-ratio: 9 / 16; }
.arte.feed { max-width: 320px; aspect-ratio: 4 / 5; }
.arte.status { max-width: 260px; aspect-ratio: 9 / 16; }
.arte-cab { padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.arte-cab i { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-style: normal;
  font-size: 11px; }
.arte img { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.arte-rodape { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.arte-rodape b { font-size: 16px; }
.arte-rodape .linha-h { justify-content: space-between; align-items: flex-end; }
.qr { width: 44px; height: 44px; background: #fff; padding: 4px; display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; border-radius: 4px; flex: none; }
.qr span { background: #0A1628; }
.qr span:nth-child(3n) { background: #fff; }

/* Studio */
.studio-foto { transition: filter 0.4s ease; }
.studio-foto.original { filter: brightness(0.78) saturate(0.6) contrast(0.88) sepia(0.12); }
.linha-tempo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.linha-tempo img { aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; }

/* Plano */
.plano { border: 1px solid var(--linha); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plano.atual { border-color: var(--ouro); }
.plano b { font-size: 20px; }

/* Aviso, folha e toast */
.aviso { background: var(--sup); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 20px; }
.aviso svg { flex: none; color: var(--ouro); margin-top: 1px; }
.aviso.ok svg { color: var(--verde); }
.whats { background: #0B3B2E; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 20px; color: #E7F6EF; }
.whats a { color: #7FE0B5; text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: calc(var(--abas) + 16px); transform: translate(-50%, 20px); opacity: 0;
  width: calc(100% - 40px); max-width: 390px; background: var(--texto); color: var(--fundo); border-radius: 12px;
  padding: 12px 16px; font-size: 14px; font-weight: 600; z-index: 20; transition: all 0.25s ease; pointer-events: none; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.folha-fundo { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 15; display: flex; justify-content: center;
  align-items: flex-end; }
.folha { width: 100%; max-width: 430px; background: var(--sup); border-radius: 20px 20px 0 0; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; max-height: 80vh; overflow: auto; }
details > summary { cursor: pointer; list-style: none; font-weight: 700; display: flex; justify-content: space-between;
  align-items: center; min-height: 44px; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary svg { transform: rotate(90deg); }
hr { border: 0; border-top: 1px solid var(--linha); margin: 0; width: 100%; }

.chips.quebra { flex-wrap: wrap; margin: 0; padding: 0; }

/* ---------- Movimento ---------- */
/* Troca de tela: topo e abas ficam parados, o conteúdo desliza. */
.topo { view-transition-name: topo; }
.abas { view-transition-name: abas; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root) { animation-name: sai-esq; }
::view-transition-new(root) { animation-name: entra-dir; }
html.voltando::view-transition-old(root) { animation-name: sai-dir; }
html.voltando::view-transition-new(root) { animation-name: entra-esq; }
@keyframes entra-dir { from { transform: translateX(32px); opacity: 0; } }
@keyframes entra-esq { from { transform: translateX(-32px); opacity: 0; } }
@keyframes sai-esq { to { transform: translateX(-24px); opacity: 0; } }
@keyframes sai-dir { to { transform: translateX(24px); opacity: 0; } }

/* Toque */
.btn, .chip, .segmento button, .atalhos a, .numeros a, .lista > a, .lista > button { transition: transform 120ms ease, background-color 160ms ease; }
.btn:active, .chip:active, .atalhos a:active { transform: scale(0.97); }
.lista > a:active, .lista > button:active, .numeros a:active { background: rgba(255, 255, 255, 0.03); }
.favorito[aria-pressed="true"] svg { animation: pulo 360ms ease; fill: currentColor; }
@keyframes pulo { 40% { transform: scale(1.35); } }

/* Folha que sobe */
.folha-fundo { animation: aparece 200ms ease; }
.folha { animation: sobe 280ms cubic-bezier(.2, .8, .2, 1); }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobe { from { transform: translateY(100%); } }

/* Conversa: a última pergunta e a resposta entram em sequência */
.conversa .bolha:nth-last-child(2) { animation: bolha 260ms ease both; }
.conversa .bolha:last-child { animation: bolha 260ms ease 380ms both; }
.conversa .bolha:only-child { animation: bolha 260ms ease both; }
@keyframes bolha { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* O selo: um brilho dourado passa uma vez e os autorizados entram um a um */
.selo { position: relative; overflow: hidden; }
.selo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(226, 198, 143, 0.28) 50%, transparent 65%);
  transform: translateX(-100%); animation: brilho 1.4s ease 0.35s 1 forwards; }
@keyframes brilho { to { transform: translateX(100%); } }
.selo .lista > * { animation: bolha 300ms ease both; }
.selo .lista > *:nth-child(1) { animation-delay: 0.5s; }
.selo .lista > *:nth-child(2) { animation-delay: 0.62s; }
.selo .lista > *:nth-child(3) { animation-delay: 0.74s; }

/* Sucesso */
.aviso.ok svg { animation: check 420ms cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes check { from { transform: scale(0); } }
.toast { transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.2, .8, .2, 1); }
.studio-foto { transition: filter 0.9s ease; }
