/* ---------------------------------------------------------------------------
   Tela de abertura do GovGo — a MESMA no computador e no celular.
   ---------------------------------------------------------------------------
   Carregada pelas duas páginas de entrada (src/app/boot/index.html e
   src/mobile/boot/index.html); quem monta a tela é abertura.js, logo no começo
   da página, antes do React e do Babel. Página inteira em azul-marinho (a marca,
   nos dois temas), logotipo grande no centro, barra laranja que anda com as
   etapas reais e o nome da etapa embaixo.
   As cores do degradê são as do quadro de boas-vindas do Início
   (src/features/inicio/InicioDashboard.jsx e src/mobile/styles/inicio.css). */

.gg-abertura {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  color: #FFFFFF;
  background:
    radial-gradient(ellipse 60% 45% at 50% 44%, rgba(46, 132, 214, 0.30) 0%, rgba(46, 132, 214, 0) 70%),
    linear-gradient(135deg, #002247 0%, #003A70 55%, #0B4A8A 100%);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 220ms ease-out;
  overflow: hidden;
}

/* Tema escuro: o mesmo azul-marinho, um tom mais fundo, para não "acender" a tela. */
[data-theme="dark"] .gg-abertura {
  background:
    radial-gradient(ellipse 60% 45% at 50% 44%, rgba(46, 132, 214, 0.22) 0%, rgba(46, 132, 214, 0) 70%),
    linear-gradient(135deg, #001833 0%, #002A55 55%, #0B3F78 100%);
}

.gg-abertura--saindo {
  opacity: 0;
  pointer-events: none;
}

.gg-abertura__centro {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: gg-abertura-entra 420ms ease-out both;
}

.gg-abertura__logo {
  display: block;
  width: clamp(250px, 32vw, 460px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 960 / 226;
  user-select: none;
  -webkit-user-drag: none;
}

.gg-abertura__progresso {
  width: min(360px, 100%);
  margin-top: clamp(36px, 6vh, 56px);
}

.gg-abertura__barra {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.gg-abertura__preenche {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #FF7A45 0%, var(--orange, #FF5722) 100%);
  box-shadow: 0 0 12px rgba(255, 87, 34, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
  /* sem transição: a barra é desenhada quadro a quadro junto com o percentual */
  will-change: transform;
  overflow: hidden;
}

/* brilho discreto que corre pela parte já preenchida da barra */
.gg-abertura__preenche::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-110%);
  will-change: transform;
  animation: gg-abertura-brilho 1.6s ease-in-out infinite;
}

.gg-abertura__linha {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  min-height: 22px;
}

.gg-abertura__etapa {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.gg-abertura__conta {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.gg-abertura__lido {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes gg-abertura-entra {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes gg-abertura-brilho {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

@media (max-width: 600px) {
  .gg-abertura__progresso { width: min(300px, 100%); }
  .gg-abertura__etapa { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gg-abertura { transition: none; }
  .gg-abertura__centro { animation: none; }
  .gg-abertura__preenche::after { animation: none; display: none; }
}
