/* Componente Astrolábio (usado no cabeçalho do relatório). Estilos de tela ficam em mistico.css. */

.astrolabio {
  --ast-tamanho: 300px;
  position: relative;
  width: min(100%, var(--ast-tamanho));
  aspect-ratio: 1;
  margin: 0.25rem auto 0.5rem;
  touch-action: manipulation;
}

.astrolabio svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: "Playfair Display", serif;
}

/* Só os grupos animados giram em torno do centro; os demais usam rotate(a cx cy) no atributo. */
.ast-halo, .ast-signos, .ast-planeta {
  transform-box: view-box;
  transform-origin: 50% 50%;
}
.no-halo, .no-selo { transform-box: fill-box; transform-origin: center; }

.ast-halo { animation: ast-respira 6s ease-in-out infinite; }
.ast-cursor { opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }

.ast-anel { fill: none; stroke: rgba(245, 242, 235, 0.16); stroke-width: 0.8; }
.ast-marcas line { stroke: rgba(245, 242, 235, 0.22); stroke-width: 0.8; }
.ast-orbita { fill: none; stroke: rgba(126, 214, 211, 0.22); stroke-width: 0.8; stroke-dasharray: 2 6; }

.ast-signos { animation: ast-gira 140s linear infinite; }
.ast-signos text {
  fill: rgba(215, 181, 109, 0.62);
  font-size: 15px;
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols", serif;
}

.ast-planeta circle { fill: var(--ouro); stroke: rgba(215, 181, 109, 0.28); stroke-width: 5; paint-order: stroke; }
.ast-planeta.p1 { animation: ast-gira 26s linear infinite; }
.ast-planeta.p2 { animation: ast-gira 41s linear infinite reverse; animation-delay: -12s; }
.ast-planeta.p2 circle { fill: #7fd9ff; stroke: rgba(126, 214, 211, 0.28); }
.ast-planeta.p3 { animation: ast-gira 63s linear infinite; animation-delay: -30s; }
.ast-planeta.p3 circle { fill: #b9a4ff; stroke: rgba(179, 140, 255, 0.28); }

/* Constelação entre os pilares: só se desenha quando os nós deixam de estar selados. */
.ast-ligas line {
  stroke: rgba(245, 242, 235, 0.1);
  stroke-width: 0.8;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke 0.6s ease, stroke-dashoffset 1s ease;
}
.ast-ligas line:not(.is-lit) { stroke-dasharray: 0.02 0.03; }
.ast-ligas line.is-lit { stroke: rgba(126, 214, 211, 0.6); stroke-width: 1.1; }
.ast-ligas line.is-gold { stroke: rgba(215, 181, 109, 0.85); }

.ast-centro circle { fill: rgba(9, 11, 18, 0.92); stroke: rgba(215, 181, 109, 0.4); stroke-width: 1; }
.ast-centro-glifo { fill: var(--ouro); font-size: 26px; animation: ast-respira 4.5s ease-in-out infinite; }
.ast-centro-glifo.tem-numero { font-size: 30px; }

/* Nós (pilares) */
.ast-no { cursor: pointer; outline: none; }
.no-in { transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1); transform-box: fill-box; transform-origin: center; }
.ast-no:hover .no-in, .ast-no:focus-visible .no-in, .ast-no.is-sel .no-in { transform: scale(1.12); }

.no-corpo { fill: rgba(9, 11, 18, 0.94); stroke-width: 1.1; transition: stroke 0.5s ease, filter 0.5s ease; }
.no-icone { stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linejoin: round; transition: color 0.5s ease, opacity 0.5s ease; }
.no-icone rect, .no-icone path { fill: none; }
.no-glifo { fill: currentColor; stroke: none; }
.no-halo { fill: none; stroke: transparent; stroke-width: 6; opacity: 0; }
.no-selo { fill: none; stroke-width: 0.9; stroke-dasharray: 3 5; transform-box: fill-box; transform-origin: center; }

.ast-no.is-locked { color: rgba(191, 193, 198, 0.55); }
.ast-no.is-locked .no-corpo { stroke: rgba(191, 193, 198, 0.3); }
.ast-no.is-locked .no-selo { stroke: rgba(215, 181, 109, 0.4); animation: ast-gira 24s linear infinite; }
.ast-no.is-locked .no-halo { stroke: rgba(215, 181, 109, 0.22); animation: ast-halo 3.4s ease-in-out infinite; }
.ast-no.is-locked:nth-of-type(2) .no-halo { animation-delay: 0.5s; }
.ast-no.is-locked:hover .no-selo { stroke: rgba(215, 181, 109, 0.9); animation-duration: 3s; }

.ast-no.is-active { color: #7fd9ff; }
.ast-no.is-active .no-corpo { stroke: rgba(126, 214, 211, 0.75); filter: drop-shadow(0 0 8px rgba(126, 214, 211, 0.55)); }
.ast-no.is-active .no-selo { stroke: rgba(126, 214, 211, 0.5); animation: ast-gira 10s linear infinite; }
.ast-no.is-active .no-halo { stroke: rgba(126, 214, 211, 0.25); animation: ast-halo 2.4s ease-in-out infinite; }

.ast-no.is-open { color: var(--ouro); }
.ast-no.is-open .no-corpo { stroke: var(--ouro); filter: drop-shadow(0 0 10px rgba(215, 181, 109, 0.7)); }
.ast-no.is-open .no-selo { stroke: rgba(215, 181, 109, 0.75); stroke-dasharray: none; animation: ast-abre 0.9s ease-out; }
.ast-no.is-open .no-halo { stroke: rgba(215, 181, 109, 0.2); animation: ast-halo 5s ease-in-out infinite; }

.ast-no.is-sel .no-corpo { stroke-width: 1.8; }
.ast-no:focus-visible .no-corpo { stroke: #fff; }

@keyframes ast-gira { to { transform: rotate(360deg); } }
@keyframes ast-respira { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes ast-halo { 0%, 100% { opacity: 0.15; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes ast-abre { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.no-signo { font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols", serif; }
