:root {
    /* These are placeholders. They get overwritten by JS based on CONFIG */
    --bg-color: #1a1d23; 
    --text-primary: #f2f2f2;
    --text-secondary: #b0b0b0;
    --accent: #d4af37; 
    --heart: #ff8fa3;

    /* Blob Colors */
    --blob-1: rgba(45, 55, 72, 0.5);
    --blob-2: rgba(160, 130, 50, 0.3);
    --blob-3: rgba(70, 60, 70, 0.3);
    --blob-4: rgba(212, 175, 55, 0.15);

    /* Liquid Glass Variables */
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);
    --glass-blur: 30px;
    
    --font-header: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* BASE & RESET */
* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; /* Disable blue overlay on mobile */
    outline: none;
}
button:focus, a:focus { outline: none; }

html.lenis { height: auto; } 
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
}

body.noscroll { overflow: hidden !important; }

/* LIQUID BACKGROUND */
.liquid-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 20% 20%, var(--blob-1) 0px, transparent 50%),
        radial-gradient(at 80% 80%, var(--blob-2) 0px, transparent 50%),
        radial-gradient(at 50% 50%, var(--blob-3) 0px, transparent 60%),
        radial-gradient(at 90% 10%, var(--blob-4) 0px, transparent 40%);
    filter: blur(150px); 
    opacity: 1;
}

h1, h2, h3, h4 { font-family: var(--font-header); font-weight: 400; }
p { font-weight: 300; line-height: 1.7; color: var(--text-secondary); }
.text-center { text-align: center; }

/* PRELOADER */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); 
    z-index: 20000; 
    display: flex; align-items: center; justify-content: center;
}
.loader-text { font-size: 3rem; font-family: var(--font-header); color: var(--accent); }

/* NAVIGATION */
nav {
    position: fixed; top: 0; width: 100%; padding: 15px 40px;
    display: flex; justify-content: flex-start; 
    align-items: center;
    z-index: 100;
    background: rgba(0,0,0,0.2); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-logo { 
    font-weight: 600; letter-spacing: 2px; color: var(--text-primary); 
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* MUSIC PLAYER */
.music-btn-container {
    position: fixed; bottom: 30px; left: 30px;   
    z-index: 10005; top: auto;
}
.music-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--glass-bg); backdrop-filter: blur(15px);
    border: 1px solid var(--glass-highlight);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3); color: var(--accent);
}
.music-btn:hover { transform: scale(1.1); border-color: var(--accent); box-shadow: 0 0 20px var(--accent); }
.music-icon-btn { font-size: 1.5rem; }
.music-waves-btn { display: flex; align-items: center; gap: 3px; height: 20px; display: none; }
.music-bar-btn {
    width: 3px; background: var(--accent); border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}
.music-bar-btn:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.music-bar-btn:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.music-bar-btn:nth-child(3) { height: 12px; animation-delay: 0.3s; }

.playing .music-icon, .playing .music-icon-btn { display: none; }
.playing .music-waves-mini, .playing .music-waves-btn { display: flex; }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.5); } }

/* RSVP BUTTON */
.rsvp-floating { position: fixed; bottom: 30px; right: 30px; z-index: 9998; }
.rsvp-btn {
    display: flex; align-items: center; justify-content: center;
    background: var(--glass-bg); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-highlight); padding: 10px 30px;
    border-radius: 50px; text-transform: uppercase; 
    font-size: 0.75rem; letter-spacing: 1px; text-decoration: none; 
    color: var(--text-primary); transition: 0.4s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); cursor: pointer;
    font-family: 'Montserrat', sans-serif; font-weight: 600;
}
.rsvp-btn:hover { background: var(--accent); border-color: var(--accent); color: #000; box-shadow: 0 0 20px var(--accent); }

/* FLOATING HEART */
.floating-heart {
    position: fixed; pointer-events: none; color: var(--heart);
    font-size: 1.5rem; animation: floatUp 2.5s ease-out forwards;
    z-index: 9999; text-shadow: 0 0 10px var(--heart);
}
@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(var(--r)); }
}

/* RSVP MODAL */
#rsvp-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background-color: var(--bg-color); z-index: 10000; 
    display: none; opacity: 0; transition: opacity 0.4s ease; overflow: hidden; 
}
#rsvp-overlay.active { display: block; opacity: 1; }
typebot-standard { width: 100%; height: 100%; display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.close-overlay-btn {
    position: absolute; top: 25px; right: 25px; z-index: 10001;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
    color: var(--accent); font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.close-overlay-btn:hover { background: var(--accent); color: #000; }

/* HERO */
.hero {
    height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1515934751635-c81c6bc9a2d8?q=80&w=2070&auto=format&fit=crop') no-repeat center/cover;
    filter: brightness(0.5) contrast(1.1) saturate(0.8); transform: scale(1.1);
}
.hero-text { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 {
    font-size: clamp(3rem, 8vw, 9rem); line-height: 0.9; margin-bottom: 10px;
    background: linear-gradient(to bottom right, #ffffff 30%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 25px rgba(0,0,0,0.6));
}
.hero-sub {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem); letter-spacing: 4px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 30px; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* COUNTDOWN */
.hero-countdown {
    display: flex; gap: 30px; margin-top: 30px;
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 25px 50px; border-radius: 60px; 
}
.cd-box { text-align: center; min-width: 60px; }
.cd-num { display: block; font-size: 2.5rem; font-family: var(--font-header); color: #fff; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.cd-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-top: 5px; color: var(--accent); }

/* TICKER */
.ticker-wrap {
    width: 100%; overflow: hidden; background: rgba(0,0,0,0.2); 
    backdrop-filter: blur(10px); border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border); color: var(--accent);
    padding: 20px 0; white-space: nowrap;
}
.ticker { display: flex; width: max-content; }
.ticker-item { 
    display: inline-flex; align-items: center; font-family: var(--font-header); 
    font-size: 1.5rem; margin-right: 50px; text-transform: uppercase; letter-spacing: 2px; 
}
.ticker-item i { margin-left: 50px; font-size: 0.7em; opacity: 0.6; }

/* CALENDAR & PALETTE CONTAINERS */
.calendar-section, .palette-section { 
    padding: 80px 20px 0px; display: flex; flex-direction: column;
    align-items: center; position: relative; z-index: 2; 
}
.calendar-container, .palette-container {
    display: flex; flex-direction: column; gap: 30px; align-items: center;
    width: 100%; max-width: 500px;
}

/* SHARED GLASS CARD STYLE (Calendar & Palette) */
.calendar-wrapper, .palette-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    padding: 30px; border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
    width: 100%; max-width: 350px; text-align: center;
    transition: transform 0.4s ease;
    user-select: none; -webkit-user-select: none;
}
.palette-wrapper { max-width: 800px; padding: 35px 20px; } 

.calendar-wrapper:hover, .palette-wrapper:hover { 
    transform: translateY(-5px); border-color: var(--glass-highlight); 
}

.cal-title-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 10px; font-weight: 600; }
.cal-header { 
    font-family: var(--font-header); font-size: 1.8rem; color: var(--accent); 
    margin-bottom: 20px; text-transform: uppercase; letter-spacing: 2px;
    display: flex; justify-content: center; gap: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); width: 100%; }
.cal-weekdays { margin-bottom: 10px; border-bottom: 1px solid var(--glass-border); padding-bottom: 8px; }
.cal-day-name { font-weight: 600; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; text-align: center; display: flex; justify-content: center; align-items: center; }
.cal-grid { row-gap: 5px; } 
.cal-day {
    aspect-ratio: 1; width: 100%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto; border-radius: 50%; font-family: var(--font-body); 
    color: var(--text-primary); font-size: 0.95rem; position: relative; cursor: default;
}
.cal-day.active { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent); font-weight: bold; animation: pulse-shadow 1s ease-in-out infinite; }
.cal-day.heart-active { background: transparent; color: #fff; font-weight: bold; text-shadow: 0 2px 4px rgba(0,0,0,0.8); z-index: 2; cursor: pointer; }
.cal-day.heart-active::after {
    content: '❤'; position: absolute; top: 55%; left: 50%; transform: translate(-100%, -100%);
    font-size: 2.5rem; color: var(--heart); z-index: -1; text-shadow: 0 0 15px var(--heart); animation: pulse-text 1s ease-in-out infinite;
}
.cal-day.dim { opacity: 0.2; }

/* PALETTE CONTENT */
.palette-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.palette-item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.color-circle { width: 80px; height: 80px; border-radius: 50%; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 2px solid var(--glass-border); }
.color-name { font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; color: var(--text-primary); }
.color-hex { font-size: 0.7rem; color: var(--text-secondary); opacity: 0.7; }

/* LEGEND */
.cal-legend { display: flex; gap: 30px; justify-content: center; align-items: center; margin-bottom: 30px; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.legend-item { display: flex; align-items: center; gap: 10px; }
.dot-rsvp { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: pulse-shadow 2s infinite; }
.dot-heart { color: var(--heart); font-size: 1.2rem; line-height: 0; text-shadow: 0 0 10px var(--heart); animation: pulse-text 2s infinite; }

/* GLOW ANIMATIONS */
@keyframes pulse-shadow { 0% { box-shadow: 0 0 10px var(--accent); } 50% { box-shadow: 0 0 25px var(--accent); } 100% { box-shadow: 0 0 10px var(--accent); } }
@keyframes pulse-text { 0% { text-shadow: 0 0 10px var(--heart); transform: translate(-50%, -50%) scale(1); } 50% { text-shadow: 0 0 25px var(--heart); transform: translate(-50%, -50%) scale(1.1); } 100% { text-shadow: 0 0 10px var(--heart); transform: translate(-50%, -50%) scale(1); } }
@keyframes pulse-filter { 0% { filter: drop-shadow(0 0 5px var(--accent)); } 50% { filter: drop-shadow(0 0 20px var(--accent)); } 100% { filter: drop-shadow(0 0 5px var(--accent)); } }

/* SECTIONS */
.verse-section { padding: 100px 20px; text-align: center; position: relative; z-index: 2; }
.verse-section i.ph-cross-thin { animation: pulse-filter 3s ease-in-out infinite; }
.verse-text { font-family: var(--font-header); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.5rem); max-width: 800px; margin: 0 auto 20px; line-height: 1.4; text-shadow: 0 2px 10px rgba(0,0,0,0.3); color: var(--text-primary); }
.verse-ref { font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }

.bento-section { padding: 50px 20px 100px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.bento-card {
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    padding: 40px; border-radius: 24px; display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); min-height: 300px; position: relative; overflow: hidden;
}
.bento-card:hover { transform: translateY(-7px) scale(1.01); border-color: var(--glass-highlight); background: rgba(255, 255, 255, 0.1); box-shadow: 0 15px 40px -10px rgba(0,0,0,0.4), 0 0 30px -10px rgba(0,0,0,0.1); }
.bento-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, var(--accent), transparent); opacity: 0.1; pointer-events: none; }
.card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.card-icon { font-size: 2.2rem; color: var(--accent); filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)); margin-bottom: 0;}
.card-title { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 0;}
.span-2 { grid-column: span 2; } .span-full { grid-column: 1 / -1; min-height: 500px; padding: 0; }
.map-container { width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.map-frame { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(1.1); }

.timeline-section { padding: 80px 20px; max-width: 800px; margin: 0 auto; position: relative; z-index: 2;}
.timeline-item { display: flex; gap: 30px; margin-bottom: 60px; align-items: flex-start; }
.tl-date { width: 140px; text-align: right; font-weight: bold; color: var(--accent); padding-top: 5px; font-size: 1.1rem; text-shadow: 0 2px 5px rgba(0,0,0,0.3);}
.tl-content { 
    flex: 1; background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border); padding: 30px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); position: relative;
}
.tl-content::before { content: ''; position: absolute; top: 20px; left: -31px; width: 1px; height: 120%; background: var(--glass-border); z-index: -1; }
.timeline-item:last-child .tl-content::before { display: none; }
.tl-title { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-primary); }

.registry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-width: 1000px; margin: 0 auto; }
.registry-card {
    background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border);
    padding: 30px; border-radius: 16px; text-align: center; transition: 0.3s;
    color: var(--text-primary); display: block; text-decoration: none;
}
.registry-card:hover { transform: translateY(-5px); border-color: var(--accent); background: rgba(255,255,255,0.1); }
.registry-card i { font-size: 3rem; color: var(--accent); margin-bottom: 15px; }

.media-section { max-width: 800px; margin: 80px auto; text-align: center; padding: 50px; background: rgba(0,0,0,0.4); border: 1px dashed var(--glass-border); border-radius: 24px; backdrop-filter: blur(10px); }

.faq-section { padding: 100px 20px; position: relative; z-index: 2; }
.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.faq-item { background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.faq-question { padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-header); font-size: 1.2rem; color: var(--text-primary); user-select: none; }
.faq-icon { transition: transform 0.3s ease; color: var(--accent); font-size: 1.2rem;}
.faq-item.active .faq-icon { transform: rotate(45deg); } 
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding: 0 20px; }
.faq-answer p { padding-bottom: 20px; opacity: 0.8; margin-top: 0; }
.faq-item.active { border-color: var(--accent); background: rgba(255, 255, 255, 0.1); }

/* --- OPTIMIZED INFINITE SCROLL GALLERY --- */
.gallery-wrap { 
    overflow: hidden; padding: 80px 0; width: 100%; position: relative; z-index: 2;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
    contain: content; /* Performance */
}
.gallery-track { 
    display: flex; gap: 30px; width: max-content; 
    will-change: transform; transform: translateZ(0); -webkit-transform: translateZ(0); /* Force GPU */
}
.gallery-img {
    width: 400px; height: 600px; object-fit: cover; border-radius: 16px;
    transition: 0.5s all ease-out; flex-shrink: 0; border: 1px solid transparent;
    
    /* Grayscale Enabled on Mobile + GPU Optimization */
    filter: grayscale(100%) contrast(1.1); 
    will-change: transform, filter; 
    transform: translateZ(0); -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    contain: paint; 
}
.gallery-img:hover { 
    filter: grayscale(0%) contrast(1); transform: scale(1.03) translateZ(0); 
    border-color: var(--accent); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6); 
}

footer { padding: 80px 20px; text-align: center; background: linear-gradient(to top, #111, transparent); position: relative; z-index: 2; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero h1 { font-size: 3.5rem; }
    .hero-countdown { gap: 15px; padding: 15px 25px; border-radius: 40px; width: 90%; justify-content: center; margin-top: 20px; }
    .cd-num { font-size: 1.5rem; } .cd-label { font-size: 0.6rem; }
    .bento-grid { grid-template-columns: 1fr; gap: 20px; }
    .span-2, .span-full { grid-column: 1 / -1; } .span-full { min-height: 350px; }
    .gallery-img { width: 200px; height: 300px; }
    .timeline-item { flex-direction: column; gap: 10px; }
    .tl-date { text-align: left; width: 100%; padding-top: 0; }
    .tl-content { border-left: none; padding-left: 20px; border-left: 2px solid var(--accent); } .tl-content::before { display: none;}
    .rsvp-floating { bottom: 20px; right: 20px; } .music-btn-container { left: 20px; bottom: 20px; }
}
