/* ==========================================================================
   PRELOADER — Mobile (360px – 440px)
   Different principle than desktop: instead of a dedicated background
   image, this is a translucent + blurred overlay sitting directly on
   top of the case-stack photos that are already loading underneath
   (frosted-glass effect), covering the full real viewport. Once
   preloader.js's own loading logic finishes, it adds .is-hidden — the
   exact same mechanism as desktop, just styled differently here.
   ========================================================================== */

.preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    overflow: hidden;
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    opacity: 1;
    transition: opacity 0.5s ease;
    animation: preloader-pulse 7s ease-in-out infinite;
}

/* Breathing black overlay while it's loading — separate from the
   .is-hidden opacity transition above (that one fades the whole
   preloader out at the end; this one just pulses its own background
   the whole time it's up). */
@keyframes preloader-pulse {
    0%, 100% { background-color: rgba(0, 0, 0, 1); }
    50% { background-color: rgba(0, 0, 0, 0.5); }
}

.preloader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader__bg {
    display: none;
}

.preloader__bar-track {
    position: absolute;
    top: 48.7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 27.3rem;
    height: 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    z-index: 1;
}

.preloader__bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 1rem;
    transition: width 0.2s ease;
}

.preloader__text {
    position: absolute;
    top: 51rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-family: 'Atyp Display', sans-serif;
    font-weight: 600;
    font-size: 2rem;
    line-height: 2rem;
    letter-spacing: -0.05em;
    color: #ffffff;
    white-space: nowrap;
    z-index: 1;
}

body.preloader-lock {
    overflow: hidden;
}
