:root {
    --primary-color: #5C0A15; /* Rajwadi Deep Maroon */
    --secondary-color: #D4AF37; /* Royal Gold */
    --accent-color: #114232; /* Emerald Green */
    --bg-color: #Fdfbf3; /* Ancient Parchment */
    --text-dark: #3a1a11;
    --text-light: #Fdfbf3;
    --font-heading: 'Rasa', serif;
    --font-body: 'Hind Vadodara', sans-serif;
    --gold-gradient: linear-gradient(135deg, #FFDF73, #D4AF37, #996515, #FFDF73);
    --red-gradient: linear-gradient(135deg, #7A1020, #5C0A15, #3D050D);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');
    color: var(--text-dark);
    overflow-x: hidden;
    overflow-y: hidden; /* Prevent scrolling initially */
    scroll-behavior: smooth;
    font-size: 18px;
    line-height: 1.8;
}

body.curtains-open {
    overflow-y: auto;
}

/* Typography */
h1, h2, h3, .guest-name, .signature {
    font-family: var(--font-heading);
    color: var(--primary-color);
    text-align: center;
}

/* Sections Base */
.section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border-bottom: 5px solid var(--secondary-color);
}

/* Section Backgrounds - Rajwadi Touch */
.divine-entry {
    background: radial-gradient(circle, rgba(253,251,243,0.9) 0%, rgba(212,175,55,0.2) 100%), url('https://www.transparenttextures.com/patterns/cream-paper.png');
}

.fathers-voice {
    background: var(--bg-color) url('https://www.transparenttextures.com/patterns/old-wall.png');
}

.meet-couples {
    background: var(--red-gradient);
    color: var(--text-light);
    position: relative;
}
.meet-couples::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/royal-purpurea.png');
    opacity: 0.3;
    pointer-events: none;
}

.ceremonies {
    background: var(--bg-color) url('https://www.transparenttextures.com/patterns/arabesque.png');
}

.invitees {
    background: var(--red-gradient);
    color: var(--text-light);
}
.invitees h2 {
    color: var(--secondary-color) !important;
}

/* Royal Ornaments */
.ornament {
    width: 100%;
    height: 180px;
    background-image: url('leaves_toran_transparent.jpg');
    background-size: cover;
    background-position: center;
    margin: -10px 0 20px 0;
    mix-blend-mode: multiply;
}

/* Curtains Overlay */
.curtain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.curtain {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    background: #800000;
    z-index: 1000;
    transition: transform 2.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 2s ease-out;
    background-image: repeating-linear-gradient(
        to right,
        #7A1020 0%,
        #5C0A15 10%,
        #99152B 15%,
        #7A1020 20%
    );
    box-shadow: inset 0 0 80px rgba(0,0,0,0.9);
    pointer-events: auto;
}

.curtain::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 150px;
    background: url('https://www.transparenttextures.com/patterns/floral-motif.png');
    opacity: 0.6;
}

.curtain::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: url('https://www.transparenttextures.com/patterns/gold-scale.png');
    opacity: 0.8;
    border-top: 3px solid var(--secondary-color);
}

.curtain.left {
    left: 0;
    transform-origin: left;
    border-right: 8px solid var(--secondary-color);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.curtain.right {
    right: 0;
    transform-origin: right;
    border-left: 8px solid var(--secondary-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

body.curtains-open .curtain.left { transform: scaleX(0); }
body.curtains-open .curtain.right { transform: scaleX(0); }
body.curtains-open .curtain-overlay { pointer-events: none; }

/* Royal Enter Button */
.royal-enter-btn {
    position: relative;
    z-index: 2001;
    pointer-events: auto;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 25px 50px;
    font-size: 2.2rem;
    font-family: var(--font-heading);
    border-radius: 50px;
    border: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), inset 0 0 25px rgba(212,175,55,0.4);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');
    transition: all 0.5s ease;
    cursor: pointer;
    text-decoration: none;
}

.royal-enter-btn:hover {
    background: #4A0811;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 40px rgba(212,175,55,0.7);
    transform: scale(1.1);
}

.btn-border {
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 2px dashed var(--secondary-color);
    border-radius: 42px;
    pointer-events: none;
    animation: spin-border 10s linear infinite;
}

@keyframes spin-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.curtains-open .royal-enter-btn {
    opacity: 0;
    transform: scale(0.2) rotate(180deg);
    pointer-events: none;
}

/* General Buttons */
.btn {
    padding: 12px 35px;
    font-size: 1.3rem;
    font-family: var(--font-heading);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: var(--gold-gradient);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    border: 1px solid #FFF;
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.8);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Music Toggle */
.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}
.playing { animation: pulse 2s infinite; }

/* Section 1: Divine Entry */
.content-box {
    text-align: center;
    max-width: 850px;
    padding: 4rem;
    border-radius: 10px;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.5s ease 1s;
    border: 4px double var(--secondary-color);
}

body.curtains-open .content-box {
    opacity: 1;
    transform: translateY(0);
}

.glass-effect {
    background: rgba(253, 251, 243, 0.85);
    backdrop-filter: blur(5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.kalash-container {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.kalash {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.8);
    animation: float 4s ease-in-out infinite;
}

.diya {
    font-size: 2.5rem;
    position: absolute;
    bottom: 20px;
    animation: flicker 1s infinite alternate;
}
.left-diya { left: -50px; }
.right-diya { right: -50px; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); text-shadow: 0 0 10px #ff9900; }
    50% { opacity: 0.8; transform: scale(1.1); text-shadow: 0 0 25px #ff4500; }
}

.title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.blessings {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-style: italic;
    font-weight: 600;
}

.guest-name-container {
    margin-bottom: 3rem;
    padding: 2rem;
    background: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    border-top: 3px solid var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.3);
}

.guest-name {
    font-size: 2.8rem;
    margin: 1rem 0;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.4);
}

.pulse-anim { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Section 2: Father's Voice */
.section-title {
    font-size: 3rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '🌿';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent-color);
}
.section-title.light { color: var(--secondary-color); }
.section-title.light::after { color: #FFF; }

.paper-texture {
    background: #FDFBF3 url('https://www.transparenttextures.com/patterns/rice-paper.png');
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    text-align: left;
    padding: 4rem;
}

.audio-player-custom { text-align: center; margin-bottom: 3rem; }

.letter-content p {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #4a2511;
}

.letter-content .signature {
    text-align: right;
    margin-top: 4rem;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Section 3: Meet the Couples (Jharokha Style) */
.couples-intro {
    text-align: center;
    margin-bottom: 3rem;
    color: #FDFBF3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.mataji-krupa {
    font-size: 2.5rem;
    color: #ff9900;
    margin-bottom: 1rem;
    font-weight: 700;
}

.parents-proud {
    font-size: 1.5rem;
    margin-top: 1rem;
    font-weight: 600;
}

.couples-container {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    z-index: 2;
}

.couple-card {
    flex: 1;
    min-width: 320px;
    background: var(--bg-color);
    background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');
    border: 4px solid var(--secondary-color);
    /* Jharokha Arch Effect */
    border-radius: 150px 150px 10px 10px;
    padding: 3rem 2rem 2rem;
    text-align: center;
    transition: transform 0.6s, box-shadow 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
}

.couple-card::before {
    content: '';
    position: absolute;
    top: -15px; left: -15px; right: -15px; bottom: -15px;
    border: 2px solid var(--secondary-color);
    border-radius: 165px 165px 25px 25px;
    pointer-events: none;
    opacity: 0.5;
}

.couple-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.frame {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: var(--gold-gradient);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.couple-photo {
    width: 164px;
    height: 164px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    -webkit-border-radius: 50%;
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--secondary-color);
}

.photo-placeholder i {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.highlight-name {
    color: var(--primary-color);
    font-size: 2.3rem !important;
    margin-bottom: 0.5rem;
    font-weight: 800 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2), 0 0 15px rgba(212, 175, 55, 0.7);
}

.bride-parents, .groom-parents {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.4;
}

.sang-divider {
    margin: 1.5rem 0;
}

.swastik-divider {
    font-size: 3rem;
    color: var(--gold-gradient);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    align-self: center;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    margin: 0 1rem;
    font-weight: bold;
}

.sang {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin: 0 10px;
}

.couple-details p {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.couple-details .location {
    color: var(--accent-color);
    font-weight: 600;
}

/* Section 4: Ceremonies (Royal Scroll Style) */
.book-container {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-color);
    background-image: url('https://www.transparenttextures.com/patterns/old-wall.png');
    max-width: 1000px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border-radius: 5px;
    border: 3px solid var(--secondary-color);
    position: relative;
}

.book-container::before, .book-container::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    background: var(--gold-gradient);
    top: 0;
}
.book-container::before { left: -15px; border-radius: 15px; box-shadow: 5px 0 10px rgba(0,0,0,0.2); }
.book-container::after { right: -15px; border-radius: 15px; box-shadow: -5px 0 10px rgba(0,0,0,0.2); }

.page {
    flex: 1;
    min-width: 320px;
    padding: 4rem;
    position: relative;
}

.left-page {
    border-right: 2px dashed var(--secondary-color);
}

.event {
    margin-bottom: 3.5rem;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
    transition: transform 0.3s;
}

.event:hover {
    transform: scale(1.03);
    background: rgba(255,255,255,0.9);
}

.event-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.event h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.event p {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 500;
}

.choghadiyu {
    color: var(--accent-color) !important;
    font-weight: 700 !important;
    margin-top: 1rem;
    background: rgba(212, 175, 55, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
}

.map-action { margin-top: 3rem; text-align: center; }

/* Section 5: Invitees */
.royal-border {
    border: 5px solid var(--secondary-color);
    padding: 5rem;
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(212,175,55,0.2);
}

.names p {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-family: var(--font-heading);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
}

.samast {
    font-size: 1.4rem !important;
    color: #e0e0e0 !important;
    margin-top: 1.5rem;
}

.final-location {
    margin-top: 3rem;
    font-size: 1.5rem;
    color: #FFF;
}

.rsvp-container { margin-top: 4rem; }
.gold-btn { font-size: 1.6rem; padding: 15px 50px; }

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .title { font-size: 2.2rem; }
    .guest-name { font-size: 2rem; }
    .section { padding: 4rem 1rem; }
    .content-box { padding: 2rem; }
    .book-container { flex-direction: column; }
    .book-container::before, .book-container::after { display: none; }
    .left-page { border-right: none; border-bottom: 2px dashed var(--secondary-color); }
    .names p { font-size: 1.5rem; }
    .royal-enter-btn { font-size: 1.5rem; padding: 15px 30px; }
    .couple-card { border-radius: 100px 100px 10px 10px; }
}
