/* ============================================
   VILLAGE MURAL PRELOADER
   Authentic Vietnamese Heritage Loading Screen
   ============================================ */

.village-mural-preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #1A1A1A;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.village-mural-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Mural Image Wrapper */
.mural-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 215, 0, 0.3);
}

/* Grayscale Base Image */
.mural-base {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.4);
}

/* Color Fill Animation - Liquid Wave Effect */
.mural-color-fill {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    clip-path: url(#wave-clip);
    animation: liquidFillFromBottom 4.5s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* SVG Wave Clip Path */
.mural-wrapper::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
}

@keyframes liquidFillFromBottom {
    0% {
        clip-path: polygon(0% 100%,
                5% 100%,
                10% 100%,
                15% 100%,
                20% 100%,
                25% 100%,
                30% 100%,
                35% 100%,
                40% 100%,
                45% 100%,
                50% 100%,
                55% 100%,
                60% 100%,
                65% 100%,
                70% 100%,
                75% 100%,
                80% 100%,
                85% 100%,
                90% 100%,
                95% 100%,
                100% 100%,
                100% 100%,
                0% 100%);
    }

    15% {
        clip-path: polygon(0% 95%,
                5% 97%,
                10% 98%,
                15% 97%,
                20% 96%,
                25% 97%,
                30% 98%,
                35% 97%,
                40% 96%,
                45% 97%,
                50% 98%,
                55% 97%,
                60% 96%,
                65% 97%,
                70% 98%,
                75% 97%,
                80% 96%,
                85% 97%,
                90% 98%,
                95% 97%,
                100% 96%,
                100% 100%,
                0% 100%);
    }

    30% {
        clip-path: polygon(0% 75%,
                5% 78%,
                10% 80%,
                15% 79%,
                20% 76%,
                25% 78%,
                30% 81%,
                35% 79%,
                40% 77%,
                45% 79%,
                50% 82%,
                55% 80%,
                60% 77%,
                65% 79%,
                70% 81%,
                75% 78%,
                80% 76%,
                85% 78%,
                90% 80%,
                95% 79%,
                100% 77%,
                100% 100%,
                0% 100%);
    }

    50% {
        clip-path: polygon(0% 50%,
                5% 53%,
                10% 55%,
                15% 52%,
                20% 49%,
                25% 52%,
                30% 56%,
                35% 53%,
                40% 51%,
                45% 54%,
                50% 57%,
                55% 54%,
                60% 51%,
                65% 53%,
                70% 56%,
                75% 52%,
                80% 49%,
                85% 52%,
                90% 55%,
                95% 53%,
                100% 51%,
                100% 100%,
                0% 100%);
    }

    70% {
        clip-path: polygon(0% 25%,
                5% 28%,
                10% 30%,
                15% 27%,
                20% 24%,
                25% 27%,
                30% 31%,
                35% 28%,
                40% 26%,
                45% 29%,
                50% 32%,
                55% 29%,
                60% 26%,
                65% 28%,
                70% 31%,
                75% 27%,
                80% 24%,
                85% 27%,
                90% 30%,
                95% 28%,
                100% 26%,
                100% 100%,
                0% 100%);
    }

    85% {
        clip-path: polygon(0% 8%,
                5% 10%,
                10% 12%,
                15% 9%,
                20% 7%,
                25% 9%,
                30% 11%,
                35% 10%,
                40% 8%,
                45% 10%,
                50% 12%,
                55% 10%,
                60% 8%,
                65% 9%,
                70% 11%,
                75% 9%,
                80% 7%,
                85% 9%,
                90% 11%,
                95% 10%,
                100% 8%,
                100% 100%,
                0% 100%);
    }

    100% {
        clip-path: polygon(0% 0%,
                5% 2%,
                10% 3%,
                15% 2%,
                20% 1%,
                25% 2%,
                30% 3%,
                35% 2%,
                40% 1%,
                45% 2%,
                50% 3%,
                55% 2%,
                60% 1%,
                65% 2%,
                70% 3%,
                75% 2%,
                80% 1%,
                85% 2%,
                90% 3%,
                95% 2%,
                100% 1%,
                100% 100%,
                0% 100%);
    }
}

/* Vignette Overlay */
.mural-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
            transparent 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* Restaurant Name - Above Image */
.preloader-text-top {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInScale 1s ease-out 0.5s forwards;
}

.preloader-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.preloader-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Loading Progress Bar */
.loading-progress {
    width: 100%;
    max-width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.5s forwards;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
            #C8102E 0%,
            #FFD700 50%,
            #C8102E 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressFill 4.5s cubic-bezier(0.4, 0.0, 0.2, 1) forwards,
        shimmer 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* German Description */
.mural-description {
    max-width: 700px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
}

.mural-description p {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .preloader-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .mural-wrapper {
        aspect-ratio: 4 / 3;
    }

    .preloader-title {
        font-size: 2.5rem;
    }

    .preloader-subtitle {
        font-size: 0.875rem;
    }

    .mural-description p {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .loading-progress {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .mural-wrapper {
        aspect-ratio: 1 / 1;
    }

    .preloader-title {
        font-size: 2rem;
    }

    .mural-description {
        padding: 0 1rem;
    }
}