/* =========================================================================
   Tema Binar — cahaya merah muda berkilau.

   Titik tolaknya video: bokeh merah muda, butiran cahaya keemasan yang
   turun dari atas & naik dari bawah, pusat putih yang bersinar.

   Gagasan utama: CAHAYA. Video menjadi latar tetap yang terus berkilau;
   semua isi melayang di atasnya sebagai kartu kaca putih yang berpendar
   (tepi bercahaya, bukan garis). Bentuk yang diulang: BULATAN CAHAYA —
   sel hitung mundur, penanda cerita, bingkai foto — seperti bokeh video.
   Warna: merah mawar tua (teks utama), putih, merah muda, emas pucat.
   Huruf: Birthstone (nama & judul), Noto Serif Display (sub judul),
   Be Vietnam Pro (teks).
   ========================================================================= */

:root {
    --c-paper: #FBEFF2;
    --c-ink: #5B2438;
    --c-accent: #A8345A;

    --c-muted: color-mix(in srgb, var(--c-ink) 72%, #fff);
    --c-rule: color-mix(in srgb, var(--c-accent) 22%, #fff);
    --c-sunk: color-mix(in srgb, var(--c-accent) 8%, #fff);
    --c-action: var(--c-accent);

    --f-names: 'Birthstone', 'Great Vibes', cursive;
    --f-display: 'Noto Serif Display', Georgia, serif;
    --f-body: 'Be Vietnam Pro', system-ui, sans-serif;
    --f-script: var(--f-names);

    --bnr-gold: #E9C98F;
    --bnr-glass: rgb(255 255 255 / .74);
    --bnr-glow: 0 0 0 1px rgb(255 255 255 / .9), 0 0 28px 4px rgb(255 255 255 / .75), 0 24px 60px -30px rgb(120 30 60 / .45);
    --bnr-halo: 0 0 18px rgb(255 255 255 / .95), 0 0 2px rgb(255 255 255 / .9);
    --bnr-stage-w: max(100vw, 100dvh * 9 / 16);
}

body.inv.bnr {
    background: var(--c-paper); color: var(--c-ink);
    font-family: var(--f-body); font-size: .95rem; line-height: 1.75;
    font-feature-settings: 'lnum' 1;
}

.bnr-amp { font-family: var(--f-names); color: var(--c-accent); }

/* ---------------------------------------------------------- latar tetap */

.bnr-film { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #F4C9D3; pointer-events: none; }
.bnr-film__stage {
    position: absolute; left: 50%; top: 50%;
    width: var(--bnr-stage-w); aspect-ratio: 9 / 16; transform: translate(-50%, -50%);
}
.bnr-film__poster, .bnr-film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bnr-film__video { opacity: 0; transition: opacity .6s ease; }
.bnr-film.is-live .bnr-film__video { opacity: 1; }

/* ---------------------------------------------------------------- sampul */

/* Sampul hanya teks, di atas latar tetap: tanpa warna latar sendiri. */
.bnr .inv-cover.bnr-cover { background: transparent; padding: 0; display: grid; place-items: center; }

/* Pusat cahaya putih video ±25–75% tinggi layar; butiran di atas & bawah. */
.bnr-cover__text {
    display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: .6rem;
    width: min(88vw, 26rem); height: min(56dvh, 34rem); text-align: center;
    animation: bnr-glow-in 1.6s var(--ease) both .3s;
}
@keyframes bnr-glow-in { from { opacity: 0; filter: blur(6px); transform: scale(.98); } to { opacity: 1; filter: none; transform: none; } }

.bnr-cover__label { margin: 0; font: italic 300 clamp(1rem, 4.4vw, 1.2rem)/1.2 var(--f-display); color: var(--c-ink); text-shadow: var(--bnr-halo); }
.bnr-cover__names {
    display: grid; justify-items: center; width: 100%; margin: 0;
    font: 400 clamp(3.4rem, 17vw, 5.2rem)/.95 var(--f-names); color: var(--c-accent); text-wrap: balance;
    text-shadow: 0 0 24px rgb(255 255 255 / .9), 0 0 4px rgb(255 255 255 / .8);
}
.bnr-cover__names .bnr-amp { font-size: .55em; line-height: 1.1; }
.bnr-cover__date { margin: .3rem 0 0; font: 400 clamp(1rem, 4.4vw, 1.15rem)/1.3 var(--f-display); letter-spacing: .04em; color: var(--c-ink); text-shadow: var(--bnr-halo); }
.bnr-cover__foot { margin-top: 1rem; }
.bnr-cover__to { margin: 0; font-size: .78rem; color: var(--c-muted); text-shadow: var(--bnr-halo); }
.bnr-cover__guest { margin: .15rem 0 0; font: 400 1.3rem/1.25 var(--f-display); color: var(--c-ink); overflow-wrap: anywhere; text-shadow: var(--bnr-halo); }

.bnr-open {
    margin-top: 1rem; padding: .85rem 2rem; border: 0; border-radius: 999px;
    background: var(--c-accent); color: #fff; font: 500 .9rem/1 var(--f-body); letter-spacing: .02em; cursor: pointer;
    box-shadow: 0 0 0 4px rgb(255 255 255 / .55), 0 0 30px 6px rgb(255 255 255 / .7);
    transition: background .25s ease, box-shadow .25s ease;
}
.bnr-open:hover { background: var(--c-ink); box-shadow: 0 0 0 6px rgb(255 255 255 / .7), 0 0 40px 10px rgb(255 255 255 / .8); }
.bnr-open:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------------------------------------------------------------- isi */

/* Sampul transparan → isi baru terlihat setelah undangan dibuka. */
body.bnr:not(.is-open) .bnr-main { visibility: hidden; opacity: 0; }
body.bnr.is-open .bnr-main { animation: bnr-fade .9s ease both .3s; }
@keyframes bnr-fade { from { opacity: 0; } }

.bnr .inv__main.bnr-main {
    position: relative; z-index: 1;
    width: min(100% - 2rem, 30rem); max-width: none; margin: 0 auto; padding: 30vh 0 0;
}

/* Kartu kaca yang berpendar: tepi cahaya putih, bukan garis. */
.bnr .inv-section {
    margin: 0 0 22vh; padding: 2.75rem 1.5rem 2.5rem;
    border: 0; border-radius: 1.75rem; text-align: center;
    background: var(--bnr-glass);
    -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
    box-shadow: var(--bnr-glow);
}

.bnr-head { margin-bottom: 1.75rem; text-align: center; }
.bnr-head__title {
    display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 0;
    font: 400 clamp(2.8rem, 12vw, 3.4rem)/1 var(--f-names); color: var(--c-accent);
}
/* Kilau kecil di kedua sisi judul. */
.bnr-head__title::before, .bnr-head__title::after {
    content: ''; flex: none; width: .7rem; height: .7rem;
    background: radial-gradient(circle, #fff 0 20%, var(--bnr-gold) 35%, transparent 70%);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    transform: scale(1.8);
}
.bnr-head__lead { max-width: 24rem; margin: .6rem auto 0; color: var(--c-muted); }

/* Pembuka */
.bnr .inv-bismillah { color: var(--c-accent); }
.bnr-verse { margin: 0 0 1.5rem; }
.bnr-verse__text { margin: 0; font: italic 300 1.15rem/1.7 var(--f-display); color: var(--c-ink); }
.bnr-verse__source { margin-top: .6rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--c-accent); }
.bnr-lede { max-width: 25rem; margin: 0 auto; color: var(--c-muted); }

/* Mempelai: foto bulat berpendar seperti bulatan bokeh */
.bnr-couple__grid { display: grid; gap: .5rem; }
.bnr-couple__amp { margin: .25rem 0; font: 400 3.6rem/1 var(--f-names); color: var(--c-accent); }
.bnr-person { display: grid; justify-items: center; }
.bnr-photo {
    width: 10.5rem; aspect-ratio: 1; margin: 0 0 1.3rem; border-radius: 50%;
    box-shadow: 0 0 0 5px #fff, 0 0 30px 8px rgb(255 255 255 / .9), 0 0 60px 10px rgb(233 201 143 / .35);
}
.bnr-photo img, .bnr-photo__initial { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bnr-photo__initial { display: grid; place-items: center; background: var(--c-sunk); font: 400 5rem/1 var(--f-names); color: var(--c-accent); }
.bnr-person__text { min-width: 0; overflow-wrap: break-word; }
.bnr-person__name { margin: 0; font: 400 2.8rem/1 var(--f-names); color: var(--c-accent); }
.bnr-person__family { margin: .4rem 0 0; font-size: .88rem; color: var(--c-muted); }
.bnr-person__bio { max-width: 22rem; margin: .6rem auto 0; font-size: .88rem; color: var(--c-muted); }
.bnr-person__ig { display: inline-block; margin-top: .6rem; color: var(--c-accent); font-size: .84rem; font-weight: 600; text-decoration: none; }

/* Hitung mundur: bulatan cahaya */
.bnr-countdown { display: flex; justify-content: center; gap: .55rem; margin: 0 auto 2rem; }
.bnr .bnr-countdown .inv-countdown__cell {
    display: grid; place-content: center; gap: .05rem; width: 4.1rem; aspect-ratio: 1; min-width: 0; padding: 0;
    border: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff 0 45%, color-mix(in srgb, var(--c-accent) 14%, #fff) 100%);
    box-shadow: 0 0 18px 2px rgb(255 255 255 / .9), 0 0 0 1px rgb(233 201 143 / .6);
}
.bnr .bnr-countdown b { font: 400 1.45rem/1 var(--f-display); color: var(--c-accent); }
.bnr .bnr-countdown span { font-size: .64rem; text-transform: none; letter-spacing: .03em; color: var(--c-muted); }

/* Acara */
.bnr-events__list { display: grid; gap: 0; }
.bnr-event { padding: 1.35rem 0; }
.bnr-event + .bnr-event { border-top: 1px solid var(--c-rule); }
.bnr-event.is-past { opacity: .55; }
.bnr-event__title { margin: 0 0 .2rem; font: 400 2.7rem/1 var(--f-names); color: var(--c-accent); }
.bnr-event__date { margin: 0; font: 400 1.08rem/1.4 var(--f-display); }
.bnr-event__time { margin: 0; color: var(--c-muted); }
.bnr-event__venue { margin: .85rem 0 0; font-weight: 600; }
.bnr-event__address { margin: .1rem 0 0; font-size: .88rem; color: var(--c-muted); }
.bnr-event__meta { margin: .35rem 0 0; font-size: .84rem; color: var(--c-muted); }
.bnr-event__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.bnr-event__actions .inv-btn { flex: 1 1 8.5rem; text-align: center; }

/* Tombol */
.bnr .inv-btn { border-radius: 999px; padding: .72rem 1.2rem; font: 600 .82rem/1.2 var(--f-body); letter-spacing: .01em; text-transform: none; }
.bnr .inv-btn--solid { background: var(--c-accent); border-color: var(--c-accent); color: #fff; box-shadow: 0 0 18px rgb(255 255 255 / .8); }
.bnr .inv-btn--ghost { background: rgb(255 255 255 / .7); border-color: var(--c-rule); color: var(--c-ink); }
.bnr .inv-btn:hover { filter: none; background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

/* Cerita: bulatan cahaya sebagai penanda */
.bnr-story__list { display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.bnr-story__item { display: grid; justify-items: center; }
.bnr-story__item::before {
    content: ''; width: .85rem; height: .85rem; margin-bottom: .55rem; border-radius: 50%;
    background: radial-gradient(circle, #fff 0 30%, var(--bnr-gold) 70%); box-shadow: 0 0 12px 3px rgb(255 255 255 / .95);
}
.bnr-story__period { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .06em; color: var(--c-accent); }
.bnr-story__title { margin: .15rem 0 0; font: 400 1.25rem/1.3 var(--f-display); color: var(--c-ink); }
.bnr-story__img { width: 100%; aspect-ratio: 4 / 3; margin-top: .75rem; object-fit: cover; border-radius: 1.1rem; }
.bnr-story__text { max-width: 25rem; margin: .4rem 0 0; font-size: .9rem; color: var(--c-muted); }

/* Galeri (markup _base) */
.bnr .inv-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.bnr .inv-gallery__cell { padding: 0; border: 0; border-radius: 1.1rem; aspect-ratio: 3 / 4; overflow: hidden; background: var(--c-sunk); cursor: zoom-in; }
.bnr .inv-gallery__cell:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
.bnr .inv-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }

/* Video & siaran langsung */
.bnr .inv-video { padding: 0; border: 0; border-radius: 1.1rem; overflow: hidden; background: #000; }
.bnr .inv-video iframe { position: static; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Form RSVP & ucapan (markup _base) */
.bnr .inv-form { gap: 1.3rem; text-align: left; }
.bnr .inv-label { font-size: .85rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--c-ink); }
.bnr .inv-input { padding: .8rem 1rem; border: 1px solid rgb(255 255 255 / .95); border-radius: 1rem; background: rgb(255 255 255 / .85); font-size: .95rem; }
.bnr .inv-input:focus, .bnr .inv-input:focus-visible { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent); }
.bnr .inv-choice { border-color: rgb(255 255 255 / .95); border-radius: 1rem; background: rgb(255 255 255 / .85); }
.bnr .inv-choice:has(:checked) { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 8%, #fff); color: var(--c-accent); }
.bnr .inv-choice input { accent-color: var(--c-accent); }
.bnr .inv-form .inv-btn--solid { width: 100%; padding-block: .95rem; }
.bnr .inv-tally div { border: 0; border-radius: 1rem; background: rgb(255 255 255 / .85); }
.bnr .inv-tally dd { font-family: var(--f-display); font-size: 1.9rem; color: var(--c-accent); }
.bnr .inv-wish { padding: .95rem 1.1rem; border: 0; border-radius: 1rem; background: rgb(255 255 255 / .8); text-align: left; }
.bnr .inv-wish__name { font-weight: 600; color: var(--c-accent); }

/* Hadiah: kartu mawar tua bertabur kilau */
.bnr .inv-gifts { display: grid; gap: 1rem; }
.bnr .inv-gift {
    padding: 1.8rem 1.5rem; border: 0; border-radius: 1.3rem; text-align: center; color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgb(255 255 255 / .55) 0 1.5px, transparent 2.5px) 0 0 / 38px 34px,
        radial-gradient(circle at 70% 60%, rgb(233 201 143 / .7) 0 1px, transparent 2px) 0 0 / 27px 31px,
        linear-gradient(160deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 70%, #3a0f22));
    box-shadow: 0 0 24px rgb(255 255 255 / .6);
}
.bnr .inv-gift__logo { max-height: 1.6rem; margin-inline: auto; filter: brightness(0) invert(1); opacity: .9; }
.bnr .inv-gift__label { font-size: .85rem; letter-spacing: .02em; text-transform: none; color: rgb(255 255 255 / .8); }
.bnr .inv-gift__account { font: 400 1.6rem/1.3 var(--f-display); letter-spacing: .05em; color: #fff; }
.bnr .inv-gift__holder, .bnr .inv-gift__address { color: rgb(255 255 255 / .85); }
.bnr .inv-gift .inv-btn--ghost { margin-top: 1rem; background: transparent; border-color: rgb(255 255 255 / .6); color: #fff; }
.bnr .inv-gift__qr { display: block; max-width: 12rem; margin: .75rem auto 0; padding: .5rem; background: #fff; border-radius: .5rem; }

/* Penutup: kartu terakhir, lalu ruang lapang untuk kilau latar */
.bnr .bnr-closing { margin-bottom: 55vh; }
.bnr-closing__text { max-width: 24rem; margin: 0 auto; color: var(--c-muted); }
.bnr-closing__salutation { margin: 1.6rem 0 0; font: italic 300 1.05rem/1.3 var(--f-display); color: var(--c-muted); }
.bnr-closing__names { display: grid; margin: .2rem 0 0; font: 400 clamp(3.2rem, 14vw, 4rem)/.95 var(--f-names); color: var(--c-accent); }
.bnr-closing__names .bnr-amp { font-size: .55em; }
.bnr-closing__tag { margin: .8rem 0 0; font-size: .88rem; color: var(--c-muted); }
.bnr .bnr-footer {
    position: relative; margin: 0 -1rem; padding: 1rem; border-radius: 1.25rem 1.25rem 0 0;
    background: rgb(91 36 56 / .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: rgb(255 255 255 / .8); font-size: .75rem; text-align: center;
}
.bnr .bnr-footer a { color: #fff; }

/* Musik, tombol QR, navigasi cepat */
.bnr .inv-music { background: var(--c-accent); box-shadow: 0 0 18px rgb(255 255 255 / .8); }
.bnr .inv-checkin-btn { background: var(--c-accent); color: #fff; }
.bnr { --qn-bg: rgb(255 255 255 / .82); --qn-fg: var(--c-muted); --qn-active: var(--c-accent); }

/* ------------------------------------------------------------ layar lebar */

@media (min-width: 900px) {
    /* Panggung 9:16 di tengah supaya butiran cahaya tetap terlihat; sisi
       kiri-kanan diisi poster yang diburamkan. */
    body.inv.bnr { --bnr-stage-w: calc(100dvh * 9 / 16); }
    .bnr-film::before {
        content: ''; position: absolute; inset: -40px;
        background: url('poster.jpg') center / cover; filter: blur(30px); opacity: .8;
    }
    .bnr-film__stage { box-shadow: 0 0 60px -10px rgb(120 30 60 / .35); }
    .bnr .inv-cover.bnr-cover { left: 0; right: 0; width: auto; }
    .bnr .inv__main.bnr-main { width: min(30rem, var(--bnr-stage-w) - 3rem); }
}

@media (prefers-reduced-motion: reduce) {
    .bnr-cover__text, body.bnr.is-open .bnr-main { animation: none; }
    .bnr-open, .bnr-film__video { transition: none; }
}

/* ------------------------------------------------- HP: bilah alamat menyusut
   Di HP, bilah alamat menutup sendiri saat digulir → tinggi layar berubah →
   latar fixed ikut berubah ukuran ("melompat"). Latar memakai tinggi layar
   TERBESAR (lvh) yang tetap.

   Sebelum dibuka: tinggi layar saat ini (dvh), supaya teks sampul tetap sejajar
   dengan bingkai video. Setelah dibuka: tinggi TERBESAR (lvh) yang tetap —
   bergeser halus sekali saat sampul memudar, lalu tidak berubah lagi. */
@supports (height: 100lvh) {
    .bnr-film { bottom: auto; height: 100dvh; transition: height .7s ease; }
    .bnr-film__stage { transition: width .7s ease; }
    body.inv.is-open .bnr-film { height: 100lvh; }
    body.inv.is-open { --bnr-stage-w: max(100vw, 100lvh * 9 / 16); }
    @media (min-width: 900px) { body.inv.is-open { --bnr-stage-w: calc(100lvh * 9 / 16); } }
}
