.vt-chegada {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero .service-name #rever-abertura {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: -8px 0 -8px auto;
  padding-inline: 7px;
  color: #f3e6cc;
  font: 500 13px/1.15 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.hero .service-name #rever-abertura:focus-visible { outline: 2px solid #eed6ab; }
@media(max-width:350px) {
  .hero .service-name:has(#rever-abertura)::before { width: 13px; }
}

.vt-chegada::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #1e2420;
}

.vt-chegada-palco {
  position: relative;
  width: min(100%, 56.25vh, 620px);
  width: min(100%, 56.25dvh, 620px);
  aspect-ratio: 9 / 16;
}

.vt-chegada-filme {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1e2420;
}

.vt-chegada[data-fase="preparo"] { pointer-events: none; }
.vt-chegada[data-fase="preparo"] .vt-chegada-palco {
  background: #1e2420 url("assets/chegada/abertura.webp") center / contain no-repeat;
}
.vt-chegada[data-fase="preparo"] .vt-chegada-filme { visibility: hidden; }

.vt-chegada-selo {
  position: fixed;
  display: block;
  max-width: none;
  pointer-events: none;
  transform-origin: 0 0;
}

html.vt-chegada-ativa .hero-media .folio-stamp {
  visibility: hidden;
}

/* The folio's destination is the VT in the masthead. Keep its lettering
   visible while the moving monogram fills the top of the lockup. */
html[data-release="retrato-em-folio"].vt-chegada-encaixando .site-header .brand img {
  clip-path: inset(68% 0 0);
}

.vt-chegada[data-fase="encaixe"] {
  pointer-events: none;
}

.vt-chegada[data-fase="encaixe"]::before {
  animation: vt-abrir-capa 440ms cubic-bezier(.26,.05,.32,1) both;
}

.vt-chegada[data-fase="encaixe"] .vt-chegada-palco {
  /* The moving ink has its own transparent layer; keep the rest of the still. */
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    32.46% 35.93%, 32.46% 54.80%, 70.15% 54.80%, 70.15% 35.93%, 32.46% 35.93%);
  animation: vt-abrir-capa 225ms ease-out both;
}

html.vt-chegada-encaixando .hero-media .portrait-image {
  animation: vt-revelar-retrato 555ms cubic-bezier(.17,.61,.28,1) both;
}

@keyframes vt-abrir-capa {
  to { opacity: 0; }
}

@keyframes vt-revelar-retrato {
  from { clip-path: inset(0 0 18%); }
  to { clip-path: inset(0); }
}

@media (prefers-reduced-motion: reduce), print {
  .vt-chegada { display: none; }
  html.vt-chegada-ativa .hero-media .folio-stamp { visibility: visible; }
  html.vt-chegada-encaixando .hero-media .portrait-image { animation: none; }
}
