/* BASE STYLES & VARIABLES */
:root {
    --cream: #f5f0e6;
    --brown: #6b4f3a;
    --dark-brown: #3e2c23;
    --text-color: #3e2c23;
    --light-text: #fff;
    --bg-overlay: rgba(62, 44, 35, 0.6);
    --nav-bg: rgba(107, 79, 58, 0.9);
    
    --font-heading: 'Cinzel', serif;
    --font-accent: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --font-wedding: 'Parisienne', cursive;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #1a1a1a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* DESKTOP WRAPPER (9:16 PORTRAIT) */
.desktop-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1578305829630-f5068224ce3d?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat fixed;
}
.desktop-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 0;
}

.mobile-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    max-height: 100vh;
    background-color: var(--cream);
    overflow: hidden; /* We'll control scroll inside main-content */
    z-index: 1;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

/* SCROLL BAR FOR CONTAINER */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    opacity: 0;
    transition: opacity 1s ease;
    height: 100vh;
    position: absolute;
    inset: 0;
    background-color: var(--cream);
    z-index: 10;
    padding-bottom: 80px;
    display: none; /* Initially hidden until unlocked */
    background-image: radial-gradient(rgba(107, 79, 58, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.main-content.visible {
    display: block;
    opacity: 1;
}

/* HERO SECTION (VIDEO AUTOPLAY) */
.hero-section {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1.2s ease;
}
.hero-section.slide-up {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(62,44,35,0.3) 0%, rgba(62,44,35,0.7) 100%);
    z-index: -1;
}

.hero-content {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1.5s ease, transform 1.5s ease;
    width: 90%;
    max-width: 320px;
}

.hero-content.show {
    opacity: 1;
    transform: scale(1);
}

/* JAVANESE FRAME */
.frame-jawa {
    position: relative;
    padding: 2rem;
    border: 2px solid var(--brown);
    background: rgba(245, 240, 230, 0.15);
    backdrop-filter: blur(5px);
    text-align: center;
    color: var(--light-text);
}

.frame-jawa::before,
.frame-jawa::after {
    content: '';
    position: absolute;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    top: -5px;
    left: -5px;
    border: 1px solid rgba(245, 240, 230, 0.5);
    z-index: -1;
}
.frame-jawa::after {
    top: 5px;
    left: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    border: 1px solid rgba(107, 79, 58, 0.8);
}

/* Abstract Ornaments (Using CSS shapes) */
.vector-ornament {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--cream);
}
.top-left { top: -15px; left: -15px; border-right: none; border-bottom: none; }
.top-right { top: -15px; right: -15px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -15px; left: -15px; border-right: none; border-top: none; }
.bottom-right { bottom: -15px; right: -15px; border-left: none; border-top: none; }

.frame-inner p.kepada {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.frame-inner h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--cream);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.cover-names {
    font-family: var(--font-wedding);
    font-size: 2.2rem;
    color: var(--gold, #d4af37);
    margin-bottom: 0.5rem;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.btn-primary {
    background-color: var(--brown);
    color: var(--cream);
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--cream);
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    letter-spacing: 1px;
}
.btn-primary:hover {
    background-color: var(--dark-brown);
    transform: scale(1.05);
}

/* TYPOGRAPHY & SECTIONS */
.section {
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 1px;
    background-color: var(--brown);
    margin: 10px auto 0;
}

/* SECTION BACKGROUND IMAGES */
.opening, .closing, .event {
    position: relative;
    z-index: 1;
}

.opening::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('assets/images/bg_opening.png') center/cover no-repeat;
    opacity: 0.45; /* Vektor/image lebih terlihat namun tetap menjaga kontras */
    z-index: -1;
}

.event::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('assets/images/bg_event.png') center/cover no-repeat;
    opacity: 0.35;
    z-index: -1;
}

.closing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('assets/images/bg_closing.png') center/cover no-repeat;
    opacity: 0.4;
    z-index: -1;
}

/* ORNAMENTS (Rings) */
.ring-ornament {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* OPENING */
.bismillah-container h2 {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 1rem;
    font-weight: 400;
}
.quote {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.quote-source {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brown);
}

/* COUPLE */
.couple-card {
    margin-bottom: 2rem;
}
.photo-container {
    width: 200px;
    height: 250px;
    margin: 0 auto 1.5rem;
    position: relative;
    border-radius: 10px 10px 0 0;
    padding: 5px;
    border: 1px solid var(--brown);
}
.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    filter: sepia(0.2) contrast(0.95);
}
.couple-name {
    font-family: var(--font-wedding);
    color: var(--dark-brown);
    font-size: 2rem;
    margin-bottom: 0.3rem;
    font-weight: normal;
}
.parents {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}
.ig-link {
    color: var(--brown);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}
.ampersand {
    font-family: var(--font-wedding);
    font-size: 2.2rem;
    color: var(--brown);
    margin: -1rem 0 1rem;
    line-height: 1;
}

/* EVENT */
.event-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.event-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(107, 79, 58, 0.2);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(107, 79, 58, 0.05);
}
.event-icon {
    font-size: 2rem;
    color: var(--brown);
    margin-bottom: 1rem;
}
.event-card h3 {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
}
.divider-small {
    width: 30px;
    height: 2px;
    background: var(--brown);
    margin: 0 auto 1rem;
}
.event-date {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.event-time, .event-loc {
    margin-bottom: 0.3rem;
}
.event-addr {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}
.btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--brown);
    color: var(--brown);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.btn-secondary:hover {
    background: var(--brown);
    color: var(--cream);
}

/* GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 8px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: sepia(0.3) saturate(0.8);
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/* LOVE STORY */
.timeline {
    position: relative;
    margin: 0 auto;
    width: 100%;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--brown);
    opacity: 0.5;
}
.timeline-item {
    position: relative;
    padding-left: 45px;
    margin-bottom: 2rem;
    text-align: left;
}
.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brown);
    box-shadow: 0 0 0 4px var(--cream);
}
.timeline-content h3 {
    font-family: var(--font-accent);
    color: var(--dark-brown);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}
.timeline-date {
    font-size: 0.8rem;
    color: var(--brown);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.timeline-content p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* DIGITAL GIFT */
.gift-desc {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}
.bank-card {
    background: #fff;
    border: 1px solid rgba(107, 79, 58, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.bank-icon {
    font-size: 2rem;
    color: var(--brown);
    margin-bottom: 0.5rem;
}
.account-number {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0.5rem 0;
    color: var(--dark-brown);
}
.btn-copy {
    background: rgba(107, 79, 58, 0.1);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--brown);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* RSVP */
.input-field {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: transparent;
    border: 1px solid rgba(107, 79, 58, 0.3);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark-brown);
}
.input-field:focus {
    outline: none;
    border-color: var(--brown);
    background: rgba(255, 255, 255, 0.5);
}
.w-100 { width: 100%; }

.wishes-board {
    margin-top: 3rem;
    text-align: left;
}
.wishes-board h3 {
    font-family: var(--font-heading);
    color: var(--dark-brown);
    margin-bottom: 1.5rem;
    text-align: center;
}
.wishes-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}
.wish-item {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--brown);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}
.badge-hadir { background: #e6f4ea; color: #1e8e3e; }
.badge-absen { background: #fce8e6; color: #d93025; }
.wish-text { font-size: 0.9rem; margin-bottom: 0.5rem; }
.wish-time { font-size: 0.75rem; color: #888; }

/* CLOSING */
.closing {
    background: var(--dark-brown);
    color: var(--cream);
}
.closing-text { margin-bottom: 1rem; }
.terimakasih {
    font-weight: 700;
    margin-bottom: 2rem;
}
.couple-closing {
    font-family: var(--font-wedding);
    font-size: 2.2rem;
    font-weight: normal;
    color: var(--cream);
}

/* MUSIC TOGGLE */
.music-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--brown);
    color: #fff;
    border: none;
    border-radius: 50%;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}
.music-toggle.spin {
    animation: spin 3s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* BOTTOM NAVBAR */
.bottom-navbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}
.bottom-navbar.show {
    transform: translateY(0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(245, 240, 230, 0.6);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.nav-item span {
    font-size: 0.65rem;
    margin-top: 4px;
    font-family: var(--font-body);
}
.nav-item.active {
    color: var(--cream);
}
.nav-item.active i {
    transform: translateY(-2px);
}

/* ANIMATIONS & EFFECTS */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

#snackbar {
    visibility: hidden;
    min-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 12px;
    position: absolute;
    z-index: 100;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}
#snackbar.show {
    visibility: visible;
    opacity: 1;
}

/* SCROLLBAR STYLING */
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: var(--cream); }
.main-content::-webkit-scrollbar-thumb { background: var(--brown); border-radius: 10px; }
