        :root {
            --primary-color: #b59b72; 
            --primary-light: #eaddcf; 
            --dark-color: #4a4a4a;
            --bg-color: #fbfaf8; 
            --card-bg: #ffffff;
            --envelope-bg: #a68c69; 
            --envelope-dark: #8c7353;
            --envelope-light: #bfaa87;
        }

        html { scroll-behavior: smooth; overflow-x: hidden; }
        body { font-family: 'Montserrat', sans-serif; background-color: var(--bg-color); color: var(--dark-color); overflow-x: hidden; overflow-y: hidden; }
        h1, h2, h3, .font-serif { font-family: 'Cormorant Garamond', serif; }

        .fs-small{
        font-size:0.75rem;
        }

        .text-gold{
        color:var(--primary-color);
        }

        .letter-spacing-2{
        letter-spacing:2px;
        }

        /* =========================================
           SCROLL ANIMATIONS (Dioptimalkan via JS Observer)
           ========================================= */
        .reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
        .reveal.active { opacity: 1; transform: translateY(0); }
        
        .reveal-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
        .reveal-left.active { opacity: 1; transform: translateX(0); }
        
        .reveal-right { opacity: 0; transform: translateX(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
        .reveal-right.active { opacity: 1; transform: translateX(0); }

        .reveal-zoom { opacity: 0; transform: scale(0.8); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
        .reveal-zoom.active { opacity: 1; transform: scale(1); }

        /* =========================================
           3D ENVELOPE ANIMATION
           ========================================= */
        #cover-screen {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('https://images.unsplash.com/photo-1584551246679-0daf3d275d05?q=80&w=2070&auto=format&fit=crop') center/cover;
            z-index: 9999; display: flex; justify-content: center; align-items: center;
            transition: opacity 1s ease, transform 1s ease, visibility 1s ease; 
            width: 100vw; 
            height: 100dvh;
        }
        /* =========================================
           POTRET BAHAGIA (STACKED CARDS + DEKORASI BUNGA LEMES)
           ========================================= */
        .potret-wrapper { position: relative; max-width: 900px; margin: 0 auto; display: flex; justify-content: center; }

        .floral-ornament { position: absolute; top: 20px; width: 200px; height: auto; z-index: 1; opacity: 1; pointer-events: none; }
        .floral-left { left: 0; transform-origin: top left; animation: lemesLeft 6s ease-in-out infinite; }
        .floral-right { right: 0; transform-origin: top right; animation: lemesRight 7s ease-in-out infinite; }

        @media (max-width: 768px) {
            .floral-ornament { width: 120px; opacity: 1; } 
            .floral-left { left: -20px; } .floral-right { right: -20px; }
        }

        .stack-container { margin: 0 auto; max-width: 500px; padding-bottom: 250px; width: 100%; position: relative; z-index: 5; }
        
        /* Modifikasi transisi wrapper agar mendukung scale */
        .stack-card-wrapper { display: flex; justify-content: center; align-items: center; position: relative; padding-top: 20px; margin-bottom: -160px; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0.1s; will-change: transform; }
        
        .stack-card-wrapper:nth-child(1) { z-index: 1; } .stack-card-wrapper:nth-child(2) { z-index: 2; } .stack-card-wrapper:nth-child(3) { z-index: 3; } .stack-card-wrapper:nth-child(4) { z-index: 4; }
        
        /* Auto Focus: Diperkecil menjadi 1.05 agar tidak kegedean */
        .stack-card-wrapper.focus-card {
            z-index: 50 !important;
            transform: scale(1.05); 
        }
        .stack-card-wrapper.focus-card .stack-card {
            box-shadow: 0 6px 18px rgba(0,0,0,0.22), 0 0 12px rgba(181, 155, 114, 0.25);
            border-color: var(--primary-color);
        }

        .stack-card { width: 300px; height: 430px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 20px; background: var(--card-bg); border: 1px solid rgba(181, 155, 114, 0.4); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 0 8px rgba(181, 155, 114, 0.08); transform-origin: center center; padding: 15px; cursor: pointer; animation: cardPopUp linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; transition: box-shadow 0.4s ease; will-change: transform; }
        .stack-card img { width: 100%; height: 85%; object-fit: cover; border-radius: 12px; pointer-events: none; }
        .stack-label { height: 15%; display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; color: var(--primary-color); font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
        
        /* MENGHILANGKAN OPACITY: Dibuat solid 100% dari awal sampai akhir */
        @keyframes cardPopUp { from { transform: translateY(200px) rotate(0deg); } to { transform: translateY(0px) rotate(-8deg); } }
        .stack-card-wrapper:nth-child(even) .stack-card { animation: cardPopUpRight linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
        @keyframes cardPopUpRight { from { transform: translateY(200px) rotate(0deg); } to { transform: translateY(0px) rotate(8deg); } }

        /* LIGHTBOX GALLERY CATEGORY */
        .lightbox-overlay { display: none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.4s ease; }
        .lightbox-overlay.show { display: flex; opacity: 1; }
        .lightbox-content-wrapper { position: relative; text-align: center; max-width: 90%; max-height: 85vh; }
        #lightbox-img { max-width: 100%; max-height: 75vh; border-radius: 10px; box-shadow: 0 0 15px rgba(0,0,0,0.35); border: 2px solid var(--primary-color); object-fit: contain; animation: zoomInLightBox 0.3s ease; }
        @keyframes zoomInLightBox { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        #lightbox-caption { color: white; font-size: 1.5rem; margin-top: 15px; letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
        .close-lightbox { position: absolute; top: 20px; right: 30px; color: white; font-size: 45px; cursor: pointer; z-index: 100000; transition: color 0.3s, transform 0.3s; }
        .close-lightbox:hover { color: var(--primary-color); transform: scale(1.1); }
        .nav-arrow { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; color: white; font-size: 25px; transition: all 0.3s; user-select: none; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; z-index: 100000; }
        .nav-arrow:hover { background-color: var(--primary-color); border-color: var(--primary-color); box-shadow: 0 0 15px rgba(181, 155, 114, 0.5); }
        .prev-arrow { left: 30px; } .next-arrow { right: 30px; }
        @media (max-width: 768px) { .nav-arrow { width: 40px; height: 40px; font-size: 20px; } .prev-arrow { left: 10px; } .next-arrow { right: 10px; } }
        .fade-out-cover { opacity: 0 !important; transform: scale(1.05); visibility: hidden; pointer-events: none; }

        .envelope-wrapper { position: relative; width: 90vw; max-width: 650px; height: 60vw; max-height: 400px; perspective: 1500px; margin: 0 auto; }
        .envelope-back { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #5c4b37; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.35); z-index: 1; }
        .envelope-paper {
            position: absolute; top: 5%; left: 5%; width: 90%; height: 90%; background-color: #fff;
            border-radius: 8px; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; box-shadow: 0 0 15px rgba(0,0,0,0.3); padding: 20px;
        }
        .paper-content-inner { opacity: 0; transform: translateY(15px); transition: opacity 0.6s ease, transform 0.6s ease; width: 100%; }
        .paper-title { font-size: clamp(0.8rem, 2vw, 1.1rem); margin-bottom: 5px; }
        .paper-names { font-size: clamp(1.8rem, 6vw, 3.2rem); margin: 10px 0; font-weight: 600; }

        .envelope-front-left { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-color: var(--envelope-bg); clip-path: polygon(0 0, 52% 50%, 0 100%); z-index: 3; border-radius: 8px 0 0 8px; }
        .envelope-front-right { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-color: var(--envelope-bg); clip-path: polygon(100% 0, 100% 100%, 48% 50%); z-index: 3; border-radius: 0 8px 8px 0; }
        .envelope-front-bottom { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-color: var(--envelope-light); clip-path: polygon(0 100%, 50% 48%, 100% 100%); z-index: 4; border-radius: 0 0 8px 8px; }
        .envelope-flap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--envelope-dark); clip-path: polygon(0 0, 100% 0, 50% 52%); z-index: 5; border-radius: 8px 8px 0 0; transform-origin: top; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; will-change: transform;}

        .wax-seal {
            position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%);
            width: clamp(55px, 12vw, 80px); height: clamp(55px, 12vw, 80px);
            background: radial-gradient(circle, #d4af37, #9c7b16); border-radius: 50%;
            box-shadow: 0 3px 10px rgba(0,0,0,0.35), inset 0 1px 3px rgba(255,255,255,0.4);
            display: flex; justify-content: center; align-items: center; color: white; font-family: 'Cormorant Garamond', serif; font-size: clamp(1.2rem, 3vw, 2rem); font-weight: bold; z-index: 6; transition:
            transform .3s ease,
            opacity .3s ease;
        }

        .envelope-flap:hover .wax-seal { transform: translate(-50%, -50%) scale(1.1); }
        .click-guide { position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%); color: white; letter-spacing: 2px; font-size: clamp(0.7rem, 2vw, 0.9rem); animation: pulse 2s infinite; white-space: nowrap; }

        .btn-buka-surat { background-color: var(--primary-color); color: white; border: none; padding: clamp(8px, 2vw, 12px) clamp(20px, 4vw, 35px); border-radius: 30px; font-size: clamp(0.8rem, 2vw, 1rem); letter-spacing: 1px; margin-top: 15px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(181, 155, 114, 0.4); pointer-events: auto; }
        .btn-buka-surat:hover { background-color: #9c845e; transform: translateY(-3px); }

        .envelope-opened .envelope-wrapper { cursor: default; }
        .envelope-opened .envelope-flap { transform: rotateX(180deg); z-index: 1; cursor: default; pointer-events: none; }
        .envelope-opened .wax-seal, .envelope-opened .click-guide { opacity: 0; pointer-events: none; }
        .envelope-opened .envelope-paper { animation: pullOutPaper 2s forwards 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
        @keyframes pullOutPaper { 0% { transform: translateY(0) scale(1); z-index: 2; } 40% { transform: translateY(-110%) scale(1); z-index: 2; } 41% { transform: translateY(-110%) scale(1); z-index: 10; } 100% { transform: translateY(-15%) scale(1.15); z-index: 10; box-shadow: 0 12px 30px rgba(0,0,0,0.35); } }
        .envelope-opened .paper-content-inner { transition-delay: 2.1s; opacity: 1; transform: translateY(0); }

        /* =========================================
           KOMPONEN UMUM & HERO (TEMA KHITANAN)
           ========================================= */
        .hero-section { 
            min-height: 100vh; 
            display: flex; 
            flex-direction: column; 
            justify-content: center; 
            align-items: center; 
            text-align: center; 
            background: linear-gradient(rgba(251, 250, 248, 0.85), rgba(251, 250, 248, 0.85)), url('/assets/img/bg-hero.webp') center/cover no-repeat;
            position: relative;
            overflow: hidden;
            padding-top: 80px;
            padding-bottom: 50px;
        }
        
        /* Posisi Lampion Gantung & Animasi Ayun */
        .lantern { 
            position: absolute; 
            top: 0; 
            width: clamp(60px, 12vw, 90px); 
            z-index: 1; 
            transform-origin: top center; 
            animation: swing-lantern 4s ease-in-out infinite; 
        }
        .lantern-left { left: 5%; }
        .lantern-right { right: 5%; animation-delay: -2s; } /* Jeda minus agar ayunannya selang-seling */

        @keyframes swing-lantern {
            0% { transform: rotate(-8deg); }
            50% { transform: rotate(8deg); }
            100% { transform: rotate(-8deg); }
        }

        /* Desain Bingkai Mandala Custom */
        .mandala-frame {
            position: relative;
            width: clamp(220px, 50vw, 280px);
            height: clamp(220px, 50vw, 280px);
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .frame-img { position: absolute; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
        .profile-img { position: relative; width: 65%; height: 65%; border-radius: 50%; object-fit: cover; z-index: 2; border: 4px solid var(--primary-color); }

        /* Teks & Garis Hiasan */
        .names { font-family: 'Cormorant Garamond', serif; margin: 15px 0; text-shadow: 2px 2px 10px rgba(255,255,255,0.7); }
        .ornate-divider { display: flex; align-items: center; justify-content: center; margin: 20px auto; width: 80%; max-width: 400px; }
        .ornate-divider::before, .ornate-divider::after { content: ""; height: 1.5px; flex-grow: 1; background-color: var(--primary-color); margin: 0 15px; opacity: 0.5; }

        .section-title { font-size: clamp(2.2rem, 4vw, 3rem); color: var(--dark-color); margin-bottom: 30px; text-align: center; }
        .divider { width: 60px; height: 2px; background-color: var(--primary-color); margin: 20px auto; }
        .divider.small { width: 30px; margin: 10px auto; }

        /* =========================================
           SEQUENTIAL ENTRANCE ANIMATIONS (HERO)
           ========================================= */
        /* Status awal: Sembunyikan semua elemen sebelum tombol dibuka */
        .anim-top, .anim-bottom, .anim-left, .anim-right, .anim-rotate, .anim-expand { 
            visibility: hidden; 
        }

        /* Begitu class start-anim masuk, buat jadi terlihat dan jalankan animasi */
        .start-anim .anim-top, .start-anim .anim-bottom, .start-anim .anim-left, .start-anim .anim-right, .start-anim .anim-rotate, .start-anim .anim-expand {
            visibility: visible;
        }

        /* Gunakan "both" agar elemen tertahan di titik awal (transparan) selama masa delay */
        .start-anim .anim-top { animation: fade-in-top 1s cubic-bezier(0.25, 1, 0.5, 1) both; }
        .start-anim .anim-bottom { animation: fade-in-bottom 1s cubic-bezier(0.25, 1, 0.5, 1) both; }
        .start-anim .anim-left { animation: fade-in-left 1s cubic-bezier(0.25, 1, 0.5, 1) both; }
        .start-anim .anim-right { animation: fade-in-right 1s cubic-bezier(0.25, 1, 0.5, 1) both; }
        .start-anim .anim-rotate { animation: rotate-in-center 1.2s cubic-bezier(0.25, 1, 0.5, 1) both; }
        .start-anim .anim-expand { animation: expand-center 1s cubic-bezier(0.25, 1, 0.5, 1) both; }

        /* Urutan kedatangan (Delay) */
        .start-anim .delay-1 { animation-delay: 0.2s; } /* Judul */
        .start-anim .delay-2 { animation-delay: 0.4s; } /* Bingkai Foto */
        .start-anim .delay-3 { animation-delay: 0.7s; } /* Teks Arab */
        .start-anim .delay-4 { animation-delay: 0.9s; } /* Pengantar */
        .start-anim .delay-5 { animation-delay: 1.1s; } /* Nama Rasya & Garis */

        /* Keyframes Gerakan */
        @keyframes fade-in-top { 0% { opacity: 0; transform: translateY(-50px); } 100% { opacity: 1; transform: translateY(0); } }
        @keyframes fade-in-bottom { 0% { opacity: 0; transform: translateY(50px); } 100% { opacity: 1; transform: translateY(0); } }
        @keyframes fade-in-left { 0% { opacity: 0; transform: translateX(-50px); } 100% { opacity: 1; transform: translateX(0); } }
        @keyframes fade-in-right { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }
        @keyframes rotate-in-center { 0% { opacity: 0; transform: scale(0.2) rotate(-180deg); } 100% { opacity: 1; transform: scale(1) rotate(0deg); } }
        @keyframes expand-center { 0% { width: 0%; opacity: 0; } 100% { width: 80%; opacity: 1; } }
        
        .btn-gold { background-color: var(--primary-color); color: white; border-radius: 50px; padding: 12px 35px; letter-spacing: 1px; text-transform: uppercase; font-size: 0.9rem; transition: all 0.3s ease; border: none; text-decoration: none; display: inline-block; }
        .btn-gold:hover { background-color: #9c845e; color: white; transform: translateY(-3px); box-shadow: 0 5px 12px rgba(181, 155, 114, 0.3); }
        
        @keyframes pulse { 0% { transform: scale(1) translateX(-50%); } 50% { transform: scale(1.05) translateX(-50%); } 100% { transform: scale(1) translateX(-50%); } }
        
        .music-btn { position: fixed; bottom: 30px; right: 30px; background-color: var(--primary-color); color: white; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; z-index: 999; box-shadow: 0 4px 10px rgba(0,0,0,0.18); cursor: pointer; animation: spin 4s linear infinite; will-change: transform; }
        .music-btn.paused { animation: none; }
        @keyframes spin { 100% { transform: rotate(360deg); } }

        /* =========================================
           RANGKAIAN ACARA
           ========================================= */
        .acara-section { padding: 100px 0; background-color: #f6f4f0; }
        .acara-card { background-color: var(--card-bg); border-radius: 15px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.05); transition: transform 0.3s ease; height: 100%; border: 1px solid rgba(181, 155, 114, 0.1); }
        .acara-card:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(181, 155, 114, 0.2); }
        .acara-img-container { height: 250px; overflow: hidden; }
        .acara-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
        .acara-card:hover .acara-img { transform: scale(1.1); }
        .acara-card-body { padding: 40px 30px; }
        .acara-icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; }
        
        /* =========================================
           WEDDING GIFT -> TANDA KASIH
           ========================================= */
        .gift-card-wrapper { margin: 3rem auto; width: 100%; max-width: 500px; }
        .gift-card { background: var(--card-bg); border-radius: 20px; box-shadow: 0 6px 18px rgba(0,0,0,0.05); padding: 35px; text-align: center; border: 1px solid rgba(181, 155, 114, 0.2); }
        .gift-bank-name { font-family: 'Cormorant Garamond', serif; color: var(--primary-color); font-size: 1.8rem; font-weight: bold; margin-bottom: 5px; letter-spacing: 2px; }
        .gift-rek { font-family: 'Montserrat', sans-serif; font-size: 1.4rem; font-weight: 600; color: var(--dark-color); letter-spacing: 3px; margin-bottom: 5px; }
        .btn-copy-small { background-color: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; transition: 0.3s; margin-top: 10px; }
        .btn-copy-small:hover { background-color: var(--primary-color); color: #fff; }

        /* =========================================
           RSVP - BOOK ANIMATION 3D
           ========================================= */
        .book-container { position: relative; width: 100%; max-width: 450px; height: 500px; margin: 0 auto; perspective: 1500px; }
        .book { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); }
        .book.open { transform: translateX(50%); }
        .book-cover { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 10; transform-origin: left center; transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); transform-style: preserve-3d; }
        .book.open .book-cover { transform: rotateY(-180deg); }
        .book-cover-front, .book-cover-back { position: absolute; width: 100%; height: 100%; top: 0; left: 0; backface-visibility: hidden; border-radius: 5px 15px 15px 5px; }
        .book-cover-front { background-color: var(--envelope-bg); border: 2px solid var(--primary-color); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 3px 3px 12px rgba(0,0,0,0.3); }
        .book-cover-back { background-color: #f6f4f0; transform: rotateY(180deg); border-radius: 15px 5px 5px 15px; }
        .book-page { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 5; background-color: #fff; border-radius: 5px 15px 15px 5px; padding: 35px; border-left: 2px solid rgba(0,0,0,0.05); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
        
        @media (max-width: 768px) { .book.open { transform: translateX(0); } .book.open .book-cover { transform: rotateY(-105deg); } }
        @media(max-width:768px){

            .lightbox-overlay{
                backdrop-filter:none;
                background:rgba(0,0,0,0.95);
            }

            .stack-card-wrapper.focus-card{
                transform:scale(1.01);
            }

        }