/* 
   MOBILE-FIRST ROYAL THEME 
   Base styles are optimized for 320px - 480px, then scaled up.
*/
:root {
    --primary: #5A0F1C; 
    --accent: #D4AF37; 
    --bg-color: #FDF4E3; 
    --text-dark: #2C1810;
    --text-light: #FDF4E3;
    --font-heading: 'Cinzel', serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
    --nav-height: 60px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}
body.locked { overflow: hidden; }
.hidden { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.5s ease; }

/* --- LOADER --- */
.loader-container { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--primary); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.8s ease; }
.mandala-spinner { width: 60px; height: 60px; border: 3px solid rgba(212, 175, 55, 0.3); border-top: 3px solid var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite; margin-bottom: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--accent); font-family: var(--font-heading); font-size: 1rem; letter-spacing: 1px; text-align: center; padding: 0 10px; }

/* --- ENVELOPE OPENING --- */
.envelope-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--text-dark); z-index: 9000; display: flex; justify-content: center; align-items: center; transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s; padding: 20px; }
.envelope-screen.opened { transform: scale(1.2) translateY(-30px); opacity: 0; pointer-events: none; }
.envelope-wrapper { text-align: center; position: relative; width: 100%; max-width: 320px; }
.envelope { width: 100%; height: 180px; background: var(--primary); position: relative; margin: 0 auto 20px; border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; }
.envelope-flap { position: absolute; top: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to bottom right, var(--primary) 49%, transparent 50%), linear-gradient(to bottom left, var(--primary) 49%, transparent 50%); border-bottom: 2px solid var(--accent); transform-origin: top; transition: transform 1s ease; z-index: 3; }
.envelope.open .envelope-flap { transform: rotateX(180deg); }
.envelope-letter { color: var(--accent); font-family: var(--font-heading); z-index: 1; }
.letter-title { font-size: 2.5rem; font-family: var(--font-script); margin-bottom: 5px; }

/* --- BUTTONS --- */
.gold-btn {
    background: linear-gradient(45deg, #B8860B, #FFD700, #B8860B);
    color: var(--primary); padding: 12px 24px; border: none; font-weight: 600;
    font-family: var(--font-body); border-radius: 30px; cursor: pointer; text-transform: uppercase; 
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); min-height: 44px; /* thumb-friendly */
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gold-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6); }
.btn-pulse { animation: pulseGlow 2s infinite; }
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* --- NAVBAR --- */
.navbar { position: fixed; top: 0; width: 100%; height: var(--nav-height); padding: 0 20px; display: flex; justify-content: space-between; align-items: center; background: rgba(253, 244, 227, 0.95); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid rgba(212, 175, 55, 0.3); }
.nav-brand { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 5px;}
.nav-brand span { color: var(--accent); font-family: var(--font-script); font-size: 1.8rem; }
.mobile-menu-btn { background: none; border: none; font-size: 1.5rem; color: var(--primary); min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1001; }
.hamburger { width: 24px; height: 18px; position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.hamburger span { width: 100%; height: 2px; background-color: var(--primary); transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1); transform-origin: left center; }
.mobile-menu-btn.active .hamburger span:nth-child(1) { transform: rotate(45deg); width: 110%; }
.mobile-menu-btn.active .hamburger span:nth-child(2) { opacity: 0; width: 0; }
.mobile-menu-btn.active .hamburger span:nth-child(3) { transform: rotate(-45deg); width: 110%; }

.nav-links { position: fixed; top: var(--nav-height); left: 0; width: 100%; background: var(--bg-color); flex-direction: column; text-align: center; padding: 20px 0; border-bottom: 2px solid var(--accent); display: flex; opacity: 0; transform: translateY(-10px); transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s; box-shadow: 0 10px 20px rgba(0,0,0,0.1); pointer-events: none; z-index: 999; }
.nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-links li { margin: 15px 0; opacity: 0; transform: translateY(-10px); transition: opacity 0.4s ease, transform 0.4s ease; transition-delay: 0s; }
.nav-links.active li { opacity: 1; transform: translateY(0); }
.nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
.nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
.nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
.nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 1.1rem; text-transform: uppercase; padding: 10px; display: block; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--accent); }

/* --- HERO SECTION --- */
.hero { height: 100vh; height: 100dvh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(90, 15, 28, 0.65); z-index: 2; }
.hero-content { position: relative; z-index: 3; text-align: center; color: var(--text-light); width: 100%; padding: 0 15px; margin-top: var(--nav-height); }
.pre-title { font-size: clamp(0.8rem, 3vw, 1.2rem); letter-spacing: 2px; margin-bottom: 10px; color: var(--accent); text-transform: uppercase; }
.couple-names { font-family: var(--font-script); font-size: clamp(3rem, 12vw, 7rem); margin-bottom: 10px; text-shadow: 2px 4px 10px rgba(0,0,0,0.5); line-height: 1.1; }
.couple-names span { color: var(--accent); font-family: var(--font-heading); font-size: clamp(1.5rem, 6vw, 4rem); margin: 0 10px; display: inline-block; }
.tagline { font-size: clamp(0.9rem, 4vw, 1.4rem); font-weight: 300; margin-bottom: 20px; line-height: 1.4; padding: 0 10px; }

/* Countdown */
.countdown-container { margin-top: 20px; }
.countdown { display: flex; justify-content: center; gap: 10px; padding: 15px 10px; background: rgba(0,0,0,0.4); border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 12px; backdrop-filter: blur(5px); flex-wrap: wrap; }
.time-box { text-align: center; min-width: 60px; flex: 1; }
.time-box span { display: block; font-size: clamp(1.5rem, 6vw, 2.5rem); font-family: var(--font-heading); color: var(--accent); font-weight: 700; }
.time-box p { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }

.scroll-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; text-align: center; color: var(--text-light); text-decoration: none; animation: upDown 2s infinite; display: block; padding: 10px; }
.mouse { width: 20px; height: 35px; border: 2px solid var(--accent); border-radius: 15px; margin: 0 auto 5px; position: relative; }
.mouse::before { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 2px; height: 6px; background: var(--accent); border-radius: 2px; animation: scrollDown 2s infinite; }
.scroll-indicator p { font-size: 0.7rem; text-transform: uppercase; }

@keyframes upDown { 0%,100% {transform: translateX(-50%) translateY(0);} 50% {transform: translateX(-50%) translateY(10px);} }
@keyframes scrollDown { 0% {top: 5px; opacity: 1;} 100% {top: 15px; opacity: 0;} }

/* --- COMMON CONTAINERS --- */
.container.mobile-container { padding: 50px 15px; width: 100%; max-width: 1200px; margin: 0 auto; overflow: hidden; }
.section-title { font-family: var(--font-heading); font-size: clamp(2rem, 8vw, 3.5rem); color: var(--primary); text-align: center; margin-bottom: 30px; position: relative; }
.section-title::after { content: '✤'; display: block; color: var(--accent); font-size: clamp(1rem, 4vw, 1.5rem); margin-top: 10px; }
.royal-border { border: 2px solid var(--accent); padding: 30px 15px; text-align: center; background: url('https://placehold.co/800x600/fdfbf7/fdfbf7?text=Subtle+Mandala') center/cover; box-shadow: 0 10px 20px rgba(90, 15, 28, 0.08); border-radius: 8px; }
.luxury-border-glow { border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 15px rgba(212, 175, 55, 0.2); border-radius: 10px; padding: 5px; background: var(--bg-color); }
.text-gold { color: var(--accent) !important; }
.mt-section { margin-top: 20px; }

/* --- STORY VIDEO SECTION --- */
.story-video-section { background: var(--bg-color); }
.video-wrapper { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px; position: relative; background: #000; }
.landscape-video { width: 100%; height: 100%; object-fit: cover; }

/* --- INVITE SECTION --- */
.invite-section { background: var(--bg-color); padding-top: 0; }
.ganesha-icon { width: 60px; margin-bottom: 15px; }
.message-text { font-size: 1rem; line-height: 1.6; color: var(--text-dark); }
.ornament-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); width: 80%; margin: 20px auto 0; }

/* --- LUXURY TIMELINE --- */
.events-section { background-color: var(--primary); color: var(--text-light); }
.luxury-timeline { position: relative; padding: 20px 0; }
.luxury-timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 20px; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.timeline-block { display: flex; flex-direction: column; position: relative; margin-bottom: 40px; }
.timeline-dot { position: absolute; left: 20px; transform: translateX(-50%); width: 16px; height: 16px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); z-index: 2; border: 3px solid var(--primary); top: 5px; }
.timeline-content { padding-left: 50px; width: 100%; }
.timeline-date { display: block; font-family: var(--font-heading); color: var(--accent); font-weight: bold; font-size: 1rem; margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }
.timeline-card { background: rgba(253, 244, 227, 0.05); border: 1px solid rgba(212, 175, 55, 0.3); padding: 20px; border-radius: 8px; backdrop-filter: blur(5px); }
.timeline-card h3 { color: var(--bg-color); font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 10px; }
.timeline-card p { font-size: 0.9rem; color: #eee; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.timeline-card i { color: var(--accent); width: 16px; text-align: center; }

/* --- GALLERY (MASONRY) --- */
.gallery-section { background: var(--bg-color); }
.masonry-gallery { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
}
.gallery-img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; border: 1px solid rgba(212, 175, 55, 0.2); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* --- LIGHTBOX --- */
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(20, 10, 5, 0.98); backdrop-filter: blur(5px); overflow: auto; padding-top: var(--nav-height); }
.lightbox-content { margin: auto; display: block; max-width: 95%; max-height: 85vh; object-fit: contain; border: 2px solid var(--accent); border-radius: 4px; animation: zoom 0.3s; }
.close-lightbox { position: absolute; top: 15px; right: 20px; color: var(--accent); font-size: 40px; font-weight: bold; padding: 10px; cursor: pointer; line-height: 1; z-index: 10000; }
@keyframes zoom { from {transform:scale(0.8); opacity:0;} to {transform:scale(1); opacity:1;} }

/* --- LOCATION --- */
.location-section { background: var(--bg-color); }
.map-wrapper { height: 300px; padding: 0; border: none; }
.map-action-container { text-align: center; margin-top: 24px; }
.map-action-container .btn-responsive { display: inline-flex; width: 80%; max-width: 300px; justify-content: center; }

/* --- RSVP --- */
.rsvp-section { background: var(--bg-color); position: relative; color: var(--text-dark); padding-top: 0; }
.rsvp-card { padding: 10px 15px; text-align: center; position: relative; z-index: 2; border: none; box-shadow: none; background: transparent; }

.family-regards { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin-top: 5px; }
.regards-title { font-size: clamp(2.2rem, 7vw, 3rem); margin-bottom: 0; }
.regards-names { font-size: clamp(1rem, 3.5vw, 1.4rem); font-family: var(--font-heading); color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px;}
.regards-firm { font-size: clamp(0.85rem, 3vw, 1rem); color: var(--text-dark); opacity: 0.8; letter-spacing: 1px; margin-bottom: 5px; }
.regards-img { width: 100%; max-width: 600px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid rgba(212, 175, 55, 0.4); margin-top: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* --- FLOATING CONTROLS REMOVED --- */

/* --- FOOTER --- */
.footer { background: var(--primary); color: var(--text-light); text-align: center; padding: 40px 15px 20px; }
.couple-footer-names { font-family: var(--font-script); font-size: clamp(2.5rem, 8vw, 4rem); color: var(--accent); margin: 15px 0; }
.footer-bottom { margin-top: 30px; padding-top: 15px; border-top: 1px solid rgba(212, 175, 55, 0.2); font-size: 0.75rem; color: rgba(253, 244, 227, 0.6); }

/* --- SMOOTH REVEAL ANIMATIONS (Optimized for Mobile) --- */
/* On mobile, prefer fade and slight slide-up over complex transforms */
.reveal, .reveal-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.active, .reveal-up.active { opacity: 1; transform: translateY(0); }

/* --- FLOWER SHOWER CONTAINER --- */
#flower-shower-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 500; overflow: hidden; }
.flower-particle { position: absolute; top: -50px; background-size: contain; background-repeat: no-repeat; opacity: 0.8; will-change: transform, top, opacity; }

/* --- DESKTOP SCALING (min-width: 768px) --- */
@media (min-width: 768px) {
    .container.mobile-container { padding: 80px 20px; }
    .section-title { margin-bottom: 50px; }
    .nav-links { position: static; display: flex !important; transform: none !important; opacity: 1 !important; pointer-events: auto; flex-direction: row; background: transparent; border: none; box-shadow: none; padding: 0; width: auto; }
    .nav-links li { opacity: 1 !important; transform: none !important; transition-delay: 0s !important; margin: 0 10px; }
    .mobile-menu-btn { display: none; }
    .nav-links a { padding: 5px 10px; }
    
    .countdown { padding: 20px; gap: 20px; border-radius: 15px; }
    .time-box { min-width: 80px; }
    
    .masonry-gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .gallery-img { transition: transform 0.3s ease; }
    .gallery-img:hover { transform: scale(1.02); }
    
    .luxury-timeline::before { left: 50%; }
    .timeline-block { flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 60px; }
    .timeline-block:nth-child(even) { flex-direction: row-reverse; }
    .timeline-dot { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; }
    .timeline-content { width: 45%; padding: 0; }
    .timeline-block:nth-child(odd) .timeline-content { text-align: right; padding-right: 40px; }
    .timeline-block:nth-child(even) .timeline-content { text-align: left; padding-left: 40px; }
    .timeline-card { padding: 30px; transition: transform 0.3s; }
    .timeline-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
    .timeline-card p { justify-content: flex-start; }
    .timeline-block:nth-child(odd) .timeline-card p { justify-content: flex-end; }
    
    .map-wrapper { height: 450px; border: 4px solid var(--accent); }
    
    /* RSVP scaled styling */
    .rsvp-card { padding: 30px; background: rgba(253, 244, 227,0.95); border: 2px solid var(--accent); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); margin-top: 10px; }
}

@media (min-width: 1024px) {
    .container.mobile-container { padding: 100px 20px; }
}
