/* MODERNA - SAPPHIRE EDITION 
   Theme: Organic Minimalism
   Author: imora.id
*/

:root {
    --mint: #DDE5B6;
    --sage: #A9AF7E;
    --clay: #B08968;
    --white: #FDFDFB;
    --dark: #2D2D2D;
    --transition-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: #E2E2E2;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    position: relative;
    background-image: radial-gradient(var(--mint) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

body.no-scroll {
    overflow: hidden;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3 {
    font-family: 'Syne', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sage);
}

.cursive {
    font-family: 'Sacramento', cursive;
    color: var(--clay);
    font-size: 2.8rem;
}

.arabic {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--sage);
    direction: rtl;
    padding: 20px 0;
}

section {
    padding: 80px 25px;
    text-align: center;
    position: relative;
}

/* ========== COVER SECTION & TRANSITION ========== */
#cover {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: radial-gradient(circle at center, var(--white) 0%, #F5F5F0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1), opacity 1s;
    padding: 40px;
    text-align: center;
    overflow: hidden;
}

#cover.hide {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
    filter: grayscale(1) blur(10px);
}

/* ========== ANIMATION CORE (STAGGERED) ========== */
.anim-1 { opacity: 0; animation: fadeBlurIn 1.2s var(--transition-curve) forwards 0.2s; }
.anim-2 { opacity: 0; animation: fadeBlurIn 1.2s var(--transition-curve) forwards 0.5s; }
.anim-3 { opacity: 0; animation: fadeBlurIn 1.2s var(--transition-curve) forwards 0.8s; }
.anim-4 { opacity: 0; animation: fadeBlurIn 1.2s var(--transition-curve) forwards 1.1s; }

@keyframes fadeBlurIn {
    from {
        opacity: 0;
        filter: blur(15px);
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

/* ========== MODERN BUTTON STYLE ========== */
.btn-open {
    position: relative;
    margin-top: 30px;
    padding: 16px 50px;
    background: transparent !important;
    color: var(--sage) !important;
    border: 1px solid var(--sage) !important;
    border-radius: 2px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    transition: all 0.5s var(--transition-curve);
    overflow: hidden;
    z-index: 1;
}

.btn-open:hover {
    color: white !important;
    letter-spacing: 5px;
}

.btn-open::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: var(--sage);
    transition: width 0.5s var(--transition-curve);
    z-index: -1;
}

.btn-open:hover::before {
    width: 100%;
}

.btn-line {
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 1px;
    background: var(--clay);
    transform: translateX(-50%);
    transition: width 0.5s ease;
}

.btn-open:hover .btn-line {
    width: 80%;
}

/* ========== FLOATING ORNAMENTS ========== */
#cover::after {
    content: '';
    position: absolute;
    width: 250px; height: 250px;
    border: 1px solid var(--mint);
    border-radius: 50%;
    top: -80px; right: -80px;
    z-index: -1;
    animation: floatingCircle 15s infinite linear;
}

#cover::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border: 1px dashed var(--clay);
    bottom: -100px; left: -100px;
    z-index: -1;
    opacity: 0.2;
    animation: morphingShape 20s infinite alternate ease-in-out;
}

@keyframes floatingCircle {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 40px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes morphingShape {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%; transform: rotate(45deg); }
}

/* ========== REVEAL ON SCROLL ========== */
.reveal {
    opacity: 0;
    filter: blur(10px);
    transition: all 1.2s var(--transition-curve);
}

.reveal-bottom { transform: translateY(60px) rotate(2deg); }
.reveal-left { transform: translateX(-60px) rotate(-2deg); }
.reveal-right { transform: translateX(60px) rotate(2deg); }

.reveal.active {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
    filter: blur(0);
}

.timer-container {
    display: flex;
    justify-content: center;
    gap: 15px; /* Jarak antar kotak lebih lega */
    margin-top: 40px;
}

.timer-box {
    background: #ffffff;
    width: 75px;
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px; /* Sudut tumpul yang lembut */
    box-shadow: 0 10px 25px rgba(169, 175, 126, 0.15); /* Shadow warna Sage */
    border: 1px solid rgba(221, 229, 182, 0.5); /* Border tipis warna Mint */
    transition: transform 0.3s ease;
}

.timer-box:hover {
    transform: translateY(-5px);
}

.timer-box span {
    display: block;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--sage);
    line-height: 1;
}

.timer-box small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--clay);
    margin-top: 8px;
    font-weight: 600;
}

/* ========== HERO ARCH STYLE ========== */
.hero-img {
    width: 280px;
    height: 400px;
    border-radius: 140px 140px 0 0;
    overflow: hidden;
    margin: 0 auto 30px;
    box-shadow: 20px 20px 0px var(--mint);
    border: 1px solid rgba(169, 175, 126, 0.2);
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.hero-img:hover img {
    transform: scale(1.1);
}


/* Profile Frames */
.profile-frame {
    width: 100%;
    height: 450px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--mint);
    background: #fcfcfc;
}
.left-arch { border-radius: 0 140px 0 140px; }
.right-arch { border-radius: 140px 0 140px 0; }
.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Event Labels */
.event-label {
    font-size: 0.6rem; 
    letter-spacing: 3px; 
    color: var(--clay); 
    font-weight: 700; 
    margin-bottom: 10px;
}

/* ========== CARD MODERNA ========== */
.card-moderna {
    background: var(--white);
    padding: 40px 25px;
    border: 1px solid var(--mint);
    text-align: left;
    margin-bottom: 25px;
    position: relative;
}

.card-moderna::after {
    content: '';
    position: absolute;
    bottom: -10px; right: -10px;
    width: 100%; height: 100%;
    border: 1px solid var(--sage);
    z-index: -1;
    transition: 0.3s;
}

.card-moderna:hover::after {
    bottom: -5px; right: -5px;
}

/* ========== GALLERY MASONRY ========== */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
    margin-top: 30px;
}

.masonry-item {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--mint);
}

.masonry-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.8s;
}

.item-large { grid-column: span 1; grid-row: span 2; }


/* RSVP SECTION STYLING */
.rsvp-form {
    max-width: 400px;
    margin: 40px auto 0;
    text-align: left;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: 15px 0; /* Gaya Underline */
    margin-bottom: 25px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--mint);
    color: var(--dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    border-bottom: 1px solid var(--sage);
}

.rsvp-form select {
    cursor: pointer;
    appearance: none; /* Menghilangkan arrow default browser */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A9AF7E' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    background: var(--sage) !important;
    color: white !important;
    border: none;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    border-radius: 4px; /* Sedikit rounded agar modern */
}

.btn-submit:hover {
    background: var(--clay) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(176, 137, 104, 0.2);
}

/* ========== MUSIC & NAVIGATION ========== */
.music-control {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 1000;
}

.music-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--white);
    color: var(--sage);
    border: 2px solid var(--sage);
    display: flex; justify-content: center; align-items: center;
}

.playing i { animation: spin 3s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.back-to-top {
    color: var(--clay);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 50px;
}

.back-to-top i { animation: bounce 2s infinite; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}