/* Kunang — undangan pernikahan bergaya lukisan cat air: hutan ajaib di malam hari. Sampul berupa stoples kaca berisi
   kunang-kunang; saat dibuka tutupnya terlempar, kunang-kunang terbang keluar menerangi hutan, dan pandangan turun dari
   bulan di sela dahan ke tanah lapang dengan pohon tua berlorong. Kunang-kunang (kanvas, kunang.js) terus beterbangan di
   seluruh halaman, dan tiap bagian isi punya penghuni yang hidup sendiri: embun di daun, lentera berayun, kelinci
   mengintip, jamur menyala, foto berayun di tali, burung hantu berkedip, rusa minum di sungai. */
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Pinyon Script"; src: url("fonts/pinyon-script.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #0d1726; --bg2: #13223a; --deep: #1b2d47; --ink: #f2ead6; --soft: #b9c0cf; --gold: #e3bd72; --gold-hi: #f7e0a6;
  --glow: #ffe49a; --moss: #7f9b6b; --paper: #f4ead3; --paper-ink: #3d2a19; --wood: #6b4524; --line: rgba(227, 189, 114, .35);
  --display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #070d18; }
body { margin: 0; background: #070d18; color: var(--ink); font: 500 19px/1.55 var(--serif); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ol, figure { margin: 0; }
a { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.page { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; min-height: 100vh; overflow: hidden; }
@media (min-width: 560px) { .page { box-shadow: 0 30px 80px rgba(0, 0, 0, .5); } }

/* ---------- Adegan hutan: lapisan selebar kolom halaman, di belakang pembuka ----------
   .stage berbanding 940:1684 (ukuran lukisan) dan selalu menutup layar; empat lapisan memakai bingkai yang sama,
   jadi di skala 1 bertumpuk menjadi lukisan utuh: latar (langit, bulan, hutan jauh) → tengah (pohon tua, tanah lapang,
   sungai) → bingkai (batang kiri-kanan dan dahan di atas) → depan (jamur dan pakis). Itu keadaan dasar. Sebelum dibuka
   semua lapisan dibesarkan dari titik bulan dan digeser turun: yang terlihat hanya bulan di sela dahan; saat dibuka
   pandangan turun ke tanah lapang dengan laju berbeda per lapisan. */
.scene { position: fixed; top: 0; left: 50%; width: min(100%, 480px); height: 100%; transform: translateX(-50%); z-index: 0; pointer-events: none; overflow: hidden; contain: strict; background: #0b1424; display: none; }
.js .scene { display: block; }
.scene-off .scene { visibility: hidden; }
.stage { position: absolute; left: 50%; top: 50%; height: max(100%, calc(min(100vw, 480px) * 1.7915)); aspect-ratio: 940 / 1684; translate: -50% -50%; }
.ly { position: absolute; inset: 0; will-change: transform; transform-origin: 51% 14.8%; }
.ly > img, .fx { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.ly-depan > img, .ly-depan > .fx { top: 76.96%; height: 23.04%; }
.js .ly { transition: transform 5.2s cubic-bezier(.55, 0, .2, 1) .7s; }
.js .ly-bingkai { transition-duration: 4.6s; }
.js .ly-depan { transition: transform 4.2s cubic-bezier(.3, 0, .2, 1) 1.8s; }
.js:not(.is-open) .ly-latar { transform: translateY(20%) scale(2.4); }
.js:not(.is-open) .ly-tengah { transform: translateY(75%) scale(1.6); }
.js:not(.is-open) .ly-bingkai { transform: translateY(20%) scale(2.9); }
.js:not(.is-open) .ly-depan { transform: translateY(40%); }
.js.no-anim .ly, .js.no-anim .gelap { transition: none; }
.sinar-bulan { position: absolute; left: 51%; top: 14.8%; width: 44%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 248, 225, .55), rgba(200, 220, 255, .16) 55%, transparent); mix-blend-mode: screen; }
.cahaya-lorong { position: absolute; left: 51.5%; top: 55%; width: 36%; height: 24%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 128, .75), rgba(255, 190, 90, .22) 55%, transparent); mix-blend-mode: screen; }
.mist { position: absolute; left: -20%; width: 90%; height: 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(190, 210, 235, .5), transparent); } .mist.m1 { top: 61%; } .mist.m2 { top: 67%; left: 30%; width: 85%; }
.kilau { fill: #e9f4ff; opacity: .2; transform-box: fill-box; transform-origin: center; }
.pendar { fill: rgba(255, 236, 170, .32); mix-blend-mode: screen; transform-box: fill-box; transform-origin: center; }
.gelap { position: absolute; inset: 0; background: #050a14; opacity: 0; }
.js .gelap { transition: opacity 3.6s ease .5s; }
.js:not(.is-open) .gelap { opacity: .62; }
.terang { position: absolute; inset: 0; background: radial-gradient(circle at 51.5% 55%, #fff1c6 0, #f1c36a 14%, rgba(13, 23, 38, 0) 50%), var(--bg); opacity: 0; }

/* Kunang-kunang: satu kanvas tetap di depan seluruh halaman (digambar kunang.js), tembus ketukan. */
.kunang { position: fixed; top: 0; left: 50%; width: min(100%, 480px); height: 100%; translate: -50% 0; z-index: 30; pointer-events: none; display: none; mix-blend-mode: screen; }
.js.is-open .kunang { display: block; }

.caps { font: 500 13px/1.4 var(--display); letter-spacing: .34em; text-transform: uppercase; }
.script { font: 400 50px/1.05 var(--script); color: var(--gold-hi); text-shadow: 0 0 18px rgba(255, 214, 128, .35); }
.lead { font-size: 18px; line-height: 1.6; color: var(--soft); max-width: 22em; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px; border: 1px solid var(--gold); border-radius: 999px; background: var(--gold); color: #1d1608; text-decoration: none; cursor: pointer; font: 600 13px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; }
.btn-line { background: transparent; color: var(--gold-hi); border-color: currentColor; }
.btn.copied { background: var(--moss); border-color: var(--moss); color: #fff; }

/* ---------- Sampul: malam gelap, bulan samar di belakang, stoples berisi kunang-kunang di tengah ---------- */
.cover { position: relative; min-height: 100vh; min-height: 100svh; padding: 50px 26px 40px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 18px; text-align: center; background: radial-gradient(120% 70% at 50% 45%, rgba(20, 34, 58, .55), rgba(5, 10, 20, .92) 75%), #0b1424; color: var(--ink); overflow: hidden; }
.js .cover { background: radial-gradient(120% 70% at 50% 45%, rgba(20, 34, 58, .35), rgba(5, 10, 20, .9) 78%); }
.cover[hidden] { display: none; }
.cover-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.cover.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 10, 20, .75), rgba(5, 10, 20, .25) 40%, rgba(5, 10, 20, .85)); }
.cover-top, .cover-bottom, .stoples { position: relative; z-index: 1; }
.cover-top, .cover-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cover .names { font: 500 32px/1.15 var(--display); letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; color: #fff7e2; text-shadow: 0 0 18px rgba(255, 214, 128, .4); }
.names .amp { margin: 0 .25em; font: 400 40px/1 var(--script); text-transform: none; letter-spacing: 0; color: var(--gold-hi); }
.to { font-size: 16px; line-height: 1.5; opacity: .9; }
.guest-name { font: 600 24px/1.2 var(--serif); overflow-wrap: anywhere; }
.cover .open { margin-top: 8px; min-width: 230px; min-height: 48px; }
.stoples { width: min(42vw, 190px); max-height: 38vh; aspect-ratio: 520 / 954; }
.stoples .badan { width: 100%; height: 100%; }
.stoples .tutup { position: absolute; left: 10.96%; top: 0; width: 77.9%; }
.stoples .pijar { position: absolute; left: -45%; right: -45%; top: 5%; bottom: -10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 220, 130, .5), rgba(255, 200, 100, .14) 55%, transparent); }
.isi { position: absolute; left: 18%; right: 18%; top: 26%; bottom: 10%; }
.isi i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 8px 3px rgba(255, 226, 130, .85), 0 0 18px 6px rgba(255, 210, 100, .35); }
.isi i:nth-child(1) { left: 20%; top: 30%; } .isi i:nth-child(2) { left: 64%; top: 18%; } .isi i:nth-child(3) { left: 44%; top: 56%; } .isi i:nth-child(4) { left: 78%; top: 64%; }
.isi i:nth-child(5) { left: 12%; top: 76%; } .isi i:nth-child(6) { left: 52%; top: 84%; } .isi i:nth-child(7) { left: 34%; top: 8%; }
html:not(.js) .cover .open, html:not(.js) .stoples { display: none; }

/* Dengan JS: sampul menutup layar sampai tamu menekan "Buka undangan" (atau mengetuk stoples). */
.js .cover { position: fixed; top: 0; bottom: 0; left: 50%; width: min(100%, 480px); transform: translateX(-50%); z-index: 40; overflow-y: auto; transition: opacity 1s ease .7s; }
.js .stoples { cursor: pointer; }
.js:not(.is-open) body { overflow: hidden; }
.js.is-open .cover { opacity: 0; pointer-events: none; }
.js.no-anim .cover { transition: none; }
.memuat .cover .open { pointer-events: none; opacity: .55; }

/* ---------- Pembuka: nama bercahaya seperti kunang-kunang, di atas lingkaran jamur bercahaya ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: 44px 20px; display: grid; place-items: center; text-align: center; background: linear-gradient(180deg, #13223a, var(--bg)); }
.hero-pin { display: grid; place-items: end center; width: 100%; }
.js .hero { display: block; padding: 0; background: none; }
.js .hero-pin { position: fixed; left: 50%; bottom: 0; width: min(100%, 480px); height: 100vh; height: 100svh; translate: -50% 0; padding: 0 24px 7vh; pointer-events: none; }
.scene-off .hero-pin { visibility: hidden; }
.title-wrap { width: 100%; }
.js:not(.is-open) .title-wrap { opacity: 0; }
.title { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 10px 0; isolation: isolate; }
.title::before { content: ""; position: absolute; inset: -10% -14% -30%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(5, 10, 20, .74), rgba(5, 10, 20, .4) 60%, transparent); }
.title .caps { font-size: 12px; color: var(--soft); }
.t-name { font: 400 54px/1.05 var(--script); color: #fff6d8; overflow-wrap: anywhere; text-shadow: 0 0 10px rgba(255, 226, 140, .9), 0 0 28px rgba(255, 196, 90, .55), 0 0 60px rgba(255, 180, 70, .3); }
.t-name .amp { font-size: .75em; color: var(--gold); }
.pl-date { margin-top: 2px; font: 500 14px/1.4 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); }
.cincin { position: relative; width: 250px; height: 74px; margin-top: 4px; }
.cincin::before { content: ""; position: absolute; left: -10%; right: -10%; top: 30%; bottom: -30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 230, 160, .32), transparent); }
.cincin .j { position: absolute; bottom: 0; width: 44px; height: auto; transform-origin: 50% 100%; }
.j1 { left: 0; bottom: 14px !important; width: 34px !important; } .j2 { left: 48px; width: 48px !important; } .j3 { left: 104px; bottom: -6px !important; width: 42px !important; scale: -1 1; } .j4 { left: 156px; width: 50px !important; } .j5 { left: 214px; bottom: 16px !important; width: 34px !important; scale: -1 1; }
.mouse { display: block; margin-top: 12px; width: 22px; height: 36px; border: 1.5px solid var(--ink); border-radius: 12px; position: relative; opacity: .8; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); animation: gulir 1.6s ease-in-out infinite; }

/* ---------- Isi: malam biru tua bertabur bintang samar ---------- */
main > section:not(.hero) { position: relative; padding: 64px 26px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
  background: radial-gradient(1.4px 1.4px at 22px 34px, rgba(255, 240, 200, .5), transparent), radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, .45), transparent), radial-gradient(1.2px 1.2px at 80px 170px, rgba(255, 240, 200, .35), transparent), radial-gradient(1px 1px at 190px 220px, rgba(255, 255, 255, .3), transparent), linear-gradient(180deg, var(--bg), var(--bg2));
  background-size: 230px 260px, 230px 260px, 230px 260px, 230px 260px, auto; }
main h2.script::after { content: ""; display: block; width: 250px; max-width: 80vw; height: 32px; margin: 2px auto 0; background: url("img/pembatas.webp") center / contain no-repeat; }

/* Kutipan: ditulis di bawah daun lebar yang bergoyang; embun berkilau dan setetes jatuh dari ujungnya. */
.verse { padding-top: 40px !important; }
.daun { position: relative; width: 100%; max-width: 400px; transform-origin: 4% 50%; }
.daun img { width: 100%; }
.embun { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(220, 240, 255, .5) 40%, rgba(160, 200, 220, .15) 70%); box-shadow: 0 0 6px rgba(220, 240, 255, .6); }
.embun.e1 { left: 32%; top: 38%; } .embun.e2 { left: 55%; top: 58%; width: 8px; height: 8px; } .embun.e3 { left: 72%; top: 36%; width: 9px; height: 9px; }
.tetes { position: absolute; left: 95%; top: 49%; width: 9px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 40% 35%, #fff, rgba(200, 230, 250, .6) 50%, rgba(160, 200, 220, .2)); opacity: 0; }
.quote { font: italic 500 21px/1.6 var(--serif); max-width: 20em; }
.source { font: 600 14px/1.4 var(--display); letter-spacing: .14em; color: var(--gold-hi); }

/* Mempelai: potret lonjong di bingkai ranting berbunga, dikitari tiga kunang-kunang; "&" bercahaya di antaranya. */
.couple { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; margin-top: 8px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.potret { position: relative; width: 236px; aspect-ratio: 600 / 755; }
.foto { position: absolute; left: 13%; right: 13%; top: 10%; bottom: 12%; border-radius: 50%; overflow: hidden; background: var(--deep); display: flex; }
.foto > * { flex: 1; width: 100%; height: 100%; object-fit: cover; }
.foto span { display: flex; align-items: center; justify-content: center; font: 400 90px/1 var(--script); color: var(--gold-hi); }
.ranting { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.edar { position: absolute; left: 50%; top: 50%; width: 0; height: 0; scale: 1 1.3; }
.edar i { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 8px 3px rgba(255, 226, 130, .85), 0 0 18px 6px rgba(255, 210, 100, .3); transform: rotate(var(--a, 0deg)) translateX(126px); }
.edar i:nth-child(2) { --a: 130deg; } .edar i:nth-child(3) { --a: 250deg; }
.person h3 { font: 400 40px/1.05 var(--script); color: var(--gold-hi); overflow-wrap: anywhere; }
.parents { font-size: 17px; line-height: 1.45; color: var(--soft); max-width: 16em; }
.ig { font-size: 16px; font-weight: 700; color: var(--gold); }
.dan { font: 400 64px/1 var(--script); color: #fff6d8; text-shadow: 0 0 14px rgba(255, 220, 130, .8), 0 0 34px rgba(255, 190, 90, .4); }

/* Hitung mundur: empat lentera tergantung di dahan, berayun dengan irama berbeda; angka di dalam kacanya. */
main > section.count { background: radial-gradient(70% 40% at 50% 60%, rgba(255, 200, 110, .12), transparent), linear-gradient(180deg, var(--bg2), #0f1c30); }
.dahan { width: calc(100% + 30px); height: 12px; margin: 10px -15px -20px; border-radius: 8px; background: linear-gradient(180deg, #6d5236, #3f2d1d); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); position: relative; z-index: 1; }
.dahan::before, .dahan::after { content: ""; position: absolute; top: -12px; width: 26px; height: 14px; border-radius: 0 100% 0 100%; background: var(--moss); } .dahan::before { left: 14%; rotate: -20deg; } .dahan::after { right: 18%; rotate: 160deg; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
.lentera { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 18px; transform-origin: 50% 0; }
.lentera::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: 20px; background: #a98b5d; }
.kaca { position: relative; display: block; width: 100%; max-width: 92px; aspect-ratio: 220 / 533; background: url("img/lentera.webp") center / contain no-repeat; }
.kaca b { position: absolute; left: 0; right: 0; top: 59%; translate: 0 -50%; font: 600 19px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #4a2c12; text-shadow: 0 0 6px rgba(255, 245, 210, .9); }
.lentera span { margin-top: 4px; font-size: 15px; color: var(--soft); }
html:not(.js) .countdown, html:not(.js) .dahan { display: none; }

/* Acara: tiap acara ditulis di irisan batang kayu; kelinci sesekali mengintip dari baliknya. */
.programme { gap: 34px !important; }
.event { position: relative; width: min(100%, 340px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.irisan { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; padding: 19% 17%; background: url("img/irisan.webp") center / 100% 100% no-repeat; color: var(--paper-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.irisan .script { font-size: 42px; color: #6b3a14; text-shadow: none; }
.when { font: 700 18px/1.45 var(--serif); }
.where { font-size: 16px; line-height: 1.4; max-width: 15em; overflow-wrap: anywhere; }
.kelinci { position: absolute; z-index: 0; right: -6%; top: 52%; width: 30%; }
.event:nth-of-type(odd) .kelinci { right: auto; left: -6%; scale: -1 1; }
.dress { font-size: 17px; font-style: italic; color: var(--soft); }

/* Kisah: batu pijakan berselang kiri-kanan; jamur di sisi tiap batu menyala saat batunya sampai di layar. */
.chapters { position: relative; list-style: none; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 30px; text-align: left; }
.chapters::before { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 14px; margin-left: -7px; background: radial-gradient(ellipse 7px 4px at 50% 50%, rgba(170, 180, 190, .35) 90%, transparent) 0 0 / 14px 22px repeat-y; }
.chapters li { position: relative; width: 86%; }
.chapters li:nth-child(odd) { align-self: flex-start; } .chapters li:nth-child(even) { align-self: flex-end; }
.batu { position: relative; z-index: 1; padding: 22px 22px 20px; border-radius: 46px 72px 52px 64px / 40px 50px 62px 56px; background: radial-gradient(120% 90% at 30% 20%, #4b5b6c, #2c3a4b 70%); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25), 0 14px 24px rgba(0, 0, 0, .35); }
.chapters h3 { font: 400 34px/1.05 var(--script); color: var(--gold-hi); margin-bottom: 6px; }
.chapters p { font-size: 17px; line-height: 1.55; color: #dfe2ea; }
.chapters .jamur { position: absolute; z-index: 2; bottom: -14px; width: 56px; }
.chapters li:nth-child(odd) .jamur { right: -40px; } .chapters li:nth-child(even) .jamur { left: -40px; scale: -1 1; }
.chapters li::after { content: ""; position: absolute; z-index: 0; bottom: -40px; width: 150px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 230, 160, .55), transparent); opacity: .12; transition: opacity 1.4s ease; }
.chapters li:nth-child(odd)::after { right: -88px; } .chapters li:nth-child(even)::after { left: -88px; }
.chapters li.nyala::after, html:not(.js) .chapters li::after { opacity: 1; }
.kisah-foto { margin: 0 0 12px; padding: 6px 6px 18px; background: var(--paper); border-radius: 3px; rotate: -1.5deg; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.chapters li:nth-child(even) .kisah-foto { rotate: 1.5deg; }
.kisah-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Galeri: foto dijepit di tali yang terbentang, masing-masing berayun pelan. */
.jemuran { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 14px; width: 100%; padding-top: 16px; }
.jepit { position: relative; padding: 7px 7px 20px; background: var(--paper); border-radius: 2px; box-shadow: 0 10px 20px rgba(0, 0, 0, .4); transform-origin: 50% -14px; }
.jepit::before { content: ""; position: absolute; top: -14px; left: -14px; right: -14px; height: 2px; background: rgba(214, 192, 150, .7); }
.jepit::after { content: ""; position: absolute; top: -21px; left: 50%; width: 9px; height: 20px; margin-left: -4.5px; border-radius: 2px; background: linear-gradient(90deg, #a7794c, #c99d6c, #a7794c); }
.jepit img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.jepit:nth-child(odd) { rotate: -1.5deg; } .jepit:nth-child(even) { rotate: 1.8deg; }
.jepit:last-child:nth-child(odd) { grid-column: 1 / -1; width: 70%; justify-self: center; }

/* Amplop: burung hantu bertengger di atas, menoleh dan berkedip; rekening di kartu kertas bersegel. */
.hantu { position: relative; width: 150px; margin-bottom: -8px; transform-origin: 50% 92%; }
.kelopak { position: absolute; width: 13%; height: 10.4%; top: 12.6%; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #9a7752, #6e5034); transform-origin: 50% 0; scale: 1 0; }
.kelopak.ka { left: 31.1%; } .kelopak.kb { left: 53.2%; }
.gift-list { display: grid; gap: 14px; width: 100%; }
.gift-card { position: relative; padding: 18px 18px 18px 22px; border-radius: 6px; background: linear-gradient(180deg, #f8efdb, var(--paper)); color: var(--paper-ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; box-shadow: 0 12px 24px rgba(0, 0, 0, .35); }
.gift-card::after { content: ""; position: absolute; right: 50%; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c9453c, #8c241f); box-shadow: 0 0 0 3px rgba(140, 36, 31, .25); }
.bank { font: 600 12px/1.4 var(--display); letter-spacing: .22em; text-transform: uppercase; color: #7a4b1c; }
.number { font-size: 22px; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.holder { font-size: 15px; color: #6b5a48; }
.gift-card .btn { flex-shrink: 0; min-height: 42px; padding: 0 16px; color: #7a4b1c; }
.address { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); font-size: 16px; line-height: 1.5; color: var(--soft); text-align: left; }

/* Ucapan & RSVP. */
main > section.rsvp { background: radial-gradient(60% 30% at 50% 0, rgba(255, 210, 120, .14), transparent), linear-gradient(180deg, #0f1c30, var(--bg)); }
.note { width: 100%; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 14px; font-size: 16px; }
.thanks { width: 100%; padding: 22px 18px; border-radius: 18px; background: rgba(255, 230, 160, .08); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.thanks .big { font: 400 38px/1.1 var(--script); color: var(--gold-hi); }
.toples-kecil { position: relative; width: 70px; aspect-ratio: 520 / 954; }
.toples-kecil img { width: 100%; }
.toples-kecil .nyala { position: absolute; inset: 10% -40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 220, 130, .6), transparent); }
.toples-kecil .masuk { position: absolute; left: 50%; top: 40%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 8px 3px rgba(255, 226, 130, .85); }
.form { width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; font-size: 16px; font-weight: 700; }
.field legend { padding: 0 0 6px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid rgba(227, 189, 114, .4); border-radius: 12px; background: rgba(244, 234, 211, .95); color: var(--paper-ink); font: 500 18px/1.4 var(--serif); }
.field textarea { padding: 12px 14px; min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-hi); outline-offset: 1px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; font: 600 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.opt input:checked + span { background: var(--gold); border-color: var(--gold); color: #1d1608; }
.opt input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.rsvp .btn { min-height: 50px; }

main > section.wishes-box { align-items: stretch; text-align: left; gap: 0; padding-top: 30px; }
.wishes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wishes-head h2 { font: 400 36px/1.1 var(--script); color: var(--gold-hi); }
.wishes-head span { font-size: 15px; color: var(--soft); white-space: nowrap; }
.wishes { list-style: none; margin: 12px 0 0; padding: 0; max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.wishes li { position: relative; padding: 14px 16px 14px 30px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(227, 189, 114, .2); display: flex; flex-direction: column; gap: 4px; }
.wishes li::before { content: ""; position: absolute; left: 12px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 7px 2px rgba(255, 226, 130, .8); }
.wish-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wish-head b { font-size: 18px; }
.tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--gold); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.status { font-size: 14px; font-weight: 700; color: var(--gold); }
.wish-text { font-size: 17px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.wish-reply { margin-top: 6px; padding: 8px 12px; border-left: 2px solid var(--gold); font-style: italic; color: var(--soft); }

/* Penutup: rusa minum di sungai yang memantulkan bulan. */
main > section.closing { padding-top: 0; padding-bottom: 54px; }
.sungai { position: relative; width: calc(100% + 52px); margin: 0 -26px 6px; -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 10%, #000 82%, transparent); }
.sungai > img:first-child { width: 100%; }
.pantul { position: absolute; left: 44%; top: 52%; width: 22%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 250, 225, .5), transparent); mix-blend-mode: screen; }
.rusa { position: absolute; left: 40%; top: 46%; width: 40%; scale: -1 1; transform-origin: 30% 95%; }
.riak { position: absolute; left: 41.5%; top: 71%; width: 12%; height: 2.4%; margin: -1.2% -6%; border-radius: 50%; border: 1.5px solid rgba(220, 235, 255, .55); opacity: 0; }
.merci { font-size: 56px; }
.thanks-line { font-size: 17px; font-style: italic; color: var(--soft); }
.buket { width: 200px; margin-top: 4px; }
.pl-name { font: 500 22px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
footer { position: relative; padding: 18px 16px 26px; text-align: center; font-size: 14px; color: var(--soft); background: #0a1220; }

.music-toggle { position: fixed; bottom: 16px; right: max(14px, calc(50% - 226px)); z-index: 50; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gold); border-radius: 50%; background: rgba(13, 23, 38, .85); color: var(--gold-hi); cursor: pointer; box-shadow: 0 0 16px rgba(255, 210, 110, .3); }
.music-toggle svg { width: 18px; height: 18px; }
.music-toggle[aria-pressed="false"]::after { content: ""; position: absolute; width: 24px; height: 1.5px; background: var(--gold-hi); transform: rotate(-45deg); }
html:not(.js) .music-toggle, .js:not(.is-open) .music-toggle { display: none; }

/* ---------- Animasi ---------- */
/* Isi muncul bertahap saat digulir (kelas .rv dipasang kunang.js). */
.rv { opacity: 0; translate: 0 26px; }
.rv.script { translate: 0 -22px; }
.rv.irisan, .rv.event, .jemuran .rv { translate: 0 0; scale: .86; }
.rv.in { opacity: 1; translate: 0 0; scale: 1; transition: opacity .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), translate .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms), scale .9s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 1ms); }
/* Bagian yang tidak sedang terlihat (tanpa .aktif) membekukan geraknya. */
main > section:not(.hero):not(.aktif) *, main > section:not(.hero):not(.aktif) *::before, main > section:not(.hero):not(.aktif) *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero { min-height: 260vh; min-height: 260svh; }
  .isi i { animation: dengung 2.4s ease-in-out infinite alternate, kedip 1.6s ease-in-out infinite alternate; }
  .isi i:nth-child(2n) { animation-duration: 3.1s, 2.1s; animation-delay: -1s, -.6s; } .isi i:nth-child(3n) { animation-duration: 2.7s, 1.3s; animation-delay: -2s, -.3s; }
  .stoples .pijar { animation: napas 3.2s ease-in-out infinite alternate; }
  .cover-top { animation: turun 1.2s .2s both; } .cover-bottom { animation: naik 1.2s .5s both; } .stoples { animation: naik 1.2s .35s both; }
  .js.is-open:not(.no-anim) .tutup { animation: lempar 1s cubic-bezier(.2, .6, .4, 1) both; }
  .js.is-open:not(.no-anim) .isi i { animation: lepas .5s ease-out both; }
  .js.is-open:not(.no-anim) .stoples .pijar { animation: kilat .8s ease-out both; }
  .sinar-bulan { animation: napas 6s ease-in-out infinite alternate; }
  .cahaya-lorong { animation: denyut-c 4.2s ease-in-out infinite alternate; }
  .mist.m1 { animation: hanyut 26s ease-in-out infinite alternate; } .mist.m2 { animation: hanyut 34s ease-in-out infinite alternate-reverse; }
  .kilau { animation: kelip 2.4s ease-in-out infinite; } .kilau.k2 { animation-delay: -.8s; } .kilau.k3 { animation-delay: -1.6s; }
  .pendar { animation: denyut-c 3.4s ease-in-out infinite alternate; } .pendar.p2 { animation-delay: -1.2s; } .pendar.p3 { animation-delay: -2s; } .pendar.p4 { animation-delay: -.6s; }
  /* Judul: nama menyala pelan seperti kunang-kunang berkumpul, lalu jamur tumbuh satu per satu. */
  .js.is-open:not(.no-anim) .title .caps { animation: naik 1s 5.4s both; }
  .js.is-open:not(.no-anim) .t-name { animation: nyala 2s 5.8s ease-out both; }
  .js.is-open:not(.no-anim) .pl-date { animation: naik 1s 6.8s both; }
  .js.is-open:not(.no-anim) .cincin::before { animation: muncul 1.6s 6.6s both; }
  .js.is-open:not(.no-anim) .j1 { animation: tumbuh .8s 6.5s cubic-bezier(.3, 1.6, .5, 1) both; } .js.is-open:not(.no-anim) .j2 { animation: tumbuh .8s 6.75s cubic-bezier(.3, 1.6, .5, 1) both; }
  .js.is-open:not(.no-anim) .j3 { animation: tumbuh .8s 7s cubic-bezier(.3, 1.6, .5, 1) both; } .js.is-open:not(.no-anim) .j4 { animation: tumbuh .8s 7.25s cubic-bezier(.3, 1.6, .5, 1) both; }
  .js.is-open:not(.no-anim) .j5 { animation: tumbuh .8s 7.5s cubic-bezier(.3, 1.6, .5, 1) both; }
  .js.is-open:not(.no-anim) .title .mouse { animation: naik 1s 8.2s both; }
  /* Perjalanan gulir: setelah pembukaan (.ready), --p 0→1 membawa pandangan masuk ke lorong cahaya di pohon tua. */
  .ready .ly { transition: none; transform-origin: 51.5% 55%; }
  .ready .ly-latar { transform: scale(calc(1 + var(--p, 0) * .5)); }
  .ready .ly-tengah { transform: scale(calc(1 + var(--p, 0) * var(--p, 0) * 6)); }
  .ready .ly-bingkai { transform-origin: 50% 45%; transform: scale(calc(1 + var(--p, 0) * 1.8)); }
  .ready .ly-depan { transform-origin: 50% 100%; transform: translateY(calc(var(--p, 0) * 60%)) scale(calc(1 + var(--p, 0) * 1.4)); }
  .ready .cahaya-lorong { opacity: calc(1 + var(--p, 0) * 2); }
  .ready .title-wrap { opacity: calc(1 - var(--p, 0) * 4); translate: 0 calc(var(--p, 0) * -120px); }
  .ready .terang { opacity: calc((var(--p, 0) - .5) * 2.6); }

  /* Isi yang hidup. Keadaan awal ornamen ditulis untuk bagian yang belum .tampak; geraknya berulang selama terlihat. */
  .js .verse:not(.tampak) .daun { opacity: 0; translate: -30px 10px; rotate: -6deg; }
  .daun { transition: opacity 1.2s ease, translate 1.4s cubic-bezier(.2, .7, .2, 1), rotate 1.4s cubic-bezier(.2, .7, .2, 1); animation: goyang 5s ease-in-out infinite alternate; }
  .embun { animation: kemilau 3s ease-in-out infinite; } .embun.e2 { animation-delay: -1s; } .embun.e3 { animation-delay: -2s; }
  .tetes { animation: tetes 7s 1.5s ease-in infinite; }
  .js .intro:not(.tampak) .ranting { opacity: 0; scale: .8; rotate: -8deg; }
  .ranting { transition: opacity 1.2s ease, scale 1.4s cubic-bezier(.3, 1.3, .5, 1), rotate 1.4s ease; }
  .edar i { animation: edar 11s linear infinite, kedip 1.8s ease-in-out infinite alternate; }
  .edar i:nth-child(2) { animation-duration: 14s, 2.3s; animation-direction: reverse, alternate; } .edar i:nth-child(3) { animation-duration: 9s, 1.4s; }
  .dan { animation: kedip-teks 3s ease-in-out infinite alternate; }
  .js .count:not(.tampak) .lentera { translate: 0 -40px; opacity: 0; }
  .lentera { transition: translate 1.2s cubic-bezier(.3, 1.4, .5, 1), opacity .8s ease; animation: ayun 3.6s ease-in-out infinite alternate; }
  .lentera:nth-child(2) { animation-duration: 4.4s; animation-delay: -1.2s; transition-delay: .12s; } .lentera:nth-child(3) { animation-duration: 3.2s; animation-delay: -2s; transition-delay: .24s; } .lentera:nth-child(4) { animation-duration: 4s; animation-delay: -.6s; transition-delay: .36s; }
  .kaca { animation: lampu 2.6s ease-in-out infinite alternate; }
  .kelinci { animation: intip 9s 1s ease-in-out infinite; }
  .event:nth-of-type(odd) .kelinci { animation: intip 11s 4s ease-in-out infinite; }
  .chapters li.nyala::after { animation: denyut-c 3s 1.4s ease-in-out infinite alternate; }
  .js .story li:not(.nyala) .jamur { scale: .3; opacity: 0; }
  .js .story li:nth-child(even):not(.nyala) .jamur { scale: -.3 .3; }
  .jamur { transition: scale .9s cubic-bezier(.3, 1.6, .5, 1), opacity .5s ease; transform-origin: 50% 100%; }
  .jepit { animation: ayun-foto 5s ease-in-out infinite alternate; } .jepit:nth-child(3n+2) { animation-duration: 6.2s; animation-delay: -2s; } .jepit:nth-child(3n) { animation-duration: 4.4s; animation-delay: -1s; }
  .js .gifts:not(.tampak) .hantu { opacity: 0; translate: 0 -30px; }
  .hantu { transition: opacity 1s ease, translate 1.2s cubic-bezier(.3, 1.4, .5, 1); animation: toleh 8s ease-in-out infinite; }
  .kelopak { animation: kedip-mata 5s 1s infinite; }
  .toples-kecil .masuk { animation: masuk 2.4s .4s ease-in-out both; } .toples-kecil .nyala { animation: kilat-lama 2.4s .4s ease-out both, napas 3s 2.8s ease-in-out infinite alternate; }
  .pantul { animation: kilau-air 3.6s ease-in-out infinite alternate; }
  .rusa { animation: minum 7s ease-in-out infinite; }
  .riak { animation: riak 7s ease-out infinite; } .riak.r2 { animation-delay: 1.1s; }
  .js .closing:not(.tampak) .rusa { opacity: 0; }
  .buket { animation: ayun 7s ease-in-out infinite alternate; transform-origin: 50% 85%; }
}
@keyframes dengung { from { translate: -5px 4px; } to { translate: 6px -6px; } }
@keyframes kedip { from { opacity: .35; } to { opacity: 1; } }
@keyframes kedip-teks { from { text-shadow: 0 0 10px rgba(255, 220, 130, .5), 0 0 24px rgba(255, 190, 90, .2); } to { text-shadow: 0 0 16px rgba(255, 220, 130, .95), 0 0 40px rgba(255, 190, 90, .5); } }
@keyframes napas { from { opacity: .7; scale: 1; } to { opacity: 1; scale: 1.06; } }
@keyframes denyut-c { from { opacity: .6; } to { opacity: 1; } }
@keyframes kilat { 0% { opacity: 1; scale: 1; } 30% { opacity: 1; scale: 1.8; } 100% { opacity: 0; scale: 2.4; } }
@keyframes kilat-lama { 0%, 70% { opacity: .2; } 85% { opacity: 1; scale: 1.3; } 100% { opacity: .8; scale: 1; } }
@keyframes lempar { 0% { translate: 0 0; rotate: 0deg; opacity: 1; } 18% { translate: 0 -14px; rotate: -6deg; } 100% { translate: -90px -46vh; rotate: -260deg; opacity: 0; } }
@keyframes lepas { to { translate: 0 -60px; opacity: 0; } }
@keyframes hanyut { from { translate: -8% 0; } to { translate: 14% 0; } }
@keyframes kelip { 0%, 100% { scale: .3; opacity: .1; } 50% { scale: 1.1; opacity: .95; } }
@keyframes nyala { 0% { opacity: 0; filter: blur(10px); letter-spacing: .2em; } 60% { opacity: 1; filter: blur(1px); } 100% { opacity: 1; filter: blur(0); letter-spacing: 0; } }
@keyframes muncul { from { opacity: 0; } to { opacity: 1; } }
@keyframes tumbuh { from { opacity: 0; scale: 0; } to { opacity: 1; } }
@keyframes goyang { from { rotate: -1.6deg; } to { rotate: 1.4deg; } }
@keyframes kemilau { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.1; } }
@keyframes tetes { 0% { opacity: 0; scale: .2; translate: 0 0; } 40% { opacity: 1; scale: 1; translate: 0 0; } 52% { opacity: 1; scale: 1 1.2; translate: 0 4px; } 70% { opacity: 0; translate: 0 150px; } 100% { opacity: 0; translate: 0 150px; } }
@keyframes edar { from { transform: rotate(var(--a, 0deg)) translateX(126px); } to { transform: rotate(calc(var(--a, 0deg) + 360deg)) translateX(126px); } }
@keyframes ayun { from { rotate: -2.6deg; } to { rotate: 2.6deg; } }
@keyframes ayun-foto { from { rotate: -2.4deg; } to { rotate: 2deg; } }
@keyframes lampu { from { opacity: .88; } to { opacity: 1; } }
@keyframes intip { 0%, 30% { translate: -62% 0; rotate: 0deg; } 40% { translate: 4% 0; rotate: -4deg; } 46% { rotate: 3deg; } 52% { rotate: -2deg; } 62% { translate: 4% 0; rotate: 0deg; } 72%, 100% { translate: -62% 0; } }
@keyframes toleh { 0%, 40%, 100% { rotate: 0deg; } 48%, 60% { rotate: -9deg; } 70%, 80% { rotate: 6deg; } 88% { rotate: 0deg; } }
@keyframes kedip-mata { 0%, 90%, 100% { scale: 1 0; } 93%, 95% { scale: 1 1; } }
@keyframes masuk { 0% { translate: 70px -90px; opacity: 0; } 15% { opacity: 1; } 60% { translate: 26px -50px; } 100% { translate: 0 0; opacity: 1; } }
@keyframes kilau-air { from { opacity: .4; scale: .85 1; } to { opacity: 1; scale: 1.15 1; } }
@keyframes minum { 0%, 100% { rotate: 0deg; } 20%, 60% { rotate: 1.6deg; } 70% { rotate: -1deg; } 80% { rotate: 0deg; } }
@keyframes riak { 0%, 22% { opacity: 0; scale: .2; } 26% { opacity: .9; } 60%, 100% { opacity: 0; scale: 1.8; } }
@keyframes turun { from { opacity: 0; translate: 0 -18px; } to { opacity: 1; translate: 0 0; } }
@keyframes naik { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes gulir { 0% { translate: 0 0; opacity: 1; } 70% { translate: 0 12px; opacity: 0; } 100% { translate: 0 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rv { opacity: 1; translate: none; scale: none; } *, *::before, *::after { animation: none !important; } .js .ly, .js .gelap { transition: none; } .kunang { display: none !important; } }
