.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 46%, rgba(246, 0, 63, .09), transparent 34%),
        rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}

.page-transition.is-active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.transition-loader {
    display: grid;
    place-items: center;
    gap: 13px;
    transform: scale(.94);
    transition: transform .18s ease;
}

.page-transition.is-active .transition-loader {
    transform: scale(1);
}

.transition-logo-wrap {
    position: relative;
    width: min(390px, 78vw);
    padding: clamp(18px, 4vw, 28px);
    overflow: hidden;
    border: 1px solid rgba(20, 25, 30, .08);
    border-radius: 24px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 24px 70px rgba(20, 25, 30, .12);
    isolation: isolate;
    animation: logoHeartbeat 1.35s ease-in-out infinite;
}

.transition-logo {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(246, 0, 63, .2));
}

.transition-logo-glow {
    position: absolute;
    z-index: 0;
    inset: 18% 10%;
    border-radius: 50%;
    background: rgba(246, 0, 63, .22);
    filter: blur(35px);
    animation: glowBeat 1.35s ease-in-out infinite;
}

.transition-logo-sheen {
    position: absolute;
    z-index: 3;
    top: -35%;
    bottom: -35%;
    left: -36%;
    width: 22%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    animation: logoSheen 1.8s ease-in-out infinite;
}

.transition-status {
    color: rgba(32, 32, 32, .68);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 14px;
}

.loading-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #f6003f;
    box-shadow: 0 0 18px rgba(246, 0, 63, .7);
    opacity: .28;
    transform: translateY(0);
    animation: dotPulse .9s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: .15s;
}

.loading-dots span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes logoHeartbeat {
    0%, 30%, 100% { transform: scale(1); }
    10% { transform: scale(1.035); }
    18% { transform: scale(1.008); }
    24% { transform: scale(1.022); }
}

@keyframes glowBeat {
    0%, 30%, 100% { opacity: .32; transform: scale(.92); }
    10% { opacity: .82; transform: scale(1.08); }
    18% { opacity: .45; transform: scale(.98); }
    24% { opacity: .68; transform: scale(1.04); }
}

@keyframes logoSheen {
    0%, 22% { left: -36%; opacity: 0; }
    34% { opacity: 1; }
    62%, 100% { left: 118%; opacity: 0; }
}

@keyframes dotPulse {
    0%,
    80%,
    100% {
        opacity: .28;
        transform: translateY(0);
    }
    35% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition,
    .transition-loader,
    .transition-logo-wrap,
    .transition-logo-glow,
    .transition-logo-sheen,
    .loading-dots span {
        animation: none;
        transition: none;
    }
}
