/* General Styles */
:root {
    --color-gold: #D4AF37;
    --color-red: #8B0000;
    --color-ivory: #FFFFF0;
    --color-pastel-yellow: #FDFD96;
    --color-dark-text: #333;
    --color-light-text: #FFF;
    --transition-speed: 0.6s;
    --ease-out-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* New palette for open invitation */
    --blush: #f4d7d7;
    --gold-foil: #d4af37;
    --ivory-card: #fff8f0;
    --black-text: #2b2b2b;
    --pearl: #fffdf8;
}

/* Quick navigation menu */
#quick-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 245, 248, 0.85) 100%);
    backdrop-filter: blur(8px);
    padding: 8px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), 0 0 12px rgba(212, 175, 55, 0.4);
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    z-index: 9999;
}

#quick-nav a {
    position: relative;
    font-family: 'Playfair Display', serif;
    color: var(--color-red);
    text-decoration: none;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#quick-nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    box-shadow: 0 0 8px var(--color-gold);
    transition: transform 0.3s ease;
    pointer-events: none;
}

#quick-nav a:hover,
#quick-nav a.active {
    background-color: var(--color-gold);
    color: var(--color-light-text);
    text-decoration: none;
}

#quick-nav a:hover::after,
#quick-nav a.active::after {
    transform: translateX(-50%) scale(1);
}

@media (max-width: 480px) {
    #quick-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 6px 0;
    }

    #quick-nav a {
        font-size: 0.9rem;
        padding: 4px 8px;
    }
}


html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: var(--color-dark-text);
    overflow-x: hidden;
    background-color: var(--color-ivory);
}

/* Scene 1: Initial Screen */
#scene1 {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Optimized instant-loading background */
    background: linear-gradient(135deg,
            #ffe4e6 0%,
            #fce7f3 20%,
            #fdf2f8 40%,
            #fffbeb 60%,
            #fef3c7 80%,
            #ffe4e6 100%);
    background-size: 400% 400%;
    background-position: center;
    overflow: hidden;
    animation: backgroundPan 60s infinite alternate linear;
    z-index: 1;
    /* Ensure scene1 is behind scene2 when scene2 is active */
    transition: opacity 0.8s ease-out;
}

@keyframes backgroundPan {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

#gift-box-container {
    position: relative;
    width: 300px;
    height: 200px;
    perspective: 1000px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    z-index: 2;
    /* Ensure gift box is above scene1 background */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Scene 2: Open Invitation Card */
#scene2 {
    min-height: 100vh;
    background-color: var(--color-ivory);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transform: translateY(0px);
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
    z-index: 100;
}

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 5;
    /* Ensure invite-box creates a stacking context */
    /* opacity and transform will be controlled by GSAP */
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gold-frame {
    border: 6px solid var(--gold-foil);
    filter: brightness(1.1);
    padding: 20px;
    position: relative;
    z-index: 2;
    /* Gold frame should be behind text but above card background */
    --sparkle-opacity: 0;
    /* Custom property for sparkle control */
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gold-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: var(--sparkle-opacity);
    /* Controlled by custom property */
    animation: sparkle 1.5s infinite ease-out;
    /* Sparkle animation */
    mix-blend-mode: overlay;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }

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

.invitation-title,
.invitation-subtitle,
.section-title,
.message-text,
.names-list,
.info-text,
.program-item {
    position: relative;
    /* Ensure z-index works */
    z-index: 4;
    /* Ensure text is above gold frame and floral elements */
}

.card-body {
    background-color: var(--ivory-card);
    /* Ivory paper texture */
    padding: 30px;
    line-height: 1.6;
    font-family: 'Playfair Display', serif;
    color: var(--black-text);
    /* Ensure text is visible */
    position: relative;
    z-index: 3;
    /* Card body should be above its background pseudo-element */
}

.card-body::before {
    /* Use pseudo-element for background image to control its opacity */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/800x1200/FFFACD/8B4513?text=Pastel+Yellow+Flowers');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    /* Even more subtle background image */
    z-index: -1;
    /* Behind the actual content */
}

/* Floral elements */
.top-floral,
.bottom-floral {
    position: absolute;
    width: 100%;
    height: 50px;
    /* Adjust height as needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: repeat-x;
    z-index: 1;
    /* Lower z-index to be behind text */
}

/* Pearls for floral elements (pseudo-elements) */
.top-floral::before,
.bottom-floral::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--pearl);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    /* Pearl glow */
    z-index: 4;
    /* Ensure pearls are on top of floral pattern but below text */
}

/* Butterflies */
.ribbon-butterfly,
.bottom-butterfly {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 6;
    /* Ensure butterflies are on top of text */
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.ribbon-butterfly {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 6s infinite ease-in-out;
}

.bottom-butterfly {
    bottom: 20px;
    right: 20px;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.bottom-butterfly:hover {
    transform: scale(1.05) rotateZ(1.5deg);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(-50%);
    }

    50% {
        transform: translateY(-10px) translateX(-50%);
    }

    100% {
        transform: translateY(0) translateX(-50%);
    }
}

/* Gift Items */
.gift-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gift-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gift-description {
    flex: 1;
    font-family: 'Playfair Display', serif;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

/* RSVP Button - Enhanced for Touch */
.jewel-button {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #FFD700 50%, var(--color-gold) 100%);
    color: var(--color-light-text);
    font-family: 'Playfair Display', serif;
    font-size: 1.6em;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    min-width: 200px;
    border: 3px solid var(--color-gold);
    border-radius: 50px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(212, 175, 55, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.jewel-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.jewel-button::after {
    content: '👑';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Touch/Hover Effects */
.jewel-button:hover,
.jewel-button:focus {
    background: linear-gradient(135deg, var(--color-red) 0%, #DC143C 50%, var(--color-red) 100%);
    border-color: var(--color-red);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(220, 20, 60, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.jewel-button:hover::before,
.jewel-button:focus::before {
    left: 100%;
}

.jewel-button:hover::after,
.jewel-button:focus::after {
    transform: translateY(-50%) scale(1.2) rotate(10deg);
}

/* Active/Touch State */
.jewel-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(212, 175, 55, 0.3),
        inset 0 2px 0 rgba(0, 0, 0, 0.1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
}

/* Pulse animation for attention */
@keyframes buttonPulse {
    0% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    70% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 10px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.jewel-button {
    animation: buttonPulse 2s infinite;
}

/* Accessibility (AA) and Responsiveness */
@media (max-width: 768px) {
    #scene2 {
        padding: 60px 15px;
    }
    .invitation-title {
        font-size: 3em;
    }

    .invitation-subtitle {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 2.5em;
    }

    .message-text,
    .names-list,
    .info-text {
        font-size: 1.1em;
    }

    .invite-box {
        padding: 30px;
    }

    .jewel-button {
        font-size: 1.4em;
        padding: 18px 35px;
        min-width: 250px;
    }

    .gift-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .gift-description {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #scene2 {
        padding: 40px 10px;
    }
    .invite-box {
        padding: 20px;
    }
    .invitation-title {
        font-size: 2.5em;
    }

    .invitation-subtitle {
        font-size: 1.2em;
    }

    .section-title {
        font-size: 2em;
    }

    .message-text,
    .names-list,
    .info-text {
        font-size: 1em;
    }

    .jewel-button {
        font-size: 1.2em;
        padding: 16px 30px;
        min-width: 200px;
    }
}

@keyframes backgroundPan {
    0% {
        background-position: 0% 0%;
    }

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

#gift-box-container {
    position: relative;
    width: 300px;
    height: 200px;
    perspective: 1000px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

#gift-box-base {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, #FFD700 0%, #DAA520 50%, #B8860B 100%);
    border: 2px solid #B8860B;
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.7), 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.2'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    background-repeat: repeat;
    background-position: center;
}

#gift-box-top {
    position: absolute;
    top: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, #FFD700 0%, #DAA520 50%, #B8860B 100%);
    border: 2px solid #B8860B;
    transform-origin: bottom center;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.7), 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 12px 12px 0 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.2'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    background-repeat: repeat;
    background-position: center;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#filigree {
    position: absolute;
    width: 95%;
    height: 95%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0L61.8 38.2L100 38.2L69.1 61.8L80.9 100L50 76.4L19.1 100L30.9 61.8L0 38.2L38.2 38.2Z' fill='%23D4AF37' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 50% 50%;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.5;
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
    z-index: 4;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

#ribbon-left,
#ribbon-right {
    position: absolute;
    width: 50%;
    height: 30px;
    background-color: var(--color-red);
    border-top: 3px solid var(--color-gold);
    border-bottom: 3px solid var(--color-gold);
    top: calc(50% - 15px);
    z-index: 3;
    transition: all var(--transition-speed) ease-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: skewY(-5deg);
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
}

#ribbon-left {
    left: 0;
    transform-origin: right center;
    border-radius: 0 15px 15px 0;
}

#ribbon-right {
    right: 0;
    transform-origin: left center;
    border-radius: 15px 0 0 15px;
    transform: skewY(5deg);
}

/* Moño voluminoso - using pseudo-elements for the bow loops */
#ribbon-left::after,
#ribbon-right::before {
    content: '';
    position: absolute;
    width: 45px;
    height: 45px;
    background-color: var(--color-red);
    border: 3px solid var(--color-gold);
    border-radius: 50%;
    top: -10px;
    z-index: 5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
}

#ribbon-left::after {
    right: -25px;
    transform: rotate(55deg);
}

#ribbon-right::before {
    left: -25px;
    transform: rotate(-55deg);
}

/* Medallion */
#medallion {
    position: absolute;
    width: 110px;
    height: 80px;
    background: linear-gradient(to bottom, #FFD700, #DAA520);
    border: 3px solid #B8860B;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    top: calc(50% - 40px);
    left: calc(50% - 55px);
    z-index: 6;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.8);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='48' fill='black'/%3E%3Cpath d='M50 2A48 48 0 002 50a48 48 0 0048 48 48 48 0 0048-48A48 48 0 0050 2zm0 5a43 43 0 0143 43 43 43 0 01-43 43A43 43 0 017 50a43 43 0 0143-43z' fill='white'/%3E%3C/svg%3E");
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-position: center;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#medallion-name {
    font-family: 'Great Vibes', cursive;
    font-size: 1.8em;
    color: var(--color-gold);
    background-color: var(--color-ivory);
    padding: 5px 15px;
    border-radius: 10px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 1;
    /* Always visible */
}

/* Scene 2: Open Invitation Card */
#scene2 {
    min-height: 100vh;
    background-color: var(--color-ivory);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transform: translateY(0px);
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
    z-index: 100;
}

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 5;
    /* Ensure invite-box creates a stacking context */
    opacity: 1;
    visibility: visible;
    transform: rotateY(0deg);
}

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* opacity and transform will be controlled by GSAP */
}

.gold-frame {
    border: 6px solid var(--gold-foil);
    filter: brightness(1.1);
    padding: 20px;
    position: relative;
    z-index: 1;
    --sparkle-opacity: 0;
    /* Custom property for sparkle control */
}

.gold-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: var(--sparkle-opacity);
    /* Controlled by custom property */
    animation: sparkle 1.5s infinite ease-out;
    /* Sparkle animation */
    mix-blend-mode: overlay;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }

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

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 5;
    /* Ensure invite-box creates a stacking context */
    /* opacity and transform will be controlled by GSAP */
}

.gold-frame {
    border: 6px solid var(--gold-foil);
    filter: brightness(1.1);
    padding: 20px;
    position: relative;
    z-index: 2;
    /* Gold frame should be behind text but above card background */
    --sparkle-opacity: 0;
    /* Custom property for sparkle control */
}

.gold-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: var(--sparkle-opacity);
    /* Controlled by custom property */
    animation: sparkle 1.5s infinite ease-out;
    /* Sparkle animation */
    mix-blend-mode: overlay;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }

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

.invitation-title,
.invitation-subtitle,
.section-title,
.message-text,
.names-list,
.info-text,
.program-item {
    position: relative;
    /* Ensure z-index works */
    z-index: 4;
    /* Ensure text is above gold frame and floral elements */
}

.card-body {
    background-color: var(--ivory-card);
    /* Ivory paper texture */
    padding: 30px;
    line-height: 1.6;
    font-family: 'Playfair Display', serif;
    color: var(--black-text);
    /* Ensure text is visible */
    position: relative;
    z-index: 3;
    /* Card body should be above its background pseudo-element */
}

.card-body::before {
    /* Use pseudo-element for background image to control its opacity */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/800x1200/FFFACD/8B4513?text=Pastel+Yellow+Flowers');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    /* Even more subtle background image */
    z-index: -1;
    /* Behind the actual content */
}

/* Floral elements */
.top-floral,
.bottom-floral {
    position: absolute;
    width: 100%;
    height: 50px;
    /* Adjust height as needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: repeat-x;
    z-index: 1;
    /* Lower z-index to be behind text */
}

/* Pearls for floral elements (pseudo-elements) */
.top-floral::before,
.bottom-floral::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--pearl);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    /* Pearl glow */
    z-index: 4;
    /* Ensure pearls are on top of floral pattern but below text */
}

/* Butterflies */
.ribbon-butterfly,
.bottom-butterfly {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 6;
    /* Ensure butterflies are on top of text */
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.card-body {
    background-color: var(--ivory-card);
    /* Ivory paper texture */
    padding: 30px;
    line-height: 1.6;
    font-family: 'Playfair Display', serif;
    color: var(--black-text);
    /* Ensure text is visible */
    position: relative;
    z-index: 2;
}

.card-body::before {
    /* Use pseudo-element for background image to control its opacity */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/800x1200/FFFACD/8B4513?text=Pastel+Yellow+Flowers');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    /* Even more subtle background image */
    z-index: -1;
    /* Behind the actual content */
}

/* Floral elements */
.top-floral,
.bottom-floral {
    position: absolute;
    width: 100%;
    height: 50px;
    /* Adjust height as needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: repeat-x;
    z-index: 1;
    /* Lower z-index to be behind text */
}

.card-body::before {
    /* Use pseudo-element for background image to control its opacity */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://via.placeholder.com/800x1200/FFFACD/8B4513?text=Pastel+Yellow+Flowers');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    /* Very subtle background image */
    z-index: -1;
    /* Behind the actual content */
}

.card-body>* {
    position: relative;
    z-index: 3;
    /* Ensure text is above background image */
}

/* Floral elements */
.top-floral,
.bottom-floral {
    position: absolute;
    width: 100%;
    height: 50px;
    /* Adjust height as needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E");
    /* White floral pattern */
    background-size: contain;
    background-repeat: repeat-x;
    z-index: 1;
    /* Lower z-index to be behind text */
}

.top-floral {
    top: 0;
    left: 0;
    transform: translateY(-100%);
    /* Initially hidden for mask-slide-down effect */
}

.bottom-floral {
    bottom: 0;
    left: 0;
    transform: translateY(100%);
    /* Initially hidden */
}

/* Pearls for floral elements (pseudo-elements) */
.top-floral::before,
.bottom-floral::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--pearl);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    /* Pearl glow */
    z-index: 4;
    /* Ensure pearls are on top of floral pattern */
}

.top-floral::before {
    top: 10px;
    /* Adjust position */
    left: 20%;
    /* Example position */
}

.bottom-floral::after {
    bottom: 10px;
    /* Adjust position */
    right: 20%;
    /* Example position */
}

/* Butterflies */
.ribbon-butterfly,
.bottom-butterfly {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    /* Ensure butterflies are on top */
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.card-body>* {
    position: relative;
    z-index: 3;
    /* Ensure text is above background image */
}

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* opacity and transform will be controlled by GSAP */
}

.gold-frame {
    border: 6px solid var(--gold-foil);
    filter: brightness(1.1);
    padding: 20px;
    position: relative;
    z-index: 1;
    --sparkle-opacity: 0;
    /* Custom property for sparkle control */
}

.gold-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: var(--sparkle-opacity);
    /* Controlled by custom property */
    animation: sparkle 1.5s infinite ease-out;
    /* Sparkle animation */
    mix-blend-mode: overlay;
}

.invite-box {
    background-color: var(--blush);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    /* Initially hidden */
    transform: rotateY(10deg);
    /* Initial rotation for animation */
}

.gold-frame {
    border: 6px solid var(--gold-foil);
    filter: brightness(1.1);
    padding: 20px;
    position: relative;
    z-index: 1;
}

.gold-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    /* Hidden by default */
    animation: sparkle 1.5s infinite ease-out;
    /* Sparkle animation */
    mix-blend-mode: overlay;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }

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

.card-body {
    background-color: var(--ivory-card);
    padding: 30px;
    line-height: 1.6;
    font-family: 'Playfair Display', serif;
    color: var(--black-text);
    /* Ensure text is visible */
    position: relative;
    z-index: 2;
}

.invitation-title {
    font-family: 'Great Vibes', cursive;
    font-size: 4em;
    color: var(--color-red);
    margin-bottom: 15px;
}

.invitation-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    color: var(--color-dark-text);
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3em;
    color: var(--color-gold);
    margin-top: 60px;
    margin-bottom: 20px;
}

.message-text,
.names-list,
.info-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Dress Code Image Styles */
.dress-code-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.dress-code-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.dress-code-image:hover {
    transform: scale(1.1);
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
}

.dress-code-text {
    text-align: center;
}

/* Welcome Message Enhanced Styles */
.welcome-block {
    margin: 40px 0;
    padding: 0;
}

.welcome-frame {
    position: relative;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 248, 220, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    border: 3px solid var(--color-gold);
    border-radius: 20px;
    padding: 35px 30px;
    margin: 20px 0;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(212, 175, 55, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.welcome-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--color-gold),
            var(--color-red),
            var(--color-gold),
            var(--color-red));
    background-size: 300% 300%;
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    opacity: 0.7;
}

.welcome-frame:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.2),
        0 6px 20px rgba(212, 175, 55, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(212, 175, 55, 0.2);
}

.welcome-frame:hover::before {
    animation-duration: 2s;
    opacity: 1;
}

.welcome-message-text {
    font-family: 'Great Vibes', cursive;
    font-size: 1.8em;
    line-height: 1.6;
    color: var(--color-dark-text);
    text-align: center;
    margin: 0;
    padding: 15px 0;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.welcome-ornament {
    text-align: center;
    font-size: 2em;
    color: var(--color-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: sparkle 3s ease-in-out infinite;
    position: relative;
}

.top-ornament {
    margin-bottom: 15px;
    animation-delay: 0s;
}

.bottom-ornament {
    margin-top: 15px;
    animation-delay: 1.5s;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }

    25% {
        transform: scale(1.1) rotate(90deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.9;
    }

    75% {
        transform: scale(1.1) rotate(270deg);
        opacity: 1;
    }
}

/* Mobile Welcome Message */
@media (max-width: 768px) {
    .welcome-frame {
        padding: 25px 20px;
        margin: 15px 0;
    }

    .welcome-message-text {
        font-size: 1.5em;
        line-height: 1.5;
    }

    .welcome-ornament {
        font-size: 1.5em;
    }
}

/* Acknowledgement Message Enhanced Styles */
.acknowledgement-block {
    margin: 40px 0;
    padding: 0;
}

.acknowledgement-frame {
    position: relative;
    background: linear-gradient(135deg,
            rgba(139, 0, 0, 0.05) 0%,
            rgba(255, 255, 255, 0.95) 30%,
            rgba(255, 255, 255, 0.95) 70%,
            rgba(139, 0, 0, 0.05) 100%);
    border: 3px solid var(--color-red);
    border-radius: 20px;
    padding: 35px 30px;
    margin: 20px 0;
    box-shadow:
        0 8px 25px rgba(139, 0, 0, 0.15),
        0 4px 12px rgba(139, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(139, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.acknowledgement-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--color-red),
            var(--color-gold),
            var(--color-red),
            var(--color-gold));
    background-size: 300% 300%;
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    opacity: 0.6;
}

.acknowledgement-frame:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 12px 35px rgba(139, 0, 0, 0.2),
        0 6px 20px rgba(139, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(139, 0, 0, 0.2);
}

.acknowledgement-frame:hover::before {
    animation-duration: 2s;
    opacity: 0.9;
}

.acknowledgement-message-text {
    font-family: 'Great Vibes', cursive;
    font-size: 1.7em;
    line-height: 1.6;
    color: var(--color-dark-text);
    text-align: center;
    margin: 0;
    padding: 15px 0;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.acknowledgement-ornament {
    text-align: center;
    font-size: 1.8em;
    color: var(--color-red);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: heartbeat 2.5s ease-in-out infinite;
    position: relative;
}

.acknowledgement-block .top-ornament {
    margin-bottom: 15px;
    animation-delay: 0s;
}

.acknowledgement-block .bottom-ornament {
    margin-top: 15px;
    animation-delay: 1.25s;
}

@keyframes heartbeat {

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

    20% {
        transform: scale(1.3);
        opacity: 1;
    }

    40% {
        transform: scale(1.1);
        opacity: 0.9;
    }

    60% {
        transform: scale(1.4);
        opacity: 1;
    }

    80% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* Mobile Acknowledgement Message */
@media (max-width: 768px) {
    .acknowledgement-frame {
        padding: 25px 20px;
        margin: 15px 0;
    }

    .acknowledgement-message-text {
        font-size: 1.4em;
        line-height: 1.5;
    }

    .acknowledgement-ornament {
        font-size: 1.4em;
    }
}

/* Elegant Section Dividers */
.elegant-divider {
    position: relative;
    height: 1px;
    margin: 50px auto;
    max-width: 300px;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(212, 175, 55, 0.3) 20%,
            rgba(212, 175, 55, 0.8) 50%,
            rgba(212, 175, 55, 0.3) 80%,
            transparent 100%);
    overflow: visible;
}

.elegant-divider::before {
    content: '❋';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ivory-card);
    color: var(--color-gold);
    font-size: 1.5em;
    padding: 0 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    animation: dividerGlow 3s ease-in-out infinite alternate;
}

.elegant-divider::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: linear-gradient(45deg,
            transparent,
            rgba(212, 175, 55, 0.2),
            rgba(212, 175, 55, 0.4),
            rgba(212, 175, 55, 0.2),
            transparent);
    border-radius: 3px;
    filter: blur(1px);
}

@keyframes dividerGlow {
    0% {
        text-shadow:
            1px 1px 2px rgba(0, 0, 0, 0.1),
            0 0 8px rgba(212, 175, 55, 0.3);
        transform: translateX(-50%) scale(1);
    }

    100% {
        text-shadow:
            1px 1px 2px rgba(0, 0, 0, 0.1),
            0 0 15px rgba(212, 175, 55, 0.6),
            0 0 25px rgba(212, 175, 55, 0.3);
        transform: translateX(-50%) scale(1.1);
    }
}

/* Mobile Dividers */
@media (max-width: 768px) {
    .elegant-divider {
        margin: 35px auto;
        max-width: 250px;
    }

    .elegant-divider::before {
        font-size: 1.3em;
        padding: 0 12px;
    }

    .elegant-divider::after {
        width: 30px;
        height: 4px;
    }
}

.content-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
    margin-bottom: 40px;
    will-change: transform, opacity;
}

.content-block.is-in-view {
    opacity: 1;
    transform: translateY(0);
}

#program-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.program-item {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.program-item strong {
    color: var(--color-red);
}

/* Floral elements */
.top-floral,
.bottom-floral {
    position: absolute;
    width: 100%;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: repeat-x;
    z-index: 3;
}

.top-floral {
    top: 0;
    left: 0;
    transform: translateY(-100%);
    /* Initially hidden for mask-slide-down effect */
}

.bottom-floral {
    bottom: 0;
    left: 0;
    transform: translateY(100%);
    /* Initially hidden */
}

/* Pearls for floral elements (pseudo-elements) */
.top-floral::before,
.bottom-floral::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--pearl);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    /* Pearl glow */
    z-index: 4;
}

.top-floral::before {
    top: 10px;
    left: 20%;
}

.bottom-floral::after {
    bottom: 10px;
    right: 20%;
}

/* Butterflies */
.ribbon-butterfly,
.bottom-butterfly {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0C25 0 0 25 0 50s25 50 50 50 50-25 50-50S75 0 50 0zm0 10c19.3 0 35 15.7 35 35S69.3 80 50 80 15 64.3 15 45 30.7 10 50 10zM30 50c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm20-10c5.5 0 10 4.5 10 10s-4.5 10-10 10-10-4.5-10-10 4.5-10 10-10z' fill='%23D4AF37' opacity='0.8'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.ribbon-butterfly {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 6s infinite ease-in-out;
}

.bottom-butterfly {
    bottom: 20px;
    right: 20px;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.bottom-butterfly:hover {
    transform: scale(1.05) rotateZ(1.5deg);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(-50%);
    }

    50% {
        transform: translateY(-10px) translateX(-50%);
    }

    100% {
        transform: translateY(0) translateX(-50%);
    }
}

/* Gift Items */
.gift-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gift-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gift-description {
    flex: 1;
    font-family: 'Playfair Display', serif;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

/* RSVP Button - Enhanced for Touch */
.jewel-button {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--color-gold) 0%, #FFD700 50%, var(--color-gold) 100%);
    color: var(--color-light-text);
    font-family: 'Playfair Display', serif;
    font-size: 1.6em;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    min-width: 200px;
    border: 3px solid var(--color-gold);
    border-radius: 50px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(212, 175, 55, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.jewel-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.jewel-button::after {
    content: '👑';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Touch/Hover Effects */
.jewel-button:hover,
.jewel-button:focus {
    background: linear-gradient(135deg, var(--color-red) 0%, #DC143C 50%, var(--color-red) 100%);
    border-color: var(--color-red);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(220, 20, 60, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.jewel-button:hover::before,
.jewel-button:focus::before {
    left: 100%;
}

.jewel-button:hover::after,
.jewel-button:focus::after {
    transform: translateY(-50%) scale(1.2) rotate(10deg);
}

/* Active/Touch State */
.jewel-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(212, 175, 55, 0.3),
        inset 0 2px 0 rgba(0, 0, 0, 0.1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
}

/* Pulse animation for attention */
@keyframes buttonPulse {
    0% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    70% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 10px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 4px 12px rgba(212, 175, 55, 0.4),
            0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.jewel-button {
    animation: buttonPulse 2s infinite;
}

/* Accessibility (AA) and Responsiveness */
@media (max-width: 768px) {
    #scene2 {
        padding: 60px 15px;
    }
    .invitation-title {
        font-size: 3em;
    }

    .invitation-subtitle {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 2.5em;
    }

    .message-text,
    .names-list,
    .info-text {
        font-size: 1.1em;
    }

    .invite-box {
        padding: 30px;
    }

    .jewel-button {
        font-size: 1.4em;
        padding: 18px 35px;
        min-width: 250px;
    }

    .gift-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .gift-description {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #scene2 {
        padding: 40px 10px;
    }
    .invite-box {
        padding: 20px;
    }
    .invitation-title {
        font-size: 2.5em;
    }

    .invitation-subtitle {
        font-size: 1.2em;
    }

    .section-title {
        font-size: 2em;
    }

    .message-text,
    .names-list,
    .info-text {
        font-size: 1em;
    }

    .jewel-button {
        font-size: 1.2em;
        padding: 16px 30px;
        min-width: 200px;
    }
}
