/* ============================================
   2º BPCHQ — INTRO INSTITUCIONAL
   Sóbria, formal, no padrão de sistema oficial PM.
   Pura CSS — não altera scripts, conexões ou dados.
   ============================================ */

/* Esconde o loader em GIF e qualquer intro antiga */
html body .site-loader,
html body .login-intro {
    display: none !important;
}

/* ---------- OVERLAY ---------- */
.bpchq-intro {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    pointer-events: none;
    color: #e8ecf2;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background:
        radial-gradient(ellipse at 50% 40%, #1a2335 0%, #0e1626 60%, #07101c 100%);
    animation: bpIntroOut 0.7s ease 3.4s forwards;
    will-change: opacity;
}

/* Faixa institucional fina no topo (azul/dourado/azul) */
.bp-band {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
        #1F253B 0%,
        #1F253B 48%,
        #c9a96b 48%,
        #c9a96b 52%,
        #1F253B 52%,
        #1F253B 100%);
    opacity: 0;
    animation: bpFadeIn 0.5s ease 0.05s forwards;
}

/* Cabeçalho com nome da corporação */
.bp-header {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(232, 236, 242, 0.85);
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    opacity: 0;
    animation: bpFadeIn 0.6s ease 0.2s forwards;
}
.bp-header strong {
    display: block;
    color: #f5e9c8;
    font-weight: 700;
    margin-bottom: 4px;
}
.bp-header span {
    display: block;
    color: rgba(232, 236, 242, 0.55);
    font-size: 10px;
    letter-spacing: 0.32em;
}

/* ---------- CENTRO ---------- */
.bp-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

/* Halo discreto atrás do brasão */
.bp-halo {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 169, 107, 0.18) 0%, transparent 65%);
    filter: blur(20px);
    opacity: 0;
    animation: bpFadeIn 1.2s ease 0.4s forwards;
}

/* Brasão */
.bp-shield {
    width: 168px;
    height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    opacity: 0;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.6));
    animation: bpShieldIn 0.9s ease 0.55s forwards;
}
.bp-shield img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Linha-rule dourada */
.bp-rule {
    margin-top: 28px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 107, 0.85), transparent);
    animation: bpRule 0.8s ease 1.1s forwards;
}

/* Título institucional */
.bp-title {
    margin-top: 22px;
    text-align: center;
}
.bp-title__eyebrow {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.42em;
    color: #c9a96b;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    animation: bpFadeUp 0.55s ease 1.3s forwards;
}
.bp-title__name {
    display: block;
    margin-top: 12px;
    font-size: clamp(1.05rem, 2.05vw, 1.4rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #ffffff;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(8px);
    animation: bpFadeUp 0.6s ease 1.5s forwards;
}
.bp-title__sys {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    letter-spacing: 0.22em;
    color: rgba(232, 236, 242, 0.7);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    animation: bpFadeUp 0.6s ease 1.7s forwards;
}

/* Barra de progresso institucional */
.bp-progress {
    margin-top: 38px;
    width: 240px;
    max-width: 70vw;
    height: 2px;
    background: rgba(232, 236, 242, 0.08);
    overflow: hidden;
    border-radius: 2px;
    opacity: 0;
    animation: bpFadeIn 0.4s ease 1.95s forwards;
}
.bp-progress::after {
    content: "";
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(201, 169, 107, 0.4), #c9a96b);
    animation: bpProgress 1.2s ease 2.0s forwards;
}

.bp-progress__label {
    display: block;
    margin-top: 12px;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: rgba(232, 236, 242, 0.5);
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    animation: bpFadeIn 0.4s ease 2.05s forwards;
}

/* Rodapé */
.bp-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(232, 236, 242, 0.45);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    opacity: 0;
    animation: bpFadeIn 0.6s ease 2.4s forwards;
}
.bp-footer span + span::before {
    content: "·";
    margin: 0 10px;
    color: rgba(201, 169, 107, 0.6);
}

/* ---------- KEYFRAMES ---------- */
@keyframes bpIntroOut {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}
@keyframes bpFadeIn { to { opacity: 1; } }
@keyframes bpFadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes bpShieldIn {
    0% { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes bpRule {
    to { width: 240px; }
}
@keyframes bpProgress {
    to { width: 100%; }
}

/* Mobile */
@media (max-width: 600px) {
    .bp-shield { width: 132px; height: 132px; }
    .bp-header { font-size: 10px; top: 28px; }
    .bp-header strong { font-size: 11px; }
    .bp-rule { width: 100%; max-width: 200px; }
    .bp-title__eyebrow { font-size: 9.5px; letter-spacing: 0.32em; }
    .bp-title__sys { font-size: 11px; letter-spacing: 0.18em; }
    .bp-footer { font-size: 9px; letter-spacing: 0.18em; padding: 0 16px; }
    .bp-footer span + span::before { margin: 0 6px; }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .bpchq-intro,
    .bpchq-intro * {
        animation-duration: 0.4s !important;
        animation-delay: 0s !important;
    }
}
