:root {
    --gold: #c9a96e;
    --gold-light: #e7d3a4;
    --gold-dark: #9f7740;
    --cream: #fdf8f1;
    --cream-deep: #f2e8da;
    --rose: #c78f9f;
    --text: #4c3a2a;
    --text-soft: #7b6658;
    --dark: #20160f;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(73, 48, 27, 0.14);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--text);
    background: var(--cream);
}

.cover {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(231, 211, 164, 0.3), transparent 40%), linear-gradient(160deg, #fdf8f1 0%, #f4e8d7 100%);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.cover-out {
    animation: fadeOut 0.65s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(1.04); }
}

.cover-inner {
    max-width: 680px;
    width: 100%;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(201, 169, 110, 0.45);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    text-align: center;
    padding: 52px 24px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.cover-ornament {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cover-ornament.top { top: 16%; }
.cover-ornament.bottom { bottom: 16%; }

.cover-petals .cp {
    position: absolute;
    color: rgba(201, 169, 110, 0.5);
    font-size: 18px;
    animation: float 7s ease-in-out infinite;
}

.cp1 { top: 12%; left: 18%; }
.cp2 { top: 26%; right: 14%; animation-delay: 0.6s; }
.cp3 { bottom: 30%; left: 14%; animation-delay: 1s; }
.cp4 { bottom: 20%; right: 20%; animation-delay: 1.4s; }
.cp5 { top: 48%; left: 5%; animation-delay: 2s; }
.cp6 { top: 54%; right: 6%; animation-delay: 2.3s; }

@keyframes float {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(-12px); opacity: 0.95; }
}

.cov-pre {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold-dark);
}

.cov-divider,
.inv-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.cov-divider span,
.inv-divider span {
    width: 54px;
    height: 1px;
    background: rgba(201, 169, 110, 0.7);
}

.cov-divider i,
.inv-divider i {
    color: var(--gold);
}

.cov-names {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.7rem, 8vw, 4.7rem);
    line-height: 1;
    color: var(--dark);
}

.cov-name { display: block; }
.cov-amp {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2.4rem, 7vw, 3.5rem);
    color: var(--rose);
    margin: 6px 0;
}

.cov-date {
    color: var(--text-soft);
    margin-top: 6px;
}

.guest-badge {
    margin: 16px auto 0;
    padding: 10px 16px;
    border-radius: 99px;
    border: 1px solid var(--gold-light);
    background: rgba(255, 255, 255, 0.82);
    width: fit-content;
    max-width: 100%;
}

.cov-btn {
    margin-top: 22px;
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    padding: 14px 26px;
    border-radius: 99px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.cov-note {
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.cover-brand {
    position: absolute;
    bottom: 20px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9rem;
}

.invitation {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.invitation.inv-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.music-player {
    position: fixed;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 30;
    background: rgba(32, 22, 15, 0.88);
    color: var(--white);
    border-radius: 99px;
    padding: 8px 12px;
}

.music-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: transparent;
    color: var(--white);
    cursor: pointer;
}

.music-btn.playing {
    background: rgba(201, 169, 110, 0.26);
}

.music-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.88);
}

section {
    padding: 90px 24px;
}

.inv-hero {
    min-height: 70vh;
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    background: linear-gradient(160deg, #f8f0e3 0%, #f0dfc6 100%);
    overflow: hidden;
}

.inv-ring {
    border: 1px solid rgba(201, 169, 110, 0.5);
    border-radius: 50%;
    position: absolute;
    animation: spin 24s linear infinite;
}

.r1 { width: 230px; height: 230px; top: 10%; right: 6%; }
.r2 { width: 140px; height: 140px; left: 5%; bottom: 12%; animation-direction: reverse; }
.r3 { width: 90px; height: 90px; right: 24%; bottom: 20%; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.inv-hero-content {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.inv-greeting {
    font-family: 'Great Vibes', cursive;
    color: var(--rose);
    font-size: clamp(2.2rem, 6vw, 3.2rem);
}

.inv-sub {
    color: var(--text-soft);
    line-height: 1.8;
}

.s-label-inv {
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-align: center;
    color: var(--gold-dark);
    font-size: 0.74rem;
}

.s-title-inv {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    text-align: center;
    margin-top: 10px;
    color: var(--dark);
}

.inv-couple,
.inv-events,
.inv-map,
.inv-gallery,
.inv-rsvp,
.inv-closing,
.inv-countdown {
    max-width: 1180px;
    margin: 0 auto;
}

.couple-wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.person {
    text-align: center;
}

.person-photo {
    width: min(260px, 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 18px;
    border: 8px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-role {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dark);
    font-size: 0.72rem;
}

.person-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.person-parents {
    color: var(--text-soft);
    margin-top: 8px;
    line-height: 1.7;
}

.couple-connector {
    text-align: center;
    display: grid;
    gap: 10px;
    align-items: center;
}

.conn-line {
    width: 1px;
    height: 68px;
    margin: 0 auto;
    background: linear-gradient(var(--gold), transparent);
}

.conn-amp {
    font-family: 'Great Vibes', cursive;
    color: var(--rose);
    font-size: 2.2rem;
}

.couple-quote {
    margin-top: 38px;
    text-align: center;
    color: var(--text-soft);
    line-height: 1.8;
}

.couple-quote blockquote {
    max-width: 820px;
    margin: 0 auto;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
}

.couple-quote cite {
    display: block;
    margin-top: 8px;
    font-size: 0.95rem;
}

.inv-countdown {
    background: linear-gradient(145deg, #20160f, #4f3628);
    border-radius: 24px;
    color: var(--white);
    text-align: center;
}

.inv-countdown .s-title-inv,
.inv-countdown .s-label-inv,
.inv-countdown .cd-target,
.inv-countdown .inv-divider i {
    color: #f9ebd1;
}

.inv-countdown .inv-divider span {
    background: rgba(249, 235, 209, 0.6);
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 740px;
    margin: 0 auto;
}

.cd-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
}

.cd-num {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 2.9rem);
}

.cd-lbl {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.cd-target {
    margin-top: 14px;
    opacity: 0.9;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.event-card {
    background: var(--white);
    border: 1px solid rgba(201, 169, 110, 0.34);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.ev-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--white);
}

.ev-name {
    margin-top: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
}

.ev-details {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.ev-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
    color: var(--text-soft);
}

.map-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.map-tab {
    border: 1px solid var(--gold-light);
    background: var(--white);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
}

.map-tab.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.map-frames {
    position: relative;
    margin-top: 16px;
    height: 360px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-frame {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.map-frame.active {
    opacity: 1;
    pointer-events: auto;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.g-item {
    position: relative;
    min-height: 210px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.g-item.g-wide {
    grid-column: span 2;
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.g-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(32, 22, 15, 0.35);
    color: var(--white);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.g-item:hover img {
    transform: scale(1.05);
}

.g-item:hover .g-overlay {
    opacity: 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.lightbox.active {
    display: flex;
}

.lb-img {
    width: min(90vw, 980px);
    max-height: 82vh;
    object-fit: contain;
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
}

.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

.rsvp-desc {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-soft);
    line-height: 1.8;
}

.rsvp-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rsvp-form-card,
.dataset-card {
    background: var(--white);
    border: 1px solid rgba(201, 169, 110, 0.28);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.rsvp-form {
    display: grid;
    gap: 10px;
}

.rsvp-input {
    width: 100%;
    border: 1px solid var(--gold-light);
    border-radius: 12px;
    padding: 12px;
    color: var(--text);
    background: #fffefa;
}

.rsvp-btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    padding: 13px 16px;
    cursor: pointer;
}

.form-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.form-alert--success {
    background: #edf7ef;
    border: 1px solid #b8dec0;
    color: #2f6240;
}

.form-alert--error {
    background: #fff1f1;
    border: 1px solid #f0bcbc;
    color: #9f2f2f;
}

.dataset-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
}

.dataset-subtitle {
    margin-top: 4px;
    color: var(--text-soft);
}

.entry-list {
    margin-top: 12px;
    max-height: 420px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

.entry-item {
    border: 1px solid rgba(201, 169, 110, 0.26);
    border-radius: 12px;
    padding: 10px;
    background: #fffdf8;
}

.entry-item-dark {
    background: linear-gradient(135deg, #fffaf0, #fff7ea);
}

.entry-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.entry-message {
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.6;
}

.entry-meta {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.attendance-pill {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.attendance-pill.hadir {
    background: #e4f3e7;
    color: #2f6b3f;
}

.attendance-pill.hadir-plus {
    background: #e7efff;
    color: #3452a7;
}

.attendance-pill.tidak-hadir {
    background: #fde9e9;
    color: #9f3030;
}

.empty-state {
    color: var(--text-soft);
    text-align: center;
    padding: 20px;
}

.inv-closing {
    text-align: center;
}

.clo-pre {
    color: var(--rose);
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
}

.clo-names {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.7rem, 8vw, 4rem);
}

.clo-msg {
    color: var(--text-soft);
    line-height: 1.8;
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .couple-wrap {
        grid-template-columns: 1fr;
    }

    .couple-connector {
        grid-template-columns: auto auto auto;
    }

    .conn-line {
        width: 68px;
        height: 1px;
        background: linear-gradient(90deg, var(--gold), transparent);
    }

    .events-grid,
    .rsvp-layout {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .g-item.g-wide {
        grid-column: span 2;
    }

    .map-frames {
        height: 300px;
    }
}

@media (max-width: 640px) {
    section {
        padding: 76px 16px;
    }

    .cover-inner {
        padding: 42px 18px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .g-item,
    .g-item.g-wide {
        grid-column: span 1;
    }

    .music-label {
        display: none;
    }
}