/* A mesma composição aprovada, em tela cheia, sem esticar nem cortar a marca. */
.langris-abertura {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: #faf9f6;
  color: #141414;
  overflow: hidden;
  overscroll-behavior: contain;
  opacity: 1;
  transition: opacity 180ms ease;
}
.langris-abertura::backdrop { background: #faf9f6; }
.langris-abertura::after {
  content: "";
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: calc(50% - 44px);
  width: 88px;
  height: 2px;
  border-radius: 2px;
  background: #3157ff;
  transform-origin: left;
  animation: abertura-progresso 8s linear both;
}
.langris-abertura.abertura-saindo { opacity: 0; }
.langris-abertura .abertura-cena {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100vw, 177.777778vh);
  width: min(100vw, 177.777778dvh);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}
.langris-abertura .abertura-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 220ms ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}
.langris-abertura.abertura-pronta .abertura-video { opacity: 1; }
.langris-abertura .abertura-slogan {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  max-width: calc(100% - 32px);
  color: #494956;
  font: 500 clamp(12px, 1.25vw, 17px)/1.5 system-ui, sans-serif;
  letter-spacing: .025em;
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  animation: abertura-slogan-entrada 650ms cubic-bezier(.22,1,.36,1) 2500ms both;
}
.langris-abertura .abertura-gradient-wave-text {
  --gi: -25;
  --gradient-wave-base: #494956;
  --gradient-wave-violeta: #6060a0;
  --gradient-wave-azul: #3157ff;
  --gradient-wave-petroleo: #357d9e;
  --gradient-wave-roxo: #6d50a5;
  --gradient-wave-cinza: #62618c;
  display: inline-block;
  padding-inline: 2px;
  /* O recuo desloca a origem das bandas para baixo da linha, como no original. */
  padding-bottom: 20%;
  margin-bottom: -20%;
  -webkit-font-smoothing: antialiased;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .langris-abertura .abertura-gradient-wave-text {
    background-image: radial-gradient(circle at 50% bottom,
      var(--gradient-wave-base) calc((var(--gi) + 0) * 1%),
      var(--gradient-wave-violeta) calc((var(--gi) + 8) * 1%),
      var(--gradient-wave-azul) calc((var(--gi) + 12) * 1%),
      var(--gradient-wave-petroleo) calc((var(--gi) + 16) * 1%),
      var(--gradient-wave-roxo) calc((var(--gi) + 20) * 1%),
      var(--gradient-wave-azul) calc((var(--gi) + 24) * 1%),
      var(--gradient-wave-cinza) calc((var(--gi) + 28) * 1%),
      var(--gradient-wave-violeta) calc((var(--gi) + 32) * 1%),
      var(--gradient-wave-azul) calc((var(--gi) + 36) * 1%),
      var(--gradient-wave-base) calc((var(--gi) + 40) * 1%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.langris-abertura .abertura-aviso-acessivel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@keyframes abertura-slogan-entrada {
  from { opacity: 0; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes abertura-progresso {
  from { transform: scaleX(0); opacity: .25; }
  to { transform: scaleX(1); opacity: .65; }
}

/* A abertura aprovada tem identidade própria: vídeo original e fundo creme
   nos dois temas, sem trocar a animação por imagens estáticas no escuro.
   O tema escolhido para o painel continua intacto por baixo do dialog. */
@media (prefers-reduced-motion: reduce) {
  .langris-abertura { transition: none; }
  .langris-abertura .abertura-slogan { animation: none; opacity: 1; }
  .langris-abertura .abertura-video { transition: none; }
  .langris-abertura::after { animation: none; }
}

/* GradientWaveText adapted from https://spell.sh/r/gradient-wave-text.json
 * MIT License — Copyright (c) 2025 Spell UI
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
