:root {
    --maroon: #4A0A11; 
    --maroon-dark: #2a0508;
    --gold: #D4AF37;
    --gold-light: #F3E5AB;
    --emerald-dark: #072615; /* Deep rich traditional green */
}

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

html, body { 
    width: 100%;
    max-width: 100%;
    overflow-x: clip; 
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--maroon); 
    color: var(--gold-light); 
}

/* FIXED LAYER FOR LOGO */
.fixed-logo-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none; 
    z-index: 100;
    mix-blend-mode: screen; 
}

/* The Pandiri Arch */
.pandiri-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50vh; 
    background-image: url('assets/mandapam_frame.jpg');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    mix-blend-mode: screen; 
    transform-origin: center 30%; 
    z-index: 7;
}

/* The Revealed Names */
.names-container {
    position: absolute;
    top: 65%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0; 
    width: 100%;
    text-align: center;
    z-index: 5; 
}
.names { 
    font-family: 'Cormorant Garamond', serif; 
    font-size: 5.5rem; 
    color: var(--gold-light); 
    line-height: 1; 
    margin: 0; 
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
}
.weds { 
    font-family: 'Great Vibes', cursive; 
    font-size: 3rem; 
    color: var(--gold); 
    display: block; 
    margin: 10px 0; 
}


/* HERO SECTION (Scrollable) */
.hero-section {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #6b0f1a 0%, #30060b 100%);
}

.top-text {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    color: var(--gold);
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 10;
}
.top-text span {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--gold-light);
    display: inline-block;
    margin-bottom: 10px;
}

/* The Couple Icon */
.couple-icon {
    position: absolute;
    bottom: 2vh; 
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 250px;
    height: 30vh;
    background-image: url('assets/couple.jpg');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
    z-index: 6; 
}

.scroll-prompt {
    position: absolute;
    bottom: 5vh;
    left: 4vw;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    animation: bounce 2s infinite;
    z-index: 20;
    /* Optional: rotate it 90deg for a sleek modern vertical look, or leave horizontal */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* =========================================
   PURCHASE FLOATING BUTTON (WHATSAPP)
   ========================================= */
.purchase-btn {
    position: fixed;
    bottom: 4vh;
    right: 4vw;
    background: linear-gradient(135deg, #D4AF37, #FFF5CC);
    color: var(--maroon-dark);
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000; /* Always visible */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
}

.purchase-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.4);
    border-color: #D4AF37;
}

@media (max-width: 768px) {
    .purchase-btn {
        padding: 12px; /* Make it a circle on mobile */
        border-radius: 50%;
    }
    .purchase-btn span {
        display: none; /* Hide text on mobile, just show WA icon */
    }
}

/* =========================================
   INVITATION / LAGNA PATRIKA SECTION
   ========================================= */
.invitation-section {
    min-height: 100vh;
    background-color: var(--gold-light);
    color: var(--maroon);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15vh 5vw 10vh 5vw;
    position: relative;
    z-index: 15;
    border-top: 2px solid var(--maroon);
}

.auspicious-words {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--maroon);
    margin-bottom: 3rem;
    display: flex;
    gap: 15px;
    align-items: center;
}
.auspicious-words .dot { color: var(--gold); }

.invitation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.blessings-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--maroon);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Sacred breathing and continuous gold shimmer for the Om text (visible beautifully on Mobile too) */
.om-text {
    display: inline-block;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: linear-gradient(120deg, var(--maroon) 0%, #D4AF37 40%, #FFF5CC 50%, #D4AF37 60%, var(--maroon) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShine 3s linear infinite, sacredBreathing 4s ease-in-out infinite;
}

@keyframes sacredBreathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.invite-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 2;
    max-width: 700px;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--maroon-dark);
}

.couple-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.person { 
    text-align: center; 
    padding: 2rem;
    border-radius: 15px;
    transition: background 0.3s ease;
    transform-style: preserve-3d; /* For the JS 3D tilt effect */
    cursor: pointer;
}

/* Subtle background glow on hover for the whole block */
.person:hover, .person.mobile-active {
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

.full-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--maroon-dark);
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Prepare for 3D pop out */
    transform: translateZ(30px); 
}

/* ULTRA PREMIUM: Gold Foil Shimmer on Hover and Mobile Active */
.person:hover .full-name, .person.mobile-active .full-name {
    transform: translateZ(50px) scale(1.05); /* Pops out in 3D */
    background: linear-gradient(120deg, var(--maroon-dark) 0%, #D4AF37 40%, #FFF5CC 50%, #D4AF37 60%, var(--maroon-dark) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShine 2.5s linear infinite;
    text-shadow: 0px 10px 20px rgba(212, 175, 55, 0.3); /* Soft gold shadow */
}

@keyframes goldShine {
    to { background-position: 200% center; }
}

.qualifications {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #9e7d17; 
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    transform: translateZ(20px); /* 3D layer */
}

.parents {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--maroon);
    margin-bottom: 0.3rem;
}

.origin {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--maroon);
    opacity: 0.8;
}

.weds-divider {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #9e7d17;
    margin: 1.5rem 0;
}

.invite-footer {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--maroon);
    margin-top: 4rem;
    text-align: center;
}

/* =========================================
   PRE-WEDDING 3D GALLERY
   ========================================= */
.gallery-section {
    background: var(--maroon);
    padding: 8vh 0;
    overflow: hidden;
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.gallery-section .section-title {
    text-align: center;
    font-size: 3.5rem;
    position: relative;
    z-index: 10; /* Protects title from mobile Safari 3D bleed */
}

.gallery-container {
    width: 100%;
    height: 70vh; 
    position: relative;
    perspective: 1200px;
    overflow: hidden;
    margin-top: 2rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-container:active {
    cursor: grabbing;
}

.gallery-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50vh;
    max-width: 80vw;
    aspect-ratio: 1/1;
    border-radius: 50%; 
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transform-style: preserve-3d;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.1);
    pointer-events: none; 
}

.gallery-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    pointer-events: none;
}

.next-section-arrow {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    cursor: pointer;
    z-index: 20;
    animation: bounce 2s infinite;
    background: rgba(42, 4, 8, 0.6);
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.next-section-arrow:hover {
    background: var(--gold);
    color: var(--maroon-dark);
    transform: translateX(-50%) scale(1.1);
}

.next-section-arrow svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .gallery-container { 
        height: 55vh; 
    }
    .gallery-item { 
        width: 60vw; /* Considerably smaller diameter on mobile */
    }
}

/* =========================================
   EVENTS STACK
   ========================================= */
.events-section {
    min-height: 100vh;
    background-color: #280307; /* Darker background to make the arch visible! */
    color: var(--gold-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12vh 5vw 10vh; /* Extra padding for the arch */
    position: relative;
    z-index: 15;
    
    /* Removed the flat gold line */
    border-top: none; 
    
    /* Elegant architectural dome shape */
    border-top-left-radius: 50% 8vh;
    border-top-right-radius: 50% 8vh;
    box-shadow: 0 -15px 50px rgba(0,0,0,0.5); /* Shadow layers it over the gallery */
    margin-top: -2vh; /* Pulls it slightly over the gallery */
}

.events-section .section-title {
    color: var(--gold-light);
    margin-bottom: 4rem;
}

.events-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px; /* Keeps it sleek and card-like on PC */
    margin: 0 auto;
    padding-bottom: 0; /* Removed extra empty space */
}

.sticky-card {
    position: sticky;
    top: 15vh; /* The precise point where cards stick to the top */
    margin-bottom: 60vh; /* Distance between the stacked cards */
}

.sticky-card:last-child {
    margin-bottom: 15vh; /* Drastically reduced so the footer follows closely behind it */
}

.card-inner {
    background: #36070c; 
    border: 1px solid var(--gold);
    padding: 3.5rem 2rem;
    text-align: center;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 -15px 30px rgba(0,0,0,0.5); 
    transform-origin: top center; 
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    pointer-events: none;
}

.card-inner h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.event-details p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}
.event-details .date { font-weight: 600; color: var(--gold-light); }
.event-details .time { color: var(--gold-light); opacity: 0.9; }
.event-details .venue { font-style: italic; color: #fff; opacity: 0.8; margin-top: 1rem; }

/* Location Button */
.location-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 12px 30px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}
.location-btn:hover {
    background: var(--gold);
    color: var(--maroon-dark);
}

/* Desktop Adjustments */
@media (min-width: 768px) {
    .top-text { font-size: 3.5rem; top: 12%; }
    .top-text span { font-size: 1.8rem; margin-bottom: 15px; }
    .names-container { top: 73%; } 
    .names { font-size: 7rem; } 
    .weds { font-size: 4.5rem; }
    .section-title { font-size: 4.5rem; }
    .full-name { font-size: 3rem; }
    .weds-divider { font-size: 4.5rem; margin: 0 4rem; }
    .couple-details { flex-direction: column; gap: 3rem; }
    /* Note: Events stack as a column on desktop as well to preserve the premium sticky scroll effect */
}

/* Footer Section (Sweeps over the stack) */
.site-footer {
    background-color: var(--gold-light);
    color: var(--maroon);
    text-align: center;
    padding: 20vh 5vw;
    position: relative;
    z-index: 20; /* Critical: High z-index makes this footer slide OVER the stuck cards */
    border-top: 4px solid var(--maroon);
}
.site-footer h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}
.site-footer p {
    font-family: "Great Vibes", cursive;
    font-size: 3rem;
    color: #9e7d17;
}

