/* =========================================================
   Lavelle — Demo "Sinema" (Velvet & Gold)
   Undangan berbasis scroll (seperti demo lain) DENGAN backdrop
   sinematik yang hidup sepanjang scroll: tirai teater jadi bingkai,
   dedaunan & kelopak berjatuhan, cahaya lilin, kabut, kartu acrylic.
   ========================================================= */

:root {
    --bg: #0b0608;
    --velvet: #3a0e16;
    --velvet-dk: #210710;
    --velvet-lt: #5a1822;
    --gold: #e8c879;
    --gold-soft: #f3e2b6;
    --gold-deep: #b08f48;
    --cream: #f6ecd9;
    --ink-soft: rgba(246, 236, 217, .72);
    --line: rgba(232, 200, 121, .26);

    --serif: 'Cormorant Garamond', Georgia, serif;
    --script: 'Pinyon Script', cursive;
    --sans: 'Jost', system-ui, sans-serif;

    --px: 0; --py: 0;        /* parallax pointer (di-set JS) */
    --frame: 8.5vw;          /* lebar bingkai tirai di tepi */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* elemen banner 3D: tersembunyi sampai engine scroll menempatkannya.
   Hanya disembunyikan bila JS aktif (fallback: tetap tampil tanpa JS). */
.js [data-fx] { opacity: 0; will-change: transform, opacity; }
body { background: var(--bg); color: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; line-height: 1.6; }
body.locked { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ===== fase: tampilkan/sembunyikan ===== */
.phase-before, .phase-after { display: none; }
body.is-before .phase-before { display: block; }
body.is-after .phase-after { display: block; }
span.phase-before, span.phase-after { display: none; }
body.is-before span.phase-before { display: inline-block; }
body.is-after span.phase-after { display: inline-block; }
body.is-after .ph.phase-after { display: block; }

/* =========================================================
   BACKDROP SINEMATIK — fixed, hidup sepanjang scroll
   ========================================================= */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.bd-photo {
    position: absolute; inset: -8%;
    background: #1a0e0a center 35% / cover no-repeat;
    transform: translate3d(calc(var(--px) * -18px), calc(var(--py) * -12px), 0) scale(1.14);
    animation: kenburns 32s ease-in-out infinite alternate;
    will-change: transform, opacity;
    transition: opacity 1.3s ease;
}
#bdB { opacity: 0; }   /* layer kedua untuk crossfade antar-section */

/* lapisan warna yang berubah tiap section — soft-light agar menyatu dgn foto */
.bd-tint { position: absolute; inset: 0; background: rgba(120,70,30,.4); transition: background-color 1.3s ease; mix-blend-mode: soft-light; }
@keyframes kenburns {
    0%   { transform: translate3d(calc(var(--px) * -18px), calc(var(--py) * -12px), 0) scale(1.14); }
    100% { transform: translate3d(calc(var(--px) * -18px), calc(var(--py) * -12px), 0) scale(1.26) translateY(-2%); }
}

.bd-grade {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(8,5,12,.62) 0%, rgba(8,5,12,.28) 30%, rgba(12,6,8,.55) 70%, rgba(6,3,4,.9) 100%),
        radial-gradient(120% 80% at 70% 15%, rgba(255,196,120,.26), rgba(255,196,120,0) 55%);
}
.bd-sun {
    position: absolute; top: 10%; left: 68%; width: 44vmax; height: 44vmax; border-radius: 50%;
    transform: translate(-50%, -50%) translate3d(calc(var(--px) * -28px), calc(var(--py) * -18px), 0);
    background: radial-gradient(circle, rgba(255,210,140,.5), rgba(255,180,110,.16) 38%, rgba(255,180,110,0) 70%);
    filter: blur(6px); animation: sunpulse 7s ease-in-out infinite;
}
@keyframes sunpulse { 0%,100% { opacity: .78; } 50% { opacity: 1; } }

.fog { position: absolute; left: -30%; right: -30%; height: 60%; opacity: .45; will-change: transform; }
.fog--1 { bottom: -8%; background: radial-gradient(60% 100% at 30% 100%, rgba(255,200,140,.16), rgba(255,200,140,0) 70%), radial-gradient(50% 100% at 75% 100%, rgba(180,150,220,.12), rgba(180,150,220,0) 70%); animation: fogdrift 26s linear infinite; }
.fog--2 { top: 18%; height: 50%; opacity: .3; background: radial-gradient(50% 100% at 60% 50%, rgba(220,220,255,.1), rgba(220,220,255,0) 70%); animation: fogdrift 38s linear infinite reverse; }
@keyframes fogdrift { 0% { transform: translateX(-6%); } 50% { transform: translateX(6%); } 100% { transform: translateX(-6%); } }

.particles { position: absolute; inset: 0; }

.candle {
    position: absolute; bottom: -12%; width: 38vmax; height: 38vmax;
    background: radial-gradient(circle at 50% 70%, rgba(255,180,90,.42), rgba(255,150,70,.1) 35%, rgba(255,150,70,0) 65%);
    filter: blur(8px); mix-blend-mode: screen; animation: flicker 2.6s ease-in-out infinite;
}
.candle--l { left: -12%; }
.candle--r { right: -12%; animation-delay: -1.1s; animation-duration: 3.1s; }
@keyframes flicker {
    0%,100% { opacity: .7; transform: scale(1); }
    20% { opacity: .5; transform: scale(1.03); }
    40% { opacity: .85; transform: scale(.99); }
    62% { opacity: .55; transform: scale(1.04); }
    80% { opacity: .8; transform: scale(1); }
}

.bd-vignette { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 42%, rgba(0,0,0,0) 50%, rgba(0,0,0,.6) 100%); }

/* =========================================================
   POHON FOREGROUND — siluet di tepi, bergoyang saat scroll
   (BUKAN background; lapisan depan di atas foto)
   ========================================================= */
@property --idle { syntax: "<number>"; inherits: false; initial-value: 0; }
:root { --swing: 0; }

.flora { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.tree { position: absolute; opacity: .68; filter: drop-shadow(0 8px 22px rgba(0,0,0,.5)) saturate(.85); }
.tree svg { display: block; width: 100%; height: auto; }
/* gabungan goyang idle (animasi) + goyang scroll (var --swing dari JS) */
.tree--tl, .tree--tr { width: clamp(150px, 24vw, 320px); top: -6px; }
.tree--tl { left: -10px; transform-origin: top left;   transform: rotate(calc((var(--idle) + var(--swing)) * 1deg)); animation: treeIdle 6s ease-in-out infinite; }
.tree--tr { right: -10px; transform-origin: top right;  transform: scaleX(-1) rotate(calc((var(--idle) + var(--swing)) * 1deg)); animation: treeIdle 6.8s ease-in-out infinite -1.5s; }
.tree--bl, .tree--br { width: clamp(140px, 20vw, 280px); bottom: -8px; }
.tree--bl { left: -6px;  transform-origin: bottom left;  transform: rotate(calc((var(--idle) + var(--swing) * 1.4) * 1deg)); animation: treeIdle 5.4s ease-in-out infinite -.7s; }
.tree--br { right: -6px; transform-origin: bottom right; transform: scaleX(-1) rotate(calc((var(--idle) + var(--swing) * 1.4) * 1deg)); animation: treeIdle 6.2s ease-in-out infinite -2.3s; }
@keyframes treeIdle { 0%, 100% { --idle: -1.6; } 50% { --idle: 1.6; } }

/* =========================================================
   TIRAI TEATER — penutup awal & bingkai tetap (fixed)
   ========================================================= */
.frame { position: fixed; inset: 0; z-index: 6; pointer-events: none; }

.valance {
    position: absolute; top: 0; left: 0; right: 0; height: 8vh; z-index: 2;
    background: repeating-linear-gradient(90deg, var(--velvet-dk) 0, var(--velvet) 5%, var(--velvet-lt) 10%, var(--velvet) 15%, var(--velvet-dk) 20%);
    border-bottom: 3px solid var(--gold-deep); box-shadow: 0 8px 26px rgba(0,0,0,.6);
    -webkit-mask-image: radial-gradient(13px 16px at 13px 100%, transparent 98%, #000 100%);
    mask-image: radial-gradient(13px 16px at 13px 100%, transparent 98%, #000 100%);
    -webkit-mask-size: 26px 100%; mask-size: 26px 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
}

.curtain {
    position: absolute; top: 0; bottom: 0; width: 54%;
    background: linear-gradient(90deg,
        var(--velvet-dk) 0%, var(--velvet-lt) 7%, var(--velvet) 14%, var(--velvet-dk) 21%,
        var(--velvet-lt) 30%, var(--velvet) 38%, var(--velvet-dk) 46%, var(--velvet-lt) 56%,
        var(--velvet) 64%, var(--velvet-dk) 72%, var(--velvet-lt) 82%, var(--velvet) 90%, var(--velvet-dk) 100%);
    box-shadow: inset 0 0 80px rgba(0,0,0,.6);
    transition: transform 2.4s cubic-bezier(.76,0,.18,1);
    will-change: transform;
}
.curtain::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7px; background: linear-gradient(var(--gold-soft), var(--gold-deep)); box-shadow: 0 0 18px rgba(232,200,121,.55); }
.curtain--l { left: 0; animation: swayL 9s ease-in-out infinite; }
.curtain--l::after { right: -3px; }
.curtain--r { right: 0; animation: swayR 9.6s ease-in-out infinite; }
.curtain--r::after { left: -3px; }
@keyframes swayL { 0%,100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(.35deg) scaleX(1.01); } }
@keyframes swayR { 0%,100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-.35deg) scaleX(1.01); } }

/* terbuka: tirai mundur jadi bingkai tipis di tepi (sway berhenti) */
body.invite-open .curtain { animation: none; }
body.invite-open .curtain--l { transform: translateX(calc(-100% + var(--frame))); }
body.invite-open .curtain--r { transform: translateX(calc(100% - var(--frame))); }

/* =========================================================
   SAMPUL PEMBUKA
   ========================================================= */
.cover {
    position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 8vw;
    background: radial-gradient(120% 120% at 50% 30%, rgba(12,6,9,.45), rgba(8,4,6,.82));
    transition: opacity 1.1s ease, visibility 1.1s ease;
}
.cover.open { opacity: 0; visibility: hidden; }
.cover__inner { text-align: center; max-width: 440px; animation: floatIn 1.3s cubic-bezier(.22,1,.36,1) both; }
@keyframes floatIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.cover__ring {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-weight: 600; font-size: 2rem; color: var(--gold);
    width: 116px; height: 116px; border: 1px solid rgba(232,200,121,.5); border-radius: 50%;
    margin-bottom: 1.3rem; box-shadow: 0 0 40px -8px rgba(232,200,121,.4), inset 0 0 30px rgba(232,200,121,.08);
}
.cover__ring i { font-style: normal; font-family: var(--script); font-size: 1.4rem; color: var(--gold-soft); margin: 0 .1em; }
.cover__kicker { font-weight: 300; letter-spacing: .42em; text-transform: uppercase; font-size: .7rem; color: var(--gold); padding-left: .42em; }
.cover__names { font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 11vw, 4.2rem); color: var(--gold-soft); line-height: 1.05; margin: .2rem 0 .5rem; }
.cover__rule { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--gold-deep); margin: .3rem 0 1.3rem; }
.cover__rule::before, .cover__rule::after { content: ""; height: 1px; width: 56px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.cover__rule::after { transform: scaleX(-1); }
.cover__to { font-size: .8rem; letter-spacing: .1em; color: var(--ink-soft); }
.cover__guest { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--cream); margin: .15rem 0 1.7rem; }
.cover__hint { margin-top: 1.2rem; font-size: .66rem; letter-spacing: .06em; color: rgba(246,236,217,.45); }

/* =========================================================
   KONTROL TETAP
   ========================================================= */
.back-demo, .music {
    position: fixed; z-index: 24; cursor: pointer; text-decoration: none;
    background: rgba(20,10,14,.5); border: 1px solid var(--line); color: var(--cream);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: background .3s, border-color .3s, transform .3s;
}
.back-demo { top: max(14px, env(safe-area-inset-top)); left: 14px; display: inline-flex; align-items: center; gap: .45em; padding: .55em 1.05em; border-radius: 50px; font-size: .74rem; letter-spacing: .05em; }
.music { top: max(14px, env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.back-demo:hover, .music:hover { background: rgba(232,200,121,.18); border-color: var(--gold); }
.music.playing i { animation: spin 4s linear infinite; color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

.brandtag { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 7; font-family: var(--script); font-size: 1.4rem; color: var(--gold); opacity: 0; transition: opacity 1s ease 1.4s; pointer-events: none; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
body.invite-open .brandtag { opacity: .8; }

/* =========================================================
   LAYOUT SCENE & SECTION
   ========================================================= */
.scene { position: relative; z-index: 5; }
.sec { position: relative; padding: clamp(4rem, 12vh, 8rem) 0; }
/* lebar konten = dibatasi maksimum, tapi selalu menyisakan ruang dari tirai (--frame) di tepi,
   sehingga konsisten dari layar lebar hingga mobile tanpa pernah tertutup tirai */
.wrap { width: min(640px, calc(100vw - 2 * var(--frame) - 36px)); margin: 0 auto; text-align: center; }
.wrap--wide { width: min(920px, calc(100vw - 2 * var(--frame) - 36px)); }
.banner { position: relative; }
.banner.glass { padding: 2.2rem 1.8rem; }

.kicker { display: inline-block; font-weight: 400; letter-spacing: .4em; text-transform: uppercase; font-size: .68rem; color: var(--gold); margin-bottom: .8rem; padding-left: .4em; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 6vw, 2.8rem); color: var(--cream); text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.title-script { font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1.1; background: linear-gradient(160deg, #fff5dd, var(--gold) 45%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 16px rgba(0,0,0,.55)); }
.divider { color: var(--gold-deep); margin: 1rem 0 1.8rem; font-size: 1rem; position: relative; }
.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: clamp(40px, 18vw, 110px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep)); }
.divider::before { right: calc(50% + 22px); }
.divider::after { left: calc(50% + 22px); transform: scaleX(-1); }
.lead { color: var(--ink-soft); max-width: 520px; margin: 0 auto; font-family: var(--serif); font-size: 1.15rem; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.lead b { color: var(--cream); }

/* ===== HERO ===== */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12vh max(var(--frame), 26px); position: relative; }
.names { font-family: var(--script); font-weight: 400; font-size: clamp(3.2rem, 14vw, 7rem); line-height: 1; background: linear-gradient(160deg, #fff5dd, var(--gold) 45%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(0,0,0,.5)); }
.hero__date { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.05rem, 3.4vw, 1.5rem); color: var(--cream); text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.scroll-cue { position: absolute; bottom: 9vh; left: 50%; transform: translateX(-50%); font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.scroll-cue i { display: block; margin: .5rem auto 0; color: var(--gold); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ===== QUOTE ===== */
.quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 4vw, 1.7rem); color: var(--cream); }
.quote cite { display: block; margin-top: 1rem; font-style: normal; letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; color: var(--gold); }

/* =========================================================
   ACRYLIC / GLASS — kartu kaca buram
   ========================================================= */
.glass {
    background: linear-gradient(165deg, rgba(58,30,36,.42), rgba(14,7,10,.5));
    border: 1px solid var(--line); border-radius: 18px;
    backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 24px 60px -28px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
}

/* ===== MEMPELAI (link Instagram pada halaman buku) ===== */
.ig { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); color: var(--gold); transition: background .3s, color .3s; }
.ig:hover { background: var(--gold); color: #2a210f; }

/* ===== COUNTDOWN ===== */
.countdown { display: flex; justify-content: center; gap: clamp(.5rem, 2.4vw, 1.1rem); flex-wrap: wrap; }
.cd { min-width: clamp(62px, 18vw, 92px); padding: 1rem .4rem; }
.cd b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 6vw, 2.8rem); color: var(--gold-soft); line-height: 1; }
.cd span { display: block; margin-top: .4rem; font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.married-badge { display: inline-flex; align-items: center; gap: .5em; margin-top: 1.6rem; padding: .7em 1.5em; border-radius: 50px; border: 1px solid var(--gold); color: var(--gold-soft); font-size: .82rem; letter-spacing: .08em; }

/* ===== STORY ===== */
.timeline { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.tl-item { padding: 1.3rem 1.5rem; position: relative; }
.tl-item .yr { font-family: var(--script); font-size: 1.8rem; color: var(--gold); }
.tl-item h4 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--cream); margin: .1rem 0 .3rem; }
.tl-item p { color: var(--ink-soft); font-size: .95rem; }

/* ===== ACARA ===== */
.events { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.event-card { flex: 1 1 240px; max-width: 300px; padding: 2rem 1.5rem; }
.event-card .ic { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; color: var(--gold); border: 1px solid var(--line); background: rgba(232,200,121,.06); }
.event-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--cream); margin-bottom: .5rem; }
.event-card p { color: var(--ink-soft); font-size: .95rem; line-height: 1.7; }
.btn-map { display: inline-flex; align-items: center; gap: .45em; margin-top: 1.1rem; padding: .6em 1.3em; border-radius: 50px; border: 1px solid var(--gold); color: var(--gold-soft); text-decoration: none; font-size: .78rem; letter-spacing: .06em; transition: background .3s, color .3s; }
.btn-map:hover { background: var(--gold); color: #2a210f; }
.event-card__btns { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.btn-map--soft { border-color: var(--line); color: var(--ink-soft); }
.btn-map--soft:hover { background: rgba(232,200,121,.16); color: var(--gold-soft); border-color: var(--gold); }

/* ===== GALERI ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.gallery-grid .ph { overflow: hidden; border-radius: 12px; border: 1px solid rgba(232,200,121,.18); }
.gallery-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: transform .6s ease; }
.gallery-grid .ph:hover img { transform: scale(1.08); }
.note { margin-top: 1.2rem; font-size: .78rem; color: rgba(246,236,217,.5); font-style: italic; }

/* ===== FORM ===== */
.form { max-width: 460px; margin: 0 auto; padding: 1.8rem 1.6rem; text-align: left; }
.form label { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: .9rem 0 .35rem; }
.form label:first-child { margin-top: 0; }
.form input, .form select, .form textarea { width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: .8em .9em; color: var(--cream); font-family: var(--sans); font-size: .95rem; outline: none; resize: vertical; transition: border-color .3s; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--gold); }
.form select option { background: #1a0d11; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; cursor: pointer; border: none; font-family: var(--sans); font-weight: 500; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; padding: 1em 2.2em; border-radius: 50px; color: #2a210f; background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); box-shadow: 0 14px 34px -14px rgba(232,200,121,.7); transition: transform .3s, box-shadow .3s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 20px 46px -14px rgba(232,200,121,.9); }
.form .btn { width: 100%; margin-top: 1.3rem; }
.btn-open { margin-top: .4rem; }
.rsvp-ok { display: none; margin-top: 1rem; text-align: center; font-family: var(--serif); font-style: italic; color: var(--gold-soft); }
.rsvp-ok.show { display: block; }

/* ===== UCAPAN ===== */
.wishes { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; text-align: left; max-height: 420px; overflow-y: auto; padding-right: .3rem; }
.wish { padding: 1rem 1.2rem; border-radius: 14px; }
.wish b { color: var(--gold-soft); font-family: var(--serif); font-size: 1.1rem; }
.wish .at { display: inline-block; margin-left: .5rem; font-size: .68rem; color: rgba(246,236,217,.45); }
.wish p { color: var(--ink-soft); font-size: .92rem; margin-top: .25rem; }

/* ===== AMPLOP ===== */
.gifts { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }
.gift { flex: 1 1 230px; max-width: 290px; padding: 1.8rem 1.4rem; }
.gift .bank { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--gold); }
.gift .no { font-size: 1.25rem; letter-spacing: .08em; color: var(--cream); margin: .5rem 0 .2rem; }
.gift .nm { font-size: .85rem; color: var(--ink-soft); }
.btn-copy { margin-top: 1rem; cursor: pointer; background: none; border: 1px solid var(--gold); color: var(--gold-soft); border-radius: 50px; padding: .55em 1.2em; font-family: var(--sans); font-size: .76rem; letter-spacing: .05em; transition: background .3s, color .3s; }
.btn-copy:hover { background: var(--gold); color: #2a210f; }

/* ===== CLOSING & FOOTER ===== */
.closing { text-align: center; }
.closing .names { font-size: clamp(2.6rem, 10vw, 4.5rem); margin-top: .8rem; }
footer { position: relative; z-index: 5; text-align: center; padding: 2.4rem 1.5rem max(3rem, env(safe-area-inset-bottom)); font-size: .78rem; color: rgba(246,236,217,.5); }
footer a { color: var(--gold); text-decoration: none; }

/* =========================================================
   BINGKAI — "banner di dalam banner": frame ornamen dengan
   cahaya emas berjalan di tepi + ornamen sudut bergerak,
   sedangkan konten tenang di dalam (.bingkai__in)
   ========================================================= */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.bingkai { position: relative; padding: clamp(20px, 3.4vw, 40px); border-radius: 24px; }

/* cahaya emas berputar mengelilingi bingkai (di LUAR konten) */
.bingkai::before {
    content: ""; position: absolute; inset: 0; border-radius: 24px; padding: 2px; pointer-events: none; z-index: 0;
    background: conic-gradient(from var(--ring),
        rgba(232,200,121,0) 0deg, rgba(243,226,182,.95) 38deg, rgba(232,200,121,0) 96deg,
        rgba(232,200,121,0) 184deg, rgba(243,226,182,.75) 224deg, rgba(232,200,121,0) 290deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: bingkaiRing 7s linear infinite;
}
@keyframes bingkaiRing { to { --ring: 360deg; } }

/* garis bingkai dalam (statis, tipis emas) */
.bingkai::after {
    content: ""; position: absolute; inset: 9px; border: 1px solid rgba(232,200,121,.4); border-radius: 16px;
    pointer-events: none; z-index: 0; box-shadow: inset 0 0 26px rgba(232,200,121,.08);
}

/* ornamen sudut (di-inject JS) — bergerak/berdenyut di luar konten */
.bingkai__c {
    position: absolute; width: 12px; height: 12px; z-index: 2; pointer-events: none;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
    box-shadow: 0 0 12px rgba(232,200,121,.75);
    animation: bingkaiCorner 3.6s ease-in-out infinite;
}
.bingkai__c--tl { top: 4px; left: 4px; }
.bingkai__c--tr { top: 4px; right: 4px; animation-delay: -.9s; }
.bingkai__c--bl { bottom: 4px; left: 4px; animation-delay: -1.8s; }
.bingkai__c--br { bottom: 4px; right: 4px; animation-delay: -2.7s; }
@keyframes bingkaiCorner {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: .75; }
    50% { transform: rotate(225deg) scale(1.35); opacity: 1; }
}

/* konten di dalam bingkai (banner dalam banner) */
.bingkai__in { position: relative; z-index: 1; border-radius: 16px; padding: clamp(1.5rem, 4vw, 2.4rem); }
/* banner non-glass: scrim tipis agar teks selalu terbaca di atas foto terang */
.bingkai__in:not(.glass):not(.book) {
    background: linear-gradient(165deg, rgba(20,10,14,.40), rgba(8,4,6,.52));
    border: 1px solid rgba(232,200,121,.14);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.bingkai__in.glass { padding: clamp(1.7rem, 4.5vw, 2.6rem); }
/* override agar form & panel rapi saat jadi isi bingkai */
.bingkai__in.form { max-width: none; }
.bingkai__in.book { padding: 0; margin: 0; max-width: none; }
.bingkai__in.adat__panel { padding: 3rem 1.8rem 2.2rem; }
.bingkai + .bingkai { margin-top: 1.4rem; }
.wrap > .bingkai:first-child, .wrap--wide > .bingkai { margin-top: 1.4rem; }

/* =========================================================
   SPREAD BUKU 3D — foto di halaman + teks di sebelahnya
   ========================================================= */
.book { perspective: 1400px; max-width: 760px; margin: 0 auto; }
.book__spread {
    display: grid; grid-template-columns: 1fr 1fr; transform-style: preserve-3d;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 40px 90px -34px rgba(0,0,0,.9);
    position: relative;
}
/* lipatan tengah buku */
.book__spread::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.5), rgba(255,255,255,.06), rgba(0,0,0,.5), rgba(0,0,0,0));
    z-index: 3; pointer-events: none;
}
.book__page { min-height: 300px; padding: 0; transform-style: preserve-3d; backface-visibility: hidden; }
.book__page--photo { background-color: #1a0e0a; background-size: cover; background-position: center 30%; background-repeat: no-repeat; }
.book__page--text {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 2rem 1.6rem; gap: .25rem;
    /* foto referensi (di-set inline) sebagai latar; scrim gelap ada di gradient inline agar teks terbaca */
    background-color: #1a0e0a; background-size: cover; background-position: center 30%; background-repeat: no-repeat;
    border: 1px solid var(--line);
}
.book__k { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.book__page--text h3 { font-family: var(--script); font-size: clamp(2rem, 6vw, 3rem); color: var(--gold-soft); line-height: 1.05; }
.book__sub { color: var(--ink-soft); font-family: var(--serif); font-size: 1.05rem; }
.book__page--text .ig { width: auto; height: auto; border-radius: 50px; padding: .45em 1.1em; gap: .4em; margin-top: .6rem; font-size: .8rem; }
/* sisi buku ala "halaman tebal" */
.book--flip .book__spread { box-shadow: 0 40px 90px -34px rgba(0,0,0,.9); }

/* =========================================================
   BANNER ADAT JAWA — akrilik + ornamen gunungan
   ========================================================= */
.adat__panel {
    position: relative; padding: 3rem 1.8rem 2.2rem; border-radius: 20px; overflow: hidden;
    background:
        repeating-linear-gradient(45deg, rgba(232,200,121,.05) 0 8px, rgba(232,200,121,0) 8px 16px),
        linear-gradient(165deg, rgba(58,30,36,.55), rgba(14,7,10,.62));
    border: 1px solid var(--line);
}
/* gunungan/kayon (siluet) */
.gunungan { display: block; width: 54px; height: 70px; margin: 0 auto 1rem; background: linear-gradient(var(--gold-soft), var(--gold-deep)); clip-path: polygon(50% 0, 62% 18%, 58% 30%, 72% 42%, 60% 52%, 78% 68%, 50% 100%, 22% 68%, 40% 52%, 28% 42%, 42% 30%, 38% 18%); filter: drop-shadow(0 0 10px rgba(232,200,121,.5)); }
.adat__intro { color: var(--ink-soft); font-family: var(--serif); font-size: 1.1rem; max-width: 460px; margin: 0 auto 1.6rem; }
.adat__list { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.adat__item { flex: 1 1 150px; max-width: 200px; padding: 1.2rem .8rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.adat__item i { font-size: 1.4rem; color: var(--gold); }
.adat__item b { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--cream); margin: .4rem 0 .25rem; }
.adat__item span { font-size: .82rem; color: var(--ink-soft); }

/* kartu galeri tampil 3D (transform di-set engine) */
.gallery-grid .ph { transform-style: preserve-3d; }

/* =========================================================
   RAIL PROGRESS (titik di kanan)
   ========================================================= */
.rail { position: fixed; top: 50%; right: 12px; transform: translateY(-50%); z-index: 7; display: none; flex-direction: column; gap: .7rem; opacity: 0; transition: opacity .8s ease; }
body.invite-open .rail { display: flex; opacity: .9; }
.rail .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(246,236,217,.25); cursor: pointer; transition: all .3s; }
.rail .dot.active { background: var(--gold); transform: scale(1.5); box-shadow: 0 0 10px rgba(232,200,121,.8); }

/* =========================================================
   DETAIL / POLISH — lightbox, fokus keyboard, micro-interaction
   (penyesuaian desktop ada di desktop.css, mobile di mobile.css)
   ========================================================= */
/* lightbox galeri */
.lightbox { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 5vh 5vw;
    background: rgba(6,3,5,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease; cursor: zoom-out; }
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(880px, 92vw); max-height: 86vh; border-radius: 14px; border: 1px solid rgba(232,200,121,.4);
    box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); transform: scale(.96); transition: transform .45s cubic-bezier(.22,1,.36,1); }
.lightbox.show img { transform: scale(1); }
.lightbox__x { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    background: rgba(20,10,14,.6); border: 1px solid var(--line); color: var(--cream); font-size: 1.1rem; transition: background .3s, transform .3s; }
.lightbox__x:hover { background: rgba(232,200,121,.2); transform: rotate(90deg); }

/* scroll-cue memudar setelah mulai scroll */
.scroll-cue { transition: opacity .6s ease; }
body.scrolled .scroll-cue { opacity: 0; }

/* fokus keyboard yang jelas (aksesibilitas) tanpa mengganggu klik mouse */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .rail .dot:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px;
}
/* feedback tekan tombol */
.btn:active { transform: translateY(-1px) scale(.985); }
.btn-map:active, .btn-copy:active, .music:active, .back-demo:active, .lightbox__x:active { transform: scale(.94); }

/* hemat: animasi bingkai hanya jalan saat terlihat di layar */
.bingkai:not(.in-view)::before,
.bingkai:not(.in-view) .bingkai__c { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
    .bd-photo, .bd-sun, .fog, .candle, .curtain, .scroll-cue i, .music.playing i,
    .bingkai::before, .bingkai__c, .tree { animation: none !important; }
    /* tetap tampil tanpa gerak 3D berlebihan */
    [data-fx] { opacity: 1 !important; transform: none !important; }
}
