/* ========= ENVELOPE VIDEO OVERLAY ========= */
#envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999999;
    background: #f5f2ed url('../img/paper-texture-bg.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1.2s ease, visibility 1.2s ease;
    touch-action: none;
    overscroll-behavior: none;
    cursor: pointer;
}

#envelope-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hide language button while envelope is playing */
body:has(#envelope-overlay:not(.hidden)) .lang-toggle-fixed {
    display: none !important;
}


.envelope-tap-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: circular, helvetica, sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    animation: hint-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

@media (max-width: 768px) {
    .envelope-tap-hint {
        bottom: 30px;
        font-size: 12px;
    }
}

#envelope-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}

@media (min-width: 769px) {
    #envelope-video {
        object-fit: contain !important;
        width: auto !important;
        height: 85vh !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        border-radius: 4px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    }
}

/* Warm True Tone tint — simulates the warm display effect */
#envelope-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 235, 200, 0.06);
    pointer-events: none;
    z-index: 1;
}

/* ========= INVITATION PAGE ========= */
#invitation-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../img/invitation-bg.png') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow: hidden;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    touch-action: none;
    overscroll-behavior: none;
}

#invitation-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.invitation-birds {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: auto !important;
    opacity: 0.4;
    pointer-events: none;
    z-index: 2;
}

/* Warm True Tone tint on invitation page */
#invitation-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 235, 200, 0.06);
    pointer-events: none;
    z-index: 0;
}

.invitation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 25px 30px 20px;
    z-index: 1;
    width: 100%;
}

.invitation-name.cursive {
    font-family: 'Alex Brush', cursive !important;
    font-size: 52px;
    font-weight: 400;
    font-style: normal;
    color: #4a5c40;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin: 0;
    text-transform: none;
}

.invitation-amp {
    font-family: 'Alex Brush', cursive !important;
    font-size: 36px;
    color: #4a5c40;
    margin: 4px 0;
}

.invitation-message {
    font-family: 'Cinzel', 'Trajan Pro', serif !important;
    font-size: 11px;
    font-weight: 400;
    color: #4a5c40;
    line-height: 2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    max-width: 500px;
    margin: 15px auto;
    padding: 0 10px;
}

.invitation-venues {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.venue-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.venue-label {
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    color: #4a5c40;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.venue-name {
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-size: 11px;
    color: #4a5c40;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.venue-time {
    font-family: 'Cinzel', 'Trajan Pro', serif;
    font-size: 10px;
    color: #4a5c40;
    margin-top: 4px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.venue-divider {
    width: 1px;
    height: 40px;
    background: #4a5c40;
    opacity: 0.4;
}

.invitation-location-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
    gap: 0;
}

.invitation-location,
.invitation-date {
    display: block;
}

.invitation-location {
    font-family: 'Cinzel', 'Trajan Pro', serif !important;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    color: #4a5c40;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.invitation-date {
    font-family: 'Cinzel', 'Trajan Pro', serif !important;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    color: #4a5c40;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.invitation-cta {
    position: relative;
    z-index: 2;
    margin-top: 8px;
    padding: 14px 35px;
    background: transparent;
    color: #4a5c40;
    border: 1.5px solid #4a5c40;
    border-radius: 0;
    font-family: 'Cinzel', 'Trajan Pro', serif !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    -webkit-text-stroke: 0.5px #4a5c40;
}

.invitation-cta:hover {
    background: #4a5c40;
    color: #fff;
    text-decoration: none;
}

.invitation-couple {
    display: none;
}

.invitation-city-wrap {
    display: none;
}

/* ========= RESPONSIVE ========= */
@media (min-width: 769px) {
    #invitation-page {
        justify-content: flex-start;
    }

    .invitation-content {
        justify-content: flex-start;
        padding: 30px 30px 20px;
    }

    .invitation-name.cursive {
        font-size: 48px;
    }

    .invitation-message {
        font-size: 11px;
        margin: 12px auto;
    }

    .invitation-venues {
        margin-top: 10px;
    }

    .invitation-location {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .invitation-content {
        padding: 25px 20px 15px;
    }

    .invitation-name.cursive {
        font-size: 42px;
    }

    .invitation-amp {
        font-size: 28px;
    }

    .invitation-message {
        font-size: 13px;
        margin: 15px auto;
        padding: 0 15px;
        line-height: 1.6;
    }

    .invitation-venues {
        gap: 20px;
        margin-bottom: 15px;
    }

    .venue-label {
        font-size: 13px;
    }

    .venue-name {
        font-size: 11px;
    }

    .invitation-location-date {
        margin-top: 25px;
    }

    .invitation-location {
        font-size: 13px !important;
    }

    .invitation-date {
        font-size: 13px !important;
        margin-top: 0;
    }

    .invitation-cta {
        margin-top: 15px;
        padding: 12px 28px;
        font-size: 14px;
        letter-spacing: 2px;
    }
}

@media (max-width: 380px) {
    .invitation-name.cursive {
        font-size: 34px;
    }

    .invitation-amp {
        font-size: 24px;
    }

    .invitation-message {
        font-size: 12px;
        margin: 10px auto;
    }

    .invitation-content {
        padding: 40px 15px 10px;
    }

    .invitation-date {
        font-size: 12px !important;
        margin-top: 0;
    }

    .invitation-location {
        font-size: 12px !important;
    }

    .invitation-cta {
        margin-top: 10px;
        padding: 10px 24px;
        font-size: 12px;
    }
}

@media (max-height: 600px) {
    .invitation-content {
        padding: 20px 15px 10px;
    }

    .invitation-name.cursive {
        font-size: 30px;
    }

    .invitation-message {
        font-size: 12px;
        margin: 8px auto;
        line-height: 1.5;
    }

    .invitation-venues {
        margin-top: 8px;
    }

    .invitation-date {
        margin-top: 0;
    }
}
