/* ==========================================================================
   THEME: DESAIN 28 - BOHO PAMPAS
   KitoNgundang Wedding Invitation
   ========================================================================== */

:root {
    --paper: #fdf9f6;
    --blush: #f4ddd2;
    --sand: #d9c3a7;
    --mocha: #ae8f7a;
    --mocha-deep: #9a7a64;
    --cocoa: #7a5c48;
    --btn: #8e6f5a;
    --btn-dark: #735643;
    --ink: #33291f;
    --muted: #6b5a4c;
    --line: rgba(122, 92, 72, 0.3);
    --bg-body: #dccbbd;

    --font-script: 'Alex Brush', cursive;
    --font-serif: 'Lora', Georgia, serif;
    --font-body: 'Jost', sans-serif;
    --font-arab: 'Amiri', serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
    --spring: cubic-bezier(0.34, 1.5, 0.5, 1);

    /* sampul tertutup (rata di bawah) dan terbuka (tepi sobekan bergerigi di atas layar) */
    --tear-closed: polygon(0% 0%, 100% 0%, 100% 104%, 95.83% 104%, 91.67% 104%, 87.5% 104%, 83.33% 104%, 79.17% 104%, 75% 104%, 70.83% 104%, 66.67% 104%, 62.5% 104%, 58.33% 104%, 54.17% 104%, 50% 104%, 45.83% 104%, 41.67% 104%, 37.5% 104%, 33.33% 104%, 29.17% 104%, 25% 104%, 20.83% 104%, 16.67% 104%, 12.5% 104%, 8.33% 104%, 4.17% 104%, 0% 104%);
    --tear-open: polygon(0% 0%, 100% 0%, 100% -6%, 95.83% -15%, 91.67% -8%, 87.5% -17%, 83.33% -10%, 79.17% -16%, 75% -5%, 70.83% -14%, 66.67% -12%, 62.5% -18%, 58.33% -7%, 54.17% -13%, 50% -6%, 45.83% -16%, 41.67% -9%, 37.5% -17%, 33.33% -4%, 29.17% -13%, 25% -8%, 20.83% -18%, 16.67% -10%, 12.5% -14%, 8.33% -5%, 4.17% -15%, 0% -7%);

    /* tali rami: garis bergelombang dengan simpul kecil */
    --twine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='14' viewBox='0 0 130 14'%3E%3Cpath d='M2 7 Q17 0 32 7 T62 7 T92 7 T128 7' fill='none' stroke='%23ae8f7a' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='65' cy='7' r='3.2' fill='%23fdf9f6' stroke='%23ae8f7a' stroke-width='1.4'/%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--ink);
    line-height: 1.7;
    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(--cocoa);
    outline-offset: 3px;
}

/* ---------- Elemen dekoratif ---------- */
.deco {
    pointer-events: none;
    user-select: none;
}

.wash {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 0;
    background: url('../images/wash.svg') center / 112% auto no-repeat;
    opacity: 0.72;
}

/* tangkai pampas di tepi layar */
.stalk {
    position: absolute;
    z-index: 1;
    width: auto;
    max-width: none;
    transform-origin: 50% 100%;
    animation: swayStalk 7s ease-in-out infinite;
}

/* rangkaian bunga kering: pembungkus mengatur posisi, gambar tumbuh dari pangkal lalu bergoyang */
.cluster {
    position: absolute;
    z-index: 3;
    display: block;
}

.cluster img {
    width: 100%;
    height: auto;
    transform-origin: 23% 98%;
    animation: sway 8s ease-in-out infinite;
}

/* serat pampas yang melayang naik */
.fluff {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.fluff b {
    position: absolute;
    bottom: -14px;
    left: var(--x);
    width: calc(var(--s) * 2.2);
    height: calc(var(--s) * 2.2);
    border-radius: 50%;
    background: radial-gradient(circle, #fffdf8 0 34%, rgba(233, 214, 190, 0.6) 58%, rgba(233, 214, 190, 0) 72%);
    box-shadow: 0 0 9px rgba(255, 248, 235, 0.95);
    opacity: 0;
    animation: floatUp var(--t, 17s) ease-in-out var(--dl, 0s) infinite;
}

/* ---------- Tombol kraft ---------- */
.btn-kraft {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--mocha-deep) 0%, var(--btn) 100%);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0.85rem 2.2rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(122, 92, 72, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-kraft::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.34) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.9s var(--ease);
}

.btn-kraft:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(122, 92, 72, 0.38);
}

.btn-kraft:hover::before {
    transform: translateX(130%);
}

.btn-kraft:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   COVER
   ========================================================================== */
#cover {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    z-index: 9999;
    overflow: hidden;
    background: var(--paper) url('../images/paper.svg') center top / 480px 720px;
    clip-path: var(--tear-closed);
    transition:
        clip-path 1.7s var(--ease-io),
        transform 1.7s var(--ease-io),
        visibility 0s linear 1.7s;
}

/* dibuka: kertas sampul sobek ke atas */
#cover.opened {
    clip-path: var(--tear-open);
    transform: translateX(-50%) translateY(-3%);
    visibility: hidden;
    pointer-events: none;
}

#cover.opened .ring-photo {
    transform: scale(1.12);
    transition: transform 1.6s var(--ease-io);
}

#cover.opened .cluster img {
    scale: 1.15;
    transition: scale 1.6s var(--ease-io);
}

#cover .wash {
    top: 18%;
    height: 66%;
}

.stalk-l {
    left: -44px;
    bottom: -12px;
    height: 50%;
}

.cover-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 1.5dvh, 0.9rem);
    padding: 3dvh 1.5rem;
    text-align: center;
}

.cover-kicker {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ink);
}

.ring-photo {
    --ring: min(58vw, clamp(150px, 29dvh, 232px));
    position: relative;
    width: var(--ring);
    height: var(--ring);
    margin: clamp(0.5rem, 2.4dvh, 1.2rem) 0 clamp(0.6rem, 2.6dvh, 1.4rem);
}

.ring-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 0 4px var(--paper),
        0 0 0 5.5px var(--sand),
        0 16px 30px rgba(122, 92, 72, 0.24);
}

/* cincin tipis kedua, sedikit bergeser seperti goresan tangan */
.ring {
    position: absolute;
    inset: -10px;
    z-index: 1;
    border-radius: 50%;
    border: 1.5px solid #cdb592;
    transform: rotate(-12deg) scale(1, 0.97);
    pointer-events: none;
}

.cluster-cover {
    right: -40%;
    bottom: -24%;
    width: 92%;
}

.cover-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.6rem, 7.6dvh, 3.4rem);
    line-height: 1.1;
    white-space: nowrap;
    color: var(--mocha-deep);
}

.cover-note {
    max-width: 300px;
    font-size: 0.76rem;
    line-height: 1.65;
    color: var(--ink);
}

.cover-to {
    font-size: 0.85rem;
    color: var(--ink);
}

.cover-guest-name {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cocoa);
    word-break: break-word;
}

.cover-guest {
    max-width: 300px;
    margin-bottom: clamp(0.2rem, 1.2dvh, 0.7rem);
}

/* ==========================================================================
   LAYOUT UMUM
   ========================================================================== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--paper) url('../images/paper.svg') center top / 480px 720px;
    box-shadow: 0 0 50px rgba(51, 41, 31, 0.22);
}

section {
    position: relative;
    padding: 4.5rem 1.75rem;
    text-align: center;
    overflow: hidden;
}

section > *:not(.deco) {
    position: relative;
    z-index: 1;
}

/* bagian berlatar kertas blush dengan tepi sobekan di atas dan bawah */
section.blush {
    overflow: visible;
    background:
        linear-gradient(rgba(244, 221, 210, 0.55), rgba(244, 221, 210, 0.55)),
        url('../images/paper.svg') center top / 480px 720px;
}

.blush::before,
.blush::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 28px;
    background: url('../images/deckle.svg') center / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 0;
}

.blush::before {
    top: -27px;
}

.blush::after {
    bottom: -27px;
    transform: scaleY(-1);
}

.sec-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3.3rem;
    line-height: 1.15;
    color: var(--mocha-deep);
    white-space: nowrap;
}

.twine {
    display: block;
    width: 130px;
    height: 14px;
    margin: 0.5rem auto 1.8rem;
    background: var(--twine) center / 100% 100% no-repeat;
}

.lead {
    font-size: 0.92rem;
    color: var(--muted);
    max-width: 340px;
    margin: 0 auto;
}

/* ==========================================================================
   HERO
   ========================================================================== */
#home {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3.5rem;
    padding-bottom: 6rem;
}

#home .wash {
    top: 16%;
    height: 68%;
}

.stalk-r {
    right: -46px;
    bottom: 0;
    height: 44%;
}

.cluster-hero {
    left: -84px;
    bottom: -64px;
    width: 210px;
}

.hero-seq {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.script-sm {
    font-family: var(--font-script);
    font-size: 2.4rem;
    line-height: 1.2;
    color: var(--mocha-deep);
}

.hero-names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.8rem, 13vw, 3.7rem);
    line-height: 1.15;
    color: var(--mocha-deep);
    white-space: nowrap;
}

.hero-date {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    color: var(--cocoa);
    margin-top: 0.2rem;
}

/* foto bergaya tempel: miring, berlakban, berbingkai pasir yang bergeser */
.snap {
    position: relative;
    width: min(54vw, 210px);
    aspect-ratio: 4 / 5;
    margin: 0 auto 2rem;
    transform: rotate(var(--r, 0deg));
}

.snap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow:
        0 0 0 6px #ffffff,
        0 14px 26px rgba(122, 92, 72, 0.26);
}

.snap::before,
.bank-card::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    width: 92px;
    height: 26px;
    margin-left: -46px;
    z-index: 2;
    transform: rotate(-3deg);
    background: repeating-linear-gradient(135deg, rgba(222, 200, 170, 0.85) 0 7px, rgba(238, 222, 198, 0.85) 7px 14px);
    clip-path: polygon(0 0, 100% 0, 98% 25%, 100% 50%, 98% 75%, 100% 100%, 0 100%, 2% 75%, 0 50%, 2% 25%);
}

.snap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translate(13px, 13px);
    border: 1.5px solid var(--sand);
    border-radius: 5px;
}

.snap-hero {
    width: min(64vw, 250px);
    margin: 0.9rem auto 1.7rem;
}

body.locked .hero-seq > * {
    opacity: 0;
}

body.opened .hero-seq > * {
    animation: riseSoft 1.5s var(--ease) backwards;
}

body.opened .hero-seq > :nth-child(1) { animation-delay: 0.7s; }
body.opened .hero-seq > :nth-child(2) { animation-delay: 0.95s; }
body.opened .hero-seq > :nth-child(4) { animation-delay: 1.6s; }

body.opened .hero-seq > .hero-names {
    animation: trackIn 1.7s var(--ease) 1.3s backwards;
}

body.locked #home .wash,
body.locked #home .stalk,
body.locked #home .cluster {
    opacity: 0;
}

body.opened #home .wash {
    animation: washBloom 2.4s var(--ease) 0.5s backwards;
}

body.opened #home .stalk {
    animation: fadeIn 1.8s ease 1s backwards, swayStalk 7s ease-in-out infinite;
}

body.opened #home .cluster img {
    animation: clusterGrow 1.9s var(--spring) 0.9s backwards, sway 8s ease-in-out infinite;
}

/* ==========================================================================
   PEMBUKAAN
   ========================================================================== */
#opening {
    padding-top: 2rem;
}

.salam {
    font-family: var(--font-arab);
    font-size: 1.7rem;
    line-height: 1.9;
    color: var(--cocoa);
    margin-bottom: 1rem;
}

.ayat {
    margin: 2.4rem auto 0;
    padding: 1.8rem 0;
    max-width: 360px;
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
}

.ayat-ar {
    font-family: var(--font-arab);
    font-size: 1.45rem;
    line-height: 2.3;
    color: var(--ink);
}

.ayat-id {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--muted);
    margin-top: 0.9rem;
}

.ayat cite {
    display: block;
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--cocoa);
    margin-top: 1rem;
}

/* ==========================================================================
   MEMPELAI
   ========================================================================== */
.person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person .snap {
    margin-bottom: 2.2rem;
}

.person-name {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3.3rem;
    line-height: 1.2;
    color: var(--mocha-deep);
}

.person-full {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: var(--cocoa);
    margin-bottom: 0.7rem;
}

.person-parents {
    font-size: 0.86rem;
    line-height: 1.75;
    color: var(--muted);
}

.person-parents strong {
    font-weight: 500;
    color: var(--ink);
}

.person-ig {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 1rem;
    padding-bottom: 2px;
    font-size: 0.82rem;
    color: var(--cocoa);
    text-decoration: none;
    border-bottom: 1px dashed var(--line);
    transition: color 0.3s, border-color 0.3s;
}

.person-ig:hover {
    color: var(--ink);
    border-color: var(--cocoa);
}

.amp {
    font-family: var(--font-script);
    font-size: 4.4rem;
    line-height: 1;
    color: var(--sand);
    margin: 1.8rem 0;
}

/* ==========================================================================
   ACARA
   ========================================================================== */
.sec-date {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    color: var(--cocoa);
    margin-top: -0.6rem;
}

/* hitung mundur: batu pipih */
.countdown {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin: 1.8rem 0 1rem;
}

.cd-item {
    width: 66px;
    height: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%;
    background: radial-gradient(circle at 35% 28%, #fbf1e6, #e9d7c3);
    border: 1px solid rgba(122, 92, 72, 0.26);
    box-shadow: 0 7px 12px rgba(122, 92, 72, 0.16), inset 0 -3px 6px rgba(122, 92, 72, 0.1);
    transform: rotate(var(--r, 0deg));
}

.cd-item:nth-child(2) { border-radius: 46% 54% 48% 52% / 55% 45% 55% 45%; }
.cd-item:nth-child(3) { border-radius: 55% 45% 52% 48% / 46% 52% 48% 54%; }
.cd-item:nth-child(4) { border-radius: 48% 52% 45% 55% / 52% 48% 54% 46%; }

.cd-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
    color: var(--cocoa);
    font-variant-numeric: tabular-nums;
}

.cd-label {
    display: block;
    font-size: 0.62rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 2.6rem;
    margin-top: 3rem;
}

/* kartu acara: tag kertas kraft yang digantung dengan tali */
.tag-wrap {
    position: relative;
    filter: drop-shadow(0 14px 16px rgba(122, 92, 72, 0.22));
    transform: rotate(var(--r, 0deg));
    transform-origin: 50% 18px;
    transition: transform 0.8s var(--ease);
}

.tag-wrap::before {
    content: '';
    position: absolute;
    top: -34px;
    left: 50%;
    width: 2px;
    height: 56px;
    z-index: 3;
    border-radius: 2px;
    background: linear-gradient(#c3a587, #9d7c60);
    transform: translateX(-50%) rotate(7deg);
    transform-origin: 50% 100%;
}

.tag-wrap:hover {
    transform: rotate(0deg) translateY(-4px);
}

.event-tag {
    position: relative;
    padding: 3.6rem 1.5rem 2.2rem;
    background: linear-gradient(170deg, #f6e8d8, #ecd6be);
    clip-path: polygon(34px 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%, 0 34px);
}

.tag-hole {
    position: absolute;
    top: 16px;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: inset 0 2px 3px rgba(122, 92, 72, 0.4), 0 0 0 3px rgba(190, 160, 130, 0.55);
    z-index: 2;
}

.event-title {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: 3rem;
    line-height: 1.2;
    color: var(--mocha-deep);
}

.event-time {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cocoa);
}

.event-place {
    font-size: 0.97rem;
    font-weight: 500;
    margin-top: 0.9rem;
}

.event-addr {
    font-size: 0.84rem;
    color: var(--muted);
    max-width: 260px;
    margin: 0.1rem auto 1.4rem;
}

/* ==========================================================================
   KISAH & SUSUNAN ACARA
   ========================================================================== */
.timeline {
    position: relative;
    list-style: none;
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 0;
    border-left: 2px dashed var(--mocha);
}

.timeline li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 2.1rem;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--mocha);
    background: var(--paper);
    box-shadow: 0 0 0 4px var(--paper);
}

.tl-year {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    color: var(--cocoa);
    line-height: 1.3;
}

.timeline h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
}

.timeline p {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.rundown {
    list-style: none;
    max-width: 330px;
    margin: 0 auto;
    text-align: left;
}

.rundown li {
    display: grid;
    grid-template-columns: 4.4rem 1fr;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.8rem 0;
    border-bottom: 1px dotted var(--line);
}

.rundown li:last-child {
    border-bottom: 0;
}

.rd-time {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    font-style: italic;
    color: var(--cocoa);
    font-variant-numeric: tabular-nums;
}

.rd-text {
    font-size: 0.93rem;
    color: var(--ink);
}

/* ==========================================================================
   GALERI (polaroid miring)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.g-item {
    display: flex;
    padding: 8px 8px 24px;
    border: 0;
    border-radius: 3px;
    background: #ffffff;
    cursor: zoom-in;
    aspect-ratio: 1 / 1.14;
    box-shadow: 0 10px 20px rgba(122, 92, 72, 0.22);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.g-item:nth-child(odd)  { --sx: -22px; }
.g-item:nth-child(even) { --sx: 22px; }

.g-item img {
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: cover;
}

.g-item:hover {
    transform: rotate(0deg) scale(1.04);
    box-shadow: 0 18px 30px rgba(122, 92, 72, 0.3);
}

.g-tall {
    grid-row: span 2;
    aspect-ratio: auto;
    height: 100%;
}

.g-wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1.1;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 22, 0.94);
}

.lightbox[hidden] {
    display: none;
}

.lightbox:not([hidden]) {
    animation: fadeIn 0.4s ease;
}

.lb-img {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
    border: 8px solid #ffffff;
    border-bottom-width: 22px;
    border-radius: 3px;
}

.lb-img.swap {
    animation: lbImg 0.6s var(--ease);
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(244, 221, 210, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: #f4ddd2;
    font-size: 1rem;
    cursor: pointer;
}

.lb-close { top: 16px; right: 16px; }
.lb-prev  { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 10px; top: 50%; transform: translateY(-50%); }

.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible {
    outline-color: #f4ddd2;
}

/* ==========================================================================
   TANDA KASIH
   ========================================================================== */
.bank-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    max-width: 340px;
    margin: 2.2rem auto 0;
}

.bank-card {
    position: relative;
    padding: 1.7rem 1.25rem 1.4rem;
    border: 1px solid rgba(122, 92, 72, 0.16);
    border-radius: 3px;
    background: #fffdfa;
    box-shadow: 0 10px 22px rgba(122, 92, 72, 0.16);
    transform: rotate(var(--r, 0deg));
    transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.bank-card::before {
    top: -13px;
    width: 76px;
    margin-left: -38px;
    height: 24px;
}

.bank-card:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 18px 30px rgba(122, 92, 72, 0.22);
}

.bank-name {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cocoa);
    line-height: 1.2;
}

.bank-number {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
    margin-top: 0.5rem;
}

.bank-holder {
    font-size: 0.86rem;
    color: var(--muted);
}

.btn-copy {
    margin-top: 1rem;
    padding: 0.5rem 1.3rem;
    border-radius: 3px;
    border: 1px solid var(--btn);
    background: transparent;
    color: var(--btn);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.btn-copy:hover {
    background: var(--btn);
    color: #ffffff;
}

/* ==========================================================================
   RSVP & UCAPAN
   ========================================================================== */
.rsvp-form {
    max-width: 380px;
    margin: 0 auto;
    text-align: left;
}

.field {
    margin-bottom: 1.1rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cocoa);
    margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.78);
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.wishes-feed {
    max-width: 380px;
    max-height: 420px;
    margin: 2.4rem auto 0;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    text-align: left;
}

.wish-card {
    padding: 1rem 1.1rem;
    border-left: 3px solid var(--mocha);
    border-radius: 2px 10px 10px 2px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 10px rgba(122, 92, 72, 0.08);
}

.wish-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.wish-author {
    font-size: 0.92rem;
    font-weight: 500;
}

.wish-status {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--cocoa);
}

.wish-status-no {
    color: #8a5448;
}

.wish-new {
    animation: wishIn 0.9s var(--ease);
}

.wish-text {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   PENUTUP
   ========================================================================== */
.closing {
    position: relative;
    margin-top: 1rem;
    padding: 5rem 1.75rem 12.5rem;
    text-align: center;
    overflow: hidden;
}

.closing > *:not(.deco) {
    position: relative;
    z-index: 2;
}

.stalk-cl {
    left: -34px;
    bottom: -10px;
    height: 250px;
}

.stalk-cr {
    right: -34px;
    bottom: -10px;
    height: 300px;
    scale: -1 1;
    animation-delay: -3s;
}

.closing-text {
    max-width: 330px;
    margin: 0 auto 1.8rem;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--muted);
}

.closing-regards {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--cocoa);
}

.closing-names {
    font-family: var(--font-script);
    font-size: clamp(2.9rem, 13vw, 3.8rem);
    line-height: 1.15;
    color: var(--mocha-deep);
    white-space: nowrap;
}

.footer-credit {
    margin-top: 2rem;
    font-size: 0.76rem;
    color: var(--muted);
}

.footer-credit i {
    color: var(--mocha);
}

.footer-credit a {
    color: var(--cocoa);
    font-weight: 500;
    text-decoration: none;
}

/* ==========================================================================
   MUSIK & NAVIGASI BAWAH (gaya sama dengan desain 16-27)
   ========================================================================== */
#music-btn {
    position: fixed;
    top: 18px;
    right: max(18px, calc(50% - 240px + 18px));
    width: 42px;
    height: 42px;
    border: 1px solid rgba(244, 221, 210, 0.7);
    border-radius: 50%;
    background: rgba(142, 111, 90, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(115, 86, 67, 0.4);
    animation: rotateMusic 4s linear infinite;
}

#music-btn.paused {
    animation-play-state: paused;
    opacity: 0.85;
}

#music-btn::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1px solid rgba(244, 221, 210, 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(142, 111, 90, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(244, 221, 210, 0.45);
    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(115, 86, 67, 0.4);
}

.nav-item {
    color: #ecd9cb;
    text-decoration: none;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    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:focus-visible {
    outline-color: #ffffff;
}

body.opened .bottom-nav {
    animation: navIn 1.2s cubic-bezier(0.34, 1.45, 0.64, 1) 1.9s backwards;
}

.nav-item.active i {
    animation: navPop 0.55s cubic-bezier(0.34, 1.8, 0.64, 1);
}

/* ==========================================================================
   ANIMASI
   Konsep: kertas dan angin. Gerak masuk memakai easing "keluar cepat,
   berhenti pelan"; tiap jenis elemen punya gaya sendiri; jeda berurutan.
   ========================================================================== */
@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@keyframes riseSoft {
    from { opacity: 0; transform: translateY(26px) scale(0.98); filter: blur(7px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* nama: jarak huruf merapat sambil menajam */
@keyframes trackIn {
    from { opacity: 0; letter-spacing: 0.14em; filter: blur(7px); }
    to   { opacity: 1; letter-spacing: 0; filter: blur(0); }
}

@keyframes washBloom {
    from { opacity: 0; transform: scale(0.6); filter: blur(10px); }
    to   { opacity: 0.72; transform: none; filter: blur(0); }
}

@keyframes landIn {
    from { opacity: 0; transform: translateY(-26px) rotate(-6deg) scale(0.92); }
    to   { opacity: 1; transform: none; }
}

@keyframes clusterGrow {
    from { opacity: 0; scale: 0.35; }
    to   { opacity: 1; scale: 1; }
}

@keyframes sway {
    0%, 100% { rotate: -1.4deg; }
    50%      { rotate: 2.2deg; }
}

@keyframes swayStalk {
    0%, 100% { rotate: -2.4deg; }
    50%      { rotate: 2.8deg; }
}

@keyframes floatUp {
    0%   { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
    15%  { opacity: 0.95; }
    60%  { transform: translate3d(calc(var(--dx, -30px) * 0.5), -52dvh, 0) scale(1); }
    100% { transform: translate3d(var(--dx, -30px), -96dvh, 0) scale(1.15); opacity: 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 18px rgba(122, 92, 72, 0.3), 0 0 0 0 rgba(174, 143, 122, 0.45); }
    50%      { box-shadow: 0 8px 18px rgba(122, 92, 72, 0.3), 0 0 0 11px rgba(174, 143, 122, 0); }
}

@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); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lbImg {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes wishIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); background: rgba(217, 195, 167, 0.6); }
    to   { opacity: 1; transform: none; }
}

@keyframes tick {
    from { opacity: 0.25; transform: translateY(-9px); }
    to   { opacity: 1; transform: none; }
}

/* tag mengayun dari lubang tali, lalu berhenti */
@keyframes swing {
    0%   { rotate: -9deg; opacity: 0; }
    25%  { opacity: 1; }
    32%  { rotate: 6deg; }
    55%  { rotate: -3deg; }
    78%  { rotate: 1.2deg; }
    100% { rotate: 0deg; opacity: 1; }
}

/* sampul masuk bertahap */
.cv {
    animation: rise 1.1s var(--ease) var(--d, 0s) backwards;
}

#btn-open.cv {
    animation:
        rise 1.1s var(--ease) var(--d, 0s) backwards,
        glow 2.8s ease-in-out 3.4s infinite;
}

#cover .wash {
    animation: washBloom 2.6s var(--ease) 0.2s backwards;
}

.ring-photo {
    animation: landIn 1.6s var(--ease) 0.45s backwards;
}

#cover .cover-names {
    animation: trackIn 1.7s var(--ease) var(--d, 1.2s) backwards;
}

#cover .cluster img {
    animation: clusterGrow 1.9s var(--spring) 1s backwards, sway 8s ease-in-out infinite;
}

#cover .stalk {
    animation: fadeIn 1.8s ease 0.8s backwards, swayStalk 7s ease-in-out infinite;
}

#cover.opened .cover-note,
#cover.opened .cover-guest,
#cover.opened #btn-open,
#cover.opened .cover-names,
#cover.opened .cover-kicker {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.9s var(--ease);
}

/* muncul saat digulir: kelas .js dipasang oleh script.js, atribut data-reveal diberi otomatis */
.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 1s var(--ease) var(--d, 0s),
        transform 1.2s var(--ease) var(--d, 0s),
        filter 1s var(--ease) var(--d, 0s),
        letter-spacing 1.4s var(--ease) var(--d, 0s),
        clip-path 1.4s var(--ease-io) var(--d, 0s);
}

.js [data-reveal="up"]      { transform: translateY(28px); }
.js [data-reveal="amp"]     { transform: scale(0.5) rotate(-14deg); }
.js [data-reveal="title"]   { letter-spacing: 0.09em; filter: blur(6px); transform: translateY(10px); }
.js [data-reveal="settle"]  { transform: translateY(-30px) rotate(calc(var(--r, 0deg) * -3.5)) scale(1.05); }
.js [data-reveal="scatter"] { transform: translate(var(--sx, 0px), 36px) rotate(calc(var(--r, 0deg) * 3.5)) scale(0.82); }
.js [data-reveal="rule"]    { opacity: 1; clip-path: inset(-6px 50% -6px 50%); }
.js [data-reveal="line"]    { opacity: 1; }
.js [data-reveal="swing"]   { opacity: 0; transform-origin: 50% 18px; }

.js [data-reveal="stone"] {
    transform: translateY(26px) rotate(calc(var(--r, 0deg) * 3)) scale(0.5);
    transition:
        opacity 0.8s var(--ease) var(--d, 0s),
        transform 1.3s var(--spring) var(--d, 0s);
}

.js [data-reveal="line"]::before {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 2s var(--ease-io) var(--d, 0s);
}

.js [data-reveal].in {
    opacity: 1;
    filter: none;
}

.js [data-reveal="up"].in,
.js [data-reveal="amp"].in {
    transform: none;
}

.js [data-reveal="title"].in {
    letter-spacing: 0;
    transform: none;
}

.js [data-reveal="settle"].in,
.js [data-reveal="scatter"].in,
.js [data-reveal="stone"].in {
    transform: rotate(var(--r, 0deg));
}

.js [data-reveal="rule"].in {
    clip-path: inset(-6px 0 -6px 0);
}

.js [data-reveal="line"].in::before {
    transform: scaleY(1);
}

.js [data-reveal="swing"].in {
    animation: swing 2.6s var(--ease) var(--d, 0s) both;
}

.cd-number.tick {
    animation: tick 0.55s var(--ease);
}

/* ==========================================================================
   RESPONSIF & AKSESIBILITAS
   ========================================================================== */
@media (max-width: 360px) {
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .bottom-nav {
        padding: 0.45rem 0.9rem;
    }

    .nav-item {
        font-size: 0.66rem;
    }

    .cd-item {
        width: 58px;
        height: 58px;
    }

    .cd-number {
        font-size: 1.25rem;
    }

    .sec-title {
        font-size: 2.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .fluff {
        display: none;
    }

    #cover {
        clip-path: none;
    }

    body.locked .hero-seq > *,
    body.locked #home .wash,
    body.locked #home .stalk,
    body.locked #home .cluster,
    .js [data-reveal] {
        opacity: 1;
        filter: none;
        letter-spacing: 0;
        clip-path: none;
    }

    .js [data-reveal="up"],
    .js [data-reveal="amp"],
    .js [data-reveal="title"] {
        transform: none;
    }

    .js [data-reveal="settle"],
    .js [data-reveal="scatter"],
    .js [data-reveal="stone"] {
        transform: rotate(var(--r, 0deg));
    }
}
