:root {
    --antique-gold: #d4af37;
    --royal-maroon: #2b0a0a;     
    --royal-red-light: #4a1212;  
    --footer-bg: #2b0a0a;        
    --cream-paper: #FFF8E7;
    --bg-dark: #0f0505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --font-head: 'Great Vibes', cursive;
    --font-sub: 'Cinzel', serif;
    --font-body: 'Playfair Display', serif;
}

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

body { 
    background-color: var(--bg-dark); 
    color: #FAF9F6; 
    font-family: var(--font-body); 
    overflow-x: hidden; 
}

/* =======================================================
   --- BROWSER OVERRIDES (NATIVE APP FEEL) ---
   ======================================================= */

/* 1. Removes the blue flash/box on tap for ALL elements (Mobile) */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 2. Removes the blue focus ring on click (Desktop) */
a:focus, button:focus, .lang-switch:focus, input:focus, .event-row:focus, .modal-close-area:focus {
    outline: none !important;
}

/* 3. Prevents accidental text highlighting when double-tapping UI buttons */
button, a, .lang-switch, .modal-close-area, .event-row, .envelope-container, .shagun-box {
    -webkit-user-select: none; /* Safari/Chrome */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* 4. Prevents "Ghost Image" dragging when interacting with elements */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Stops right-click save prompt on decorative images */
}

/* Re-enable pointer events ONLY for images that need to be interacted with/scanned */
.qr-placeholder, .qr-img-real {
    pointer-events: auto; 
}
/* ======================================================= */

/* --- UTILS --- */
.gold-icon { font-size: 2rem; color: var(--antique-gold); margin-bottom: 15px; }
.tap-hint { font-size: 0.7rem; color: var(--antique-gold); margin-top: 15px; opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }

/* --- ANIMATED ELEMENTS --- */
.gold-particle {
    position: fixed; top: 0; left: 0; width: 4px; height: 4px;
    background: radial-gradient(circle, #fff, #d4af37);
    border-radius: 50%; pointer-events: none; z-index: 9999;
    box-shadow: 0 0 8px #d4af37;
}

.falling-petal {
    position: absolute; 
    width: 15px; height: 15px;
    background: linear-gradient(to bottom right, #800000, #b30000); 
    border-radius: 15px 0px 15px 0px; 
    opacity: 0.8; 
    pointer-events: none; 
    z-index: 1; 
    top: 0; 
}

/* --- LANG SWITCHER --- */
.lang-switch {
    position: fixed; top: 20px; right: 20px; z-index: 999;
    border: 1px solid var(--antique-gold); border-radius: 30px;
    padding: 8px 15px; cursor: pointer; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px); font-family: var(--font-sub); font-size: 0.8rem;
    transition: 0.3s;
}
.lang-switch:hover { background: var(--antique-gold); color: #000; }

/* --- LOADER --- */
.loader-overlay { position: fixed; inset: 0; background: #000; z-index: 1000; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.mandala-spinner { width: 250px; opacity: 0.8; }
.loading-text { margin-top: 20px; font-family: var(--font-sub); color: var(--antique-gold); letter-spacing: 3px; opacity: 0; }

/* --- HERO SECTION --- */
.hero-section { position: relative; height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.hero-bg { 
    position: absolute; inset: 0; 
    background-image: url('images/bg-velvet.webp'); 
    background-size: cover; background-position: center; 
    opacity: 0; z-index: 0; 
}
.hero-content { position: relative; z-index: 2; text-align: center; width: 90%; max-width: 800px; opacity: 0; }

.royal-border { border: 1px solid rgba(212, 175, 55, 0.5); padding: 60px 20px; position: relative; backdrop-filter: blur(2px); }
.royal-border::before, .royal-border::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid var(--antique-gold); }
.royal-border::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.royal-border::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.auspicious-symbol { font-size: 1.2rem; color: var(--antique-gold); margin-bottom: 20px; }
.couple-names { font-family: var(--font-head); font-size: 14vw; line-height: 1.4; padding: 10px 0; background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 10px 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8)); }
@media(min-width: 768px) { .couple-names { font-size: 7rem; } }
.amp { font-size: 0.5em; color: var(--antique-gold); -webkit-text-fill-color: initial; }
.date-loc { font-size: 1.2rem; line-height: 1.6; color: #eee; font-family: var(--font-sub); }
.venue { color: var(--antique-gold); display: block; margin-top: 5px; }

.scroll-indicator { position: absolute; bottom: -100px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--antique-gold); animation: glowText 2s infinite alternate; }
.scroll-indicator .line { width: 1px; height: 40px; background: var(--antique-gold); }
@keyframes glowText { from { opacity: 0.5; text-shadow: 0 0 0 transparent; } to { opacity: 1; text-shadow: 0 0 10px var(--antique-gold); } }

/* --- TIMELINE SECTION --- */
.timeline-section { 
    padding: 150px 20px 100px; 
    position: relative; 
    z-index: 5; 
    overflow: hidden; 
    background: transparent; 
}
.section-title { text-align: center; font-family: var(--font-head); font-size: 4rem; color: var(--antique-gold); margin-bottom: 60px; position: relative; z-index: 2; }
.timeline-container { max-width: 800px; margin: 0 auto; position: relative; z-index: 2; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--antique-gold), transparent); transform: translateX(-50%); }

.event-row { display: flex; justify-content: flex-end; padding-bottom: 60px; position: relative; width: 50%; cursor: pointer; }
.event-row.right { align-self: flex-end; margin-left: auto; justify-content: flex-start; }
.event-row.left { margin-right: auto; }

.event-dot { 
    position: absolute; top: 20px; 
    width: 12px; height: 12px; 
    background: var(--antique-gold); 
    border-radius: 50%; 
    box-shadow: 0 0 10px var(--antique-gold); 
    z-index: 10; 
}
.left .event-dot { right: -6px; } 
.right .event-dot { left: -6px; }

.event-card { width: 90%; background: var(--card-bg); border: 1px solid rgba(212, 175, 55, 0.2); padding: 25px; border-radius: 8px; text-align: left; transition: all 0.4s ease; backdrop-filter: blur(5px); }
.left .event-card { margin-right: 30px; } .right .event-card { margin-left: 30px; }
.event-card:hover { transform: translateY(-8px); border-color: var(--antique-gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); background: rgba(255, 255, 255, 0.08); }
.event-card h3 { font-family: var(--font-sub); color: var(--antique-gold); font-size: 1.4rem; margin-bottom: 5px; }

/* --- FOOTER (MAROON) --- */
.footer-section { 
    text-align: center; 
    padding: 80px 20px 40px; 
    background-color: var(--footer-bg); 
    border-top: 1px solid var(--antique-gold); 
    position: relative; 
    z-index: 10;
}

.shagun-box { 
    max-width: 600px; 
    margin: 0 auto 60px; 
    padding: 40px;
    border: 1px solid var(--antique-gold); 
    background: rgba(0, 0, 0, 0.3); 
    border-radius: 4px;
}
.shagun-trigger-btn { padding: 15px 40px; border: 1px solid var(--antique-gold); background: transparent; color: var(--antique-gold); font-family: var(--font-sub); cursor: pointer; transition: 0.3s; font-size: 1rem; letter-spacing: 1px; }
.shagun-trigger-btn:hover { background: var(--antique-gold); color: #000; box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }

.whatsapp-btn { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #111, #222); border: 1px solid var(--antique-gold); color: var(--antique-gold); padding: 15px 40px; border-radius: 50px; text-decoration: none; font-weight: bold; font-family: var(--font-sub); font-size: 1.1rem; box-shadow: 0 5px 15px rgba(0,0,0,0.5); transition: 0.3s; }
.whatsapp-btn:hover { background: var(--antique-gold); color: #000; box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }

.hashtag { margin-top: 40px; font-family: var(--font-sub); letter-spacing: 3px; color: #aaa; }
.credit-link { text-decoration: none; color: #888; font-size: 0.7rem; margin-top: 10px; display: inline-block; transition: 0.3s; cursor: pointer; }
.credit-link:hover { color: var(--antique-gold); }

/* ========================================= */
/* PREMIUM ENVELOPE (FIXED: HIDDEN INSIDE)   */
/* ========================================= */
.shagun-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px); z-index: 3000;
    display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.5s ease;
}
.shagun-modal-overlay.active { display: flex; opacity: 1; }

.modal-close-area { position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff; cursor: pointer; z-index: 3005; opacity: 0.7; transition: 0.3s; }
.modal-close-area:hover { opacity: 1; transform: scale(1.1); color: var(--antique-gold); }

.envelope-container { perspective: 1500px; width: 340px; height: 240px; position: relative; cursor: pointer; transition: transform 0.3s; }
.envelope-container:hover { transform: scale(1.02); }

.envelope { width: 100%; height: 100%; background: var(--royal-maroon); position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.8); transform-style: preserve-3d; }

/* 1. TOP FLAP (Sits on top) */
.envelope-flap { 
    position: absolute; top: 0; left: 0; width: 100%; height: 50%; 
    background: #3e0e0e; 
    clip-path: polygon(0 0, 50% 100%, 100% 0); 
    transform-origin: top; transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 6; /* HIGHEST */
    border-top: 1px solid rgba(212, 175, 55, 0.4); 
}

/* 2. BOTTOM POCKET (Sits above card) */
.envelope-pocket { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: var(--royal-maroon); 
    clip-path: polygon(0 100%, 50% 50%, 100% 100%); 
    z-index: 5; /* HIGH */
    border-top: 1px solid rgba(212, 175, 55, 0.2); 
}

/* 3. SIDE FOLDS (FIXED: NOW COVERS THE CENTER) */
.envelope-sides { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: #220808; /* Darker shadow */
    /* Triangle that meets exactly in the middle */
    clip-path: polygon(0 0, 0 100%, 60% 50%); 
    z-index: 4; /* Above card, Below pocket */
}
.envelope-sides.right { transform: scaleX(-1); }

/* 4. THE WHITE CARD (HIDDEN BEHIND FOLDS) */
.envelope-card { 
    position: absolute; width: 90%; height: 95%; 
    background: var(--cream-paper); 
    left: 5%; bottom: 0; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    text-align: center; 
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 2; /* LOWEST (Hidden) */
    padding: 20px; border: 2px solid var(--antique-gold); 
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1); 
}
.envelope-card h3 { color: var(--royal-maroon); font-family: var(--font-sub); font-size: 1.1rem; margin-bottom: 5px; }
.envelope-card p { color: #555; font-size: 0.75rem; }
.tap-hint-card { font-size: 0.6rem; color: #888; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; }

.qr-img-real { width: 120px; height: 120px; object-fit: contain; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }

/* Wax Seal */
.wax-seal { position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; background: radial-gradient(circle, #ffd700, #d4af37); border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.4); z-index: 10; display: flex; justify-content: center; align-items: center; color: #5a3e0b; font-size: 1rem; border: 3px double #8B4513; transition: 0.3s; }

/* ANIMATION STATES */
.envelope-container.open .envelope-flap { transform: rotateX(180deg); z-index: 1; background: #2a0909; }
.envelope-container.open .wax-seal { opacity: 0; transform: translateX(-50%) scale(0.5); }
/* Card moves UP and Z-INDEX increases to sit on top of pocket */
.envelope-container.open .envelope-card { transform: translateY(-140px); z-index: 7; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-card { background: #1a0b0b; border: 1px solid var(--antique-gold); padding: 40px; border-radius: 12px; text-align: center; width: 90%; max-width: 400px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.cal-btn { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; display: flex; gap: 8px; align-items: center; text-decoration: none; font-size: 0.9rem;}
.cal-btn.google { background: #4285F4; color: white; }
.cal-btn.apple { background: #333; color: white; }
.close-btn { background: transparent; color: #888; border: none; cursor: pointer; text-decoration: underline; margin-top: 10px; }

.venue-link {
    color: var(--antique-gold);
    text-decoration: none;
    border-bottom: 1px dashed var(--antique-gold); /* Subtle hint it's a link */
    transition: 0.3s;
    display: inline-block;
    margin-top: 5px;
}
.venue-link:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* MOBILE ALIGNMENT FIX */
@media (max-width: 768px) {
    .timeline-line { left: 30px !important; transform: none !important; }
    .event-row { width: 100% !important; justify-content: flex-start !important; padding-left: 60px !important; margin-left: 0 !important; margin-right: 0 !important; }
    .left .event-card, .right .event-card { margin: 0 !important; }
    .event-dot { left: 24px !important; right: auto !important; top: 25px !important; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }