/* Eternal Vow by GIFU — dasar semua demo undangan website.
   Tiap desain mengisi variabel warna & font di <style> halamannya sendiri. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--outer, #ddd); color: var(--ink, #353333); font-family: var(--body-font, Georgia, serif); line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
a { color: inherit; }

/* Kolom undangan: selebar ponsel, di layar lebar tetap di tengah dengan latar desain di kiri-kanan. */
.inv { position: relative; max-width: 440px; margin: 0 auto; background: var(--page, #fff); overflow: hidden; box-shadow: 0 0 60px rgba(0, 0, 0, .18); min-height: 100vh; }
.sec { position: relative; padding: 64px 24px; text-align: center; overflow: hidden; }
.sec > * { position: relative; z-index: 1; }
.deco { position: absolute; z-index: 0; pointer-events: none; max-width: none; }

.t-title { font-family: var(--title-font); font-weight: 700; color: var(--accent); margin: 0; line-height: 1.15; }
.t-script { font-family: var(--script-font); color: var(--accent); margin: 0; font-weight: 400; line-height: 1.2; }
.small { font-size: 14px; }
.muted { opacity: .85; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px; padding: 0 26px; min-height: 44px; background: var(--btn, #333); color: var(--btn-ink, #fff); font-family: var(--body-font); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }

/* Sampul: menutup undangan sampai tamu menekan "Open Invitation". */
.cover { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; background: var(--outer); transition: transform .9s cubic-bezier(.7, 0, .2, 1), opacity .9s ease; }
.cover.gone { transform: translateY(-100%); opacity: .4; pointer-events: none; }
.cover-in { position: relative; width: 100%; max-width: 440px; height: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }

/* Muncul saat digulir */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } .cover { transition: none; } }

/* Hitung mundur */
.count { display: flex; justify-content: center; gap: 10px; margin: 26px 0 0; }
.count div { width: 78px; height: 82px; border-radius: 50%; background: var(--chip); color: var(--chip-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; }
.count b { font-size: 30px; line-height: 1; }
.count span { font-size: 12px; margin-top: 4px; }

/* Galeri */
.gal { columns: 2; column-gap: 7px; margin-top: 34px; }
.gal button { display: block; width: 100%; padding: 0; border: none; background: none; margin: 0 0 7px; cursor: zoom-in; break-inside: avoid; }
.gal img { width: 100%; height: auto; }
.lb { position: fixed; inset: 0; z-index: 70; background: rgba(10, 12, 20, .92); display: none; align-items: center; justify-content: center; padding: 20px; }
.lb.on { display: flex; }
.lb img { max-height: 86vh; width: auto; border-radius: 4px; }
.lb button { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; cursor: pointer; }

/* Form RSVP & ucapan */
.card { background: var(--card); color: var(--card-ink); border-radius: 20px; padding: 30px 22px; text-align: left; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 15px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: none; border-radius: 20px; background: var(--input, #e8e8e8); color: #353333; padding: 13px 18px; font-size: 14px; outline: none; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 2px var(--btn); }
.radio { display: flex; align-items: center; gap: 10px; margin-top: 8px; cursor: pointer; font-size: 15px; }
.radio input { width: 18px; height: 18px; accent-color: var(--btn); }
.note { font-size: 12px; opacity: .8; margin-top: 12px; text-align: center; }
.done { text-align: center; padding: 10px 0 2px; font-size: 15px; }

.acct { margin-top: 16px; display: none; gap: 10px; }
.acct.on { display: grid; }
.acct div { background: rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.acct small { display: block; opacity: .85; }
.acct button { border: none; border-radius: 999px; background: var(--input, #e8e8e8); color: #353333; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }

.wishes { display: grid; gap: 12px; margin-top: 26px; max-height: 380px; overflow-y: auto; padding-right: 4px; text-align: left; }
.wish { display: flex; gap: 10px; align-items: flex-start; }
.wish i { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--chip); color: var(--chip-ink); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; }
.wish div { flex: 1; background: var(--input, #d9d9d9); border-radius: 20px; padding: 12px 16px; font-size: 13px; color: #353333; }
.wish b { display: block; font-family: var(--script-font); font-weight: 400; font-size: 19px; color: var(--accent); }

/* Bar demo: penanda halaman contoh + tombol pesan (tidak ada di undangan pelanggan). */
.demo-bar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%) translateY(140%); z-index: 60; width: calc(100% - 24px); max-width: 416px; display: flex; align-items: center; gap: 10px; background: rgba(28, 28, 30, .92); color: #fff; border-radius: 18px; padding: 10px 10px 10px 16px; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .5s ease; backdrop-filter: blur(8px); }
.demo-bar.on { transform: translateX(-50%); }
.demo-bar p { margin: 0; flex: 1; font-size: 12px; line-height: 1.35; }
.demo-bar b { display: block; font-size: 13px; }
.demo-bar a { flex: none; background: #F49092; color: #252524; text-decoration: none; border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.music { position: fixed; right: 16px; bottom: 86px; z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--btn); color: var(--btn-ink); cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.music.on { display: flex; }
@media (min-width: 480px) { .music { right: calc(50% - 204px); } }
