/* ==========================================================================
   1. RESET & VARIABLE UTAMA (LUXURY THEME)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --bg-dark-deep: #0a0a0a;       /* Hitam pekat latar belakang */
    --bg-dark-card: #141414;       /* Hitam sedikit terang untuk kontainer/kartu */
    --gold-primary: #d4af37;       /* Emas standar */
    --gold-light: #f3e5ab;         /* Emas muda berkilau */
    --gold-dark: #aa7c11;          /* Emas tua untuk bayangan/gradasi */
    --gold-gradient: linear-gradient(135deg, #aa7c11 0%, #d4af37 50%, #f3e5ab 100%);
    --text-light: #f5f5f5;         /* Teks utama (Putih gading) */
    --text-muted: #b5b5b5;         /* Teks sekunder (Abu-abu soft, ditingkatkan agar kontras) */
    --border-gold: 1px solid rgba(212, 175, 55, 0.3);
    --shadow-luxury: 0 10px 30px rgba(0, 0, 0, 0.7), 0 4px 15px rgba(212, 175, 55, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark-deep);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar Premium */
body::-webkit-scrollbar, .greeting-area::-webkit-scrollbar {
    width: 6px;
}
body::-webkit-scrollbar-track, .greeting-area::-webkit-scrollbar-track {
    background: var(--bg-dark-deep);
}
body::-webkit-scrollbar-thumb, .greeting-area::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 10px;
}

/* ==========================================================================
   2. TYPOGRAPHY (FONT, HEADINGS & TEXT COLOR)
   ========================================================================== */
h1, h2, h3, h4, .font-serif {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 2px;
    
    /* Fallback Warna Aman: Jika browser memblokir efek gradasi, tulisan tetap terbaca jelas */
    color: var(--gold-light); 
    
    /* Aturan Gradasi Emas Mewah */
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; 
    
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sub-title {
    color: var(--gold-light);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==========================================================================
   3. LAYOUT, SECTIONS & LAYAR PEMBUKA (COVER)
   ========================================================================== */
.section {
    padding: 80px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Cover / Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
    padding: 40px 20px;
}

/* Halaman Sampul Depan Pembuka (Welcome Overlay Screen) */
.welcome-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle, #1a1a1a 0%, #0a0a0a 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
}

/* Transisi menutup pintu amplop saat dibuka */
.welcome-cover.fade-out {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   4. KOMPONEN MEWAH (CARDS, BUTTONS, BADGES)
   ========================================================================== */
/* Kartu Informasi (Event, RSVP, Rekening) */
.card, .event-box, .rsvp-box {
    background-color: var(--bg-dark-card);
    border: var(--border-gold);
    border-radius: 12px;
    padding: 30px 25px;
    margin: 25px 0;
    box-shadow: var(--shadow-luxury);
    position: relative;
    overflow: hidden;
}

/* Aksen Garis Ornamen Emas Tipis Di Dalam Kartu */
.card::before {
    content: '';
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.05);
    pointer-events: none;
    border-radius: 8px;
}

/* Tombol Utama Premium (Buka Undangan / RSVP / Kirim) */
.btn-luxury, .open-button, button[type="submit"] {
    display: inline-block;
    background: transparent;
    color: var(--gold-light) !important;
    border: 1px solid var(--gold-primary);
    padding: 14px 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-luxury:hover, .open-button:hover, button[type="submit"]:hover {
    background: var(--gold-gradient);
    color: var(--bg-dark-deep) !important;
    -webkit-text-fill-color: var(--bg-dark-deep) !important; /* Mencegah bug teks transparan saat hover */
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

/* Countdown Timer */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.countdown-item {
    background: rgba(20, 20, 20, 0.8);
    border: var(--border-gold);
    border-radius: 8px;
    min-width: 70px;
    padding: 10px;
    box-shadow: var(--shadow-luxury);
}

.countdown-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-light);
    display: block;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* ==========================================================================
   5. ELEMEN KHUSUS (GALLERY, STORY, GIFT, GREETINGS)
   ========================================================================== */
/* Foto Lingkaran Mempelai */
.mempelai-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
    padding: 5px;
    background: var(--bg-dark-card);
    box-shadow: var(--shadow-luxury);
    margin-bottom: 15px;
}

/* Galeri Foto Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    border: var(--border-gold);
    box-shadow: var(--shadow-luxury);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Timeline Cerita Cinta */
.story-timeline {
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    margin: 30px auto;
    max-width: 600px;
    padding-left: 20px;
    text-align: left;
}

.story-node {
    position: relative;
    padding-bottom: 30px;
}

.story-node::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--gold-gradient);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-primary);
}

/* Komponen Kado Digital / Rekening (Gift Card) */
.bank-card {
    background: linear-gradient(135deg, #141414 0%, #1f1f1f 100%);
    border: var(--border-gold);
    border-radius: 16px;
    padding: 25px;
    margin: 15px auto;
    max-width: 400px;
    text-align: left;
    position: relative;
}

.bank-logo {
    height: 30px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: brightness(1.2);
}

.account-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 2px;
    margin: 10px 0 5px 0;
}

.account-name {
    font-size: 0.85rem;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-copy {
    background: transparent;
    border: 1px dashed var(--gold-primary);
    color: var(--gold-light);
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Form Buku Tamu & Ucapan (Greetings) */
.greeting-form label {
    display: block;
    text-align: left;
    font-size: 0.8rem;
    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: #1a1a1a;
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text-light) !important; /* Memaksa teks input berwarna cerah */
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
}

.greeting-form input::placeholder, .greeting-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.greeting-form input:focus, .greeting-form textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* Wadah List Ucapan (Scrollable) */
.greeting-area {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 25px;
}

.greeting-item {
    background: #141414;
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 15px;
    text-align: left;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.greeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.greeting-header strong {
    color: var(--gold-light);
}

.greeting-body {
    color: #e0e0e0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.greeting-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: right;
}

/* Badges Status Kehadiran */
.status-hadir {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.status-absen {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.status-ragu {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ==========================================================================
   6. INTERACTIVE & FLOATING MUSIC
   ========================================================================== */
.animate-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-text.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tombol Pengontrol Musik Mengambang */
.music-control {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: var(--gold-gradient);
    color: var(--bg-dark-deep) !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.music-control i, .music-control svg {
    width: 20px;
    height: 20px;
    color: var(--bg-dark-deep);
    transition: transform 0.3s ease;
}

.music-control.playing {
    animation: pulseGlow 2s infinite ease-in-out;
}

.music-control.playing i, .music-control.playing svg {
    animation: rotateMusic 4s infinite linear;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
/* Tablet & Screen Menengah (Max 768px) */
@media (max-width: 768px) {
    .section {
        padding: 60px 15px;
    }
    
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .mempelai-img {
        width: 150px;
        height: 150px;
    }

    .countdown-container {
        gap: 10px;
    }
    .countdown-item {
        min-width: 60px;
        padding: 8px;
    }
    .countdown-number {
        font-size: 1.4rem;
    }
}

/* Smartphone / Mobile (Max 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .section {
        padding: 50px 10px;
    }

    h1 { font-size: 2.3rem; letter-spacing: 1px; }
    h2 { font-size: 1.8rem; }
    
    .card, .event-box, .rsvp-box {
        padding: 20px 15px;
        margin: 15px 0;
    }

    /* Grid Galeri: Tampilan 2 kolom rapi di HP */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .story-timeline {
        padding-left: 15px;
    }
    
    .btn-luxury, .open-button, button[type="submit"] {
        padding: 12px 25px;
        font-size: 0.75rem;
        letter-spacing: 2px;
    }
}

/* ==========================================================================
   8. SYSTEM ANIMATION KEYFRAMES
   ========================================================================== */
@keyframes pulseGlow {
    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); }
}

@keyframes rotateMusic {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}