/* ========================================= */
/* 1. ROYAL THEME VARS                       */
/* ========================================= */
:root {
    --bg-dark: #0F0F0F;
    --bg-card: #161616;
    --gold: #D4AF37;
    --gold-dim: #AA8A28;
    --text-white: #FDFBF7;
    --text-grey: #A0A0A0;
    --font-head: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    --error: #cf6679;
    --success: #03dac6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--gold); }
a { text-decoration: none; transition: 0.3s; }
.text-center { text-align: center; }

/* ========================================= */
/* 2. HERO SECTION                           */
/* ========================================= */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1200&q=80') center/cover fixed;
    display: flex; flex-direction: column; 
    align-items: center; justify-content: center; text-align: center;
}

.hero h1 { 
    font-size: 4.5rem; letter-spacing: 5px; margin-bottom: 10px; 
    background: linear-gradient(to right, #BF953F, #FCF6BA, #B38728);
    -webkit-background-clip: text; color: transparent;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.hero .date { font-size: 1.2rem; letter-spacing: 3px; text-transform: uppercase; color: #FFF; }

.scroll-down {
    position: absolute; bottom: 30px; 
    border: 1px solid var(--gold); border-radius: 50%; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; color: var(--gold);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } }

/* ========================================= */
/* 3. TIMELINE (SCROLL LIGHT UP)             */
/* ========================================= */
.section { padding: 80px 20px; max-width: 1000px; margin: 0 auto; text-align: center; }
.section-title { font-size: 2.5rem; margin-bottom: 60px; position: relative; display: inline-block; }
.section-title::after { 
    content: ''; display: block; width: 60px; height: 2px; 
    background: var(--gold); margin: 10px auto 0; 
}

.timeline { position: relative; padding: 20px 0; overflow: hidden; min-height: 800px;}

/* Base Grey Line */
.timeline-line-base {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; 
    background: #333; transform: translateX(-50%); z-index: 0;
}

/* Lighting Up Gold Line */
.timeline-line-fill {
    position: absolute; left: 50%; top: 0; width: 2px; 
    height: 0%; /* JS will change this */
    background: var(--gold); 
    box-shadow: 0 0 15px var(--gold);
    transform: translateX(-50%); z-index: 1;
    transition: height 0.1s linear;
}

.timeline-item {
    display: flex; justify-content: flex-end; padding-right: 50px; position: relative; margin-bottom: 80px; width: 50%;
    opacity: 0.3; transition: opacity 0.5s ease, transform 0.5s ease; filter: blur(2px);
}
/* When item is active */
.timeline-item.lit { opacity: 1; filter: blur(0); }

.timeline-item:nth-child(even) { 
    align-self: flex-end; justify-content: flex-start; padding-right: 0; padding-left: 50px; margin-left: 50%; 
}

/* The Dot */
.dot {
    position: absolute; right: -9px; top: 0; width: 18px; height: 18px;
    background: var(--bg-dark); border: 2px solid #555; border-radius: 50%; 
    z-index: 5; transition: 0.3s;
}
.timeline-item:nth-child(even) .dot { right: auto; left: -9px; }

/* Dot Lights Up */
.timeline-item.lit .dot {
    border-color: var(--gold); background: var(--gold);
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold);
}

.story-content {
    background: var(--bg-card); padding: 25px; border: 1px solid #333;
    border-radius: 8px; text-align: left; width: 100%; position: relative; z-index: 2;
    transition: 0.3s;
}
.timeline-item.lit .story-content { border-color: var(--gold); box-shadow: 0 0 20px rgba(212, 175, 55, 0.1); }

.story-year { color: var(--gold); font-weight: bold; font-size: 0.9rem; letter-spacing: 1px; }
.story-content h3 { font-size: 1.4rem; margin: 5px 0 10px; color: #FFF; }
.story-content p { font-size: 0.95rem; color: var(--text-grey); line-height: 1.6; }

/* Rotating Ornaments */
.rotating-ornament {
    position: absolute; top: -30px; width: 140px; opacity: 0.05;
    animation: rotateSlow 20s linear infinite; pointer-events: none;
    transition: 0.5s;
}
.timeline-item.lit .rotating-ornament { opacity: 0.15; } /* Brighter when active */
.timeline-item .rotating-ornament { right: -180px; } 
.timeline-item:nth-child(even) .rotating-ornament { left: -180px; right: auto; }
@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========================================= */
/* 4. FLOATING EVENT CARDS                   */
/* ========================================= */
.event-card {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 30px; margin-bottom: 25px;
    display: flex; align-items: center; gap: 20px; text-align: left;
    transition: 0.3s;
    animation: floatCard 6s ease-in-out infinite;
}
.event-card:nth-child(1) { animation-delay: 0s; }
.event-card:nth-child(2) { animation-delay: 2s; }
.event-card:nth-child(3) { animation-delay: 4s; }
.event-card:hover { border-color: var(--gold); transform: scale(1.02); animation-play-state: paused; }

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

.event-icon img { width: 70px; filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(5deg); } 
.event-info h3 { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-white); }
.event-meta { color: var(--text-grey); font-size: 0.9rem; margin-bottom: 10px; }
.btn-small { 
    font-size: 0.8rem; color: var(--gold); border: 1px solid var(--gold); 
    padding: 6px 18px; border-radius: 20px; display: inline-block; margin-top: 5px;
}
.btn-small:hover { background: var(--gold); color: #000; }

/* ========================================= */
/* 5. GALLERY LOCK SECTION                   */
/* ========================================= */
.gallery-teaser {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1511285560982-1351cdeb9821?auto=format&fit=crop&w=800&q=80') center/cover;
    padding: 80px 20px; text-align: center; border-top: 1px solid var(--gold-dim);
}
.btn-gold {
    background: var(--gold); color: #000; padding: 15px 40px; 
    font-weight: bold; border-radius: 50px; display: inline-block; margin-top: 20px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); border: 2px solid var(--gold); cursor: pointer;
}
.btn-gold:hover { background: #000; color: var(--gold); box-shadow: 0 0 25px rgba(212, 175, 55, 0.4); transform: translateY(-3px); }

/* ========================================= */
/* 6. DARK RSVP FORM STYLES                  */
/* ========================================= */
.rsvp-container { max-width: 600px; margin: 0 auto; padding: 40px 20px; }
.form-card, #summaryCard { 
    background: var(--bg-card); padding: 40px; border-radius: 12px; 
    border: 1px solid #333; box-shadow: 0 10px 40px rgba(0,0,0,0.5); 
}
.form-title-rsvp { font-size: 2.5rem; margin-bottom: 10px; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; color: var(--text-grey); margin-bottom: 8px; font-size: 0.9rem; }

/* Dark Inputs */
.input-styled {
    width: 100%; padding: 14px 16px; background: #000; 
    border: 1px solid #333; border-radius: 8px;
    font-size: 1rem; color: var(--gold); transition: border 0.3s;
}
.input-styled:focus { outline: none; border-color: var(--gold); }
.phone-wrapper { display: flex; }
.code-select { width: 100px; border-radius: 8px 0 0 8px; border-right: none; }
.phone-input { border-radius: 0 8px 8px 0; }

/* Event Selection Cards (Dark Mode) */
.checkbox-group { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.event-option-card {
    display: flex; align-items: center; justify-content: space-between;
    background: #0A0A0A; padding: 15px; border-radius: 8px; 
    border: 1px solid #333; cursor: pointer; min-height: 80px; transition: 0.3s;
}
.event-option-card:hover { border-color: var(--gold); }
.event-option-card:has(input:checked) { border-color: var(--gold); background: rgba(212, 175, 55, 0.05); }

.card-icon-container { width: 50px; margin-right: 15px; }
.event-svg-small { width: 100%; filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(5deg); }
.card-content { flex: 1; text-align: left; }
.evt-title { display: block; font-weight: bold; color: #FFF; font-size: 1rem; }
.evt-date { font-size: 0.8rem; color: #777; }
.evt-loc { font-size: 0.7rem; color: var(--gold); text-transform: uppercase; }

.check-icon { 
    width: 25px; height: 25px; border: 2px solid #555; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: transparent; 
}
.event-option-card input:checked ~ .check-container .check-icon { 
    background: var(--gold); border-color: var(--gold); color: #000; 
}

/* Date Time Row */
.date-time-row { display: flex; gap: 15px; }

/* Summary & Modals */
.summary-icon { width: 70px; height: 70px; background: #222; color: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; }
.event-pill { background: #222; color: var(--gold); padding: 5px 15px; border-radius: 20px; border: 1px solid #444; font-size: 0.8rem; }
.highlight-text { color: var(--gold); font-weight: bold; }

.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); z-index: 2000; display: none; align-items: center; justify-content: center;
}
.popup-content { background: #111; padding: 40px; border: 1px solid var(--gold); border-radius: 12px; text-align: center; max-width: 400px; width: 90%; }
.popup-icon { width: 60px; height: 60px; background: #222; color: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.5rem; }

/* ========================================= */
/* 7. FOOTER                                 */
/* ========================================= */
.royal-footer {
    background: #050505; padding: 40px 20px; 
    border-top: 2px solid var(--gold-dim); text-align: center;
}
.footer-logo { font-family: var(--font-head); font-size: 1.5rem; color: var(--gold); margin-bottom: 10px; }
.copyright { color: #555; font-size: 0.8rem; margin-top: 10px; }

/* Mobile */
@media (max-width: 600px) {
    .timeline::before, .timeline-line-base, .timeline-line-fill { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; text-align: left; justify-content: flex-start; }
    .timeline-item:nth-child(even) { margin-left: 0; }
    .dot, .timeline-item:nth-child(even) .dot { left: 11px; }
    .rotating-ornament { display: none; }
    .date-time-row { flex-direction: column; }
    .hero h1 { font-size: 3rem; }
}