/* ============================================
   Page Loader — Light Glassy Theme (Inspired by Logo)
   ============================================ */

/* ---------- Full-screen backdrop ---------- */
.page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;

    /* Translucent warm background */
    background: linear-gradient(135deg,
            rgba(253, 251, 247, 0.7) 0%,
            rgba(244, 238, 225, 0.7) 50%,
            rgba(232, 222, 195, 0.7) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---------- Floating background orbs ---------- */
.loader-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    will-change: transform;
}

/* Golden yellow from logo */
.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(238, 177, 56, 0.4) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: orbFloat1 10s ease-in-out infinite;
}

/* Warm earthy tone reflecting the dark brown but lightened */
.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 114, 60, 0.25) 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation: orbFloat2 12s ease-in-out infinite;
}

/* Bright pure white for intense glass reflection */
.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    animation: orbFloat3 14s ease-in-out infinite;
}

/* Subtle amber/gold */
.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 204, 102, 0.35) 0%, transparent 70%);
    top: 15%;
    right: 20%;
    animation: orbFloat4 11s ease-in-out infinite;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(80px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-40px, 90px) scale(0.95);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-70px, -80px) scale(1.15);
    }

    66% {
        transform: translate(50px, -40px) scale(0.9);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-100px, 60px) scale(1.2);
    }
}

@keyframes orbFloat4 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, -70px) scale(1.1);
    }
}

/* ---------- Frosted glass card (Light Mode) ---------- */
.frost-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3.5rem 4.5rem;
    border-radius: 32px;
}

/* Shimmer border sweep - warm gold */
.frost-card-border {
    position: absolute;
    inset: -1px;
    border-radius: 33px;
    background: conic-gradient(from 0deg,
            transparent 0%,
            rgba(238, 177, 56, 0.6) 15%,
            transparent 30%,
            transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1.5px;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes shimmerSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Logo ring - elegant gold matching logo ---------- */
.logo-ring {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow:
        inset 0 4px 10px rgba(255, 255, 255, 0.8),
        0 4px 15px rgba(238, 177, 56, 0.15);
}

.ring-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(238, 177, 56, 0.25) 0%, transparent 70%);
    animation: ringPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ring-spin {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #eeb138;
    border-right-color: rgba(238, 177, 56, 0.4);
    animation: spinRing 2.5s linear infinite;
}

.ring-spin::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-bottom-color: rgba(168, 114, 60, 0.6);
    /* darker earthy contrast */
    border-left-color: rgba(168, 114, 60, 0.15);
    animation: spinRing 3.5s linear infinite reverse;
}

.loader-logo {
    width: 85px;
    height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(100, 60, 20, 0.15));
    animation: logoBreathe 3s ease-in-out infinite;
    z-index: 2;
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes spinRing {
    to {
        transform: rotate(360deg);
    }
}

@keyframes logoBreathe {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 8px 16px rgba(100, 60, 20, 0.15));
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 12px 24px rgba(238, 177, 56, 0.3));
    }
}

/* ---------- Brand text ---------- */
.loader-brand {
    text-align: center;
}

.loader-brand h2 {
    margin: 0 0 0.85rem 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    /* Rich warm dark brown from logo context */
    color: #4a3424;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

/* Ornamental divider - deep gold */
.loader-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.divider-line {
    display: block;
    width: 50px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(238, 177, 56, 0.8), transparent);
}

.divider-diamond {
    display: block;
    width: 7px;
    height: 7px;
    background: #eeb138;
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(238, 177, 56, 0.6);
    animation: diamondPulse 2s ease-in-out infinite;
}

@keyframes diamondPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: rotate(45deg) scale(0.9);
        box-shadow: 0 0 4px rgba(238, 177, 56, 0.4);
    }

    50% {
        opacity: 1;
        transform: rotate(45deg) scale(1.3);
        box-shadow: 0 0 12px rgba(238, 177, 56, 0.8);
    }
}

/* ---------- Progress bar ---------- */
.loader-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.progress-track {
    width: 200px;
    height: 4px;
    border-radius: 4px;
    /* Recessed glassy track */
    background: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 40%;
    border-radius: 4px;
    background: linear-gradient(90deg, #f3d081, #eeb138, #de9910);
    box-shadow: 0 0 10px rgba(238, 177, 56, 0.5);
    animation: progressSlide 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(300%);
    }
}

.loader-status {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #5c412d;
    /* earthy brown */
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

.loading-dots {
    color: #eeb138;
}

.loading-dots::after {
    content: '';
    animation: dotsAnim 1.4s steps(4, end) infinite;
}

@keyframes dotsAnim {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

/* ---------- Hide transition ---------- */
.page-loader.hidden {
    opacity: 0;
    transform: scale(1.05);
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .frost-card {
        padding: 2.5rem 2rem;
        margin: 0 1.25rem;
        gap: 1.5rem;
        border-radius: 28px;
    }

    .logo-ring {
        width: 110px;
        height: 110px;
    }

    .logo-ring::before {
        inset: -10px;
    }

    .loader-logo {
        width: 65px;
        height: 65px;
    }

    .loader-brand h2 {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }

    .progress-track {
        width: 160px;
    }
}