:root {
    --platinum: #e5e7eb;
    --dark: #111827;
    --text-gray: #4b5563;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

html {
    scroll-behavior: smooth;
    background-color: #f3f4f6;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: #f0f0ee;

    font-family: "Inter", sans-serif;
    color: var(--dark);
    background-color: var(--white);
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.02);
    overflow-x: hidden;
}

/* Fix: Lightbox scroll lock terpisah dari cover lock */
body.lightbox-open {
    overflow: hidden;
}

/* h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 300; text-transform: uppercase; letter-spacing: 4px; } */
.cursive {
    font-family: "Sacramento", cursive;
    color: var(--text-gray);
    font-size: 2.5rem;
}

section {
    overflow-x: hidden; /* tambahkan ini */
    padding: 100px 30px;
    text-align: center;
    border-bottom: 1px solid var(--platinum);
}

/* ========== ANIMATIONS ========== */
/* .reveal {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-bottom {
    transform: translateY(30px);
}
.reveal-left {
    transform: translateX(-40px);
}
.reveal-right {
    transform: translateX(40px);
}
.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
} */

/* ===== SCROLL ANIMATION - Fix konflik hidden-right ===== */
.reveal-scroll {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity 0.9s cubic-bezier(0.19, 1, 0.22, 1),
        transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scroll.hidden-right {
    opacity: 0;
    transform: translateX(40px);
}

/* Fix: Tambahkan agar hidden-right juga bisa visible */
.reveal-scroll.hidden-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scroll:nth-child(2) {
    transition-delay: 0.1s;
}
.reveal-scroll:nth-child(3) {
    transition-delay: 0.2s;
}
.reveal-scroll:nth-child(4) {
    transition-delay: 0.3s;
}
.reveal-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

/* ========== LOVE STORY ========== */
#story {
    padding: 100px 20px;
    background-color: #ffffff;
    overflow: hidden;
}

#story h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: 2px;
}

.story-timeline {
    position: relative;
    padding: 40px 0;
}

/* Garis vertikal tipis di tengah (Opsional) */
.story-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.05),
        transparent
    );
    z-index: 0;
}

.story-item {
    position: relative;
    z-index: 1;
    margin-bottom: 80px;
}

.story-item:last-child {
    margin-bottom: 0;
}

.story-date {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 5px;
    color: #a4a4a4;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.story-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    font-style: italic;
    font-weight: bold; /* Sebelumnya 500, sekarang diganti menjadi bold */
    color: #333;
    margin-bottom: 20px;
}

/* .story-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.8rem;
            font-style: italic;
            font-weight: 500;
            color: #333;
            margin-bottom: 20px;
        } */

.story-description {
    font-size: 0.85rem;
    line-height: 2;
    color: #777;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 300;
}

/* Dekorasi pemisah antar momen */
.story-divider {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.2;
}

.story-divider i {
    font-size: 0.4rem;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    #story {
        padding: 60px 25px;
    }

    .story-title {
        font-size: 1.5rem;
    }

    .story-description {
        font-size: 0.8rem;
    }
}

/* ========== COVER ========== */
#cover {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 100%;
    background-image: url("/img/cover/cover.jpeg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: 1s ease-in-out;
}

#cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(12, 12, 12, 0.31) 50%,
        rgba(19, 19, 19, 0.51) 100%
    );
    z-index: 0;
}

#cover.hide {
    transform: translateX(-50%) translateY(-100%);
}

#cover > div {
    position: relative;
    z-index: 1;
    text-align: left;
    width: 100%;
    padding: 0 32px;
    box-sizing: border-box;
    margin-top: 30vh; /* dorong konten ke 60% bawah layar */
}

/* ========== COVER ========== */
#cover > div.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1),
        transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

#cover > div.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.btn-open {
    margin-top: 40px;
    padding: 15px 40px;
    background: var(--dark);
    color: white;
    border: none;
    font-size: 0.65rem;

    letter-spacing: 3px;
    cursor: pointer;
    text-transform: uppercase;
    width: auto;
}

.btn-open:hover {
    opacity: 0.85;
}

/* ========== COUNTDOWN ========== */
.timer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 40px;
}
.timer-item span {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 300;
}
.timer-item small {
    font-size: 0.6rem;
    letter-spacing: 2px;
    opacity: 0.6;
    text-transform: uppercase;
}

/* ========== PHOTO BOX ========== */
.photo-minimal {
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 25px;
}
.photo-minimal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 1.2s;
}
.photo-minimal:hover img {
    filter: grayscale(0%);
}

/* ========== GALLERY ========== */
.masonry-grid {
    columns: 2;
    column-gap: 10px;
    margin-top: 30px;
    /* HAPUS: grid-template-columns & grid-auto-flow — konflik dengan columns */
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    filter: grayscale(100%);
    transition:
        filter 0.8s,
        transform 0.8s;
}

.masonry-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ========== RSVP FORM ========== */
.rsvp-form {
    text-align: left;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: 15px 0;
    margin-bottom: 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--platinum);
    color: var(--dark);
    outline: none;
    font-family: inherit;
}
.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--dark);
    color: white;
    border: none;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* ========== MUSIC CONTROL (VINYL VERSION) ========== */
.music-control {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-230px);
    z-index: 1000;
}

.music-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

/* Animasi Rotasi Vinyl */
@keyframes rotateVinyl {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.music-btn.playing i {
    animation: rotateVinyl 4s linear infinite;
}

body.no-scroll {
    overflow: hidden;
}
@media (max-width: 500px) {
    .music-control {
        left: 20px;
        transform: none;
    }
}

/* ============================================
   GIFT SECTION — Redesign
============================================ */

@keyframes gf-fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── SECTION ── */
.gift-section {
    background: #f4f4f2;
    color: #2c2c2c;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 5vw, 2rem);
}
.gift-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(60, 60, 60, 0.07) 1px,
        transparent 1px
    );
    background-size: 22px 22px;
    z-index: 0;
    pointer-events: none;
}

.gf-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.gf-label {
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(60, 60, 60, 0.5);
    margin-bottom: 0.4rem;
}
.gf-title {
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}
.gf-subtitle {
    font-size: clamp(0.78rem, 3.2vw, 0.84rem);
    line-height: 1.7;
    color: rgba(50, 50, 50, 0.6);
    margin: 0 auto 2rem;
    max-width: 320px;
}

/* ── GRID ── */
.gift-cards {
    display: grid;
    grid-template-columns: 1fr; /* mobile: 1 kolom */
    gap: clamp(0.75rem, 3vw, 2rem);
    width: 100%;
}
@media (min-width: 600px) {
    .gift-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── BASE CARD ── */
.gift-card {
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    animation: gf-fadeUp 0.7s ease forwards;
    opacity: 0;
    width: 100%;
    min-width: 0;
}
.gift-card:nth-child(1) {
    animation-delay: 0.1s;
}
.gift-card:nth-child(2) {
    animation-delay: 0.25s;
}

/* ── BANK CARD ── */
.bank-card-wrap {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
}

.bank-card {
    background: linear-gradient(135deg, #e2e2e2 0%, #f7f7f5 55%, #d8d8d5 100%);
    border-radius: 14px;
    padding: clamp(0.9rem, 4vw, 1.3rem) clamp(0.9rem, 4vw, 1.4rem);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border: 0.5px solid rgba(180, 180, 180, 0.35);
}
.bank-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}
.bank-card::after {
    content: "";
    position: absolute;
    bottom: -35px;
    left: -25px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    pointer-events: none;
}

.bank-card-top {
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}
.bank-card-logo img {
    height: clamp(22px, 6vw, 30px);
    width: auto;
    object-fit: contain;
}
.bank-card-logo-fallback {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem);
    font-weight: 700;
    color: #1a5276;
}

/* Chip */
.bank-card-chip {
    width: clamp(28px, 8vw, 36px);
    height: clamp(20px, 5.5vw, 27px);
    background: linear-gradient(135deg, #c9982a 0%, #f0c84a 45%, #b8861e 100%);
    border-radius: 5px;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    align-self: flex-start;
}
.bank-card-chip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.18);
    transform: translateY(-50%);
}
.bank-card-chip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.18);
    transform: translateX(-50%);
}

/* Nomor rekening — baris sendiri, TIDAK berbagi baris dengan tombol */
.bank-card-number-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
}
.bank-card-number {
    display: block;
    width: 100%;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(0.8rem, 4.2vw, 0.95rem);
    letter-spacing: 0.14em;
    color: #2a2a2a;
    font-weight: 600;
    user-select: none;
}

/* Footer: nama (kiri) + tombol Salin (kanan) */
.bank-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    width: 100%;
}
.bank-card-name {
    font-size: clamp(0.6rem, 2.8vw, 0.72rem);
    color: #3a3a3a;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tombol Salin di atas kartu bank */
.bank-copy-btn {
    background: rgba(30, 30, 30, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border: none;
    padding: 0.38rem 0.75rem;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: clamp(0.65rem, 2.6vw, 0.72rem);
    font-weight: 500;
    white-space: nowrap;
    min-height: 36px;
    min-width: 44px;
    flex-shrink: 0;
    transition:
        background 0.2s,
        transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.bank-copy-btn:hover {
    background: rgba(10, 10, 10, 0.88);
}
.bank-copy-btn:active {
    transform: scale(0.96);
}
.bank-copy-btn.copied {
    background: rgba(30, 100, 30, 0.82);
}

/* ── ADDRESS CARD ── */
.address-card {
    background: #fff;
    border: 1px solid rgba(40, 40, 40, 0.1);
    padding: clamp(1.2rem, 4.5vw, 1.8rem) clamp(1rem, 4vw, 1.4rem);
    display: flex;
    flex-direction: column;
    box-shadow: none;
    transition:
        box-shadow 0.3s,
        transform 0.3s;
}
.address-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(30, 30, 30, 0.3),
        transparent
    );
}
@media (hover: hover) {
    .address-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
    }
}

.gift-bank-name {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
}
.gf-card-divider {
    width: 32px;
    height: 1px;
    background: rgba(40, 40, 40, 0.15);
    margin: 0.8rem auto;
}
.gift-address {
    font-size: clamp(0.78rem, 3vw, 0.82rem);
    color: rgba(40, 40, 40, 0.6);
    line-height: 1.65;
    text-align: left;
    flex: 1;
}
.gift-address p {
    margin-bottom: 0.3rem;
}

/* ── SHARED BUTTON ── */
.copy-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: clamp(0.72rem, 2.8vw, 0.76rem);
    font-weight: 500;
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
    transition:
        background 0.2s,
        transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover {
    background: #333;
}
.copy-btn:active {
    transform: scale(0.96);
}
.copy-btn.copied {
    background: #2d6a2d;
}
.copy-btn.full-width {
    width: 100%;
    justify-content: center;
    margin-top: 0.8rem;
}

/* Safe area notch */
@supports (padding: env(safe-area-inset-left)) {
    .gift-section {
        padding-left: max(clamp(1rem, 5vw, 2rem), env(safe-area-inset-left));
        padding-right: max(clamp(1rem, 5vw, 2rem), env(safe-area-inset-right));
    }
}

/* ========== COMMENTS (Standard Feature) ========== */
.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.comment-item:last-child {
    border-bottom: none;
}

/* Modifikasi Gallery untuk kapasitas lebih banyak */
.masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
}

/* ========== BOTTOM NAVBAR ========== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.8); /* Transparansi Putih */
    backdrop-filter: blur(10px); /* Efek Blur Premium */
    display: flex;
    justify-content: space-around;
    padding: 12px 10px;
    border-radius: 50px; /* Bentuk Pill */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: 0.5s ease;
    z-index: 100; /* pastikan di bawah lightbox */
}

/* Navbar muncul hanya setelah undangan dibuka */
body:not(.no-scroll) .bottom-nav {
    opacity: 1;
    visibility: visible;
}

.nav-item {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    transition: 0.3s;
}

.nav-item i {
    font-size: 1.1rem;
    opacity: 0.5;
}

.nav-item span {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.5;
}

/* Hover & Active State */
.nav-item:hover i,
.nav-item:hover span {
    opacity: 1;
    color: #000;
}

/* Sembunyikan music control asli atau pindahkan posisinya */
.music-control {
    bottom: 90px !important; /* Naikkkan sedikit agar tidak tabrakan dengan navbar */
    z-index: 100;
}

/* ========== RING DECORATION ========== */
.ring-decoration {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 60px; /* Jarak dari atas setelah cover terbuka */
    margin-bottom: 10px; /* Menarik section di bawahnya agar lebih dekat */
    position: relative;
    z-index: 5;
}

.ring-decoration img {
    width: 120px; /* Ukuran cincin agar tetap elegan, tidak terlalu besar */
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.05)); /* Shadow halus */
    background: linear-gradient(to bottom, #fafafa, #fafafa, #fafafa);
    opacity: 0.9;
}

/* Responsif untuk layar kecil */
@media (max-width: 500px) {
    .ring-decoration img {
        width: 100px;
    }
}

/* UBAH BAGIAN INI */
h1,
h2,
h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: bold; /* Sebelumnya 300, sekarang diganti menjadi bold */
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* ===== SCROLL ANIMATION ===== */
.reveal-scroll {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity 0.9s cubic-bezier(0.19, 1, 0.22, 1),
        transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

/* fade-in dari kiri */
.reveal-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* fade-out ke kanan */
.reveal-scroll.hidden-right {
    opacity: 0;
    transform: translateX(40px);
}

/* Delay bertingkat untuk elemen di dalam section */
.reveal-scroll:nth-child(2) {
    transition-delay: 0.1s;
}
.reveal-scroll:nth-child(3) {
    transition-delay: 0.2s;
}
.reveal-scroll:nth-child(4) {
    transition-delay: 0.3s;
}
.reveal-scroll:nth-child(5) {
    transition-delay: 0.4s;
}
