:root {
    --primary: #0b5e46;
    /* Emerald Green */
    --primary-dark: #074733;
    --gold: #d4af37;
    --gold-light: #f1ebd5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-light: #f8faf9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow: hidden;
    /* Dimatikan awalnya agar tidak bisa di-scroll sebelum masuk */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('img/bg.png?v=dev1');
    background-size: cover;
    background-position: center;
    z-index: -1;
    pointer-events: none;
}

/* Utility Classes */
h1,
h2,
h3,
h4,
h5,
h6,
.arabic-text {
    font-family: 'Amiri', serif;
}

.section-padding {
    padding: 80px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Golden Divider */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    color: var(--gold);
    font-size: 1.2rem;
}

.divider::before,
.divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background-color: var(--gold);
    margin: 0 15px;
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(11, 94, 70, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 94, 70, 0.4);
}

/* Glassmorphism Card */
.card {
    background-color: rgba(255, 255, 255, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='0.15' stroke-width='3'%3E%3Crect x='20' y='20' width='60' height='60' /%3E%3Crect x='20' y='20' width='60' height='60' transform='rotate(45 50 50)' /%3E%3Ccircle cx='50' cy='50' r='10' /%3E%3C/g%3E%3C/svg%3E");
    background-size: 150px;
    background-position: bottom -30px right -30px;
    background-repeat: no-repeat;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* --- SECTIONS --- */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(7, 71, 51, 0.65);
    color: var(--white);
    text-align: center;
    padding: 20px;
}



.hero-content {
    z-index: 2;
    max-width: 600px;
    padding: 40px 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    /* Gold border */
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.hero .subtitle {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 20px;
}

.hero .title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero .names {
    font-size: 3rem;
    line-height: 1.2;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.scroll-prompt {
    margin-top: 50px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.fast-bounce {
    display: inline-block;
    margin-top: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Quote Section */
.quote {
    padding-top: 40px;
    /* Dikurangi agar lebih rapat dengan hero */
}

.quote .container {
    position: relative;
    z-index: 5;
}

.arabic-text {
    font-size: 2rem;
    line-height: 2;
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
    direction: rtl;
}

.translation {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Invitation Section */
.section-title {
    font-size: 2rem;
    color: var(--primary);
}

.invitation-text {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Event Details Section */
.event-details {
    background: linear-gradient(to bottom, rgba(11, 94, 70, 0.05), rgba(11, 94, 70, 0.1));
}

.event-card {
    border-top: 5px solid var(--gold);
}

.event-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
}

.event-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 5px;
}

.event-date {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.event-day {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.event-location {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.event-time {
    color: var(--text-secondary);
}

/* Closing Section */
.closing-text {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.closing-names {
    font-size: 1.5rem;
    color: var(--primary);
}

/* --- COUNTDOWN --- */
.countdown-wrap {
    margin-bottom: 30px;
}

.countdown-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(11, 94, 70, 0.05);
    /* very light emerald */
    border: 1px solid rgba(212, 175, 55, 0.5);
    /* gold border */
    border-bottom: 3px solid rgba(212, 175, 55, 1);
    border-radius: 12px;
    padding: 15px 10px;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.countdown-item span {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-item small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- ANIMATION CLASSES --- */
.animate-on-scroll {
    opacity: 0;
    transition: all 1.2s ease;
}

.fade-in {
    transform: translateY(0);
}

.slide-up {
    transform: translateY(50px);
}

.scale-up {
    transform: scale(0.9);
}

/* When element is visible via JS */
.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Responsive */
@media (max-width: 600px) {
    .hero .title {
        font-size: 2rem;
    }

    .hero .names {
        font-size: 2.2rem;
    }

    .arabic-text {
        font-size: 1.5rem;
    }

    .card {
        padding: 30px 20px;
    }
}

/* Audio Control */
.audio-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--gold);
    border: none;
    box-shadow: 0 4px 15px rgba(11, 94, 70, 0.4);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

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

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }

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

.audio-control.playing {
    animation: spin 4s linear infinite;
}

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

/* --- ISLAMIC ORNAMENTS --- */

/* Page Frame */
.page-frame {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid rgba(212, 175, 55, 0.7);
    /* Gold border */
    pointer-events: none;
    z-index: 998;
}

.page-frame::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.page-frame div {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border: 2px solid var(--gold);
}

.corner-tl {
    top: -15px;
    left: -15px;
}

.corner-tr {
    top: -15px;
    right: -15px;
}

.corner-bl {
    bottom: -15px;
    left: -15px;
}

.corner-br {
    bottom: -15px;
    right: -15px;
}

.page-frame div::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}

/* Hanging Ornament */
.hanging-ornament {
    position: absolute;
    top: 100px;
    left: 50%;
    color: var(--gold);
    font-size: 2.5rem;
    animation: swing 3.5s ease-in-out infinite alternate;
    transform-origin: top center;
    z-index: 1;
    /* Behind text */
    margin-left: -20px;
    /* Center adjustment */
}

.hanging-ornament::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    background: linear-gradient(to top, var(--gold), transparent);
}

@keyframes swing {
    0% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(-5deg);
    }
}

@media (max-width: 600px) {
    .page-frame {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .hanging-ornament {
        top: 80px;
        font-size: 2rem;
    }

    .hanging-ornament::before {
        height: 80px;
    }
}

/* --- INTRO SCREEN --- */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(11, 94, 70, 0.98), rgba(7, 71, 51, 0.95)), url('img/bg.png?v=dev1');
    background-size: cover;
    background-position: center;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: transform 1.2s cubic-bezier(0.8, 0, 0.2, 1), opacity 1.2s ease;
    text-align: center;
    padding: 20px;
}

.intro-screen.slide-out {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 30px;
    border-radius: 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    max-width: 500px;
    animation: scale-up 1s ease-out;
}

.intro-content .subtitle {
    color: var(--gold);
    letter-spacing: 3px;
    font-size: 1rem;
    margin-bottom: 20px;
}

.intro-content .names {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.intro-content p {
    font-size: 1.1rem;
    color: var(--gold-light);
}

@keyframes scale-up {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- RSVP FORM --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 94, 70, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.rsvp-message {
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

.rsvp-message.success { color: var(--primary); }
.rsvp-message.error { color: #d9534f; }