/* =========================================================
   DOVIA · Abertura (mapa-mundo em pontos)
   Fundo PERMANENTE da entrada: a animação revela o login por cima, sem trocar de ecrã.
   ========================================================= */
.abertura {
  display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: #000; color: #fff;
  --logo-ink: #FFFFFF; --logo-accent: #009E98;
  font-family: var(--f-ui);
  transition: background-color .42s ease;
}
.abertura.parada { display: none; }
html.abertura-on .abertura { z-index: 50; cursor: pointer; }
.abertura.revelada { pointer-events: none; cursor: default; }
html[data-theme="claro"] .abertura { background: #fff; color: #000; --logo-ink: #000000; }
html.abertura-on body { overflow: hidden; }
/* o login espera, invisível, até ao fim da animação */
html.abertura-on .login { opacity: 0; visibility: hidden; }
.abertura.revelada .ab-centro { opacity: 0; transform: translate(-50%, -64%) scale(.9); filter: blur(6px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1), filter .6s ease; }
.abertura.saindo { opacity: 0; transform: scale(1.06); filter: blur(6px); pointer-events: none; }
.ab-mapa { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ab-veu { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 30% at 50% 74%, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,.85) 100%); }
.ab-centro { position: absolute; left: 50%; top: 74%; transform: translate(-50%, -50%); will-change: transform, opacity;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; width: min(92vw, 560px); }
.ab-logo { width: clamp(220px, 34vw, 400px); height: auto; overflow: visible;
  opacity: 0; transform: translateY(14px) scale(.96); filter: drop-shadow(0 0 0 rgba(0,158,152,0));
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform 1.1s cubic-bezier(.16,1,.3,1), filter 1.4s ease; }
.ab-logo .lg-ptr { --ptr-dur: 1.1s; }
.abertura .ab-logo { --ptr: -38deg; }
.abertura.logo .ab-logo { opacity: 1; transform: none; filter: drop-shadow(0 0 22px rgba(0,158,152,.28)); --ptr: 0deg; }
.ab-lema { margin: 0; font-family: var(--f-display); font-size: clamp(11px, 1.05vw, 13px); font-weight: 700; letter-spacing: .32em; text-transform: uppercase;
  color: rgba(255,255,255,.62); opacity: 0; transform: translateY(8px); transition: opacity .8s ease .25s, transform .9s cubic-bezier(.16,1,.3,1) .25s; }
.ab-lema b { color: #009E98; font-weight: 700; }
.abertura.logo .ab-lema { opacity: 1; transform: none; }
  font-size: 11.5px; letter-spacing: .08em; color: rgba(255,255,255,.34); opacity: 0; transition: opacity .6s ease .8s; white-space: nowrap; }
.ab-progresso { position: absolute; left: 0; top: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(0,158,152,0), #009E98); opacity: .7; }
@media (max-width: 860px) {
  .ab-centro { top: 78%; gap: 12px; }
  .ab-veu { background:
    radial-gradient(ellipse 70% 26% at 50% 78%, rgba(0,0,0,.94) 0%, rgba(0,0,0,.5) 60%, rgba(0,0,0,0) 100%),
    radial-gradient(ellipse 140% 80% at 50% 42%, rgba(0,0,0,0) 50%, rgba(0,0,0,.85) 100%); }
  .ab-logo { width: min(64vw, 260px); }
}
@media (prefers-reduced-motion: reduce) {
  html.abertura-on .abertura { transition: opacity .2s linear; }
  .abertura.saindo { transform: none; filter: none; }
  .abertura .ab-logo { --ptr: 0deg; }
}

/* Modo claro: véu e textos em branco/preto */
html[data-theme="claro"] .ab-veu { background:
    radial-gradient(ellipse 42% 30% at 50% 74%, rgba(255,255,255,.94) 0%, rgba(255,255,255,.55) 55%, rgba(255,255,255,0) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(255,255,255,0) 55%, rgba(255,255,255,.85) 100%); }
html[data-theme="claro"] .ab-lema { color: rgba(0,0,0,.6); }
.abertura.revelada .ab-veu { opacity: .55; transition: opacity .8s ease; }
@media (prefers-reduced-motion: reduce) {
  .abertura.revelada .ab-centro { transform: translate(-50%, -50%); filter: none; transition: opacity .2s linear; }
}
