/* Viagem do hero (ver voyage.js). Sem JavaScript: só o hero com o render estático do buraco negro. */
.voyage { position: relative; }
/* html.voyage-js vem do <head>: a altura existe desde o primeiro quadro (sem salto de layout) */
html.voyage-js .voyage { height: 250svh; }
.voyage-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--obsidian); isolation: isolate; }
html.voyage-js .voyage-stage { position: sticky; top: 0; }

.voyage-layer { position: absolute; inset: 0; will-change: transform, opacity; }
.voyage-layer picture, .voyage-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.voyage-poster { object-fit: cover; transition: opacity .9s ease; }
.voyage-layer.is-live .voyage-poster { opacity: 0; }
.voyage-layer canvas { opacity: 0; transition: opacity .9s ease; }
.voyage-layer.is-live canvas { opacity: 1; }
/* A Terra entra por cima em "tela": o preto do céu dela deixa o buraco negro distante aparecer atrás */
.voyage-earth { z-index: 1; opacity: 0; mix-blend-mode: screen; }
.voyage-bh .voyage-poster { object-position: 72% 46%; }

/* Véu só atrás do texto (esquerda no computador, embaixo no celular) */
.voyage-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .6s ease;
  background: linear-gradient(90deg, rgba(3, 4, 5, .92) 0%, rgba(3, 4, 5, .7) 32%, rgba(3, 4, 5, 0) 58%), linear-gradient(0deg, var(--obsidian) 0%, transparent 16%); }
.voyage-stage.is-earth .voyage-scrim { opacity: 0; }

.voyage .hero { position: relative; z-index: 3; min-height: 100%; height: 100%; padding: 0; display: grid; align-items: center; }
.voyage .hero-grid { grid-template-columns: minmax(0, 640px); }

/* Início do movimento sincronizado com a abertura das placas */
.voyage-stage.is-revealing .voyage-bh { animation: voyage-reveal 1.9s cubic-bezier(.16, .8, .24, 1) both; }
@keyframes voyage-reveal { from { filter: brightness(.45); } to { filter: none; } }

@media (max-width: 767px) {
  .voyage .hero { align-items: start; padding-top: 37svh; }
  .voyage-bh .voyage-poster, .voyage-earth .voyage-poster { object-position: 50% 0%; }
  .voyage-scrim { background: linear-gradient(0deg, var(--obsidian) 22%, rgba(3, 4, 5, .86) 48%, rgba(3, 4, 5, 0) 70%); }
}
@media (max-width: 380px) {
  .voyage .hero { padding-top: 30svh; }
}
@media (prefers-reduced-motion: reduce) {
  .voyage-stage.is-revealing .voyage-bh { animation: none; }
  .voyage-poster, .voyage-layer canvas { transition: none; }
}
/* Render estático encolhendo: bordas esfumadas para a camada não aparecer como retângulo */
.voyage-bh.is-masked { -webkit-mask: radial-gradient(closest-side at 72% 46%, #000 62%, transparent 100%); mask: radial-gradient(closest-side at 72% 46%, #000 62%, transparent 100%); }
@media (max-width: 767px) { .voyage-bh.is-masked { -webkit-mask: radial-gradient(closest-side at 50% 23%, #000 60%, transparent 100%); mask: radial-gradient(closest-side at 50% 23%, #000 60%, transparent 100%); } }

/* ---------- Fundo da página inteira ----------
   Depois da viagem, a cena (Terra com a luz correndo pelo horizonte e o buraco negro girando ao fundo)
   fica fixa atrás de tudo; as seções sobem por cima. Sem JavaScript, o palco continua no fluxo normal. */
html.voyage-js .voyage-stage { position: fixed; top: 0; left: 0; right: 0; z-index: 0; }
html.voyage-js .voyage ~ *, html.voyage-js footer { position: relative; z-index: 1; }
.voyage-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--obsidian); opacity: calc(var(--dim, 0) * .45); pointer-events: none; }

/* Disco preto atrás da Terra (ver voyage.js): esconde estrelas e partículas do fundo dentro do planeta */
.voyage-earth-disk { position: absolute; z-index: 1; border-radius: 50%; background: var(--obsidian); opacity: 0; pointer-events: none; will-change: transform, opacity; }
.voyage-stage .gb-dust { z-index: 0; }

/* Páginas internas: o mesmo fundo (Terra em primeiro plano, buraco negro atrás), fixo e sem viagem */
.voyage-bg-only { height: 0; }
.voyage-bg-only .voyage-stage { position: fixed; top: 0; left: 0; right: 0; z-index: 0; }
.voyage-bg-only ~ *, .voyage-bg-only ~ footer { position: relative; z-index: 1; }
.voyage-bg-only .voyage-scrim { display: none; }
.voyage-bg-only ~ main .page-hero { background: transparent; }
.voyage-bg-only ~ main .page-hero:after { display: none; }

/* Celular: a aproximação da Terra pela metade (de 1,5 tela de rolagem para 0,75) */
@media (max-width: 767px) { html.voyage-js .voyage { height: 175svh; } }
