@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* paleta oficial (Manual da Marca) */
  --noite: #2B4161;      /* azul do logo: texto e botões (o #101E44 puxava para o roxo) */
  --petroleo: #5C95A4;
  --laranja: #F7922D;
  --pessego: #FDE0C9;
  --cinza: #A8A9AC;
  --cinza-escuro: #828386;
  --nevoa: #EFE9E0;
  --barro: #E9E2D7;      /* fundo das maquetes: bege de argila */
  --linha: rgba(16, 30, 68, .16);
  --linha-clara: rgba(255, 255, 255, .55);
  --papel: #FBFAFC;
  --gutter: clamp(14px, 1.8vw, 26px);
  --ease: cubic-bezier(.22, .61, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Jost', 'Segoe UI', Arial, sans-serif;
  color: var(--noite);
  background: var(--barro);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

#cena { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; outline: none; }
/* maquete pré-renderizada: mesma câmera do 3D. Paisagem: encaixa pela altura; retrato: pela largura */
.maq-img { position: fixed; z-index: 0; max-width: none; opacity: 0; pointer-events: none; user-select: none; } /* posição calculada em passeio.js (posicionaImagem) */

/* ── moldura ───────────────────────────── */
.moldura i { position: fixed; pointer-events: none; z-index: 5; background: var(--linha); transition: background .6s; }
.moldura .m-topo { left: 0; right: 0; top: 46px; height: 1px; }
.moldura .m-esq { top: 0; bottom: 0; left: var(--gutter); width: 1px; }
.moldura .m-dir { top: 0; bottom: 0; right: var(--gutter); width: 1px; }
body.modo-dentro .moldura i { background: var(--linha-clara); }

/* ── topo ──────────────────────────────── */
.topo {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: 46px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 calc(var(--gutter) + 18px);
  font-size: 13px; letter-spacing: .01em;
  transition: color .6s;
}
body.modo-dentro .topo { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .25); }
.marca { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.marca b { font-weight: 600; }
.marca img { display: block; }
.topo-centro { font-size: 13px; }
.topo-links { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
.topo-links a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.som { display: grid; place-items: center; width: auto; height: 26px; border-left: 1px solid currentColor; padding-left: 14px; opacity: .85; }
.som .onda { opacity: .25; transition: opacity .3s; }
.som[aria-pressed="true"] .onda { opacity: 1; }

/* ── entrada ───────────────────────────── */
.entrada {
  position: fixed; inset: 0; z-index: 30;
  background: radial-gradient(120% 90% at 50% 40%, #F4EFE8 0%, var(--barro) 62%, #DFD6C9 100%);
  display: grid; place-items: center; align-content: center; gap: 0;
  transition: opacity 1s var(--ease), visibility 1s;
}
.entrada-marca { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: surge 1.2s var(--ease) both; }
.entrada-logo { width: min(320px, 70vw); height: auto; display: block; }
.entrada-frase { margin: 0; font-size: 14px; letter-spacing: .02em; color: var(--cinza-escuro); }
.entrada-dica { position: absolute; left: 0; right: 0; bottom: 9%; margin: 0; text-align: center; font-size: 12px; color: var(--cinza-escuro); }
@keyframes surge { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.entrada-barra { position: absolute; left: 50%; bottom: 16%; width: min(240px, 60vw); height: 3px; border-radius: 3px; transform: translateX(-50%); background: rgba(16, 30, 68, .08); overflow: hidden; }
.entrada-barra i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--laranja), var(--petroleo) 60%, var(--noite)); transform-origin: left; transform: scaleX(0); transition: transform .3s linear; }
body:not(.carregando) .entrada { opacity: 0; visibility: hidden; }

/* ── maquetes ──────────────────────────── */
.maquetes { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.maquetes[hidden] { display: none; }

/* sombra de folhas no fundo: só na tela das maquetes, bem leve e devagar */
.folhas { position: fixed; z-index: 0; inset: -10%; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.folhas svg { position: absolute; right: -6%; bottom: -8%; width: min(70vw, 900px); height: auto; aspect-ratio: 1; opacity: .13; transform-origin: 20% 90%; animation: balanca 14s ease-in-out infinite alternate; }
body.modo-maquetes .folhas { opacity: 1; }
@keyframes balanca { from { transform: rotate(-2deg) translate(0, 0); } to { transform: rotate(2.5deg) translate(-14px, 6px); } }

.maquete-rodape {
  position: absolute; left: 0; right: 0; bottom: clamp(26px, 5.5vh, 60px);
  display: flex; flex-direction: column; align-items: center; gap: 22px; pointer-events: auto;
}
.area-titulo { text-align: center; display: flex; flex-direction: column; align-items: center; }
.area-andar { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--cinza-escuro); }
.area-andar::before, .area-andar::after { content: ''; width: 22px; height: 1px; background: var(--laranja); }
.maquete-rodape h1 { margin: 0; font-size: clamp(34px, 4.4vw, 58px); line-height: 1; font-weight: 300; letter-spacing: -.02em; }
.area-sub { margin: 12px 0 0; font-size: 14px; letter-spacing: .01em; color: var(--cinza-escuro); max-width: min(520px, 86vw); }
.btn-entrar {
  min-width: 164px; min-height: 46px; padding: 0 30px;
  background: var(--noite); color: #fff; font-size: 13px; letter-spacing: .06em;
  border-radius: 2px; box-shadow: 0 10px 30px -12px rgba(16, 30, 68, .55);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.btn-entrar:hover { background: var(--laranja); color: var(--noite); }
.btn-entrar:active { transform: scale(.97); }
.btn-entrar:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; }

/* as 3 partes: traços finos, o ativo cresce em laranja */
.passos { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.passos button { display: block; width: 28px; height: 18px; position: relative; }
.passos button::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(16, 30, 68, .18); transition: background .4s, transform .4s var(--ease); transform-origin: left; }
.passos button[aria-current="true"]::before { background: var(--laranja); }
.passos button:hover::before { background: var(--noite); }

/* setas nas bordas: nome da parte vizinha na vertical */
.nav-lado {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 16px 0; width: 58px; pointer-events: auto; color: var(--noite);
  z-index: 2; /* por cima da faixa do rodapé, que ocupa a largura toda */
  font-size: 13px; letter-spacing: .03em;
}
.nav-ant { left: calc(var(--gutter) + 6px); }
.nav-prox { right: calc(var(--gutter) + 6px); }
.nav-lado .nav-nome { writing-mode: vertical-rl; white-space: nowrap; }
.nav-ant .nav-nome { transform: rotate(180deg); }
/* seta em círculo (bordas e ao lado do Entrar): maior e fácil de achar */
.nav-bola, .seta-redonda {
  display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(43, 65, 97, .3); background: rgba(255, 255, 255, .6); color: var(--noite);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.nav-bola svg, .seta-redonda svg { width: 24px; height: 24px; transition: transform .35s var(--ease); }
.nav-lado:hover .nav-bola, .seta-redonda:hover { background: var(--noite); border-color: var(--noite); color: #fff; }
.nav-ant:hover svg, .seta-redonda:first-child:hover svg { transform: translateX(-3px); }
.nav-prox:hover svg, .seta-redonda:last-child:hover svg { transform: translateX(3px); }
.seta-redonda:active { transform: scale(.94); }
.seta-redonda:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; }
.seta-redonda[disabled] { visibility: hidden; }
.entrar-linha { display: flex; align-items: center; gap: 16px; }
.nav-lado:hover .nav-nome { text-decoration: underline; text-underline-offset: 4px; }
.nav-lado:focus-visible { outline: 2px solid var(--laranja); outline-offset: 2px; }
.nav-lado[disabled] { visibility: hidden; }
@media (max-width: 720px) {
  /* no celular as setas das bordas saem: ficam só as redondas ao lado do Entrar */
  .nav-lado { display: none; }
  .entrar-linha { gap: 12px; }
  .seta-redonda { width: 50px; height: 50px; }
  .maquete-rodape { gap: 18px; }
}
/* ── dentro ────────────────────────────── */
.dentro { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.dentro[hidden] { display: none; }
.pontos { position: absolute; inset: 0; }
.ponto {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; background: #fff; color: var(--noite);
  display: grid; place-items: center; pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  opacity: 0; transform: scale(.6); transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.ponto.visivel { opacity: 1; transform: scale(1); }
.ponto::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7); animation: pulso 2.4s var(--ease) infinite; }
@keyframes pulso { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.ponto:hover { transform: scale(1.08); }
/* olhinho com rótulo ("Ver por dentro", "Conhecer os consultórios"): pílula branca com o texto ao lado do olho */
.ponto-rotulo { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 7px 12px; background: #fff; color: var(--noite); font-size: .78rem; font-weight: 500; letter-spacing: .02em; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); pointer-events: none; }
.ponto-rotulo::before { content: ''; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: #fff; }

.dica {
  position: absolute; left: 50%; top: 50%; width: min(250px, 80vw); transform: translate(-50%, -50%);
  background: var(--papel); color: var(--noite); pointer-events: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.dica.some { opacity: 0; transform: translate(-50%, -46%); pointer-events: none; }
.dica-topo { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; }
.dica-topo button { font-size: 18px; line-height: 1; }
.dica-desenho { display: flex; gap: 6px; justify-content: center; padding: 16px 10px; overflow: hidden; }
.dica-desenho i { flex: none; width: 34px; height: 24px; border: 1px solid var(--linha); background: #fff; animation: desliza 2.6s var(--ease) infinite; }
.dica-desenho i.ativo { background: var(--pessego); border-color: var(--laranja); }
@keyframes desliza { 0%, 20% { transform: translateX(0); } 60%, 100% { transform: translateX(-40px); } }
.dica p { margin: 0; padding: 9px 10px; background: var(--pessego); text-align: center; font-size: 12px; }

.btn-areas {
  position: absolute; left: calc(var(--gutter) + 18px); bottom: 22px; pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .3);
}
.btn-areas svg { border-left: 1px solid currentColor; padding-left: 10px; width: 24px; }

.progresso { position: absolute; left: 50%; bottom: 28px; width: 140px; height: 1px; transform: translateX(-50%); background: rgba(255, 255, 255, .35); }
.progresso i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }

/* ── painel ────────────────────────────── */
.painel {
  position: fixed; z-index: 20; right: calc(var(--gutter) + 12px); bottom: 22px;
  width: min(390px, calc(100vw - 2 * var(--gutter) - 24px));
  background: var(--papel); color: var(--noite);
  padding: 20px 22px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  transform: translateY(16px); opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.painel.aberto { opacity: 1; transform: none; }
.painel[hidden] { display: none; }
.painel h2 { margin: 0 28px 10px 0; padding-left: 10px; border-left: 3px solid var(--laranja); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.painel-sub { margin: 0 0 12px; font-size: 14px; }
.painel p { font-size: 13.5px; line-height: 1.5; margin: 0 0 10px; }
.painel-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e9e6e1; margin: 2px 0 12px; border-radius: 2px; }
.painel-video[hidden] { display: none; }
.painel-fechar { position: absolute; top: 12px; right: 14px; font-size: 22px; line-height: 1; }
.painel-link {
  display: inline-block; margin-top: 6px; background: var(--noite); color: #fff; text-decoration: none;
  font-size: 13px; padding: 9px 20px; border-radius: 2px;
}
.painel-link:hover { background: var(--laranja); color: var(--noite); }
.painel-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.painel-acoes .painel-link[hidden] { display: none; }
.painel-sala { background: var(--laranja); color: var(--noite); }
.painel-sala:hover { background: var(--noite); color: #fff; }

.veu { position: fixed; inset: 0; z-index: 25; background: #fff; opacity: 0; pointer-events: none; }

@media (max-width: 720px) {
  /* celular: alvos de toque de 44 px, painel no rodapé, setas maiores */
  .nav-nome { display: none; }           /* no celular só a seta; o nome vai no title e no aria-label */
  .btn-entrar { min-height: 44px; padding: 12px 34px; font-size: 15px; }
  .btn-areas { min-height: 44px; }
  .ponto { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .painel-fechar { width: 44px; height: 44px; top: 4px; right: 4px; }
  .painel-link { min-height: 44px; display: inline-flex; align-items: center; }
  .som { min-width: 44px; min-height: 44px; }
  .maquete-rodape { bottom: max(24px, env(safe-area-inset-bottom)); }
  .topo-links a { display: none; }
  .topo { grid-template-columns: 1fr auto; }
  .topo-centro { display: none; }
  .painel { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ponto::after, .dica-desenho i, .folhas svg { animation: none; }
}
