/* Cor da marca deste projeto (dourado da identidade). */
:root{--brand-accent:#a68d40;--brand-on-accent:#ffffff}
/* Folha de design da visita interativa: UMA fonte de verdade para o acabamento.
   Carregada por último; manda sobre atlas-visit.css sem reescrevê-lo.
   Desligar tudo de uma vez: abrir a visita com ?design=antigo (o visita.js retira esta folha).
   A identidade (cor da marca, letra e logo) continua vindo de cada projeto: --brand-accent. */
:root {
  --v-accent: var(--brand-accent, #294a3d);
  --v-on-accent: var(--brand-on-accent, #ffffff);
  --v-ink: #233c33;
  --v-muted: #526657;
  --v-paper: #f8f7f1;
  --v-surface: #fffef9;
  --v-tint: color-mix(in srgb, var(--v-accent) 14%, #ffffff);
  --v-tint-hover: color-mix(in srgb, var(--v-accent) 22%, #ffffff);
  --v-glass: rgb(255 255 255 / .84);
  --v-r-control: 10px;
  --v-r-card: 16px;
  --v-gap: .5rem;
  --v-touch: 44px;
  --v-shadow: 0 12px 32px rgb(20 32 26 / .16);
  --v-focus: 0 0 0 2px #ffffff, 0 0 0 4px var(--v-ink);
}

/* ---------- Foco: visível só ao navegar pelo teclado ---------- */
:is(a, button, select, summary, [role=button], [role=tab], [role=menuitem]):focus { outline: none; }
:is(a, button, select, summary, [role=tab], [role=menuitem]):focus-visible { outline: none; box-shadow: var(--v-focus); }

/* ---------- Ícones: um só conjunto, traço fino, SVG embutido ---------- */
.icone { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Estrutura: separar por fundo e espaço, não por borda ---------- */
/* Topo e rodapé: cores, fundo e linhas são da identidade de cada construtora (atlas-visit.css + folha da marca).
   Aqui só a medida; nunca pintar o fundo nem a cor do texto, senão um logotipo claro sobre topo escuro some. */
#brand { display: inline-flex; align-items: center; min-height: var(--v-touch); }
header { padding-block: .55rem; }
footer { padding-block: .75rem; font-size: 14px; }
.intro { border-radius: var(--v-r-card); }
.viewport { border: 0; border-radius: var(--v-r-card); background: #ffffff; }
dialog { border-radius: var(--v-r-card); background: var(--v-surface); color: var(--v-ink); padding: 1.1rem 1.25rem 1.25rem; }
#stage { border-radius: 12px; background: #ecebe4; }

/* ---------- Botões: 5 tipos ---------- */
/* Base comum (texto): sem fundo, sem borda, 14 px peso 600, canto 10 px, alvo de 44 px. */
nav a, nav button, footer a, .modes a, .baixar-ambiente, #cinema > a, #fit, .vt-texto {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--v-touch); padding: 0 .8rem; border: 0; border-radius: var(--v-r-control);
  background: transparent; color: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none;
}
/* A cor do texto vem de onde o botão está (topo claro ou escuro); o realce acompanha essa cor. */
:is(nav a, nav button, footer a, .modes a, .baixar-ambiente, #cinema > a, #fit, .vt-texto):hover { background: color-mix(in srgb, currentColor 12%, transparent); }

/* Principal: a próxima ação da tela (1 por tela). Preenchido com a cor da marca. */
.primary {
  display: inline-flex; align-items: center; gap: .55rem; min-height: var(--v-touch); padding: 0 1.15rem;
  border: 0; border-radius: var(--v-r-control); background: var(--v-accent); color: var(--v-on-accent);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.primary:hover { background: color-mix(in srgb, var(--v-accent) 86%, #000000); }

/* Secundário e ícone: fundo levemente tingido, sem borda. */
.zoom button, .close, .vt-secundario {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--v-touch); min-width: var(--v-touch); padding: 0 .9rem; border: 0; border-radius: var(--v-r-control);
  background: var(--v-tint); color: var(--v-ink); font-size: 14px; font-weight: 600; line-height: 1.2;
}
:is(.zoom button, .close, .vt-secundario):hover:not(:disabled) { background: var(--v-tint-hover); }
.zoom { gap: .35rem; }
.zoom #less, .zoom #more { padding: 0; width: var(--v-touch); }
.zoom #fit { background: transparent; }
.zoom button:disabled { opacity: .45; cursor: default; }

/* Escolha de planta: campo de escolha com fundo tingido, mantendo a letra da identidade. */
.heading select {
  appearance: none; -webkit-appearance: none; min-height: var(--v-touch);
  border: 0; border-radius: var(--v-r-control); background-color: var(--v-tint);
  padding: .3rem 2.6rem .3rem .85rem; font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23233c33' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 20px;
}
.heading label { font-size: 13px; letter-spacing: .02em; margin-bottom: .25rem; }

/* Modos do ambiente (Perspectiva · Panorama 360° · Órbita 3D): controle segmentado. */
.modes { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 13px; background: var(--v-tint); margin: .75rem 0 0; }
.modes button { min-height: var(--v-touch); padding: 0 .95rem; border: 0; border-radius: var(--v-r-control); background: transparent; color: var(--v-ink); font-size: 14px; font-weight: 600; }
.modes button[aria-pressed=true] { background: var(--v-surface); color: var(--v-ink); }
.baixar-ambiente { margin: .5rem 0 0 .4rem; }
.modes + .baixar-ambiente + #stage, .modes + #stage { margin-top: .6rem; }
.close { white-space: nowrap; }

/* ---------- Planta: áreas clicáveis na cor da marca ---------- */
.region { fill: var(--v-accent); fill-opacity: .14; stroke: var(--v-accent); stroke-width: 1.5; }
.region:hover, .region:focus-visible { fill-opacity: .42; stroke: var(--v-ink); stroke-width: 3; }
#hint { font-size: 15px; }
.legend { color: var(--v-muted); font-size: 14px; }

/* ---------- Diálogos ---------- */
dialog::backdrop { background: rgb(16 32 26 / .72); backdrop-filter: blur(2px); }
.bar { gap: .75rem; align-items: flex-start; }
.bar small { font-size: 13px; color: var(--v-muted); }
#caption { color: var(--v-muted); font-size: 15px; }

/* ---------- Controles sobre a imagem: discretos, translúcidos, arredondados ---------- */
.pnlm-controls { border: 0 !important; border-radius: var(--v-r-control) !important; background-color: var(--v-glass) !important; backdrop-filter: blur(6px); }
.pnlm-zoom-controls { overflow: hidden; }
.pnlm-zoom-in { border-bottom: 1px solid rgb(0 0 0 / .08) !important; }
.pnlm-load-box { border-radius: var(--v-r-card) !important; }
/* No toque, o panorama amplia com pinça: os botões pequenos de zoom saem para não tampar a imagem. */
@media (pointer: coarse) { .pnlm-zoom-controls { display: none !important; } }

/* ---------- Marca contemporânea: letra sem serifa e títulos firmes ---------- */
.marca-contemporanea #brand, .marca-contemporanea h1, .marca-contemporanea h2, .marca-contemporanea .heading select {
  font-family: Inter, "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif; font-weight: 600; letter-spacing: -.01em;
}

/* ---------- Celular ---------- */
@media (max-width: 650px) {
  header { padding-block: .35rem; }
  nav { gap: 0; }
  nav a, nav button { padding: 0 .6rem; min-width: var(--v-touch); }
  nav .rotulo-longo { display: none; }
  #watch .icone { display: none; }
  .heading { flex-wrap: wrap; row-gap: .5rem; }
  .heading > div:first-child { flex: 1 1 100%; }
  .heading select { width: 100%; }
  .zoom { margin-left: auto; }
  .bar h2 { font-size: 1.45rem; }
  .zoom button { padding: 0 .6rem; }
  .zoom #less, .zoom #more { width: var(--v-touch); padding: 0; }
  .modes button { padding: 0 .7rem; }
  .close { padding: 0 .75rem; font-size: 14px; }
  dialog { padding: .8rem; }
  .bar small { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* =========================================================================================
   Arranjo novo (?arranjo=novo). Sem a chave, nada abaixo aparece.
   ========================================================================================= */
/* Abas das plantas: texto com sublinhado de 2 px na ativa. A lista de escolha fica guardada. */
/* "hidden" vence as regras de exibição dos botões (senão o link levado ao menu reaparece). */
[data-arranjo=novo] [hidden] { display: none !important; }
[data-abas=sim] .heading select, [data-abas=sim] .heading label { display: none; }
.vt-abas { display: flex; flex-wrap: wrap; gap: .25rem; }
.vt-aba {
  min-height: var(--v-touch); padding: 0 .85rem; border: 0; border-radius: var(--v-r-control);
  background: transparent; color: var(--v-ink); font-size: 14px; font-weight: 600; line-height: 1.2; font-family: inherit; cursor: pointer;
}
.vt-aba:hover { background: var(--v-tint); color: var(--v-ink); }
.vt-aba[aria-selected=true] { color: var(--v-ink); box-shadow: inset 0 -2px 0 var(--v-accent); border-radius: var(--v-r-control) var(--v-r-control) 0 0; }
.vt-aba[aria-selected=true]:focus-visible { box-shadow: inset 0 -2px 0 var(--v-accent), var(--v-focus); }
/* Lista de ambientes da planta atual. */
.vt-ambientes { display: flex; flex-wrap: wrap; gap: .5rem; margin: .85rem 0 .25rem; }
.vt-ambientes[hidden] { display: none; }
/* Anterior e próximo dentro do ambiente. */
.vt-passos { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; }
.vt-passos[hidden] { display: none; }
.vt-passos .vt-secundario { width: var(--v-touch); padding: 0; }
.vt-passos .vt-secundario:disabled { opacity: .4; cursor: default; }
.vt-posicao { min-width: 3.6rem; text-align: center; font-size: 14px; color: var(--v-muted); }
/* Menu "Baixar": a única sombra da visita, só com o menu aberto. */
.vt-menu { position: relative; }
.vt-menu > .vt-texto { cursor: pointer; font-family: inherit; }
.vt-menu > .vt-texto[aria-expanded=true] { background: var(--v-tint); }
.vt-menu-lista {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 5; min-width: 15rem;
  display: grid; gap: 2px; padding: .4rem; border-radius: var(--v-r-card); background: var(--v-surface); box-shadow: var(--v-shadow);
}
.vt-menu-lista[hidden] { display: none; }
.vt-menu-lista .vt-texto { justify-content: flex-start; }
@media (max-width: 650px) {
  .vt-menu > .vt-texto span { display: none; }
  .vt-passos .vt-posicao { min-width: 3rem; }
  [data-arranjo=novo] .bar { flex-wrap: wrap; }
}
