/* ============================================
   INTRO / SPLASH ANIMATION — TWO PHASES
   Phase 1: Sand bg (#B3A694) with dark text
   Phase 2: Photo bg with white text
   Then fade out to reveal the site.
   ============================================ */

/* ---- Overlay (base) ---- */
.pg-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

/* ---- Background layers ---- */
.pg-intro-bg-sand {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #B3A694;
    z-index: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-intro-bg-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Inner layout: three elements in a row ---- */
.pg-intro-inner {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    user-select: none;
}

/* ---- Text elements ---- */
.pg-intro-text-left,
.pg-intro-text-right {
    font-family: 'Mona Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3D3529;
    opacity: 0;
    transform: translateY(8px);
    transition: color 0.6s ease;
}

.pg-intro-text-left {
    text-align: right;
    min-width: 100px;
}

.pg-intro-text-right {
    text-align: left;
    min-width: 100px;
}

/* ---- Center logo (SVG) ---- */
.pg-intro-logo {
    width: 60px;
    height: auto;
    opacity: 0;
    transform: scale(0.9);
    transition: filter 0.6s ease;
}

/* ---- Line decorators ---- */
.pg-intro-line {
    width: 30px;
    height: 1px;
    background: #3D3529;
    opacity: 0;
    transform: scaleX(0);
    transition: background 0.6s ease;
}

.pg-intro-line:first-of-type {
    transform-origin: right center;
}

.pg-intro-line:last-of-type {
    transform-origin: left center;
}

/* ============================================
   PHASE 1: Logo + text entrance on sand bg
   ============================================ */

.pg-intro-phase-in .pg-intro-logo {
    animation: pgIntroFadeScale 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.pg-intro-phase-in .pg-intro-line {
    animation: pgIntroLineIn 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) 0.4s forwards;
}

.pg-intro-phase-in .pg-intro-text-left {
    animation: pgIntroTextIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.55s forwards;
}

.pg-intro-phase-in .pg-intro-text-right {
    animation: pgIntroTextIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.65s forwards;
}

@keyframes pgIntroFadeScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pgIntroLineIn {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    100% {
        opacity: 0.5;
        transform: scaleX(1);
    }
}

@keyframes pgIntroTextIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PHASE 2: Photo appears OVER sand (no flash),
   text + logo turn white, Ken Burns zoom
   ============================================ */

.pg-intro-phase-photo .pg-intro-bg-sand {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.pg-intro-phase-photo .pg-intro-bg-photo {
    opacity: 1;
}

.pg-intro-phase-photo .pg-intro-text-left,
.pg-intro-phase-photo .pg-intro-text-right {
    color: #ffffff;
}

.pg-intro-phase-photo .pg-intro-line {
    background: #ffffff;
}

/* Invert logo to white */
.pg-intro-phase-photo .pg-intro-logo {
    filter: brightness(0) invert(1);
}



/* ============================================
   PHASE 3: Everything fades out to reveal site
   ============================================ */

.pg-intro-overlay.pg-intro-phase-out {
    animation: pgIntroOverlayOut 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pg-intro-phase-out .pg-intro-inner {
    animation: pgIntroContentOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pgIntroOverlayOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes pgIntroContentOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
}

/* Final state */
.pg-intro-overlay.pg-intro-done {
    display: none !important;
}

/* ---- Prevent body scroll ---- */
body.pg-intro-active {
    overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .pg-intro-inner {
        flex-direction: column;
        gap: 20px;
    }

    .pg-intro-text-left,
    .pg-intro-text-right {
        text-align: center;
        min-width: auto;
        font-size: 10px;
    }

    .pg-intro-line {
        display: none;
    }

    .pg-intro-logo {
        width: 50px;
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .pg-intro-phase-in .pg-intro-logo,
    .pg-intro-phase-in .pg-intro-line,
    .pg-intro-phase-in .pg-intro-text-left,
    .pg-intro-phase-in .pg-intro-text-right {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        opacity: 1;
        transform: none;
    }

    .pg-intro-bg-sand,
    .pg-intro-bg-photo {
        transition-duration: 0.01ms !important;
    }

    .pg-intro-overlay.pg-intro-phase-out,
    .pg-intro-phase-out .pg-intro-inner {
        animation-duration: 0.01ms !important;
    }
}
