/* =============================================================================
   3. PONTE DE MARCA
   =============================================================================

   A camada cobre a viewport por menos de dois segundos quando a pessoa cruza
   da abertura para "Minha trajetória". A marca aparece no centro, a forma
   vetorial que a contém cresce e os quatro planos saem como fragmentos.

   O repouso é `display: none`. O script só abre a camada depois de dois quadros
   reais; se ele falhar, nada fica sobre a página. Transform e opacity são as
   únicas propriedades animadas. */
.ponte-marca {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  isolation: isolate;
}

.ponte-marca--ativa { display: block; }
.ponte-marca[hidden] { display: none; }

.ponte-marca__plano {
  position: absolute;
  inset: -2px;
  z-index: 0;
  background: var(--cor-fundo);
  transform: translateZ(0);
}

.ponte-marca__plano--a { clip-path: polygon(52% 0, 27% 100%, 0 100%, 0 0); }
.ponte-marca__plano--b { clip-path: polygon(52% 0, 100% 0, 100% 100%, 27% 100%); }
.ponte-marca__plano--c { clip-path: polygon(0 74%, 100% 48%, 100% 100%, 0 100%); }
.ponte-marca__plano--d {
  background: linear-gradient(
    to bottom,
    transparent,
    var(--marca-luz) 24%,
    var(--marca-luz-quente) 58%,
    transparent
  );
  clip-path: polygon(49.4% 0, 52% 0, 27% 100%, 24.4% 100%);
}

.ponte-marca__assinatura {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--espaco-3);
}

.ponte-marca__logo {
  position: relative;
  z-index: 2;
  width: 6rem;
  height: 6rem;
  object-fit: contain;
}

.ponte-marca__nome {
  position: relative;
  z-index: 2;
  font-size: var(--fs-12);
  font-stretch: var(--largura-sobrancelha);
  font-weight: var(--peso-forte);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cor-texto-suave);
}

.ponte-marca__triangulo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 6rem;
  height: 6rem;
  color: var(--marca-luz);
  translate: -50% -50%;
  transform-origin: center;
}

@keyframes ponte-logo {
  0% { opacity: 0; transform: scale(.9); }
  18%, 44% { opacity: 1; transform: scale(1); }
  62%, 100% { opacity: 0; transform: scale(1.55); }
}

@keyframes ponte-nome {
  0%, 12% { opacity: 0; transform: translateY(var(--espaco-2)); }
  24%, 44% { opacity: 1; transform: translateY(0); }
  58%, 100% { opacity: 0; transform: translateY(calc(var(--espaco-2) * -1)); }
}

@keyframes ponte-expande {
  0%, 24% { opacity: 0; transform: scale(.92); }
  32% { opacity: 1; transform: scale(1); }
  78% { opacity: .58; }
  100% { opacity: 0; transform: scale(var(--ponte-escala, 20)); }
}

@keyframes ponte-plano-a { to { transform: translate(-118%, -14%); } }
@keyframes ponte-plano-b { to { transform: translate(118%, 14%); } }
@keyframes ponte-plano-c { to { transform: translateY(116%); } }
@keyframes ponte-plano-d { to { transform: translate(132%, 46%); opacity: 0; } }

.ponte-marca--rodando .ponte-marca__logo {
  animation: ponte-logo 1360ms var(--ease-padrao) both;
}
.ponte-marca--rodando .ponte-marca__nome {
  animation: ponte-nome 1360ms var(--ease-padrao) both;
}
.ponte-marca--rodando .ponte-marca__triangulo {
  animation: ponte-expande 900ms var(--ease-padrao) 340ms both;
}
.ponte-marca--rodando .ponte-marca__plano--a {
  animation: ponte-plano-a 600ms var(--ease-saida) 780ms both;
}
.ponte-marca--rodando .ponte-marca__plano--b {
  animation: ponte-plano-b 600ms var(--ease-saida) 780ms both;
}
.ponte-marca--rodando .ponte-marca__plano--c {
  animation: ponte-plano-c 600ms var(--ease-saida) 780ms both;
}
.ponte-marca--rodando .ponte-marca__plano--d {
  animation: ponte-plano-d 640ms var(--ease-saida) 900ms both;
}

html[data-effects="off"] .ponte-marca { display: none !important; }

@media (prefers-reduced-motion: reduce), (forced-colors: active), print {
  .ponte-marca { display: none !important; }
  .ponte-marca * { animation: none !important; }
}
