/* Pantalla de carga de SAVADCA: el logotipo se dibuja y sus tres columnas se
   llenan y vacían como un tablero en marcha. Va antes de que arranque Angular,
   así que no usa variables del tema: los azules son los de la marca. */
html,
body {
    margin: 0;
    height: 100%;
}

.sl {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background:
        radial-gradient(42rem 26rem at 50% 38%, rgba(59, 130, 246, 0.1), transparent 70%),
        #ffffff;
    color: #0f172a;
    font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
    animation: sl-in 0.35s ease-out both;
}

.sl-mark {
    position: relative;
    width: 76px;
    height: 76px;
    filter: drop-shadow(0 14px 28px rgba(37, 99, 235, 0.22));
}

.sl-mark::after {
    /* Halo que respira detrás del logotipo. */
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 30px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 68%);
    animation: sl-breathe 2.4s ease-in-out infinite;
    z-index: -1;
}

.sl-frame {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: sl-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.1s forwards;
}

.sl-bar {
    fill: #2563eb;
    transform-box: fill-box;
    transform-origin: 50% 0;
    transform: scaleY(0.18);
    animation: sl-fill 1.8s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

.sl-b1 {
    animation-delay: 0.55s;
}

.sl-b2 {
    fill: #3b82f6;
    animation-delay: 0.75s;
}

.sl-b3 {
    fill: #60a5fa;
    animation-delay: 0.95s;
}

.sl-word {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.42em;
    padding-left: 0.42em;
    color: #1e293b;
    opacity: 0;
    animation: sl-rise 0.6s ease-out 0.45s forwards;
}

.sl-track {
    position: relative;
    width: 132px;
    height: 3px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(37, 99, 235, 0.12);
    opacity: 0;
    animation: sl-rise 0.6s ease-out 0.6s forwards;
}

.sl-track span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    animation: sl-sweep 1.3s ease-in-out infinite;
}

.sl-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@keyframes sl-in {
    from {
        opacity: 0;
    }
}

@keyframes sl-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes sl-fill {
    0%,
    100% {
        transform: scaleY(0.18);
    }
    45%,
    60% {
        transform: scaleY(1);
    }
}

@keyframes sl-rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sl-sweep {
    from {
        transform: translateX(-110%);
    }
    to {
        transform: translateX(260%);
    }
}

@keyframes sl-breathe {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl,
    .sl-mark::after,
    .sl-frame,
    .sl-bar,
    .sl-word,
    .sl-track,
    .sl-track span {
        animation: none;
    }
    .sl-frame {
        stroke-dashoffset: 0;
    }
    .sl-bar {
        transform: none;
    }
    .sl-word,
    .sl-track {
        opacity: 1;
    }
}
