/* ==========================================================================
   THEME: DESAIN 33 - TAMAN MAGNOLIA
   KitoNgundang Wedding Invitation
   Konsep: taman botanikal hijau lumut. Untaian magnolia putih dengan bunga
   emas kecil dan daun teal, bangau putih, kartus berbingkai emas, bagian
   gelap (lumut) dan terang (kertas) yang bergantian dengan jumbai daun.
   Satu momen gerak: sampul lumut membuka seperti iris cahaya menuju kertas.
   ========================================================================== */

@property --r {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

:root {
    --lumut: #2b3526;
    --lumut-2: #3a4632;
    --olive: #464534;
    --sage: #dfe3d6;
    --kertas: #fff6ea;
    --emas: #b8975a;
    --emas-terang: #e2cb92;
    --emas-tua: #8c6f3a;
    --magnolia: #fbf8f1;
    --teal: #2f6b60;
    --mawar: #8d4f52;
    --ink: #2f3a2a;
    --muted: #55573f;
    --daun-terang: #eef1e6;
    --bg-body: #161d14;

    --font-script: 'Birthstone', 'Brush Script MT', cursive;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-arab: 'Amiri', serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io: cubic-bezier(0.6, 0, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.5, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    background-color: var(--bg-body);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.locked {
    overflow: hidden;
    height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--emas-tua);
    outline-offset: 3px;
}

.moss a:focus-visible,
.moss button:focus-visible,
.moss input:focus-visible,
.moss select:focus-visible,
.moss textarea:focus-visible {
    outline-color: var(--emas-terang);
}

/* ---------- Permukaan ---------- */
.deco {
    pointer-events: none;
    user-select: none;
}

/* kertas: warna dan serat digambar sekali di .app-container supaya menyambung antar-bagian */
.paper-sage {
    background-color: rgba(223, 227, 214, 0.6);
}

/* lumut: kabut hijau-abu dengan bagian tengah paling gelap */
.moss {
    color: var(--daun-terang);
    background:
        radial-gradient(ellipse 72% 58% at 50% 50%, rgba(16, 24, 13, 0.72), rgba(16, 24, 13, 0) 100%),
        url('../images/moss.svg') 0 0 / 480px 640px repeat,
        var(--lumut);
}

.moss-deep {
    background:
        radial-gradient(ellipse 60% 50% at 50% 46%, rgba(10, 16, 8, 0.8), rgba(10, 16, 8, 0) 100%),
        url('../images/moss.svg') 0 0 / 480px 640px repeat,
        #232c1f;
}

/* jumbai daun: warna bagian sebelumnya menjuntai ke bagian berikutnya */
.fringe {
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    z-index: 2;
    width: 100%;
    aspect-ratio: 480 / 64;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.fringe-moss { background-image: url('../images/fringe-moss.svg'); }
.fringe-paper { background-image: url('../images/fringe-paper.svg'); }

/* kartus: plakat bergelombang berbingkai emas, tinggi mengikuti isi (9-slice) */
.cartouche {
    position: relative;
    border: 1px solid transparent;
    border-image: url('../images/cartouche.svg') 70 fill / 93px / 0 stretch;
    background: none;
    color: var(--olive);
}

/* ---------- Tombol ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--lumut-2) 0%, var(--lumut) 100%);
    color: #f6f0dc;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    padding: 0.7rem 1.9rem;
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 10px 20px rgba(20, 28, 16, 0.32),
        inset 0 0 0 1px rgba(226, 203, 146, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 24px rgba(20, 28, 16, 0.4),
        inset 0 0 0 1px rgba(240, 222, 170, 0.95);
}

.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-small {
    font-size: 1.02rem;
    padding: 0.45rem 1.25rem;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.btn-gold {
    background: linear-gradient(180deg, #f1dfa6 0%, #cfae62 100%);
    color: #2a2f1d;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.34),
        inset 0 0 0 1px rgba(255, 246, 214, 0.7);
}

.btn-gold:hover {
    box-shadow:
        0 14px 24px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(255, 250, 230, 0.95);
}

/* ---------- Untaian bunga dan bangau ---------- */
.spray {
    position: absolute;
    z-index: 2;
    width: var(--w);
    pointer-events: none;
    transform-origin: 50% 0;
    animation: sway var(--dur, 9s) ease-in-out var(--d, 0s) infinite;
}

.spray img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 10px rgba(8, 14, 6, 0.28));
}

.spray-tr { top: var(--y, 0); right: var(--x, -10%); --rot: 16deg; --tx: 14%; }
.spray-tl { top: var(--y, 0); left: var(--x, -10%); --rot: -16deg; --tx: -14%; }
.spray-tl img { transform: scaleX(-1); }
.spray-br { bottom: var(--y, 0); right: var(--x, -10%); transform-origin: 50% 100%; --rot: -16deg; --tx: 14%; }
.spray-br img { transform: scaleY(-1); }
.spray-bl { bottom: var(--y, 0); left: var(--x, -10%); transform-origin: 50% 100%; --rot: 16deg; --tx: -14%; }
.spray-bl img { transform: scale(-1, -1); }

.spray-front {
    z-index: 5;
}

.crane {
    position: absolute;
    z-index: 3;
    width: var(--w);
    pointer-events: none;
}

.crane img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(8, 14, 6, 0.3));
}

.crane-l { left: var(--x); top: var(--y); }
.crane-r { right: var(--x); top: var(--y); }
.crane-r img { transform: scaleX(-1); }

/* dua bangau berhadapan di penutup */
.crane-pair-l { right: 50%; bottom: 1.4rem; margin-right: -2%; }
.crane-pair-l img { transform: scaleX(-1); }
.crane-pair-r { left: 50%; bottom: 1.4rem; margin-left: -2%; }

/* ==========================================================================
   COVER
   ========================================================================== */
#cover {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    z-index: 9999;
    overflow: hidden;
}

.cover-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5.2rem;
    overflow: hidden;
}

.cover-stage .spray,
.cover-stage .crane {
    z-index: 1;
}

.cover-card {
    z-index: 4;
    width: min(86vw, 330px);
    /* tepi plakat berada ~45px di dalam kotak (9-slice), jadi isi perlu padding ekstra */
    padding: 4.4rem 1.7rem 4.3rem;
    text-align: center;
}

.cover-kicker {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.3;
    color: var(--muted);
}

.names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(3rem, 14vw, 3.8rem);
    line-height: 1.15;
    color: var(--olive);
    white-space: nowrap;
}

.cover-date {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--olive);
}

.cover-card .divider {
    margin: 0.55rem auto 0.6rem;
    width: 170px;
    height: auto;
}

.cover-to {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--muted);
}

.cover-guest-name {
    font-family: var(--font-script);
    font-size: 2.1rem;
    line-height: 1.2;
    color: var(--ink);
    max-width: 14ch;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

.cover-note {
    max-width: 24ch;
    margin: 0.35rem auto 0.95rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--muted);
}

/* ==========================================================================
   LAYOUT UMUM
   ========================================================================== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        url('../images/paper.svg') 0 0 / 300px 300px repeat,
        var(--kertas);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
}

section,
.closing {
    position: relative;
    padding: 4.6rem 1.75rem;
    text-align: center;
    overflow: hidden;
}

section > *:not(.deco):not(.fringe),
.closing > *:not(.deco):not(.fringe) {
    position: relative;
    z-index: 3;
}

/* judul bagian */
.sec-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(3.1rem, 14vw, 3.7rem);
    line-height: 1.1;
    color: var(--olive);
}

.sec-title::after {
    content: '';
    display: block;
    width: 200px;
    height: 30px;
    margin: 0.2rem auto 1.7rem;
    background: url('../images/divider.svg') center / contain no-repeat;
}

.sec-title-light {
    color: var(--emas-terang);
}

.sec-title-light::after {
    background-image: url('../images/divider-light.svg');
}

.sec-date {
    margin: -1rem 0 2.4rem;
    font-weight: 600;
    font-size: 1.15rem;
    color: #e3e8d6;
}

.lead {
    max-width: 30ch;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--ink);
}

/* ==========================================================================
   HERO (kertas)
   ========================================================================== */
#home {
    padding: 5.2rem 0 2.6rem;
}

.frame-photo {
    position: relative;
    z-index: 3;
    width: min(78vw, 300px);
    aspect-ratio: 248 / 368;
    margin: 0 auto;
    filter: drop-shadow(0 16px 20px rgba(40, 44, 28, 0.3));
}

.frame-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--sage);
    -webkit-mask: url('../images/cartouche-mask.svg') center / 100% 100% no-repeat;
    mask: url('../images/cartouche-mask.svg') center / 100% 100% no-repeat;
}

.frame-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/cartouche-line.svg') center / 100% 100% no-repeat;
    pointer-events: none;
}

#home .names {
    margin-top: 0.9rem;
}

.hero-date {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--olive);
}

.ayat {
    width: min(330px, calc(100% - 3.5rem));
    margin: 1.7rem auto 0;
    padding: 1.4rem 0.3rem 1.2rem;
    border-top: 1.5px solid var(--emas);
    border-bottom: 1.5px solid var(--emas);
}

.ayat-ar {
    font-family: var(--font-arab);
    font-size: 1.25rem;
    line-height: 2.1;
    color: var(--ink);
}

.ayat-id {
    margin-top: 0.6rem;
    font-size: 1.1rem;
    line-height: 1.55;
    font-style: italic;
    color: var(--ink);
}

.ayat cite {
    display: block;
    margin-top: 0.6rem;
    font-style: normal;
    font-weight: 700;
    color: var(--emas-tua);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 1.9rem 0 1.4rem;
}

.cd-item {
    width: 68px;
    padding: 0.55rem 0 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--lumut-2), var(--lumut));
    box-shadow:
        0 10px 18px rgba(20, 28, 16, 0.28),
        inset 0 0 0 1px rgba(226, 203, 146, 0.75);
    color: #f6f0dc;
}

.cd-number {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: lining-nums tabular-nums;
}

.cd-label {
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--emas-terang);
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 1.05rem;
    line-height: 0.7;
    color: var(--emas-tua);
}

.scroll-hint i:nth-child(2) {
    opacity: 0.55;
}

/* ==========================================================================
   PEMBUKAAN
   ========================================================================== */
#opening {
    padding-top: 3.4rem;
    padding-bottom: 5rem;
}

.salam {
    font-family: var(--font-arab);
    font-size: 1.8rem;
    line-height: 1.9;
    color: var(--ink);
    margin-bottom: 0.9rem;
}

/* ==========================================================================
   MEMPELAI (lumut)
   ========================================================================== */
#couple {
    padding-top: 6.4rem;
}

.oval-photo {
    position: relative;
    width: min(62vw, 230px);
    aspect-ratio: 230 / 300;
    margin: 0 auto;
    padding: 6px;
    border-radius: 50%;
    border: 2px solid var(--emas);
    background: linear-gradient(180deg, #f3efe0, #d9d4c0);
    box-shadow:
        0 0 0 6px rgba(226, 203, 146, 0.2),
        0 16px 28px rgba(5, 10, 4, 0.5);
}

.oval-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--lumut-2);
}

.person-name {
    margin-top: 1.1rem;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3.6rem;
    line-height: 1.1;
    color: var(--emas-terang);
}

.person-full {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.person-parents {
    font-size: 1.15rem;
    line-height: 1.55;
    color: #dfe5d2;
}

.person-parents strong {
    font-weight: 700;
    color: #ffffff;
}

.person-ig {
    margin-top: 0.9rem;
}

.amp {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: 3.6rem;
    line-height: 1;
    color: var(--emas-terang);
    margin: 2.2rem 0 2rem;
}

/* ==========================================================================
   ACARA (lumut + bangau)
   ========================================================================== */
#event {
    padding-top: 4.4rem;
    padding-bottom: 9.5rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.event-card {
    width: min(86vw, 330px);
    padding: 5.1rem 1.5rem 4.3rem;
    text-align: center;
}

.event-icon {
    position: absolute;
    top: 2.5rem;
    left: 50%;
    translate: -50% 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--lumut);
    color: var(--emas-terang);
    font-size: 1rem;
    box-shadow: inset 0 0 0 1px rgba(226, 203, 146, 0.8), 0 6px 12px rgba(20, 28, 16, 0.3);
}

.event-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 2.55rem;
    line-height: 1.15;
    color: var(--olive);
}

.event-day {
    font-weight: 700;
    color: var(--ink);
}

.event-time {
    color: var(--muted);
}

.event-time i {
    margin-right: 6px;
    color: var(--emas-tua);
}

.event-place {
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--ink);
}

.event-addr {
    max-width: 24ch;
    margin: 0 auto 0.9rem;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--muted);
}

/* ==========================================================================
   SUSUNAN ACARA (kertas)
   ========================================================================== */
#rundown {
    padding-top: 6.2rem;
}

.rundown {
    list-style: none;
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    padding-left: 1.9rem;
    text-align: left;
}

.rundown::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--emas), rgba(184, 151, 90, 0.2));
    transform-origin: 50% 0;
}

.rundown li {
    position: relative;
    padding-bottom: 1.6rem;
}

.rundown li:last-child {
    padding-bottom: 0;
}

/* penanda berupa daun kecil bersudut */
.rundown li::before {
    content: '';
    position: absolute;
    left: -1.9rem;
    top: 8px;
    width: 14px;
    height: 14px;
    margin: -4px 0 0 -2px;
    border-radius: 0 100% 0 100%;
    background: linear-gradient(135deg, #4b8c7c, var(--teal));
    box-shadow: 0 0 0 2px var(--kertas);
}

.rd-time {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--mawar);
}

.rd-body h3 {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 1.95rem;
    line-height: 1.15;
    color: var(--olive);
}

.rd-body p {
    font-size: 1.1rem;
    line-height: 1.45;
    color: var(--muted);
}

/* ==========================================================================
   KISAH
   ========================================================================== */
.story-card {
    max-width: 330px;
    margin: 0 auto 2.6rem;
}

.story-card:last-child {
    margin-bottom: 0;
}

.story-photo {
    position: relative;
    aspect-ratio: 7 / 5;
    padding: 7px;
    border-radius: 18px;
    background: #fffdf6;
    outline: 1px solid var(--emas);
    outline-offset: 5px;
    box-shadow: 0 14px 26px rgba(50, 52, 34, 0.22);
}

.story-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: var(--sage);
}

.story-year {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 0 0.85rem;
    border-radius: 999px;
    background: var(--lumut);
    color: var(--emas-terang);
    font-family: var(--font-script);
    font-size: 1.5rem;
    line-height: 1.5;
}

.story-card h3 {
    margin-top: 1.3rem;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 2.2rem;
    line-height: 1.15;
    color: var(--olive);
}

.story-card p {
    margin-top: 0.3rem;
    font-size: 1.12rem;
    line-height: 1.5;
    color: var(--muted);
}

/* ==========================================================================
   GALERI (lumut)
   ========================================================================== */
#gallery {
    padding-top: 6rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}

.g-item {
    padding: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--emas);
    border-radius: 14px;
    background: #f6f1e2;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.7s var(--ease);
}

.g-item:hover img {
    transform: scale(1.06);
}

.g-tall {
    grid-row: span 2;
}

.g-wide {
    grid-column: span 2;
}

/* lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 18, 10, 0.94);
}

.lightbox[hidden] {
    display: none;
}

.lb-img {
    max-width: 92vw;
    max-height: 82dvh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lb-img.swap {
    animation: lbImg 0.45s var(--ease);
}

.lightbox button {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(226, 203, 146, 0.7);
    border-radius: 50%;
    background: rgba(43, 53, 38, 0.92);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.lightbox button:hover {
    transform: scale(1.08);
}

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.lb-next { right: 12px; top: 50%; margin-top: -23px; }

/* ==========================================================================
   TANDA KASIH (kertas)
   ========================================================================== */
#gift {
    padding-top: 6.2rem;
}

.bank-list {
    display: grid;
    gap: 1.2rem;
    max-width: 330px;
    margin: 2rem auto 0;
}

.bank-card {
    padding: 1.3rem 1.2rem 1.4rem;
    border-radius: 18px;
    background: #fffdf6;
    outline: 1px solid var(--emas);
    outline-offset: -7px;
    border: 1px solid rgba(184, 151, 90, 0.55);
    box-shadow: 0 12px 24px rgba(50, 52, 34, 0.14);
}

.bank-name {
    font-weight: 700;
    color: var(--olive);
}

.bank-name i {
    margin-right: 6px;
    color: var(--emas-tua);
}

.bank-number {
    margin-top: 0.15rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
}

.bank-address {
    margin: 0.3rem auto 0;
    max-width: 22ch;
    line-height: 1.4;
    color: var(--ink);
}

.bank-holder {
    margin-bottom: 0.85rem;
    font-size: 1.08rem;
    color: var(--muted);
}

/* ==========================================================================
   RSVP & UCAPAN (lumut)
   ========================================================================== */
#wishes {
    padding-top: 6rem;
}

.rsvp-form {
    max-width: 330px;
    margin: 0 auto;
    text-align: left;
}

.field {
    margin-bottom: 1rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.field label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emas-terang);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(226, 203, 146, 0.6);
    border-radius: 10px;
    background: #fbf8ee;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.wishes-feed {
    max-width: 330px;
    max-height: 380px;
    margin: 2rem auto 0;
    padding: 0.2rem;
    overflow-y: auto;
    display: grid;
    gap: 0.8rem;
    text-align: left;
}

.wish-card {
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: #fbf8ee;
    border: 1px solid rgba(226, 203, 146, 0.7);
    color: var(--ink);
}

.wish-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
}

.wish-author {
    font-weight: 700;
    color: var(--olive);
}

.wish-status {
    flex-shrink: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f6a52;
}

.wish-status-no {
    color: #9b3a2c;
}

.wish-text {
    margin-top: 0.15rem;
    font-size: 1.08rem;
    line-height: 1.45;
    color: var(--muted);
}

.wish-new {
    animation: newWish 0.8s var(--ease);
}

/* ==========================================================================
   PENUTUP (kertas)
   ========================================================================== */
.closing {
    padding: 8.6rem 1.75rem 13rem;
}

.closing-text {
    max-width: 28ch;
    margin: 0 auto;
    color: var(--ink);
}

.closing-salam {
    margin-top: 1rem;
    font-family: var(--font-arab);
    font-size: 1.5rem;
    line-height: 1.9;
    color: var(--ink);
}

.closing-regards {
    margin-top: 0.9rem;
    color: var(--muted);
}

.closing-names {
    font-family: var(--font-script);
    font-size: clamp(3rem, 14vw, 3.7rem);
    line-height: 1.15;
    color: var(--olive);
    white-space: nowrap;
}

.footer-credit {
    margin-top: 1.2rem;
    font-size: 0.98rem;
    line-height: 1.4;
    color: var(--muted);
}

.footer-credit .fa-heart {
    color: #b8605e;
}

.footer-credit a {
    color: var(--emas-tua);
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   MUSIK & NAVIGASI BAWAH (gaya sama dengan desain 16-32)
   ========================================================================== */
#music-btn {
    position: fixed;
    top: 18px;
    right: max(18px, calc(50% - 240px + 18px));
    width: 42px;
    height: 42px;
    border: 1px solid rgba(226, 203, 146, 0.8);
    border-radius: 50%;
    background: rgba(43, 53, 38, 0.96);
    color: #f6e9c2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(15, 22, 12, 0.45);
    animation: rotateMusic 4s linear infinite;
}

#music-btn.paused {
    animation-play-state: paused;
    opacity: 0.92;
}

#music-btn::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(226, 203, 146, 0.95);
    opacity: 0;
    pointer-events: none;
}

#music-btn:not(.paused)::after {
    animation: ripple 2.4s var(--ease) infinite;
}

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(43, 53, 38, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 203, 146, 0.55);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    display: flex;
    gap: clamp(0.7rem, 3.6vw, 1.5rem);
    z-index: 998;
    box-shadow: 0 8px 25px rgba(15, 22, 12, 0.5);
}

.nav-item {
    color: #d9e2cc;
    text-decoration: none;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: color 0.3s, transform 0.3s;
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item.active,
.nav-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-item.active i {
    color: var(--emas-terang);
    animation: navPop 0.55s cubic-bezier(0.34, 1.8, 0.64, 1);
}

.nav-item:focus-visible {
    outline-color: #ffffff;
}

body.opened .bottom-nav {
    animation: navIn 1.2s cubic-bezier(0.34, 1.45, 0.64, 1) 2.4s backwards;
}

/* ==========================================================================
   ANIMASI
   Konsep: taman yang bernapas. Untaian bunga bergoyang pelan, sampul lumut
   membuka seperti iris cahaya, tiap jenis elemen punya gaya masuk sendiri.
   ========================================================================== */
@keyframes coverIn {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes riseSoft {
    from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(22px) scale(0.82); }
    to   { opacity: 1; transform: none; }
}

@keyframes frameIn {
    from { opacity: 0; transform: scale(0.94); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes lbImg {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes newWish {
    from { opacity: 0; transform: translateY(-14px); background: rgba(226, 203, 146, 0.9); }
    to   { opacity: 1; transform: none; }
}

@keyframes tick {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes rotateMusic {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ripple {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(1.9); opacity: 0; }
}

@keyframes navIn {
    from { transform: translate(-50%, 160%); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes navPop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* gerak diam: dimulai dan berakhir di 0 derajat */
@keyframes sway {
    0%, 100% { rotate: 0deg; }
    30%      { rotate: 1.6deg; }
    70%      { rotate: -1.3deg; }
}

@keyframes sprayIn {
    from { opacity: 0; rotate: var(--rot); translate: var(--tx) -3%; }
    to   { opacity: 1; rotate: 0deg; translate: 0 0; }
}

@keyframes sprayOut {
    from { opacity: 1; rotate: 0deg; translate: 0 0; }
    to   { opacity: 0.9; rotate: var(--rot); translate: var(--tx) -3%; }
}

@keyframes hint {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* iris cahaya: lubang melebar dari tengah kartus */
@keyframes iris {
    from { --r: 0px; }
    to   { --r: 150vmax; }
}

@keyframes coverGone {
    to { opacity: 0; }
}

/* ---------- sampul ---------- */
.cover-card {
    animation: frameIn 1.5s var(--ease) 0.3s backwards;
}

.cover-card > * {
    animation: coverIn 1.3s var(--ease) var(--d, 0s) backwards;
    transition: opacity 0.7s ease, transform 0.9s var(--ease), box-shadow 0.3s ease;
}

.cover-card > :nth-child(1) { --d: 0.8s; }
.cover-card > :nth-child(2) { --d: 0.95s; }
.cover-card > :nth-child(3) { --d: 1.1s; }
.cover-card > :nth-child(4) { --d: 1.25s; }
.cover-card > :nth-child(5) { --d: 1.4s; }
.cover-card > :nth-child(6) { --d: 1.5s; }
.cover-card > :nth-child(7) { --d: 1.6s; }
.cover-card > :nth-child(8) { --d: 1.75s; }

#cover .spray {
    animation:
        sprayIn 1.8s var(--ease) var(--sd, 0.1s) backwards,
        sway var(--dur, 9s) ease-in-out 2s infinite;
}

#cover .crane {
    animation: coverIn 1.6s var(--ease) 1s backwards;
}

#cover.opened .cover-card > * {
    opacity: 0;
    transform: translateY(-14px);
}

#cover.opened .cover-card > :nth-child(2) { transition-delay: 0.05s; }
#cover.opened .cover-card > :nth-child(3) { transition-delay: 0.1s; }
#cover.opened .cover-card > :nth-child(4) { transition-delay: 0.15s; }
#cover.opened .cover-card > :nth-child(5) { transition-delay: 0.2s; }
#cover.opened .cover-card > :nth-child(6) { transition-delay: 0.25s; }
#cover.opened .cover-card > :nth-child(7) { transition-delay: 0.3s; }
#cover.opened .cover-card > :nth-child(8) { transition-delay: 0.35s; }

#cover.opened .spray {
    animation: sprayOut 1.5s ease-in forwards;
}

#cover.opened .crane {
    animation: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#cover.opened {
    -webkit-mask-image: radial-gradient(circle at 50% 38%, transparent var(--r), #000 calc(var(--r) + 42px));
    mask-image: radial-gradient(circle at 50% 38%, transparent var(--r), #000 calc(var(--r) + 42px));
    animation:
        iris 1.9s var(--ease-io) 0.4s forwards,
        coverGone 0.5s ease 2.3s forwards;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 2.8s;
}

/* ---------- hero: tampil berurutan saat iris membuka ---------- */
body.locked #home .frame-photo,
body.locked #home .names,
body.locked #home .hero-date,
body.locked #home .ayat,
body.locked #home .cd-item,
body.locked #btn-calendar,
body.locked .scroll-hint {
    opacity: 0;
}

body.locked #home .spray {
    animation: none;
    opacity: 0;
}

body.opened #home .spray {
    animation:
        sprayIn 1.8s var(--ease) 0.9s backwards,
        sway var(--dur, 9s) ease-in-out 2.8s infinite;
}

body.opened #home .frame-photo { animation: frameIn 1.5s var(--ease) 0.9s backwards; }
body.opened #home .names { animation: riseSoft 1.3s var(--ease) 1.5s backwards; }
body.opened .hero-date { animation: riseSoft 1.3s var(--ease) 1.8s backwards; }
body.opened .ayat { animation: riseSoft 1.5s var(--ease) 2.1s backwards; }

body.opened .cd-item { animation: popIn 1s var(--spring) backwards; }
body.opened .cd-item:nth-child(1) { animation-delay: 2.5s; }
body.opened .cd-item:nth-child(2) { animation-delay: 2.65s; }
body.opened .cd-item:nth-child(3) { animation-delay: 2.8s; }
body.opened .cd-item:nth-child(4) { animation-delay: 2.95s; }

body.opened #btn-calendar { animation: riseSoft 1.2s var(--ease) 3.3s backwards; }
body.opened .scroll-hint {
    animation:
        riseSoft 1.2s var(--ease) 3.6s backwards,
        hint 2.4s ease-in-out 4.8s infinite;
}

/* ---------- muncul saat digulir ---------- */
.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 1.2s var(--ease) var(--d, 0s),
        transform 1.4s var(--ease) var(--d, 0s),
        filter 1.2s var(--ease) var(--d, 0s),
        clip-path 1.8s var(--ease) var(--d, 0s);
}

.js [data-reveal="up"] {
    transform: translateY(28px);
    filter: blur(6px);
}

.js [data-reveal="slide"] {
    transform: translateX(-22px);
    filter: blur(4px);
}

.js [data-reveal="card"] {
    transform: translateY(46px) scale(0.95);
    filter: blur(4px);
}

.js [data-reveal="pop"] {
    transform: translateY(22px) scale(0.9);
}

/* untaian bunga: berayun masuk dari sisi */
.js [data-reveal="bloom"] {
    transform: translateY(-30px);
}

/* foto oval: terbuka dari bawah */
.js [data-reveal="oval"] {
    clip-path: inset(calc(100% - 1px) 0 0 0 round 50%);
}

.js [data-reveal="oval"] img {
    transform: scale(1.18);
    transition: transform 2.4s var(--ease) var(--d, 0s);
}

.js [data-reveal="frame"] {
    clip-path: inset(calc(100% - 1px) 0 0 0 round 18px);
}

.js [data-reveal="frame"] img {
    transform: scale(1.14);
    transition: transform 2.4s var(--ease) var(--d, 0s);
}

/* judul: tertulis dari kiri */
.js [data-reveal="write"] {
    clip-path: inset(-30% calc(100% - 1px) -30% -6%);
    transition-duration: 1.2s, 1.4s, 1.2s, 2.2s;
    transition-timing-function: var(--ease), var(--ease), var(--ease), cubic-bezier(0.45, 0.05, 0.25, 1);
}

/* garis susunan acara menggambar dari atas */
.js [data-reveal="line"] {
    opacity: 1;
}

.js [data-reveal="line"]::before {
    transform: scaleY(0);
    transition: transform 2.8s var(--ease) var(--d, 0s);
}

.js [data-reveal].in {
    opacity: 1;
}

.js [data-reveal="up"].in,
.js [data-reveal="slide"].in,
.js [data-reveal="card"].in,
.js [data-reveal="pop"].in,
.js [data-reveal="bloom"].in {
    transform: none;
    filter: none;
}

.js [data-reveal="oval"].in {
    clip-path: inset(0 0 0 0 round 50%);
}

.js [data-reveal="frame"].in {
    clip-path: inset(0 0 0 0 round 18px);
}

.js [data-reveal="oval"].in img,
.js [data-reveal="frame"].in img {
    transform: none;
}

.js [data-reveal="write"].in {
    clip-path: inset(-30% -6% -30% -6%);
}

.js [data-reveal="line"].in::before {
    transform: none;
}

.cd-number.tick {
    animation: tick 0.55s var(--ease);
}

/* ==========================================================================
   RESPONSIF & AKSESIBILITAS
   ========================================================================== */
@media (max-height: 700px) {
    .cover-stage {
        padding-top: 3.6rem;
    }

    .cover-note {
        display: none;
    }

}

@media (max-height: 600px) {
    .cover-stage {
        padding-top: 2.4rem;
    }

    .cover-card .divider {
        display: none;
    }

    .names {
        font-size: clamp(2.5rem, 12vw, 3.2rem);
    }
}

@media (max-width: 360px) {
    section,
    .closing {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .bottom-nav {
        padding: 0.45rem 0.9rem;
    }

    .nav-item {
        font-size: 0.82rem;
    }

    .cd-item {
        width: 60px;
    }

    .cd-number {
        font-size: 1.6rem;
    }

    .event-card {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .bank-number {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    #cover.opened {
        display: none;
    }

    body.locked #home .frame-photo,
    body.locked #home .names,
    body.locked #home .hero-date,
    body.locked #home .ayat,
    body.locked #home .cd-item,
    body.locked #home .spray,
    body.locked #btn-calendar,
    body.locked .scroll-hint,
    .js [data-reveal] {
        opacity: 1;
        clip-path: none;
        transform: none;
        filter: none;
    }

    .js [data-reveal="oval"] img,
    .js [data-reveal="frame"] img,
    .js [data-reveal="line"]::before {
        transform: none;
    }
}
