/*==================================================
LOADER
==================================================*/

#loader{
     max-width: 420px;
    margin: auto;
    position:fixed;
    inset:0;
    background:var(--off-white);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    transition:.6s;
}

.loader-content{
    text-align:center;
}

.loader-ring{
    width:70px;
    height:70px;
    margin:auto;
    border:4px solid rgba(184,134,91,.15);
    border-top-color:var(--primary);
    border-radius:50%;
    animation:spin 1s linear infinite;
}

.loader-content h1{
    font-size:2.8rem;
    margin-top:20px;
}

.loader-content span{
    color:var(--secondary);
}

.loader-content p{
    letter-spacing:3px;
    text-transform:uppercase;
    font-size:12px;
    margin-top:8px;
}

/*==================================================
ENVELOPE
==================================================*/

.envelope-wrapper{
    display:flex;
    justify-content:center;
    margin-top:40px;
}

.envelope{
    width:320px;
    height:220px;
    position:relative;
    cursor:pointer;
    perspective:1000px;
}

.envelope-back{
    position:absolute;
    inset:0;
    background:#f6ece3;
    border-radius:12px;
    box-shadow:var(--shadow);
}

.envelope-flap{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:120px;
    background:#e7d6c6;
    clip-path:polygon(0 0,100% 0,50% 100%);
    transform-origin:top;
    transition:.8s;
}

.envelope-letter{
    position:absolute;
    left:50%;
    top:15px;
    width:88%;
    transform:translateX(-50%);
    background:#fff;
    padding:25px;
    border-radius:8px;
    box-shadow:0 8px 30px rgba(0,0,0,.08);
    text-align:center;
    z-index:2;
}

.envelope-letter h2{
    font-size:2rem;
    margin-top:12px;
}

.wax-seal{
    position:absolute;
    left:50%;
    top:90px;
    transform:translateX(-50%);
    width:55px;
    height:55px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    z-index:5;
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

#openInvitation{
    display:block;
    margin:45px auto 0;
    background:var(--primary);
    color:#fff;
    padding:15px 40px;
    border-radius:50px;
    font-size:15px;
    transition:.35s;
}

#openInvitation:hover{
    background:var(--primary-dark);
    transform:translateY(-3px);
}

/*==================================================
MUSIC BUTTON
==================================================*/

.music-button{
    position:fixed;
    right:20px;
    bottom:20px;
    width:58px;
    height:58px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    font-size:22px;
    box-shadow:var(--shadow);
    z-index:200;
}

/*==================================================
COUNTDOWN
==================================================*/

.countdown-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
}

.time-box{
    background:#fff;
    border-radius:20px;
    padding:28px 15px;
    text-align:center;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
}

.time-box h3{
    font-size:2rem;
    color:var(--primary);
}

.time-box span{
    display:block;
    margin-top:8px;
    font-size:13px;
    color:var(--text-light);
}

/*==================================================
IMAGE FRAME
==================================================*/

.image-frame{
    width:190px;
    height:190px;
    margin:auto;
    position:relative;
}

.image-frame img{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:50%;
}

.frame-border{
    position:absolute;
    inset:-10px;
    border:2px solid var(--primary);
    border-radius:50%;
}

/*==================================================
LOVE ICON
==================================================*/

.love-icon{
    width:80px;
    height:80px;
    margin:40px auto;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    position:relative;
}

.pulse-ring{
    position:absolute;
    inset:-8px;
    border:2px solid var(--primary);
    border-radius:50%;
    animation:pulse 2s infinite;
}

/*==================================================
STORY CARD
==================================================*/

.story-card{
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
    margin-bottom:45px;
}

.story-card img{
    height:220px;
    object-fit:cover;
}

.story-card div{
    padding:25px;
}

.story-dot{
    width:50px;
    height:50px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 20px;
}

/*==================================================
EVENT CARD
==================================================*/

.events-grid{
    display:grid;
    gap:24px;
}

.event-card{
    background:#fff;
    border-radius:22px;
    padding:35px 25px;
    text-align:center;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
}

.event-icon{
    width:75px;
    height:75px;
    border-radius:50%;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f9efe7;
    font-size:34px;
    margin-bottom:20px;
}

.featured{
    border:2px solid var(--primary);
}

/*==================================================
GALLERY
==================================================*/

.gallery-stack{
    display:grid;
    gap:28px;
}

.gallery-card{
    background:#fff;
    border-radius:22px;
    overflow:hidden;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
}

.gallery-card img,.gallery-card video{
    height:280px;
    object-fit:cover;
}

.gallery-card span{
    display:block;
    padding:18px;
    text-align:center;
    font-weight:600;
}

.rotate-left{
    transform:rotate(-3deg);
}

.rotate-right{
    transform:rotate(3deg);
}

/*==================================================
VENUE
==================================================*/

.venue-card{
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    box-shadow:var(--shadow);
}

.venue-image img{
    height:250px;
    object-fit:cover;
}

.venue-content{
    padding:30px;
}

.venue-buttons{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
    margin-top:25px;
}

/*==================================================
RSVP
==================================================*/

.letter-wrapper{
    display:flex;
    justify-content:center;
}

.letter{
    background:#fff;
    width:100%;
    padding:35px;
    border-radius:26px;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
}

.letter-text{
    text-align:center;
    margin-bottom:30px;
}

#rsvpForm button{
    width:100%;
    padding:16px;
    border-radius:50px;
    background:var(--primary);
    color:#fff;
    font-size:16px;
    transition:.35s;
}

#rsvpForm button:hover{
    background:var(--primary-dark);
}

/*==================================================
THANK YOU
==================================================*/

.thank-content{
    text-align:center;
}

.thank-content h2{
    font-size:3rem;
}

.thank-content h3{
    margin-top:25px;
    color:var(--primary);
}

/*==================================================
DECORATIVE ELEMENTS
==================================================*/

.gold-divider{
    width:120px;
    height:2px;
    margin:25px auto;
    background:linear-gradient(
        to right,
        transparent,
        var(--primary),
        transparent
    );
}

/*==================================================
COMMON GLASS CARD
==================================================*/

.glass-card{
    background:rgba(255,255,255,.6);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.4);
    border-radius:24px;
    box-shadow:var(--shadow);
}

/*==================================================
KEYFRAMES
==================================================*/

@keyframes spin{

    to{
        transform:rotate(360deg);
    }

}

@keyframes pulse{

    0%{
        transform:scale(.8);
        opacity:1;
    }

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

}