/* ==========================================================================
   1. RESET & VARIABLES MAJESTIC PALETTE
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Jost:wght@300;400;500;600&display=swap');

:root {
    --bg-emerald-deep: #051411;
    --bg-emerald-light: #0b221e;
    --bg-card-dark: #0f2b26;
    --gold-primary: #dfba6b;
    --gold-light: #f6e3b4;
    --gold-gradient: linear-gradient(135deg, #b8860b 0%, #e6ca83 50%, #946b06 100%);
    --text-main: #f0f4f3;
    --text-muted: #9faea7;
    --border-luxury: 1px solid rgba(223, 186, 107, 0.3);
    --shadow-deep: 0 15px 35px rgba(0,0,0,0.8), 0 5px 15px rgba(223, 186, 107, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-emerald-deep);
    color: var(--text-main);
    font-family: 'Jost', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Custom */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-emerald-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-primary); border-radius: 10px; }

/* ==========================================================================
   2. TYPOGRAPHY REFINEMENT
   ========================================================================== */
h1, h2, h3, h4, .font-serif {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-transform: uppercase;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.3));
}

.sub-title {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 15px;
    opacity: 0.9;
}

.sc-sub {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--gold-primary);
    display: block;
}

.sc-text-info { font-size: 0.9rem; color: var(--text-main); margin-top: 15px;}
.sc-text-info-sub { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin-bottom: 20px;}

/* ==========================================================================
   3. WELCOME COVER (OPTIMASI BACKGROUND IMAGE)
   ========================================================================== */
.welcome-cover {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s ease;
}

.welcome-cover.fade-out {
    transform: scale(1.1);
    opacity: 0;
    pointer-events: none;
}

.cover-content {
    max-width: 500px;
    text-align: center;
    border: var(--border-luxury);
    padding: 40px 30px;
    background: rgba(5, 20, 17, 0.85); /* Diturunkan transparansinya agar kontras teks tajam */
    backdrop-filter: blur(4px); /* Efek kaca halus modern */
    box-shadow: var(--shadow-deep);
    border-radius: 4px;
}

.main-title {
    font-size: 2.6rem;
    margin: 20px 0;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.guest-box {
    margin: 20px 0;
    border-bottom: 1px dashed var(--gold-primary);
    padding-bottom: 15px;
}

.guest-name {
    font-size: 1.6rem;
    color: var(--gold-light);
    letter-spacing: 1px;
}

/* Hero Main Screen */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

#parallax-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 120%;
    z-index: 1;
    will-change: transform;
}

.relative { position: relative; }
.z-20 { z-index: 20; }

.main-names {
    font-size: 3.5rem;
    margin: 15px 0;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wedding-date {
    letter-spacing: 6px;
    color: var(--text-main);
    font-weight: 300;
    font-size: 1.2rem;
}

/* ==========================================================================
   4. LAYOUT COMPONENT & INTERACTIVE BUTTONS
   ========================================================================== */
.section { padding: 120px 20px; text-align: center; }
.alt-bg { background-color: var(--bg-emerald-light); border-top: var(--border-luxury); border-bottom: var(--border-luxury); }
.container { max-width: 900px; margin: 0 auto; }

.btn-majestic, .btn-majestic-submit {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-light) !important;
    padding: 14px 30px;
    font-family: 'Jost', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-majestic:hover, .btn-majestic-submit:hover {
    background: var(--gold-gradient);
    color: var(--bg-emerald-deep) !important;
    box-shadow: 0 0 15px rgba(223, 186, 107, 0.4);
}

/* Countdown Box */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.countdown-item {
    border: var(--border-luxury);
    background: rgba(11, 34, 30, 0.7);
    padding: 15px;
    min-width: 85px;
    box-shadow: var(--shadow-deep);
}

.countdown-number {
    font-size: 2rem;
    font-weight: 500;
    color: var(--gold-light);
    display: block;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ==========================================================================
   5. SPECIAL ELEMENTS
   ========================================================================== */
/* Quote */
.quote-box { margin-bottom: 60px; }
.gold-icon { color: var(--gold-primary); font-size: 1.5rem; margin-bottom: 15px; }
.italic-quote { font-style: italic; max-width: 600px; margin: 0 auto; color: var(--text-main); }
.quote-author { display:block; margin-top:10px; font-size:0.8rem; color: var(--gold-primary); }

/* Mempelai Profile */
.mempelai-flex { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 40px; }
.mempelai-card { flex: 1; min-width: 250px; max-width: 320px; }

.img-frame {
    position: relative;
    width: 220px;
    height: 280px;
    margin: 0 auto 25px auto;
    border: 1px solid var(--gold-primary);
    padding: 10px;
    background: rgba(223, 186, 107, 0.05);
}

.mempelai-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; filter: grayscale(20%); }
.mempelai-card:hover .mempelai-img { filter: grayscale(0%); transform: scale(1.02); }
.and-divider { font-family: 'Cinzel', serif; font-size: 3rem; color: var(--gold-primary); }

.parents-info { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; }
.parents-names { color: var(--gold-light); font-weight: 500; font-size: 0.95rem; }

/* Timeline */
.story-timeline { border-left: 2px solid rgba(223, 186, 107, 0.2); max-width: 550px; margin: 40px auto 0 auto; padding-left: 30px; text-align: left; }
.story-node { position: relative; padding-bottom: 40px; }
.story-node::before { content: ''; position: absolute; left: -36px; top: 6px; width: 10px; height: 10px; background: var(--gold-primary); border-radius: 50%; }
.story-year { font-family: 'Cinzel', serif; color: var(--gold-primary); font-weight: bold; display: block; margin-bottom: 5px; }

/* Event Modern Box */
.event-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.event-card-modern { background: var(--bg-card-dark); border: var(--border-luxury); padding: 40px; margin: 15px; flex: 1; min-width: 300px; position: relative; box-shadow: var(--shadow-deep); transition: 0.4s; }
.event-card-modern:hover { border-color: var(--gold-primary); transform: translateY(-5px); }
.card-badge { position: absolute; top: 15px; right: 15px; font-size: 0.65rem; letter-spacing: 2px; border: 1px solid var(--gold-primary); padding: 2px 8px; color: var(--gold-light); }
.event-icon { font-size: 2rem; color: var(--gold-primary); margin-bottom: 15px; }
.event-line { width: 40px; height: 1px; background: var(--gold-primary); margin: 15px auto; }
.event-card-modern p { margin: 8px 0; font-size: 0.9rem; }
.event-card-modern i { margin-right: 5px; color: var(--gold-light); }

/* Galeri Grid Masonry */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.gallery-item { aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; border: var(--border-luxury); position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; filter: grayscale(15%); }
.gallery-item:hover img { transform: scale(1.1); filter: grayscale(0%); }
.col-span-2 { grid-column: span 2; aspect-ratio: 2 / 1; }
.gallery-overlay-icon { position: absolute; bottom: 15px; right: 15px; background: rgba(5, 20, 17, 0.7); width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; border-radius: 50%; opacity: 0; transition: 0.3s; }
.gallery-item:hover .gallery-overlay-icon { opacity: 1; }

/* Kado Digital Bank */
.bank-card { background: var(--bg-card-dark); border: var(--border-luxury); max-width: 380px; margin: 20px auto; padding: 25px; text-align: left; box-shadow: var(--shadow-deep); }
.bank-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(223, 186, 107, 0.1); padding-bottom: 10px; margin-bottom: 15px; }
.bank-name-tag { font-weight: 600; letter-spacing: 2px; color: var(--gold-light); }
.account-number { font-size: 1.3rem; letter-spacing: 2px; color: var(--text-main); font-weight: bold; margin: 5px 0;}
.account-name { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase;}
.btn-copy { background: transparent; border: 1px dashed var(--gold-primary); color: var(--gold-light); padding: 7px 10px; font-size: 0.75rem; cursor: pointer; margin-top: 15px; width: 100%; transition: 0.3s; }
.btn-copy:hover { background: rgba(223, 186, 107, 0.1); }

/* ==========================================================================
   6. BUKU TAMU / GREETINGS (SPLIT SCREEN LAYOUT)
   ========================================================================== */
.greetings-wrapper { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 40px; text-align: left; }
.form-wrapper, .feed-wrapper { flex: 1; min-width: 300px; }
.greeting-form label { display: block; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-light); margin-bottom: 5px; }
.greeting-form input, .greeting-form textarea, .greeting-form select { width: 100%; background: rgba(5, 20, 17, 0.5); border: 1px solid rgba(223, 186, 107, 0.2); color: var(--text-main) !important; padding: 15px; margin-bottom: 20px; font-family: 'Jost', sans-serif; }
.greeting-form input:focus, .greeting-form textarea:focus { outline: none; border-color: var(--gold-primary); }
.greeting-area { max-height: 450px; overflow-y: auto; padding-right: 10px; }
.greeting-item { background: var(--bg-card-dark); padding: 15px; border-bottom: 2px solid var(--bg-emerald-deep); margin-bottom: 12px; box-shadow: var(--shadow-deep); }
.greeting-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;}
.greeting-header strong { color: var(--gold-light); font-size: 0.95rem; }
.greeting-body { font-size: 0.9rem; color: var(--text-main); line-height: 1.5; }
.greeting-time { display: block; font-size: 0.7rem; color: var(--text-muted); text-align: right; margin-top: 5px;}

.status { padding: 2px 8px; border-radius: 2px; font-size: 0.7rem; font-weight: bold;}
.status-hadir { background: rgba(46, 117, 89, 0.3); color: #52b788; }
.status-absen { background: rgba(186, 45, 50, 0.3); color: #e63946; }
.status-ragu { background: rgba(201, 138, 34, 0.3); color: #ffb703; }

/* ==========================================================================
   7. CONTROLS, LIGHTBOX, & ANIMATION ENGINE
   ========================================================================== */
/* Floating Controls Base */
.music-control, .scroll-control {
    position: fixed; left: 30px; width: 45px; height: 45px;
    background: var(--gold-gradient); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 9999; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.music-control { bottom: 30px; }
.scroll-control { bottom: 90px; } /* Bertumpuk rapi di atas musik */
.music-control i, .scroll-control i { font-size: 1.1rem; color: var(--bg-emerald-deep); }

/* Star Dust Effect Container */
#star-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; overflow: hidden; }
.star { position: absolute; background: var(--gold-light); border-radius: 50%; opacity: 0; box-shadow: 0 0 4px var(--gold-primary); animation: pulse var(--duration) infinite ease-in-out; }

@keyframes pulse { 
    0%, 100% { opacity: 0; transform: scale(0.5); } 
    50% { opacity: 0.7; transform: scale(1.2); } 
}

/* Lightbox Pop-up */
.lightbox-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(5, 20, 17, 0.96); z-index: 99999; display: none; justify-content: center; align-items: center; }
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90%; max-height: 80%; border: 1px solid var(--gold-primary); box-shadow: var(--shadow-deep); }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: var(--gold-primary); font-size: 2rem; cursor: pointer; background: none; border: none; }

/* Native Text Animation Grid Trigger */
.animate-text { opacity: 0; transform: translateY(30px); transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.animate-text.show { opacity: 1; transform: translateY(0); }

.wedding-footer { background: #030d0b; padding: 60px 20px; text-align: center; border-top: var(--border-luxury); }
.wedding-footer p { max-width: 500px; margin: 0 auto 20px auto; font-size: 0.9rem; }
.wedding-footer h4 { font-size: 1.8rem; }
.copyright { font-size: 0.75rem !important; color: var(--text-muted); margin-top: 20px !important; }

/* ==========================================================================
   8. MOBILE DEVICE OPTIMIZATION
   ========================================================================== */
@media (max-width: 768px) {
    h2 { font-size: 1.8rem; }
    .main-title { font-size: 2.1rem; }
    .main-names { font-size: 2.5rem; }
    .mempelai-flex { flex-direction: column; gap: 50px; }
    .and-divider { margin: 10px 0; font-size: 2rem; }
    .greetings-wrapper { flex-direction: column; }
    .section { padding: 80px 15px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .col-span-2 { grid-column: span 2; aspect-ratio: 1 / 1; }
    .countdown-container { gap: 10px; }
    .countdown-item { min-width: 70px; padding: 10px; }
    .countdown-number { font-size: 1.5rem; }
    .hero-section { background-attachment: scroll !important; }
}