/* --- 1. Variables & Global --- */
:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --gold: #D4AF37;
    --gold-dim: #AA8C2C;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-script: 'Pinyon Script', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: auto; }
body { background-color: var(--bg-dark); color: var(--text-main); font-family: var(--font-sans); overflow-x: hidden; line-height: 1.6; }
body.is-locked { overflow: hidden; height: 100vh; }

/* Texture Noise */
.noise-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9990; background: url('https://grainy-gradients.vercel.app/noise.svg'); opacity: 0.05; }

/* Falling Effect Items */
.falling-item {
    position: fixed; top: -10vh; z-index: 9999; pointer-events: none;
    animation: fall linear forwards; font-size: 1.2rem; opacity: 0.8;
}
@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* --- Typography --- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; }
.script-font { font-family: var(--font-script); color: var(--gold); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.text-body { font-size: 1rem; color: #ddd; max-width: 600px; margin: 0 auto; }
.section-padding { padding: 80px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container.small { max-width: 700px; }
.container-fluid { width: 100%; padding: 0; overflow: hidden; }
.mb-50 { margin-bottom: 50px; }

/* --- Cover Section --- */
.cover-section { position: fixed; inset: 0; z-index: 5000; display: flex; justify-content: center; align-items: center; width: 100%; height: 100vh; }
.cover-bg {
    position: absolute; inset: 0; background-size: cover;
    background-position: center 25%; /* Agar kepala aman */
    filter: brightness(0.5); transform: scale(1.1);
}
.overlay-dark { position: absolute; inset: 0; background: radial-gradient(circle, transparent 0%, #000 120%); }
.cover-content { position: relative; z-index: 20; text-align: center; padding: 20px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.title-main { font-size: 4.5rem; margin: 20px 0; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.subtitle { text-transform: uppercase; letter-spacing: 3px; font-size: 0.9rem; color: var(--gold); }
.guest-name-box { border: 1px solid var(--gold); padding: 15px 30px; display: inline-block; margin: 20px 0; backdrop-filter: blur(5px); background: rgba(0,0,0,0.3); border-radius: 5px; }
.small-note { font-size: 0.7rem; color: #aaa; font-style: italic; margin-top: 5px; }

/* Tombol Buka */
.btn-primary {
    background: rgba(212, 175, 55, 0.9); color: #000; border: none; padding: 15px 40px;
    font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
    border-radius: 50px; margin-top: 30px; transition: 0.3s; box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); 
    pointer-events: auto; position: relative; z-index: 30;
}
.btn-primary:hover { background: #fff; transform: scale(1.05); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } }

/* --- Hero --- */
.hero-section { height: 100vh; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.hero-img-wrapper { position: absolute; inset: 0; z-index: 1; }
.hero-img-wrapper img { width: 100%; height: 120%; object-fit: cover; opacity: 0.6; filter: brightness(0.8); }
.hero-text { position: relative; z-index: 2; text-align: center; }
.title-large { font-size: 5rem; color: var(--gold); margin: 10px 0; font-family: var(--font-serif); }
.date-box { border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); padding: 10px 0; margin-top: 20px; font-size: 1.2rem; display: flex; gap: 15px; justify-content: center; }

/* Salam */
.salam { font-size: 1.2rem; font-family: var(--font-serif); font-weight: 600; color: var(--gold); margin-bottom: 20px; }
.bg-texture { background-color: #0c0c0c; }
.divider-gold { width: 100px; height: 1px; background: var(--gold); margin: 30px auto; }
.bismillah { width: 220px; margin-bottom: 25px; filter: invert(1); opacity: 0.8; }
.verse { font-style: italic; color: var(--text-muted); font-size: 0.95rem; }

/* --- COUPLE (Ini yang diatur agar berdampingan di HP) --- */
.couple-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 40px; 
    flex-wrap: wrap; 
}
.couple-card { 
    text-align: center; 
    flex: 1; 
    min-width: 300px; /* Default untuk Desktop */
}
.photo-frame { 
    position: relative; 
    width: 260px; /* Default untuk Desktop */
    height: 380px; 
    margin: 0 auto; 
    overflow: hidden; 
    border-radius: 100px 100px 0 0; 
    border: 1px solid #333; 
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; transition: 1s; filter: none; } 
.photo-frame:hover img { transform: scale(1.1); }
.border-accent { position: absolute; inset: 10px; border: 1px solid rgba(212, 175, 55, 0.5); border-radius: 90px 90px 0 0; pointer-events: none; }
.and-symbol { font-size: 4rem; color: var(--gold); font-family: var(--font-script); }
.info-text { margin-top: 20px; }
.info-text h2 { font-size: 2rem; margin-bottom: 5px; }
.btn-ig { display: inline-block; margin-top: 10px; color: var(--text-muted); text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; transition: 0.3s; font-size: 0.9rem; }
.btn-ig:hover { color: var(--gold); }

/* --- Events --- */
.bg-darker { background-color: var(--bg-darker); }
.section-title { font-size: 3rem; margin-bottom: 40px; letter-spacing: 2px; }
.event-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.event-box {
    background: rgba(255,255,255,0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.05);
    padding: 30px; width: 320px; text-align: center; border-radius: 10px; transition: 0.3s;
}
.event-box:hover { border-color: var(--gold); transform: translateY(-5px); }
.icon-header { font-size: 2rem; color: var(--gold); margin-bottom: 15px; }
.btn-outline { display: inline-block; margin-top: 20px; padding: 10px 25px; border: 1px solid #555; color: #fff; text-decoration: none; border-radius: 4px; font-size: 0.8rem; }
.btn-outline:hover { background: var(--gold); color: #000; border-color: var(--gold); }

.countdown-wrapper { display: flex; justify-content: center; gap: 20px; margin-top: 50px; }
.timer-item { background: rgba(212, 175, 55, 0.1); padding: 10px 15px; border-radius: 8px; border: 1px solid rgba(212, 175, 55, 0.2); min-width: 75px; text-align: center; }
.timer-item span { display: block; font-size: 1.8rem; color: var(--gold); line-height: 1; }
.timer-item small { font-size: 0.7rem; text-transform: uppercase; }

/* --- MARQUEE GALLERY --- */
.gallery-marquee {
    position: relative; width: 100%; overflow: hidden; padding: 20px 0;
    background: rgba(255,255,255,0.02); border-top: 1px solid #222; border-bottom: 1px solid #222;
}
.gallery-track {
    display: flex; gap: 15px; width: max-content;
    animation: scrollGallery 30s linear infinite;
}
.g-card {
    width: 200px; height: 300px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.g-card img { width: 100%; height: 100%; object-fit: cover; filter: none; }
@keyframes scrollGallery { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Gift Section --- */
.bank-card {
    max-width: 350px; margin: 30px auto; padding: 30px; 
    border: 1px solid var(--gold); border-radius: 10px; background: rgba(255,255,255,0.02);
}
.bank-logo { width: 120px; height: auto; display: block; margin: 0 auto 20px auto; }
.rek-num { font-size: 1.5rem; letter-spacing: 2px; font-weight: 600; margin-bottom: 5px; }
.rek-name { color: var(--text-muted); font-size: 0.9rem; }
.btn-copy { 
    background: transparent; color: var(--gold); border: 1px solid var(--gold); 
    padding: 8px 20px; margin-top: 15px; cursor: pointer; transition: 0.3s; border-radius: 4px;
}
.btn-copy:hover { background: var(--gold); color: #000; }

/* RSVP */
.rsvp-container { padding: 40px; border: 1px solid #333; background: rgba(255,255,255,0.02); margin-top: 20px; }
.input-group { margin-bottom: 20px; }
input, select, textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid #555; color: #fff; padding: 15px 0; outline: none; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
.full-width { width: 100%; margin-top: 10px; }

/* Footer */
footer { padding: 50px 0; border-top: 1px solid #222; margin-top: 50px; }
.social-links { margin: 20px 0; font-size: 1.2rem; }
.social-links a { color: #777; margin: 0 10px; }
.social-links a:hover { color: var(--gold); }

/* Preloader & Music */
.preloader { position: fixed; inset: 0; background: #000; z-index: 10000; display: flex; justify-content: center; align-items: center; }
.loader-content { text-align: center; width: 300px; }
.progress-container { width: 100%; height: 2px; background: #222; margin-bottom: 10px; }
.progress-bar { width: 0%; height: 100%; background: var(--gold); transition: width 0.2s; }
.music-box { position: fixed; bottom: 30px; left: 30px; z-index: 1000; width: 50px; height: 50px; background: rgba(0,0,0,0.6); border: 1px solid var(--gold); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.bar { width: 3px; background: var(--gold); height: 5px; }
.playing .bar { animation: eq 1s infinite ease-in-out; }
.playing .bar:nth-child(2) { animation-delay: 0.1s; } .playing .bar:nth-child(3) { animation-delay: 0.2s; } .playing .bar:nth-child(4) { animation-delay: 0.3s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 100%; } }

/* ================================
   RESPONSIVE (KHUSUS TAMPILAN HP)
   ================================ */
@media (max-width: 768px) {
    .title-main { font-size: 3.5rem; }
    .hero-text .title-large { font-size: 4rem; }
    
    /* MODIFIKASI POSISI COUPLE (SIDE BY SIDE) */
    .couple-wrapper { 
        flex-direction: row; /* Paksa ke samping */
        align-items: flex-start; /* Rata atas */
        gap: 10px; /* Jarak lebih rapat */
    }
    
    .couple-card {
        min-width: 0; /* Override default width */
        width: 48%; /* Bagi dua layar (kurang dikit dari 50%) */
        flex: 0 0 48%; /* Pastikan tidak mengecil banget */
    }
    
    .photo-frame {
        width: 100%; /* Mengikuti lebar kartu */
        height: 220px; /* Tinggi disesuaikan biar proporsional */
        border-radius: 50px 50px 0 0; /* Radius diperkecil */
    }
    
    .and-symbol {
        display: none; /* Sembunyikan simbol '&' besar biar muat */
    }
    
    .info-text h2 { font-size: 1.3rem; } /* Font nama diperkecil */
    .info-text p { font-size: 0.8rem; } /* Font ortu diperkecil */
    
    /* Kartu Galeri */
    .g-card { width: 140px; height: 200px; } 
    .gallery-track { gap: 10px; animation-duration: 20s; }
}