/* ============================================================
   SANCTUM: corte A-A do lugar onde o Conselho vive.
   Abertura do índice /mentores/. Cada sala é um link pro dossiê;
   passar o cursor "abre a porta" e o retrato aparece dentro da sala.
   ============================================================ */

.nucleo { margin: 34px 0 34px; }
.nucleo h2 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 400; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.nucleo h2::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.nucleo-intro { color: var(--ink-2); margin-bottom: 14px; max-width: 70ch; }

.nucleo-scroll {
  position: relative; border: 1px solid var(--line); background: var(--bg);
  overflow: hidden;
}
.nucleo-svg { display: block; width: 100%; height: auto; }

/* no celular a prancha não encolhe até virar formiga: ela rola de lado */
@media (max-width: 900px) {
  .nucleo-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .nucleo-svg { width: 900px; max-width: none; }
}

.nucleo-legenda { margin-top: 12px; min-height: 3.2em; color: var(--ink-2); max-width: 78ch; }
.nucleo-legenda strong { font-weight: 600; }
.nucleo-abrir { white-space: nowrap; border-bottom: 1px solid currentColor; margin-left: 0.2em; }
.nucleo-abrir:hover { text-decoration: none; color: var(--ink); }
.nucleo-dica { display: none; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 900px) { .nucleo-dica { display: block; } }

/* ---------- traço ---------- */

.nucleo-svg text {
  font-family: var(--mono);
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round;
}
.nc-hachura { stroke: #2a333d; stroke-width: 1; }
.nc-terreno { fill: none; stroke: #5d6773; stroke-width: 1.6; }
.nc-concreto { fill: #161b22; stroke: #9aa4b0; stroke-width: 1.4; }
.nc-vao-fixo { fill: var(--bg); }
.nc-fino { fill: none; stroke: #5d6773; stroke-width: 1; }
.nc-estante { fill: none; stroke: #3a434e; stroke-width: 1; }
.nc-arvore { fill: none; stroke: #2c353f; stroke-width: 1; }
.nc-oculto { fill: none; stroke: #5d6773; stroke-width: 1; stroke-dasharray: 4 4; }
.nc-projeto, .nc-projeto rect { fill: none; stroke: #7d8793; stroke-width: 1.2; stroke-dasharray: 6 5; }
.nc-pontilhado { fill: none; stroke: #3a434e; stroke-width: 1; stroke-dasharray: 1 4; }
.nc-raio { stroke: #EF4444; stroke-width: 1.2; stroke-dasharray: 2 5; opacity: 0.55; transition: opacity 0.3s; }
.nc-raiz { fill: none; stroke: #8B5CF6; stroke-width: 1.1; opacity: 0.38; }
.nc-raiz-fina { fill: none; stroke: #8B5CF6; stroke-width: 1; opacity: 0.6; }
.nc-cadeira { fill: none; stroke: #e6e9ed; stroke-width: 1.6; }
.nc-canto { fill: none; stroke: #5d6773; stroke-width: 1.4; }
.nc-placa { fill: var(--bg); stroke: #5d6773; stroke-width: 1; }
.nc-placa-txt { font-size: 8px; letter-spacing: 0.6px; fill: #9aa4b0; stroke-width: 0 !important; }
.nc-tarja { fill: #9aa4b0; }

.nc-nota text { font-size: 10.5px; fill: #6f7a86; }
.nc-cota text { font-size: 10px; fill: #9aa4b0; dominant-baseline: middle; }
.nc-planta text { font-size: 10px; fill: #6f7a86; }
.nc-carimbo text { font-size: 9.5px; fill: #9aa4b0; }
.nc-carimbo .nc-carimbo-titulo { font-size: 22px; letter-spacing: 3px; font-weight: 700; fill: #e6e9ed; }

/* fios do Connect */
.nc-fios { opacity: 0.2; transition: opacity 0.35s; }
.nc-fios line { stroke: #10b981; stroke-width: 0.8; }

/* N.I.N.A.: uma onda de voz percorre o prédio */
.nc-nina circle {
  fill: #EC4899; transform-box: fill-box; transform-origin: center;
  animation: nc-voz 9s ease-in-out infinite;
}
@keyframes nc-voz {
  0%, 12%, 100% { opacity: 0.35; transform: scale(1); }
  4% { opacity: 1; transform: scale(1.9); }
}

/* ---------- salas ---------- */

.sala { cursor: pointer; outline: none; }
.sala:hover { text-decoration: none; }
.sala .vao { fill: var(--bg); }
.sala .contorno { fill: none; stroke: #9aa4b0; stroke-width: 1.6; transition: stroke 0.3s, stroke-width 0.3s; }
.sala .retrato { opacity: 0; transition: opacity 0.45s ease; }
.sala .moveis { transition: opacity 0.35s; }
.sala .acc, .sala .acc ellipse, .sala .acc circle, .sala .acc rect, .sala .acc path { fill: none; stroke: var(--c); stroke-width: 1.2; }
.sala .acc .acc-cheio, .sala .acc-cheio, .sala .acc-cheio * { fill: var(--c); stroke: none; }
.sala .nome { fill: var(--ink); font-size: 12px; letter-spacing: 1px; font-weight: 600; }
.sala .sub { fill: var(--c); font-size: 11px; }

.sala:hover .retrato, .sala:focus-visible .retrato, .sala.aberta .retrato { opacity: 0.92; }
.sala:hover .moveis, .sala:focus-visible .moveis, .sala.aberta .moveis { opacity: 0.06; }
.sala:hover .contorno, .sala:focus-visible .contorno, .sala.aberta .contorno { stroke: var(--c); stroke-width: 2.6; }
.sala:focus-visible .contorno { stroke-width: 3.4; }

.nucleo-svg:has(.sala-connect:hover) .nc-fios,
.nucleo-svg:has(.sala-connect:focus-visible) .nc-fios { opacity: 0.85; }
.nucleo-svg:has(.sala:not(.sala-connect):hover) .nc-fios { opacity: 0.05; }
.nucleo-svg:has(.sala-portao:hover) .nc-nina circle,
.nucleo-svg:has(.sala-portao:focus-visible) .nc-nina circle { animation-duration: 1.4s; }

@media (prefers-reduced-motion: reduce) {
  .nc-nina circle { animation: none; opacity: 0.8; }
  .sala .retrato, .sala .moveis, .sala .contorno, .nc-fios { transition: none; }
}

/* ============================================================
   O volume em 3D (assets/nucleo3d/nucleo3d.js). Sem WebGL2, fica a prancha acima.
   ============================================================ */

.n3 {
  position: relative; height: clamp(540px, 84vh, 920px); background: #04060a;
  overflow: hidden; outline: none; margin-bottom: 10px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.n3[hidden] { display: none; }
.n3:focus-visible { box-shadow: inset 0 0 0 2px #9aa4b0; }
.n3.n3-cheia { height: 100vh; width: 100vw !important; margin-left: 0 !important; border: 0; }
.n3-tela { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.n3-cheia .n3-tela { touch-action: none; }

.n3-rotulos { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s; }
.n3-rotulos.n3-visivel { opacity: 1; }
.n3-rotulo, .n3-nota { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; transition: opacity 0.3s; }
.n3-rotulo b {
  display: block; font-size: 11px; letter-spacing: 0.12em; font-weight: 600; color: #e6e9ed;
  text-shadow: 0 0 6px #04060a, 0 0 2px #04060a;
}
.n3-rotulo span { display: block; font-size: 10.5px; color: var(--c); text-shadow: 0 0 6px #04060a; }
.n3-rotulo.n3-quente b { color: var(--c); }
.n3-nota { font-size: 10.5px; color: #6f7a86; text-shadow: 0 0 6px #04060a; }

.n3-topo {
  position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between;
  align-items: center; padding: 14px 18px; pointer-events: none; justify-content: flex-end;
}
.n3-titulo { font-size: 11px; letter-spacing: 0.22em; color: #9aa4b0; text-transform: uppercase; }
.n3-titulo span { color: #5d6773; }
.n3-botoes { display: flex; gap: 8px; pointer-events: auto; }
.n3-b {
  font: inherit; font-size: 11px; letter-spacing: 0.08em; color: #c9d0d8; background: rgba(10, 12, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 3px; padding: 7px 11px; cursor: pointer;
  backdrop-filter: blur(6px); text-decoration: none; display: inline-block;
}
.n3-b:hover { color: #fff; border-color: rgba(255, 255, 255, 0.42); text-decoration: none; }
.n3-b:focus-visible { outline: 2px solid #e6e9ed; outline-offset: 2px; }
.n3-volta3d { margin: 0 0 10px; }
.n3-volta3d[hidden] { display: none; }

.n3-painel {
  position: absolute; left: 18px; bottom: 18px; max-width: min(520px, calc(100% - 36px));
  padding: 16px 18px; background: rgba(6, 8, 11, 0.8); border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid var(--c); backdrop-filter: blur(8px);
}
.n3-painel[hidden] { display: none; }
.n3-sala-nome { font-size: 20px; letter-spacing: 0.06em; font-weight: 700; text-transform: uppercase; }
.n3-sala-mentor { font-size: 12px; color: #9aa4b0; margin-top: 2px; }
.n3-sala-frase { margin: 10px 0 14px; color: #e6e9ed; font-size: 14px; line-height: 1.5; }
.n3-sala-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.n3-dossie { border-color: var(--c); color: #fff; }
.n3-seta { min-width: 34px; font-size: 15px; line-height: 1; padding: 6px 10px; }

.n3-dica { position: absolute; left: 18px; bottom: 16px; font-size: 11px; color: #6f7a86; pointer-events: none; }
.n3-dentro .n3-dica { display: none; }
.n3-carimbo {
  position: absolute; right: 18px; bottom: 16px; display: grid; gap: 1px; padding: 8px 12px;
  font-size: 9.5px; color: #8a949f; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 8, 11, 0.6); pointer-events: none; transition: opacity 0.4s;
}
.n3-carimbo b { font-size: 15px; letter-spacing: 0.2em; color: #e6e9ed; }
.n3-dentro .n3-carimbo { opacity: 0; }

.n3-carregando {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; font-size: 11px;
  letter-spacing: 0.2em; color: #6f7a86; text-transform: uppercase; pointer-events: none; transition: opacity 0.8s;
}
.n3-carregando i { display: block; height: 1px; background: #9aa4b0; animation: n3-linha 1.2s ease-in-out infinite; }
.n3-carregando.n3-pronto { opacity: 0; }
@keyframes n3-linha { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

@media (max-width: 700px) {
  .n3 { height: 78vh; }
  .n3-carimbo { display: none; }
  .n3-painel { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 13px 14px; }
  .n3-sala-nome { font-size: 17px; }
  .n3-sala-frase { font-size: 13px; margin: 8px 0 12px; }
  .n3-topo { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .n3-carregando i { animation: none; } }
.nucleo-dica[hidden], .nucleo-legenda[hidden], .nucleo-scroll[hidden] { display: none !important; }
@media (max-width: 700px) {
  .n3-rotulo b { font-size: 10px; }
  .n3-rotulo span { display: none; }
}
.nucleo-aviso { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; max-width: 78ch; }
