/* As perguntas de "Encontrar meu imóvel" em tela cheia (busca.js), iguais em todos os estilos do site.
   Usa as variáveis do estilo da página: --paper, --paper2, --ink, --ink2, --mute, --line, --sea, --sea-l, --serif, --ease. */
.ob { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); overflow: hidden; }
.ob::backdrop { background: rgba(28, 31, 34, .5); }
.ob[open] { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: 84px minmax(0, 1fr); grid-template-areas: 'foto top' 'foto corpo'; animation: ob-in .8s var(--ease) both; }
.ob.fecha { animation: ob-out .42s cubic-bezier(.6, 0, .8, .3) both; }
@keyframes ob-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes ob-out { from { clip-path: inset(0); } to { clip-path: inset(0 0 100% 0); } }
html:has(.ob[open]) { overflow: hidden; }

/* lado da foto: mostra o imóvel que mais combina até agora */
.ob-foto { grid-area: foto; position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.ob-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 22%, transparent 50%, rgba(0, 0, 0, .66)); pointer-events: none; }
.ob-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.06; transition: opacity .8s var(--ease), scale 1.8s var(--ease); }
.ob-img.on { opacity: 1; scale: 1; }
.ob-marca { position: absolute; z-index: 1; top: 0; left: clamp(24px, 3vw, 48px); display: flex; align-items: center; gap: 10px; height: 84px; font-size: 14px; font-weight: 500; letter-spacing: .01em; }
/* no fim: nome do imóvel indicado sobre a foto e setas para ver as outras fotos dele */
.ob-leg { position: absolute; z-index: 1; left: clamp(24px, 3vw, 48px); right: clamp(24px, 3vw, 48px); bottom: clamp(24px, 4.5vh, 48px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ob-leg[hidden], .ob-nav[hidden] { display: none; }
.ob-leg p { display: grid; gap: 6px; animation: ob-num .6s var(--ease) both; }
.ob-leg span { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--sea-l); }
.ob-leg b { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 2.8vw, 46px); line-height: 1.05; letter-spacing: -.02em; }
.ob-nav { display: flex; flex: none; gap: 8px; }
.ob-nav button { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.ob-nav button:hover { border-color: #fff; background: #fff; color: var(--ink); }
.ob-nav button:focus-visible { outline-color: #fff; }
.ob-nav svg { width: 22px; height: 10px; }
@keyframes ob-num { from { opacity: 0; translate: 0 35%; } }

.ob-top { grid-area: top; display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); padding: 0 clamp(24px, 5vw, 96px); }
.ob-voltar, .ob-x { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: none; height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink2); cursor: pointer; transition: color .25s; }
.ob-voltar:hover { color: var(--ink); }
.ob-voltar:disabled { visibility: hidden; }
.ob-voltar svg { width: 22px; height: 10px; transition: transform .35s var(--ease); }
.ob-voltar:hover svg { transform: translateX(-4px); }
.ob-x { width: 44px; margin-right: -14px; color: var(--ink); }
.ob-x svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.ob-x:hover svg { transform: rotate(90deg); }
.ob-prog { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; margin: 0; padding: 0; list-style: none; }
.ob-prog li { height: 2px; overflow: hidden; background: rgba(28, 31, 34, .13); }
.ob-prog li::before { content: ''; display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease), background-color .3s; }
.ob-prog li.on::before { transform: scaleX(1); }
.ob-prog li.cur::before { transform: scaleX(1); background: var(--sea); }

.ob-corpo { grid-area: corpo; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(24px, 5vw, 96px) clamp(32px, 6vh, 64px); }
.ob-palco { width: 100%; max-width: 640px; margin: auto 0; }
.ob-passo { --dir: 1; }
.ob-passo > *, .ob-op { animation: ob-entra .6s var(--ease) both; }
.ob-passo > :nth-child(2) { animation-delay: .04s; }
.ob-passo > :nth-child(n+3) { animation-delay: .1s; }
.ob-op { animation-delay: calc(.1s + var(--i) * .045s); }
.ob-ops { animation: none !important; }
.ob-passo.sai { animation: ob-sai .22s ease-in both; }
@keyframes ob-entra { from { opacity: 0; translate: calc(var(--dir) * 40px) 0; } }
@keyframes ob-sai { to { opacity: 0; translate: calc(var(--dir) * -28px) 0; } }
.ob-n { font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--sea); }
.ob-t { margin: 14px 0 clamp(26px, 4.5vh, 44px); font-size: clamp(34px, 3.6vw, 60px); font-weight: 500; line-height: 1.04; letter-spacing: -.025em; outline: none; }
.ob-ops { border-top: 1px solid var(--line); }
.ob-op { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; width: 100%; padding: clamp(17px, 2.4vh, 24px) 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ob-op::before { content: ''; position: absolute; inset: 0 -16px; z-index: -1; background: var(--paper2); transform: scaleY(0); transform-origin: bottom; transition: transform .4s var(--ease), background-color .2s; }
.ob-op:hover::before, .ob-op:focus-visible::before { transform: scaleY(1); }
.ob-op span { font-weight: 500; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.25; letter-spacing: -.015em; }
.ob-op:hover .ar { transform: translateX(6px); }
.ob-op[aria-pressed="true"] span { color: var(--sea); }
.ob-op span { transition: color .16s; }
.ob-op.is-on::before { transform: scaleY(1); background: var(--ink); transition-duration: .16s; }
.ob-op.is-on span { color: var(--paper); }
.ob-op.is-on .ar { color: var(--paper); transform: translateX(10px); }

/* fim */
.ob-fim-foto, .ob-gal { display: none; }
.ob-lead { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.3; color: var(--ink2); text-wrap: pretty; }
.ob-fim .ob-t { margin: 10px 0 14px; font-size: clamp(40px, 4.4vw, 72px); line-height: 1; }
.ob-where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; font-size: 16px; color: var(--ink2); }
.ob-where b { font-weight: 600; color: var(--ink); }
.ob-resumo { margin-top: 20px; max-width: 46ch; font-size: 17px; color: var(--ink2); }
.ob-fatos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.ob-fatos dt { font-size: 12px; color: var(--mute); }
.ob-fatos dd { margin: 3px 0 0; font-size: 15px; font-weight: 500; line-height: 1.3; }
.ob-nome { display: grid; gap: 4px; max-width: 420px; margin-top: 34px; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--ink2); }
.ob-nome input { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; font: inherit; font-size: 19px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
.ob-nome input:focus { outline: none; border-bottom-color: var(--sea); box-shadow: 0 1px 0 var(--sea); }
.ob-act { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 24px; }
.ob-mais { margin-top: clamp(36px, 6vh, 56px); }
.ob-mais > p { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--ink2); }
.ob-mais ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ob-mais a { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ob-mais img, .ob-sem { display: block; width: 76px; height: 56px; object-fit: cover; background: var(--paper2); }
.ob-mais b { display: block; font-weight: 600; font-size: 16px; }
.ob-mais em { display: block; font-style: normal; font-size: 13px; color: var(--ink2); }
.ob-mais a:hover .ar { transform: translateX(6px); }
.ob-resp { margin-top: clamp(32px, 5vh, 48px); font-size: 14px; line-height: 1.6; color: var(--mute); }
.ob-refazer { margin-left: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.ob-refazer:hover { text-decoration-color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .ob[open], .ob.fecha, .ob-passo, .ob-passo > *, .ob-op, .ob-leg p { animation: none !important; }
}
@media (max-width: 860px) {
  .ob[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60px clamp(128px, 24svh, 210px) minmax(0, 1fr); grid-template-areas: 'top' 'foto' 'corpo'; transition: grid-template-rows .5s var(--ease); }
  /* no resultado a faixa da foto fecha (as fotos vêm em fila no texto): anima a linha do grid, não a altura */
  .ob--fim[open] { grid-template-rows: 60px 0px minmax(0, 1fr); }
  .ob-top { gap: 12px; padding: 0 var(--pad); }
  .ob-voltar { width: 44px; margin-left: -12px; }
  .ob-voltar span { display: none; }
  .ob-foto { margin: 0 var(--pad); }
  .ob-marca { display: none; }
  .ob-leg { display: none; }
  .ob-corpo { padding: 0 var(--pad) 32px; }
  .ob-palco { margin: 0; padding-top: 24px; }
  .ob-t { margin: 10px 0 24px; font-size: clamp(30px, 8.4vw, 40px); }
  .ob-op { gap: 14px; }
  .ob-op span { font-size: 18px; }
  .ob-fim-foto { display: block; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 22px; object-fit: cover; background: var(--paper2); }
  .ob-gal { display: flex; gap: 8px; margin: 0 calc(var(--pad) * -1) 22px; padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); scrollbar-width: none; overscroll-behavior-x: contain; }
  .ob-gal::-webkit-scrollbar { display: none; }
  .ob-gal img { flex: 0 0 100%; min-width: 0; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; background: var(--paper2); }
  .ob-gal--varias img { flex-basis: 86%; }
  .ob-fim .ob-t { font-size: clamp(34px, 10vw, 46px); }
  .ob-fatos { gap: 12px; }
  .ob-act .btn { width: 100%; }
}
