/* ===== Preloader ABRASCOND — "Brilho e voo" =====
   A logo surge do desfoque, um brilho passa por ela enquanto a página carrega (linha nas 4 cores + porcentagem)
   e, no fim, ela "voa" e encaixa no lugar da logo do menu. Aparece só na 1ª página da visita.
   Usado em todas as páginas (Home, A Associação, Curso, Conecta, 123 Síndicos). */
#abr-pl { position: fixed; inset: 0; z-index: 99999; pointer-events: none;
  animation: abrPlFail 0s linear 8s forwards; /* segurança: some sozinho se algo falhar */ }
#abr-pl .abr-pl-bg { position: absolute; inset: 0; pointer-events: auto; background: radial-gradient(60% 55% at 50% 46%, #eef4ff 0%, #fff 70%); }
html.abr-pl-on, html.abr-pl-on body { overflow: hidden; }

#abr-pl .abr-pl-lg { position: absolute; left: 50%; top: 46%; width: min(520px, 78vw); aspect-ratio: 1620 / 492; margin-left: calc(min(520px, 78vw) / -2); transform: translateY(-50%);
  opacity: 0; filter: blur(14px); scale: .9; animation: abrPlIn 1s cubic-bezier(.22,1,.36,1) .05s forwards; will-change: transform, opacity; }
#abr-pl .abr-pl-lg img { display: block; width: 100%; height: 100%; }
/* brilho que passa só por cima do desenho da logo */
#abr-pl .abr-pl-sh { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask: url(/assets/img/logo-abrascond.png) center / 100% 100% no-repeat; mask: url(/assets/img/logo-abrascond.png) center / 100% 100% no-repeat; }
#abr-pl .abr-pl-sh::before { content: ''; position: absolute; top: -20%; bottom: -20%; left: -30%; width: 18%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); animation: abrPlShine 1.6s cubic-bezier(.4,0,.2,1) .6s infinite; }

/* linha de carregamento + porcentagem */
#abr-pl .abr-pl-ft { position: absolute; left: 50%; top: calc(46% + min(520px, 78vw) * .152 + 40px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; transition: opacity .3s ease; opacity: 0; animation: abrPlFt .6s ease .5s forwards; }
#abr-pl .abr-pl-line { position: relative; width: min(200px, 44vw); height: 2px; border-radius: 2px; background: #e6ebf5; overflow: hidden; }
#abr-pl .abr-pl-line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #3364BC, #24AAFC, #28C76F, #FCCF31); transform: scaleX(var(--p, 0)); transform-origin: left; }
#abr-pl .abr-pl-txt { min-width: 3.4em; font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .12em; color: #0e1a3a; font-variant-numeric: tabular-nums; }

/* saída */
#abr-pl.out .abr-pl-bg { opacity: 0; transition: opacity .7s ease .15s; pointer-events: none; }
#abr-pl.out .abr-pl-ft { opacity: 0; }
#abr-pl.out .abr-pl-sh::before { animation: none; }

@keyframes abrPlIn { to { opacity: 1; filter: blur(0); scale: 1; } }
@keyframes abrPlFt { to { opacity: 1; } }
@keyframes abrPlShine { to { left: 115%; } }
@keyframes abrPlFail { to { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  #abr-pl .abr-pl-lg { animation: none; opacity: 1; filter: none; scale: 1; }
  #abr-pl .abr-pl-sh::before { animation: none; }
  #abr-pl.out { opacity: 0; transition: opacity .3s ease; }
}
