/* ── Wedding Opening Overlay ── */
#opening-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    overflow: hidden;
    background: #181410;
    transition: opacity 0.9s ease, transform 0.9s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    overscroll-behavior: none;
}

#opening-overlay.is-closing {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

/* ── Full-screen slides container ── */
#opening-slides {
    position: absolute;
    inset: 0;
}

.opening-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    animation-play-state: paused;
}

.opening-slide.active {
    opacity: 1;
    animation-play-state: running;
    will-change: transform;
}

/* Ken Burns — 활성 슬라이드에서만 실행 */
.opening-slide:nth-child(1) { animation: kb-s1 28s ease-in-out infinite alternate; animation-delay: -6s; }
.opening-slide:nth-child(2) { animation: kb-s2 32s ease-in-out infinite alternate; animation-delay: -14s; }
.opening-slide:nth-child(3) { animation: kb-s3 26s ease-in-out infinite alternate; animation-delay: -4s; }
.opening-slide:nth-child(4) { animation: kb-s4 30s ease-in-out infinite alternate; animation-delay: -10s; }
.opening-slide:nth-child(5) { animation: kb-s5 27s ease-in-out infinite alternate; animation-delay: -18s; }

@keyframes kb-s1 { from { transform: scale(1.0); }   to { transform: scale(1.1); } }
@keyframes kb-s2 { from { transform: scale(1.1); }   to { transform: scale(1.0); } }
@keyframes kb-s3 { from { transform: scale(1.0); }   to { transform: scale(1.08); } }
@keyframes kb-s4 { from { transform: scale(1.08); }  to { transform: scale(1.0); } }
@keyframes kb-s5 { from { transform: scale(1.0); }   to { transform: scale(1.1); } }

/* ── Dim overlay: dark at bottom only so photo top is clear ── */
.opening-dim {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.3) 45%, rgba(0,0,0,0) 65%);
}

/* ── Bottom text zone (all text here) ── */
.opening-bottom-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 32px 30px max(env(safe-area-inset-bottom), 5vh);
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.opening-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px;
    animation: op-fade-up 1s 0.4s both;
}

.opening-signature {
    font-family: 'Birthstone-Local', 'Birthstone', cursive;
    font-size: clamp(2.6rem, 11vw, 4.4rem);
    line-height: 1;
    color: #fff;
    margin: 0 0 14px;
    animation: op-fade-up 1s 0.7s both;
    text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.opening-divider {
    width: 32px;
    height: 1px;
    background: rgba(255,255,255,0.45);
    margin: 0 auto 14px;
    animation: op-fade-in 1s 1s both;
}

.opening-names {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: clamp(0.88rem, 3.8vw, 1.05rem);
    font-weight: 300;
    letter-spacing: 5px;
    color: rgba(255,255,255,0.95);
    margin: 0 0 8px;
    animation: op-fade-up 1s 1.1s both;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.opening-names em {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    margin: 0 5px;
    color: rgba(255,255,255,0.7);
}

.opening-meta {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.6);
    animation: op-fade-up 1s 1.3s both;
    margin: 0 0 28px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ── CTA button ── */
#opening-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 13px 32px;
    border-radius: 50px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    cursor: pointer;
    white-space: nowrap;
    animation: op-fade-up 1s 1.7s both;
}

#opening-cta svg { transition: transform 0.3s; }
#opening-cta:hover svg { transform: translateY(3px); }

/* ── Keyframes ── */
@keyframes op-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes op-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
