@font-face { font-family: Archivo; src: url(assets/fonts/Archivo-Variable.ttf) format("truetype"); font-weight: 100 900; font-stretch: 62% 125%; }
@font-face { font-family: "Noto Serif"; src: url(assets/fonts/NotoSerif-Light.ttf) format("truetype"); font-weight: 300; }
@font-face { font-family: "Noto Serif"; src: url(assets/fonts/NotoSerif-LightItalic.ttf) format("truetype"); font-weight: 300; font-style: italic; }

:root {
  --linho: #e0dcd6;
  --pedra: #adaaa5;
  --preto: #000;
  --tinta: #1a1918;
  --rule: rgba(0,0,0,.18);
  --pad: clamp(16px, 2.6vw, 36px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
button { box-sizing: border-box !important; }
html, body { height: 100%; overflow: hidden; background: var(--linho); color: var(--tinta); }
body { font-family: Archivo, system-ui, sans-serif; font-size: 13px; -webkit-font-smoothing: antialiased; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
canvas#scene.pointer { cursor: pointer; }
canvas#scene:active { cursor: grabbing; }

.top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: var(--pad); pointer-events: none; z-index: 5; }
.logo { height: 17px; width: auto; }
.top-r, .eyebrow, .hint, .legal, .floors button, .panel .k, .back, .chip { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.top-r { color: rgba(0,0,0,.6); }

/* lista de pavimentos */
.floors { position: fixed; left: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; z-index: 5; border-top: 1px solid var(--rule); }
.floors button { all: unset; cursor: pointer; display: grid; grid-template-columns: 30px 1fr; gap: 10px; width: 132px; white-space: nowrap; padding: 6px 0; border-bottom: 1px solid var(--rule); color: rgba(0,0,0,.55); transition: color .2s, padding .2s; }
.floors button .n { font-family: "Noto Serif", serif; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--tinta); }
.floors button:hover, .floors button.hover { color: var(--preto); padding-left: 6px; }
.floors button.on { color: var(--preto); padding-left: 6px; }
.floors button.on .n { font-style: italic; }
.floors button:focus-visible { outline: 1px solid var(--preto); outline-offset: 2px; }

/* intro */
.intro { position: fixed; left: var(--pad); bottom: calc(var(--pad) + 18px); max-width: 380px; z-index: 5; pointer-events: none; transition: opacity .5s, transform .5s; }
.intro h1 { font-family: "Noto Serif", serif; font-weight: 300; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.02em; margin: 10px 0 14px; }
.intro h1 em, .panel h2 em { font-style: italic; }
.intro .body { font-size: 13.5px; line-height: 1.55; color: rgba(0,0,0,.72); max-width: 330px; }
.intro.hide { opacity: 0; transform: translateY(10px); }
.eyebrow { color: rgba(0,0,0,.55); }

/* painel */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100%); padding: calc(var(--pad) + 46px) var(--pad) var(--pad); background: rgba(224,220,214,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-left: 1px solid var(--rule); z-index: 6; transform: translateX(102%); transition: transform .6s cubic-bezier(.2,.7,.1,1); overflow-y: auto; overflow-x: hidden; }
.panel.open { transform: none; }
.back { all: unset; cursor: pointer; color: rgba(0,0,0,.6); display: inline-block; margin-bottom: 26px; }
.back:hover { color: var(--preto); }
.panel h2 { font-family: "Noto Serif", serif; font-weight: 300; font-size: 48px; line-height: 1; letter-spacing: -.02em; margin: 8px 0 10px; }
.panel .sub { font-size: 13.5px; color: rgba(0,0,0,.7); line-height: 1.5; margin-bottom: 26px; }
.units { border-top: 1px solid var(--rule); }
.units button { all: unset; cursor: pointer; display: grid; grid-template-columns: 52px 1fr auto; align-items: baseline; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--rule); transition: padding .2s; }
.units button:hover, .units button.hover { padding-left: 8px; }
.units .num { font-family: "Noto Serif", serif; font-size: 18px; }
.units .t { font-size: 12.5px; color: rgba(0,0,0,.7); }
.units .a { font-size: 12.5px; }
.units button:focus-visible { outline: 1px solid var(--preto); outline-offset: 2px; }
.ficha { border-top: 1px solid var(--rule); margin: 6px 0 22px; }
.ficha div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.ficha .k { color: rgba(0,0,0,.55); padding-top: 2px; }
.planta { width: 100%; height: auto; display: block; margin-bottom: 22px; mix-blend-mode: multiply; }
.cta { all: unset; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 18px; background: var(--preto); color: var(--linho); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: not-allowed; opacity: .9; }
.chip { font-size: 9.5px; color: var(--pedra); }
.note { font-size: 12px; color: rgba(0,0,0,.6); line-height: 1.5; margin-top: 12px; }

.tip { position: fixed; z-index: 7; pointer-events: none; padding: 7px 10px; background: var(--preto); color: var(--linho); font-size: 11px; letter-spacing: .06em; white-space: nowrap; opacity: 0; transform: translate(14px, 14px); transition: opacity .15s; }
.tip.show { opacity: 1; }
.hint { position: fixed; bottom: var(--pad); right: var(--pad); color: rgba(0,0,0,.5); z-index: 5; transition: opacity .4s; }
.legal { position: fixed; bottom: var(--pad); left: var(--pad); font-size: 9.5px; color: rgba(0,0,0,.42); z-index: 5; }
.loader { position: fixed; inset: 0; display: grid; place-items: center; background: var(--linho); z-index: 20; transition: opacity .8s; }
.loader img { width: 54px; animation: pulse 1.4s ease-in-out infinite; }
.loader.done { opacity: 0; pointer-events: none; }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 760px) {
  .top-r, .hint { display: none; }
  .floors { top: auto; bottom: 0; left: 0; right: 0; transform: none; flex-direction: row-reverse; overflow-x: auto; border-top: 1px solid var(--rule); background: rgba(224,220,214,.9); padding: 0 8px; }
  .floors button { width: auto; min-width: 58px; grid-template-columns: 1fr; gap: 0; padding: 10px 6px; border-bottom: 0; text-align: center; }
  .floors button .t { display: none; }
  .intro { bottom: 70px; max-width: none; right: var(--pad); }
  .intro .body { display: none; }
  .legal { display: none; }
  .panel { top: auto; height: 62vh; width: 100%; border-left: 0; border-top: 1px solid var(--rule); transform: translateY(102%); padding-top: 22px; }
  .panel h2 { font-size: 38px; }
}

/* interior */
.fade { position: fixed; inset: 0; background: var(--linho); z-index: 15; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.fade.on { opacity: 1; pointer-events: all; }
.markers { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .4s; }
.markers.show { opacity: 1; }
.markers button { all: unset; box-sizing: border-box; position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; padding: 6px 10px; background: rgba(224,220,214,.92); border: 1px solid rgba(0,0,0,.25); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; transition: background .2s, color .2s; }
.markers:not(.show) button { pointer-events: none; }
.markers button:hover { background: var(--preto); color: var(--linho); }
.units button.on .t { color: var(--preto); font-weight: 600; }
.ghost { all: unset; box-sizing: border-box; display: block; width: 100%; text-align: center; margin-top: 18px; padding: 13px; border: 1px solid var(--preto); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.ghost:hover { background: var(--preto); color: var(--linho); }
.cta { cursor: pointer; }
.cta:hover { opacity: 1; }

/* planta gerada + carregamento */
.plan-wrap { margin: 4px 0 20px; background: #f4f1ec; border: 1px solid var(--rule); }
.plan-svg { display: block; width: 100%; height: auto; }
.loader { flex-direction: column; gap: 14px; display: flex; align-items: center; justify-content: center; }
.loader .prog { font-size: 10.5px; letter-spacing: .14em; color: rgba(0,0,0,.5); }
.floors.away { opacity: 0; pointer-events: none; transition: opacity .4s; }

/* polimento: lista de andares no alto, sobre um fundo próprio; intro não colide em telas baixas */
@media (min-width: 761px) {
  .floors { top: calc(var(--pad) + 52px); transform: none; padding: 4px 12px 6px; margin-left: -12px; border-top: 0; background: rgba(224,220,214,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .floors::before { content: "Pavimentos"; display: block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(0,0,0,.45); padding: 6px 0 8px; border-bottom: 1px solid var(--rule); }
}
@media (min-width: 761px) and (max-height: 840px) {
  .intro .body { display: none; }
  .floors button { padding: 4px 0; }
}
@media (min-width: 761px) and (max-height: 600px) {
  .intro { display: none; }
}
.hint { pointer-events: none; }
