/* =========================================================================
   Tema Asmara — cat air merah muda, sepasang mempelai berhijab.

   Satu video dipotong jadi empat adegan, satu per bagian: karangan bunga
   (sampul), bergandengan (mempelai), buku nikah (acara), sepeda tandem
   (penutup). Bagian-bagian sengaja punya BENTUK sendiri — polaroid miring
   untuk mempelai, tiket berlubang untuk acara, kertas surat bergaris untuk
   cerita, amplop untuk hadiah — bukan kartu seragam yang diulang.

   Warna dari video: merah muda pucat (latar), mawar tua (utama), emas
   kecokelatan (garis ornamen), plum (teks).
   Huruf: Sacramento (nama), Playfair Display (judul & tanggal), Quicksand
   (teks).
   ========================================================================= */

:root {
    --c-paper: #FFF1EF;
    --c-ink: #5A3A40;
    --c-accent: #B4606B;
    --asm-gold: #B98E5C;
    --asm-leaf: #C993A6;

    --c-muted: color-mix(in srgb, var(--c-ink) 66%, var(--c-paper));
    --c-rule: color-mix(in srgb, var(--c-ink) 14%, var(--c-paper));
    --c-sunk: color-mix(in srgb, var(--c-accent) 8%, var(--c-paper));
    --c-action: var(--c-accent);

    --f-names: 'Sacramento', 'Great Vibes', cursive;
    --f-display: 'Playfair Display', Georgia, serif;
    --f-body: 'Quicksand', system-ui, sans-serif;
    --f-script: var(--f-names);

    --asm-card: #FFFAF8;
    --asm-line: color-mix(in srgb, var(--asm-gold) 50%, var(--c-paper));
    --asm-shadow: 0 16px 34px -24px rgb(120 50 60 / .45);
}

body.inv.asm { background: var(--c-paper); color: var(--c-ink); font-family: var(--f-body); line-height: 1.75; }

.asm-amp { font-family: var(--f-names); color: var(--asm-gold); }
.asm-sprig { display: block; margin: 0 auto .9rem; }

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

.asm .inv-cover.asm-cover { padding: 0; display: block; overflow: hidden; background: var(--c-paper); }

.asm-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;
}
.asm-stage__poster, .asm-stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.asm-stage.is-playing .asm-stage__poster { opacity: 0; }

.asm-cover__label, .asm-cover__names, .asm-cover__foot { position: absolute; z-index: 1; margin: 0; text-align: center; animation: asm-rise 1s var(--ease) both; }
.asm-stage.is-playing :is(.asm-cover__label, .asm-cover__names) { animation-delay: 2.6s; }
.asm-stage.is-playing .asm-cover__foot { animation-delay: 3.2s; }
@keyframes asm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.asm-cover__label { left: 0; right: 0; top: 11%; font: italic 400 5cqw/1.2 var(--f-display); color: var(--c-muted); }
/* Di dalam lingkaran, di atas noda cat air (pusat ±50%/55%). */
.asm-cover__names {
    left: 24%; right: 24%; top: 44%; height: 22%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; font: 400 15cqw/.95 var(--f-names); color: var(--c-accent);
}
.asm-cover__names .asm-amp { font-size: .6em; line-height: 1.1; }
.asm-cover__foot { left: 14%; right: 14%; top: 80%; display: grid; justify-items: center; gap: .4cqw; }
.asm-cover__date { position: absolute; left: 0; right: 0; top: 16.5%; z-index: 1; margin: 0; text-align: center; font: 500 4.3cqw/1.2 var(--f-display); letter-spacing: .04em; color: var(--c-ink); animation: asm-rise 1s var(--ease) both; }
.asm-stage.is-playing .asm-cover__date { animation-delay: 2.6s; }
.asm-cover__to { margin: 0; font-size: 3.2cqw; color: var(--c-muted); }
.asm-cover__guest { margin: 0 0 1.2cqw; font: 600 4.8cqw/1.25 var(--f-body); color: var(--c-ink); }

.asm-open {
    padding: 2.6cqw 7cqw; border: 1px solid var(--c-accent); border-radius: 999px;
    background: var(--c-accent); color: #fff; font: 700 3.6cqw/1 var(--f-body); letter-spacing: .02em; cursor: pointer;
    box-shadow: var(--asm-shadow); transition: background .25s ease, color .25s ease;
}
.asm-open:hover { background: #fff; color: var(--c-accent); }
.asm-open:focus-visible { outline: 2px solid var(--asm-gold); outline-offset: 4px; }

/* --------------------------------------------------- adegan per bagian */

.asm-scene { position: relative; overflow: hidden; width: 100%; aspect-ratio: 4 / 5; margin: 0 auto 2rem; border-radius: 999px 999px 1.5rem 1.5rem; background: var(--c-paper); box-shadow: var(--asm-shadow); }
.asm-scene__poster, .asm-scene__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.asm-scene.is-playing .asm-scene__poster { opacity: 0; }
.asm-scene--full { aspect-ratio: 9 / 16; margin: 0; border-radius: 0; box-shadow: none; }
.asm-scene--full .asm-scene__poster, .asm-scene--full .asm-scene__video { object-position: 50% 50%; }

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

.asm-frame { position: relative; overflow-x: clip; }
.asm-frame::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: url('latar.jpg') center top / cover, var(--c-paper);
}
.asm .inv__main { position: relative; max-width: 34rem; padding-inline: 1.5rem; }
.asm .inv-section { padding-block: clamp(3.25rem, 11vw, 4.75rem); border-bottom: 0; text-align: center; }

.asm-head { margin-bottom: 2rem; text-align: center; }
.asm-head__title { margin: 0; font: 400 clamp(1.9rem, 8vw, 2.4rem)/1.15 var(--f-display); color: var(--c-ink); }
.asm-head__lead { max-width: 25rem; margin: .9rem auto 0; color: var(--c-muted); }

/* Pembuka: bingkai lengkung bergaris ganda */
.asm-opening { padding-top: 3rem !important; }
.asm-opening__frame {
    padding: 3.5rem 1.5rem 2.25rem; border: 1px solid var(--asm-line); border-radius: 999px 999px 1rem 1rem;
    background: rgb(255 255 255 / .55);
    box-shadow: inset 0 0 0 6px rgb(255 255 255 / .55), inset 0 0 0 7px var(--asm-line);
}
.asm-verse { margin: 0 0 1.75rem; }
.asm-verse__text { margin: 0; font: italic 400 1.1rem/1.75 var(--f-display); color: var(--c-ink); }
.asm-verse__source { margin-top: .7rem; font-size: .85rem; font-weight: 600; color: var(--c-accent); }
.asm-lede { max-width: 26rem; margin: 0 auto; color: var(--c-muted); }

/* Mempelai: dua polaroid miring berlawanan */
.asm-polaroids { display: grid; justify-items: center; gap: .25rem; }
.asm-polaroids__amp { margin: -.5rem 0; font: 400 4rem/1 var(--f-names); color: var(--asm-gold); position: relative; z-index: 1; }
.asm-polaroid {
    width: min(100%, 17rem); padding: .75rem .75rem 1.25rem; background: #fff;
    box-shadow: 0 14px 30px -18px rgb(90 40 50 / .5); transform: rotate(-3deg);
}
.asm-polaroid--right { transform: rotate(2.5deg); }
.asm-polaroid__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--c-sunk); }
.asm-polaroid__photo img { width: 100%; height: 100%; object-fit: cover; }
.asm-polaroid__photo span { display: grid; place-items: center; height: 100%; font: 400 5rem/1 var(--f-names); color: var(--c-accent); }
.asm-polaroid__name { margin: .8rem 0 0; font: 400 2.3rem/1.1 var(--f-names); color: var(--c-accent); }
.asm-polaroid__family { margin: .35rem 0 0; font-size: .85rem; line-height: 1.55; color: var(--c-muted); }
.asm-polaroid__ig { display: inline-block; margin-top: .45rem; color: var(--asm-gold); font-size: .82rem; font-weight: 600; text-decoration: none; }

/* Acara: tanggal di antara dua garis ornamen video (24%–44%) */
.asm-dateboard { position: relative; width: calc(100% + 3rem); margin: 0 -1.5rem; container-type: inline-size; }
.asm-dateboard__slot {
    position: absolute; left: 12%; right: 12%; top: 24.5%; height: 19%; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw;
}
.asm-dateboard__title { margin: 0; font: italic 400 5cqw/1.2 var(--f-display); color: var(--c-muted); }
.asm-dateboard__day { margin: 0; font: 700 3.6cqw/1 var(--f-body); letter-spacing: .12em; color: var(--asm-gold); }
.asm-dateboard__date { margin: 0; font: 400 11cqw/1.05 var(--f-display); color: var(--c-accent); }
.asm-dateboard__date span { margin: 0 .15em; color: var(--asm-gold); }

.asm-countdown { display: flex; justify-content: center; gap: .5rem; margin: 2rem auto; }
.asm .asm-countdown .inv-countdown__cell {
    display: grid; place-content: center; gap: .15rem; width: 4.1rem; min-width: 0; padding: .7rem 0 .55rem;
    border: 1px dashed var(--asm-line); border-radius: .9rem; background: var(--asm-card);
}
.asm .asm-countdown b { font: 400 1.6rem/1 var(--f-display); color: var(--c-accent); }
.asm .asm-countdown span { font-size: .68rem; text-transform: none; letter-spacing: .02em; color: var(--c-muted); }

/* Tiket berlubang: sobekan kiri berisi jam, garis putus-putus, lubang
   setengah lingkaran di atas & bawah garis sobek. */
.asm-tickets { display: grid; gap: 1rem; text-align: left; }
.asm-ticket {
    --hole: .85rem;
    display: grid; grid-template-columns: 5.25rem 1fr; border-radius: 1rem; background: var(--asm-card);
    box-shadow: var(--asm-shadow);
    -webkit-mask: radial-gradient(circle var(--hole) at 5.25rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--hole) at 5.25rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
    mask: radial-gradient(circle var(--hole) at 5.25rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
          radial-gradient(circle var(--hole) at 5.25rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.asm-ticket.is-past { opacity: .55; }
.asm-ticket__stub {
    display: grid; place-content: center; justify-items: center; gap: .2rem; padding: 1rem .25rem;
    border-right: 2px dashed var(--asm-line); background: color-mix(in srgb, var(--c-accent) 10%, var(--asm-card));
    border-radius: 1rem 0 0 1rem;
}
.asm-ticket__time { font: 400 1.45rem/1 var(--f-display); color: var(--c-accent); }
.asm-ticket__tz { font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: var(--asm-gold); }
.asm-ticket__body { padding: 1.25rem 1.1rem 1.2rem 1.3rem; }
.asm-ticket__title { margin: 0; font: 400 2.1rem/1.1 var(--f-names); color: var(--c-accent); }
.asm-ticket__when { margin: .15rem 0 0; font-size: .85rem; color: var(--c-muted); }
.asm-ticket__venue { margin: .7rem 0 0; font: 500 1.05rem/1.35 var(--f-display); }
.asm-ticket__address { margin: .1rem 0 0; font-size: .85rem; color: var(--c-muted); }
.asm-ticket__meta { margin: .35rem 0 0; font-size: .82rem; color: var(--c-muted); }
.asm-ticket__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.asm-ticket__actions .inv-btn { flex: 1 1 auto; white-space: nowrap; text-align: center; }

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

/* Cerita: kertas surat bergaris, bertumpuk sedikit */
.asm-letters { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; text-align: left; }
.asm-letter {
    position: relative; padding: 1.3rem 1.3rem 1.4rem 2.2rem; border-radius: .4rem;
    background:
        linear-gradient(90deg, transparent 1.45rem, color-mix(in srgb, var(--c-accent) 35%, transparent) 1.45rem 1.55rem, transparent 1.55rem),
        repeating-linear-gradient(transparent 0 1.55rem, color-mix(in srgb, var(--asm-gold) 22%, transparent) 1.55rem 1.62rem),
        #FFFDFB;
    box-shadow: 0 10px 22px -16px rgb(90 40 50 / .45);
}
.asm-letter:nth-child(odd) { transform: rotate(-1deg); }
.asm-letter:nth-child(even) { transform: rotate(1deg); }
.asm-letter + .asm-letter { margin-top: -.3rem; }
.asm-letter__period { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--asm-gold); }
.asm-letter__title { margin: .1rem 0 0; font: 400 2rem/1.15 var(--f-names); color: var(--c-accent); }
.asm-letter__img { width: 100%; aspect-ratio: 4 / 3; margin-top: .6rem; object-fit: cover; border-radius: .3rem; }
.asm-letter__text { margin: .4rem 0 0; font-size: .9rem; line-height: 1.72; color: var(--c-ink); }

/* Galeri (markup _base): mozaik — foto ke-1 & ke-4 lebar */
.asm .inv-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.asm .inv-gallery__cell { padding: 0; border: 4px solid #fff; border-radius: .4rem; aspect-ratio: 1; overflow: hidden; background: var(--c-sunk); cursor: zoom-in; box-shadow: 0 8px 18px -14px rgb(90 40 50 / .5); }
.asm .inv-gallery__cell:nth-child(3n + 1) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.asm .inv-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }

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

/* Form RSVP & ucapan (markup _base) */
.asm .inv-form { gap: 1.25rem; padding: 1.5rem 1.25rem; border-radius: 1.25rem; background: var(--asm-card); box-shadow: var(--asm-shadow); text-align: left; }
.asm .inv-label { font-size: .85rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--c-ink); }
.asm .inv-input { padding: .8rem 1rem; border: 0; border-bottom: 1.5px solid var(--asm-line); border-radius: 0; background: transparent; font-size: .95rem; }
.asm .inv-input:focus, .asm .inv-input:focus-visible { outline: none; border-bottom-color: var(--c-accent); box-shadow: none; }
.asm .inv-choice { border: 1px solid var(--asm-line); border-radius: 999px; background: #fff; }
.asm .inv-choice:has(:checked) { border-color: var(--c-accent); background: var(--c-accent); color: #fff; }
.asm .inv-choice input { accent-color: #fff; }
.asm .inv-form .inv-btn--solid { width: 100%; padding-block: .95rem; }
.asm .inv-tally div { border: 1px dashed var(--asm-line); border-radius: .9rem; background: var(--asm-card); }
.asm .inv-tally dd { font-family: var(--f-display); font-size: 1.8rem; color: var(--c-accent); }
/* Ucapan: gelembung pesan */
.asm .inv-wish { padding: .9rem 1.1rem; border: 0; border-radius: 1.1rem 1.1rem 1.1rem .25rem; background: #fff; box-shadow: 0 6px 16px -12px rgb(90 40 50 / .45); }
.asm .inv-wish:nth-child(even) { border-radius: 1.1rem 1.1rem .25rem 1.1rem; background: color-mix(in srgb, var(--c-accent) 8%, #fff); }
.asm .inv-wish__name { font-weight: 700; color: var(--c-accent); }

/* Hadiah: amplop — penutup segitiga di atas kartu */
.asm .inv-gifts { display: grid; gap: 1.25rem; }
.asm .inv-gift {
    position: relative; padding: 3.2rem 1.4rem 1.5rem; border: 0; border-radius: .9rem; text-align: center;
    background:
        linear-gradient(to bottom right, transparent 49.5%, color-mix(in srgb, var(--c-accent) 18%, #fff) 50%) left top / 50% 2.6rem no-repeat,
        linear-gradient(to bottom left, transparent 49.5%, color-mix(in srgb, var(--c-accent) 18%, #fff) 50%) right top / 50% 2.6rem no-repeat,
        #fff;
    box-shadow: var(--asm-shadow);
}
.asm .inv-gift::before {
    content: ''; position: absolute; left: 50%; top: 1.75rem; width: 1.6rem; height: 1.6rem; transform: translate(-50%, -50%);
    border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px #fff;
}
.asm .inv-gift__logo { max-height: 1.6rem; margin: 0 auto; }
.asm .inv-gift__label { font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: none; color: var(--asm-gold); }
.asm .inv-gift__account { font: 400 1.7rem/1.3 var(--f-display); letter-spacing: .05em; color: var(--c-ink); }
.asm .inv-gift__holder, .asm .inv-gift__address { color: var(--c-muted); }
.asm .inv-gift .inv-btn--ghost { margin-top: 1rem; border-color: var(--c-accent); color: var(--c-accent); }
.asm .inv-gift__qr { display: block; max-width: 12rem; margin: .75rem auto 0; padding: .5rem; background: #fff; border-radius: .5rem; }

/* Penutup: adegan sepeda tandem utuh; salam & nama di langit */
.asm-closing { padding-bottom: 0 !important; }
.asm-closing__text { max-width: 24rem; margin: 0 auto; color: var(--c-muted); }
.asm-ride { position: relative; width: calc(100% + 3rem); margin: 1.5rem -1.5rem 0; container-type: inline-size; }
.asm-ride__text { position: absolute; left: 12%; right: 12%; top: 15%; z-index: 1; display: grid; justify-items: center; gap: 1cqw; }
.asm-ride__salutation { margin: 0; font: italic 400 4.2cqw/1.3 var(--f-display); color: var(--c-muted); }
.asm-ride__names { display: grid; margin: 0; font: 400 15cqw/.95 var(--f-names); color: var(--c-accent); }
.asm-ride__names .asm-amp { font-size: .6em; line-height: 1.1; }
.asm-ride__tag { margin: 1cqw 0 0; font-size: 3.4cqw; font-weight: 600; color: var(--asm-gold); }
.asm .asm-footer { margin-inline: -1.5rem; padding: 1rem; background: var(--c-accent); color: rgb(255 255 255 / .75); font-size: .75rem; text-align: center; }
.asm .asm-footer a { color: #fff; }

/* Navigasi cepat, musik & QR */
.asm { --qn-bg: rgb(255 250 248 / .88); --qn-fg: var(--c-muted); --qn-active: var(--c-accent); }
.asm .inv-music { background: var(--c-accent); }
.asm .inv-checkin-btn { background: var(--c-accent); color: #fff; }

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

@media (min-width: 900px) {
    .asm .inv-cover.asm-cover { left: 0; right: 0; width: auto; isolation: isolate; background: color-mix(in srgb, var(--c-accent) 10%, var(--c-paper)); }
    .asm .inv-cover.asm-cover::before {
        content: ''; position: absolute; inset: -40px; z-index: -1;
        background: url('scene-a.jpg') center / cover; filter: blur(30px); opacity: .55;
    }
    .asm-stage { width: calc(100dvh * 9 / 16); box-shadow: 0 0 60px -20px rgb(120 50 60 / .3); }
    .asm-frame { width: 34rem; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .asm-cover__label, .asm-cover__names, .asm-cover__foot { animation: none; }
    .asm-open { 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, jadi tidak berubah saat bilah alamat muncul/hilang. */
.asm-frame::before { bottom: auto; height: 100vh; height: 100lvh; }
