/* =========================================================================
   Tema Adiwarna — peoni burgundy cat air & percikan emas di atas krem.

   Titik tolaknya video: kertas krem berkabut lembut, peoni burgundy-merah
   muda dengan daun zaitun & tunas jingga tumbuh dari sudut kanan atas dan
   kiri bawah, percikan emas bertebaran seperti serbuk.

   Gagasan utama: SURAT BERBINGKAI EMAS. Tiap kartu seperti lembar surat
   dengan garis emas tipis di dalam tepinya; sampul berhias segel monogram;
   foto mempelai dilingkari cincin titik-titik emas (percikan video);
   hitung mundur berupa segel-segel burgundy. Peoni video hanya menghias
   kartu paling atas (kanan atas) & kartu penutup (kiri bawah).
   Warna: burgundy (utama), emas, zaitun, krem.
   Huruf: Allura (nama & judul), Lora (sub judul, ayat), Jost (teks).
   ========================================================================= */

:root {
    --c-paper: #FEFBF4;
    --c-ink: #4A2A30;
    --c-accent: #8B2342;

    --c-muted: color-mix(in srgb, var(--c-ink) 68%, var(--c-paper));
    --c-rule: color-mix(in srgb, var(--adw-gold) 45%, var(--c-paper));
    --c-sunk: color-mix(in srgb, var(--c-accent) 6%, var(--c-paper));
    --c-action: var(--c-accent);

    --f-names: 'Allura', 'Great Vibes', cursive;
    --f-display: 'Lora', Georgia, serif;
    --f-body: 'Jost', system-ui, sans-serif;
    --f-script: var(--f-names);

    --adw-gold: #B8935A;
    --adw-gold-lt: #E4CFA3;
    --adw-olive: #7B7A3F;
    --adw-blush: #F4DCD9;
    --adw-card: #FFFDF8;
}

body.inv.adw {
    background:
        radial-gradient(ellipse 80% 30% at 100% 0%, rgb(139 35 66 / .07), transparent 70%),
        radial-gradient(ellipse 80% 30% at 0% 100%, rgb(184 147 90 / .12), transparent 70%),
        var(--c-paper);
    background-attachment: fixed;
    color: var(--c-ink); font-family: var(--f-body); font-size: .95rem; line-height: 1.75; font-weight: 400;
    font-feature-settings: 'lnum' 1;
}

.adw-amp { font-family: var(--f-names); color: var(--adw-gold); }

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

.adw .inv-cover.adw-cover { padding: 0; display: block; overflow: hidden; background: var(--adw-card); }

/* Panggung 9:16 selalu MENUTUPI layar — teks (cqw/%) tetap di ruang krem
   kosong pada ukuran layar apa pun. */
.adw-stage {
    position: absolute; left: 50%; top: 50%;
    width: max(100vw, 100dvh * 9 / 16); aspect-ratio: 9 / 16;
    transform: translate(-50%, -50%);
    container-type: inline-size;
}
.adw-stage__poster, .adw-stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adw-stage.is-playing .adw-stage__poster { opacity: 0; }

/* Ruang kosong video: peoni atas turun sampai ±27%, peoni bawah naik dari
   ±70%. Teks di 24–65%; nama dikecilkan otomatis bila tidak muat lebar
   ATAU tinggi (theme.js). Video tumbuh dari krem polos, jadi teks menunggu. */
.adw-cover__text {
    position: absolute; top: 24%; bottom: 35%; left: 12cqw; right: 12cqw;
    display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 1.1cqw;
    text-align: center;
    animation: adw-rise 1.3s var(--ease) both;
}
.adw-cover__foot { margin-top: 2.2cqw; }
.adw-stage.is-playing .adw-cover__text { animation-delay: 3s; }
@keyframes adw-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Segel monogram: cakram burgundy bercincin emas ganda */
.adw-seal {
    display: flex; align-items: center; justify-content: center; gap: .6cqw;
    width: 15cqw; aspect-ratio: 1; margin-bottom: 1cqw; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c-accent) 78%, #fff), var(--c-accent) 60%, color-mix(in srgb, var(--c-accent) 78%, #000));
    box-shadow: 0 0 0 1cqw var(--adw-card), 0 0 0 1.35cqw var(--adw-gold), 0 2.2cqw 4cqw -1.6cqw rgb(74 42 48 / .55);
    color: var(--adw-gold-lt); font: 400 6.4cqw/1 var(--f-names);
}
.adw-seal i { font-style: normal; font-size: 4cqw; color: var(--adw-gold); }
.adw-seal span:first-child { margin-top: -.4cqw; }

.adw-cover__label {
    margin: 1.8cqw 0 0; font: 500 3cqw/1.2 var(--f-body); letter-spacing: .34em; text-transform: uppercase;
    color: var(--adw-gold);
}
.adw-cover__names {
    display: grid; justify-items: center; width: 100%; margin: 0;
    font: 400 17cqw/1 var(--f-names); color: var(--c-accent); text-wrap: balance;
}
.adw-cover__names .adw-amp { font-size: .55em; line-height: .8; }
.adw-cover__date {
    display: flex; align-items: center; gap: 2.5cqw; margin: 1.2cqw 0 0;
    font: italic 400 4.4cqw/1.2 var(--f-display); color: var(--c-ink);
}
.adw-cover__date::before, .adw-cover__date::after { content: ''; width: 6cqw; height: 1px; background: var(--adw-gold); }
.adw-cover__to { margin: 0; font-size: 3cqw; line-height: 1.3; letter-spacing: .04em; color: var(--c-muted); }
.adw-cover__guest { margin: .6cqw 0 0; font: 500 5.4cqw/1.2 var(--f-display); color: var(--c-ink); overflow-wrap: anywhere; }

.adw-open {
    margin-top: 2.6cqw; padding: 2.7cqw 7.5cqw; border: 1px solid var(--adw-gold); border-radius: 999px;
    background: var(--c-accent); color: #fff; font: 500 3.3cqw/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
    box-shadow: 0 0 0 1cqw var(--adw-card), 0 0 0 1.3cqw var(--adw-gold-lt), 0 12px 22px -12px color-mix(in srgb, var(--c-accent) 85%, transparent);
    transition: background .25s ease, color .25s ease;
}
.adw-open:hover { background: var(--adw-card); color: var(--c-accent); }
.adw-open:focus-visible { outline: 2px solid var(--adw-gold); outline-offset: 5px; }

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

.adw-frame { position: relative; overflow-x: clip; }
.adw .inv__main { position: relative; max-width: 32rem; padding: 3rem 1.25rem 0; }

/* Kartu surat: bingkai emas tipis di dalam tepi (bayangan inset = cincin
   kertas + garis emas). Peoni video hanya di kartu PALING ATAS & penutup;
   latar kartu di lapisan sendiri supaya bunga tak menutup teks. */
.adw .inv-section {
    position: relative; isolation: isolate; margin: 0 0 3.25rem; padding: 3.25rem 1.75rem 3rem;
    border: 0; border-radius: 1.4rem; text-align: center; overflow: hidden;
    background: none;
    box-shadow: 0 26px 46px -32px rgb(74 42 48 / .55), 0 0 0 1px rgb(184 147 90 / .16);
}
.adw .inv-section::before {
    content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit;
    background: var(--adw-card);
    box-shadow: inset 0 0 0 .6rem var(--adw-card), inset 0 0 0 calc(.6rem + 1px) color-mix(in srgb, var(--adw-gold) 55%, transparent);
}
.adw .inv-section > * { position: relative; }
.adw .inv-section:first-of-type::after {
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    inset: 0 0 auto 0; height: 11rem; border-radius: inherit;
    background: url('bloom-top.webp') top center / 100% auto no-repeat;
    -webkit-mask-image: linear-gradient(#000 60%, transparent);
            mask-image: linear-gradient(#000 60%, transparent);
}

.adw-head { margin-bottom: 1.8rem; text-align: center; color: var(--c-accent); }
.adw-head__title { margin: 0; font: 400 clamp(2.3rem, 10vw, 2.75rem)/1.15 var(--f-names); color: var(--c-accent); }
.adw-head__bloom { display: block; margin: .35rem auto 0; color: var(--c-accent); }
.adw-head__lead { max-width: 24rem; margin: .8rem auto 0; color: var(--c-muted); }

/* Pembuka */
.adw-opening { padding-top: 8.25rem !important; }
.adw .inv-bismillah { color: var(--c-accent); }
.adw-verse { position: relative; margin: 0 0 1.8rem; padding: 1.4rem 1rem; border-block: 1px solid var(--c-rule); }
.adw-verse__text { margin: 0; font: italic 400 1.08rem/1.75 var(--f-display); color: var(--c-ink); }
.adw-verse__source { margin-top: .7rem; font-size: .74rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--adw-gold); }
.adw-lede { max-width: 25rem; margin: 0 auto; color: var(--c-muted); }

/* Mempelai: foto bulat, cincin titik-titik emas seperti percikan video */
.adw-couple__grid { display: grid; gap: .6rem; }
.adw-couple__amp { margin: .2rem 0; font: 400 4rem/1 var(--f-names); color: var(--adw-gold); }
.adw-person { display: grid; justify-items: center; }
.adw-photo {
    position: relative; width: 10.5rem; aspect-ratio: 1; margin: .6rem 0 1.6rem; padding: 6px;
    border: 1px solid var(--adw-gold); border-radius: 50%; background: var(--adw-blush);
}
.adw-photo::before {
    content: ''; position: absolute; inset: -.6rem; border: 2px dotted var(--adw-gold); border-radius: 50%; opacity: .75; pointer-events: none;
}
.adw-photo::after {
    content: ''; position: absolute; right: .35rem; bottom: .55rem; width: .8rem; aspect-ratio: 1;
    border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px var(--adw-card), 0 0 0 4px var(--adw-gold);
}
.adw-photo img, .adw-photo__initial { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.adw-photo__initial { display: grid; place-items: center; background: var(--adw-blush); font: 400 5.2rem/1 var(--f-names); color: var(--c-accent); }
.adw-person__text { min-width: 0; overflow-wrap: break-word; }
.adw-person__name { margin: 0; font: 400 2.9rem/1.1 var(--f-names); color: var(--c-accent); }
.adw-person__family { margin: .4rem 0 0; font-size: .88rem; color: var(--c-muted); }
.adw-person__bio { max-width: 22rem; margin: .6rem auto 0; font-size: .88rem; color: var(--c-muted); }
.adw-person__ig { display: inline-block; margin-top: .6rem; color: var(--c-accent); font-size: .84rem; font-weight: 500; letter-spacing: .04em; text-decoration: none; }

/* Hitung mundur: segel burgundy bercincin emas, selang-seling segel krem */
.adw-countdown { display: flex; justify-content: center; gap: .7rem; margin: 0 auto 2.1rem; }
.adw .adw-countdown .inv-countdown__cell {
    display: grid; place-content: center; gap: .05rem; width: 3.9rem; aspect-ratio: 1; min-width: 0; padding: 0;
    border: 0; border-radius: 50%; background: var(--c-accent); color: #fff;
    box-shadow: 0 0 0 3px var(--adw-card), 0 0 0 4px var(--adw-gold);
}
.adw .adw-countdown .inv-countdown__cell:nth-child(even) { background: var(--adw-blush); }
.adw .adw-countdown b { font: 500 1.4rem/1 var(--f-display); color: #fff; }
.adw .adw-countdown .inv-countdown__cell:nth-child(even) b { color: var(--c-accent); }
.adw .adw-countdown span { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: rgb(255 255 255 / .82); }
.adw .adw-countdown .inv-countdown__cell:nth-child(even) span { color: var(--c-muted); }

/* Acara: lembar kecil berbingkai emas ganda */
.adw-events__list { display: grid; gap: 1.1rem; }
.adw-event {
    position: relative; padding: 1.9rem 1.25rem; border: 1px solid var(--c-rule); border-radius: 1rem;
    background: linear-gradient(180deg, rgb(255 255 255 / .8), color-mix(in srgb, var(--adw-blush) 22%, #fff));
}
.adw-event::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--c-rule); border-radius: .7rem; pointer-events: none; }
.adw-event.is-past { opacity: .55; }
.adw-event__title { margin: 0 0 .2rem; font: 400 2.7rem/1.1 var(--f-names); color: var(--c-accent); }
.adw-event__date { margin: 0; font: 500 1.08rem/1.4 var(--f-display); }
.adw-event__time { margin: 0; color: var(--c-muted); letter-spacing: .04em; }
.adw-event__venue { margin: .95rem 0 0; font-weight: 500; }
.adw-event__address { margin: .1rem 0 0; font-size: .88rem; color: var(--c-muted); }
.adw-event__meta { margin: .35rem 0 0; font-size: .84rem; color: var(--c-muted); }
.adw-event__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.adw-event__actions .inv-btn { flex: 1 1 8.5rem; text-align: center; }

/* Tombol */
.adw .inv-btn { border-radius: 999px; padding: .75rem 1.2rem; font: 500 .8rem/1.2 var(--f-body); letter-spacing: .06em; text-transform: none; }
.adw .inv-btn--solid { background: var(--c-accent); border-color: var(--c-accent); color: #fff; box-shadow: none; }
.adw .inv-btn--ghost { background: transparent; border-color: var(--adw-gold); color: var(--c-ink); }
.adw .inv-btn:hover { filter: none; background: var(--adw-gold); border-color: var(--adw-gold); color: #fff; }

/* Cerita: benang emas putus-putus dengan kuntum di tiap babak */
.adw-story__list { display: grid; gap: 1.8rem; margin: 0; padding: 0; list-style: none; }
.adw-story__item { position: relative; display: grid; justify-items: center; }
.adw-story__item + .adw-story__item::before {
    content: ''; width: 0; height: 2.6rem; margin-bottom: .3rem; border-left: 2px dotted var(--adw-gold);
}
.adw-story__item + .adw-story__item::after {
    content: ''; position: absolute; top: 2.55rem; left: 50%; width: .6rem; height: .6rem; margin-left: -.3rem;
    border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px var(--adw-card), 0 0 0 4px var(--adw-gold);
}
.adw-story__period { margin: .8rem 0 0; font: 400 2.1rem/1.1 var(--f-names); color: var(--adw-gold); }
.adw-story__item:first-child .adw-story__period { margin-top: 0; }
.adw-story__title { margin: .15rem 0 0; font: 500 1.25rem/1.3 var(--f-display); color: var(--c-ink); }
.adw-story__img { width: 100%; aspect-ratio: 4 / 3; margin-top: .8rem; object-fit: cover; border-radius: .9rem; border: 1px solid var(--adw-gold); padding: 4px; background: #fff; }
.adw-story__text { max-width: 25rem; margin: .5rem 0 0; font-size: .9rem; color: var(--c-muted); }

/* Galeri (markup _base): pertama bulat bercincin emas */
.adw .inv-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.adw .inv-gallery__cell { padding: 0; border: 1px solid var(--c-rule); border-radius: .9rem; aspect-ratio: 3 / 4; overflow: hidden; background: var(--c-sunk); cursor: zoom-in; }
.adw .inv-gallery__cell:first-child { grid-column: 1 / -1; width: 78%; margin: .3rem auto .6rem; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--adw-gold); outline: 2px dotted var(--adw-gold); outline-offset: 7px; }
.adw .inv-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }

/* Video & siaran langsung */
.adw .inv-video { padding: 0; border: 1px solid var(--adw-gold); border-radius: .9rem; overflow: hidden; background: #000; }
.adw .inv-video iframe { position: static; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

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

/* Hadiah: kartu beludru burgundy berlis emas, dengan percikan emas halus */
.adw .inv-gifts { display: grid; gap: 1rem; }
.adw .inv-gift {
    position: relative; padding: 1.9rem 1.5rem; border: 0; border-radius: 1.1rem; text-align: center; color: #fff;
    background:
        radial-gradient(circle at 12% 18%, rgb(228 207 163 / .5) 0 1.5px, transparent 2px),
        radial-gradient(circle at 86% 78%, rgb(228 207 163 / .5) 0 2px, transparent 2.5px),
        radial-gradient(circle at 70% 14%, rgb(228 207 163 / .4) 0 1px, transparent 1.5px),
        radial-gradient(ellipse 80% 60% at 20% 0%, rgb(255 255 255 / .12), transparent 70%),
        linear-gradient(165deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 62%, #1c0710));
    box-shadow: inset 0 0 0 5px transparent, inset 0 0 0 6px rgb(228 207 163 / .55);
}
.adw .inv-gift__logo { max-height: 1.6rem; margin-inline: auto; filter: brightness(0) invert(1); opacity: .92; }
.adw .inv-gift__label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--adw-gold-lt); }
.adw .inv-gift__account { font: 500 1.65rem/1.3 var(--f-display); letter-spacing: .06em; color: #fff; }
.adw .inv-gift__holder, .adw .inv-gift__address { color: rgb(255 255 255 / .86); }
.adw .inv-gift .inv-btn--ghost { margin-top: 1rem; border-color: var(--adw-gold-lt); color: #fff; }
.adw .inv-gift__qr { display: block; max-width: 12rem; margin: .75rem auto 0; padding: .5rem; background: #fff; border-radius: .6rem; }

/* Penutup: kartu paling bawah, peoni kiri bawah dari video */
.adw .adw-closing { margin-top: 2rem; margin-bottom: 4rem; padding-block: 4rem 11rem; }
.adw-closing__text { max-width: 24rem; margin: 0 auto; color: var(--c-muted); }
.adw-closing__salutation { margin: 1.7rem 0; font: italic 400 1.05rem/1.3 var(--f-display); color: var(--c-muted); }
.adw-closing__names { display: grid; margin: .2rem 0 0; font: 400 clamp(3.4rem, 15vw, 4.3rem)/1.05 var(--f-names); color: var(--c-accent); }
.adw-closing__names .adw-amp { font-size: .6em; line-height: .9; }
.adw-closing__tag { margin: .8rem 0 0; font-size: .82rem; letter-spacing: .12em; color: var(--adw-gold); }
.adw .adw-closing > .adw-closing-bloom {
    position: absolute; z-index: -1; left: 0; bottom: 0; width: 100%; height: auto; pointer-events: none;
    -webkit-mask-image: linear-gradient(transparent, #000 40%);
            mask-image: linear-gradient(transparent, #000 40%);
}
.adw .adw-footer { margin-inline: -1.25rem; padding: 1rem; background: var(--c-ink); color: rgb(255 255 255 / .75); font-size: .75rem; text-align: center; }
.adw .adw-footer a { color: var(--adw-gold-lt); }

/* Musik, tombol QR, navigasi cepat */
.adw .inv-music { background: var(--c-accent); }
.adw .inv-checkin-btn { background: var(--c-accent); color: #fff; }
.adw { --qn-bg: rgb(255 253 248 / .93); --qn-fg: var(--c-muted); --qn-active: var(--c-accent); }

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

@media (min-width: 900px) {
    body.inv.adw { background-color: color-mix(in srgb, var(--adw-blush) 22%, var(--c-paper)); }

    .adw .inv-cover.adw-cover { left: 0; right: 0; width: auto; isolation: isolate; background: color-mix(in srgb, var(--adw-blush) 22%, var(--c-paper)); }
    .adw .inv-cover.adw-cover::before {
        content: ''; position: absolute; inset: -40px; z-index: -1;
        background: url('opening-poster.jpg') center / cover; filter: blur(30px); opacity: .7;
    }
    .adw-stage { width: calc(100dvh * 9 / 16); box-shadow: 0 0 60px -20px rgb(74 42 48 / .35); }
    .adw-frame { width: 36rem; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .adw-cover__text { animation: none; }
    .adw-open { transition: none; }
}
