:root {
    --primary-sage: #7A8B75;
    --dark-sage: #2C3E2B;
    --light-sage: #E3EBE1;
    --bg-color: #F8F9F7;
    --text-color: #555555;
    --gold: #D4AF37;
    --script-font: 'Great Vibes', cursive;
    --serif-font: 'Playfair Display', serif;
    --sans-font: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 75px;
}

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

h1,
h2,
h3,
.script-title {
    font-family: var(--script-font);
    color: var(--dark-sage);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(44, 62, 43, 0.05);
}

.glass-panel-dark {
    background: rgba(44, 62, 43, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    color: white;
}

/* Navbar */
.navbar {
    background-color: rgba(248, 249, 247, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(44, 62, 43, 0.08);
    height: 76px;
}

.navbar-brand {
    font-family: var(--script-font);
    font-size: 2.2rem;
    color: var(--dark-sage) !important;
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dark-sage) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-sage) !important;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 76px);
    margin-top: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    background: linear-gradient(rgba(44, 62, 43, 0.35), rgba(44, 62, 43, 0.35)), url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
}

.hero-frame {
    padding: 60px 30px;
    margin-bottom: 35px;
    border-radius: 12px;
}

/* Quote Section */
.quote-section {
    background-color: var(--light-sage);
    padding: 80px 20px;
    text-align: center;
}

.quote-text {
    font-family: var(--serif-font);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--dark-sage);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.quote-ref {
    font-size: 0.9rem;
    margin-top: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Profile Section */
.profile-section {
    padding: 80px 0;
    background-color: #fff;
}

.profile-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.4s ease;
}

.profile-card:hover {
    transform: translateY(-10px);
}

.profile-img {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.love-badge {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #d90429;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

/* Countdown Section */
.countdown-section {
    background: linear-gradient(rgba(44, 62, 43, 0.7), rgba(44, 62, 43, 0.7)), url('https://images.unsplash.com/photo-1465495976277-4387d4b0b4c6?auto=format&fit=crop&w=1500&q=80') center/cover fixed;
    padding: 100px 0;
    color: white;
    text-align: center;
}

.countdown-box {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    min-width: 100px;
    text-align: center;
}

.countdown-number {
    font-family: var(--serif-font);
    font-size: 3rem;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    display: block;
}

.countdown-finished {
    display: none;
    font-family: var(--serif-font);
    font-size: 2rem;
    margin-top: 20px;
}

/* Events Section */
.events-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.event-card {
    background: #fff;
    padding: 40px 30px;
    text-align: center;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(44, 62, 43, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(44, 62, 43, 0.1);
}

.event-icon {
    font-size: 3rem;
    color: var(--primary-sage);
    margin-bottom: 20px;
}

/* Story Section */
.story-section {
    background-color: #EBF0EA;
    padding: 80px 0;
}

.story-box {
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.story-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Gallery Section (Masonry/Grid) */
.gallery-section {
    padding: 80px 0;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Envelope Section */
.envelope-section {
    padding: 80px 0;
    background-color: var(--light-sage);
    text-align: center;
}

.bank-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(44, 62, 43, 0.05);
}

.bank-logo {
    height: 40px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* RSVP Section */
.rsvp-section-bg {
    background: linear-gradient(rgba(248, 249, 247, 0.9), rgba(248, 249, 247, 0.9)), url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&w=1500&q=80') center/cover;
    padding: 80px 0;
}

.rsvp-box {
    padding: 50px 40px;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #c8d5c5;
    padding: 12px 15px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-sage);
    box-shadow: 0 0 0 0.25rem rgba(122, 139, 117, 0.2);
    background: #fff;
}

.btn-primary-custom {
    background: var(--dark-sage);
    color: white;
    border-radius: 8px;
    padding: 12px 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    border: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary-custom:hover {
    background: var(--primary-sage);
    color: white;
    transform: translateY(-2px);
}

/* Guestbook */
.guestbook-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 40px;
}

.guestbook-container::-webkit-scrollbar {
    width: 6px;
}

.guestbook-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-sage);
    border-radius: 3px;
}

.message-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-align: left;
}

/* Footer / Outro */
.outro-section {
    padding: 80px 0 40px;
    background-color: var(--dark-sage);
    color: white;
    text-align: center;
}

.outro-section h2 {
    color: white;
    font-size: 4rem;
    margin: 30px 0;
}

.social-icons a {
    color: white;
    margin: 0 12px;
    font-size: 1.3rem;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.social-icons a:hover {
    opacity: 1;
}


/* ===== */
/*regiuon Invitation Popup Overlay */
#invitation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
}

.opening-intro {
    margin-bottom: 2rem;
    text-align: center;
}

.opening-kicker {
    margin-bottom: 0.9rem;

    font-family: var(--serif-font, "Playfair Display", serif);
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.7;

    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.opening-message {
    margin: 0;

    font-family: var(--sans-font, "Montserrat", sans-serif);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.85;

    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.opening-line {
    display: block;

    width: 55px;
    height: 1px;

    margin: 1rem auto;

    background: rgba(255, 255, 255, 0.75);

    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}


/* =========================================================
   NAMA MEMPELAI
   ========================================================= */

.opening-names {
    margin: 0 0 2.2rem;

    font-family: var(--script-font, "Great Vibes", cursive);
    font-size: clamp(4rem, 14vw, 6rem);
    font-weight: 400;
    line-height: 1;

    color: #ffffff;

    text-shadow:
        0 3px 8px rgba(0, 0, 0, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.18);
}

.opening-names span {
    display: inline-block;

    margin: 0 0.12em;

    font-family: var(--serif-font, "Playfair Display", serif);
    font-size: 0.42em;
    font-style: italic;
    font-weight: 500;

    opacity: 0.9;
}


/* =========================================================
   NAMA TAMU
   ========================================================= */

.opening-guest {
    margin-bottom: 2rem;
}

.guest-label {
    margin-bottom: 0.45rem;

    font-family: var(--sans-font, "Montserrat", sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;

    color: rgba(255, 255, 255, 0.82);

    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#guest-name {
    margin-bottom: 0.65rem;

    font-family: var(--serif-font, "Playfair Display", serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.4;

    color: #ffffff;

    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.guest-note {
    margin: 0;

    font-family: var(--sans-font, "Montserrat", sans-serif);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.7;

    color: rgba(255, 255, 255, 0.7);

    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}


/* =========================================================
   TOMBOL BUKA UNDANGAN
   ========================================================= */

.opening-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;

    min-width: 205px;
    min-height: 50px;

    padding: 0.85rem 1.6rem;

    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.97);
    color: #4f5d50;

    font-family: var(--sans-font, "Montserrat", sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.opening-button i {
    font-size: 0.95rem;
}

.opening-button:hover {
    transform: translateY(-2px);

    background: #ffffff;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25);
}

.opening-button:active {
    transform: translateY(0);
}


/* =========================================================
   CHECKBOX MUSIK
   ========================================================= */

.music-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;

    margin-top: 1.25rem;

    padding: 0.25rem;

    cursor: pointer;
    user-select: none;
}

.music-checkbox input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}


/* Lingkaran checkbox */

.music-checkbox-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 30px;
    height: 30px;

    border: 1.5px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.1);

    color: transparent;

    font-size: 0.75rem;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.15);

    transition:
        all 0.3s ease;
}


/* Tulisan musik */

.music-checkbox-text {
    font-family: var(--sans-font, "Montserrat", sans-serif);

    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;

    color: rgba(255, 255, 255, 0.88);

    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.35);

    transition:
        color 0.3s ease;
}


/* Saat dipilih */

.music-checkbox input:checked+.music-checkbox-box {
    border-color: #ffffff;

    background: #ffffff;

    color: #536456;

    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.12),
        0 5px 18px rgba(0, 0, 0, 0.2);
}

.music-checkbox input:checked~.music-checkbox-text {
    color: #ffffff;
    font-weight: 600;
}


/* Hover */

.music-checkbox:hover .music-checkbox-box {
    border-color: #ffffff;

    background: rgba(255, 255, 255, 0.18);
}

.music-checkbox:hover .music-checkbox-text {
    color: #ffffff;
}


/* =========================================================
   MOBILE / HP KECIL
   ========================================================= */

@media (max-width: 576px) {

    .opening-intro {
        margin-bottom: 1.6rem;
    }

    .opening-kicker {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .opening-message {
        font-size: 0.86rem;
        line-height: 1.8;
    }

    .opening-line {
        width: 50px;
        margin: 0.9rem auto;
    }

    .opening-names {
        font-size: clamp(3.8rem, 19vw, 5rem);
        margin-bottom: 1.8rem;
    }

    .guest-label {
        font-size: 0.82rem;
    }

    #guest-name {
        font-size: 1.25rem;
    }

    .guest-note {
        font-size: 0.7rem;
    }

    .opening-button {
        min-width: 210px;
        min-height: 52px;

        font-size: 0.8rem;
    }

    .music-checkbox {
        margin-top: 1.15rem;
    }

    .music-checkbox-box {
        width: 31px;
        height: 31px;
    }

    .music-checkbox-text {
        font-size: 0.76rem;
    }
}


/* =========================================================
   HP SANGAT KECIL
   ========================================================= */

@media (max-width: 360px) {

    .opening-kicker {
        font-size: 1rem;
    }

    .opening-message {
        font-size: 0.82rem;
    }

    .opening-names {
        font-size: 3.5rem;
    }

    #guest-name {
        font-size: 1.15rem;
    }

    .opening-button {
        min-width: 200px;
        min-height: 50px;
    }

    .music-checkbox-text {
        font-size: 0.72rem;
    }
}

/*endregion invitatioin popup */
/* ===== */

.popup-content {
    animation: fadeIn 1.5s ease;
}

.popup-content h1 {
    color: white;
    font-size: 4rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#buka-undangan-btn {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.popup-hidden {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

/* Music Control Button */
#music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border: none;
    outline: none;
}

#music-control:hover {
    transform: scale(1.1);
}

.spin-slow {
    animation: spin 4s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ===== PAGE LOADER ===== */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #2C3E2B;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-content {
    color: #E8EDE7;
}

.loader-monogram {
    font-family: var(--script-font);
    font-size: 4.5rem;
    color: #D4AF37;
    line-height: 1;
}

.loader-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(232, 237, 231, 0.2);
    border-top: 3px solid #7A8B75;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loader-text {
    font-family: var(--sans-font);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.85;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .countdown-number {
        font-size: 2rem;
    }

    .countdown-item {
        padding: 15px;
        min-width: 80px;
    }

    .hero-section {
        background-attachment: scroll;
    }

    .countdown-section {
        background-attachment: scroll;
    }

    .popup-content h1 {
        font-size: 3rem;
    }
}