/* ============================================================
   SDM APU — Page Transition (glass splash + ring loader)
   Modern minimal: navy glass splash, APU logo inside a
   spinning gold (#C9A24B) ring. One-shot entrance fade;
   honors prefers-reduced-motion and print.
   ============================================================ */

#page-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(12, 27, 51, 0.78), rgba(10, 22, 43, 0.88));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 1;
    animation: pt-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    contain: layout paint;
}

#page-transition.leaving {
    animation-name: pt-leave;
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

/* Loader lockup: spinning gold ring around the APU logo */
#page-transition .pt-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-transition .pt-ring {
    width: 78px;
    height: 78px;
    animation: pt-spin 0.9s linear infinite;
}

#page-transition .pt-ring-bg {
    fill: none;
    stroke: rgba(238, 237, 232, 0.14);
    stroke-width: 5;
}

#page-transition .pt-ring-fg {
    fill: none;
    stroke: #C9A24B;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 170 44;
    transform: rotate(-90deg);
    transform-origin: center;
}

#page-transition .pt-logo {
    position: absolute;
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

@keyframes pt-enter {
    0%   { opacity: 1; }
    55%  { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes pt-leave {
    from { opacity: 0; visibility: visible; }
    to   { opacity: 1; visibility: visible; }
}

@keyframes pt-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #page-transition { display: none !important; }
}

@media print {
    #page-transition { display: none !important; }
}