:root{--cover:url(https://picsum.photos/seed/cover/1600/1600);--hero:none;--akhir:url(https://picsum.photos/seed/akhir/900/1100);--bg:#101010;--card:#1b1b19;--gold:#e0b04a;--text:#faf6ec;--muted:#cfc9b8}
*{box-sizing:border-box;margin:0}
body{background:#000;color:var(--text);font-family:Quicksand,sans-serif;font-weight:500;font-size:17px;line-height:1.8;text-align:center}
body.lock{overflow:hidden}
.wrap{max-width:480px;margin:0 auto;background:var(--bg);min-height:100vh;position:relative;overflow:hidden}
.script{font-family:'Pinyon Script',cursive;font-weight:400}
.serif{font-family:'Cormorant Garamond',serif;font-style:italic}
.gold{color:var(--gold)}.small{font-size:14px;letter-spacing:.08em;font-weight:600}
section{padding:56px 28px}
h2{font-family:'Cormorant Garamond',serif;font-style:italic;font-weight:600;font-size:36px;color:var(--gold);text-shadow:0 1px 8px #0008}
h2::after{content:"";display:block;width:56px;height:2px;background:var(--gold);margin:8px auto 0}
.names{font-size:clamp(44px,13vw,64px);line-height:1.1}
.btn{background:var(--gold);color:#1a1405;border:0;padding:10px 26px;border-radius:30px;font:700 15px Quicksand;cursor:pointer;text-decoration:none;display:inline-block;transition:transform .25s,box-shadow .25s}
.btn:hover{transform:translateY(-2px);box-shadow:0 6px 18px #d4a23744}
.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.panel{background:var(--card);border:1px solid #4a3f24;padding:32px 22px;position:relative}
.panel::before,.panel::after{content:"";position:absolute;width:28px;height:28px;border:3px solid var(--gold)}
.panel::before{top:-2px;left:-2px;border-right:0;border-bottom:0}.panel::after{bottom:-2px;right:-2px;border-left:0;border-top:0}
.orn{color:var(--gold);font-size:22px;margin:14px 0;display:inline-block;animation:sway 4s ease-in-out infinite}
@keyframes sway{50%{transform:rotate(12deg) scale(1.1)}}

/* COVER */
#cover{position:fixed;inset:0;height:100vh;height:100dvh;overflow:auto;z-index:20;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px;
 background:linear-gradient(#101010aa,#101010dd),var(--cover) center 28%/cover no-repeat,#101010;transition:transform 1.4s cubic-bezier(.77,0,.18,1)}
#cover>*{max-width:min(calc(100% - 64px),500px);text-align:center}
#cover .names{font-size:clamp(38px,11vw,52px)}
#cover .guest{max-width:min(calc(100% - 64px),420px);border:0;box-shadow:none;animation:rise 1.2s cubic-bezier(.2,.8,.2,1) both}
#cover,#cover .guest b{color:#fff}
#cover #openBtn{background:#fff;color:#000;box-shadow:none}
#cover #openBtn:hover{background:#000;color:#fff;box-shadow:0 0 0 1px #fff}
#cover.open{animation:tutup 1.4s cubic-bezier(.77,0,.18,1) .3s forwards}
#cover.open>*{animation:none}
@keyframes tutup{to{transform:translateY(-101%);visibility:hidden}}
#cover>*{animation:rise 1.2s cubic-bezier(.2,.8,.2,1) both}
#cover>*:nth-child(2){animation-delay:.2s}#cover>*:nth-child(3){animation-delay:.4s}#cover>*:nth-child(4){animation-delay:.6s}#cover>*:nth-child(5){animation-delay:.8s}#cover>*:nth-child(6){animation-delay:1s}#cover>*:nth-child(7){animation-delay:1.2s}#cover>*:nth-child(8){animation-delay:1.4s}
@keyframes rise{from{opacity:0;transform:translateY(30px)}}
.guest{border:1px solid var(--gold);padding:14px 28px;border-radius:30px;margin-top:10px;animation:glow 3s ease-in-out infinite}
@keyframes glow{50%{box-shadow:0 0 18px #d4a23755}}
.guest b{display:block;font-size:20px;font-weight:600;color:var(--gold);word-break:break-word}

/* HERO */
.hero{position:relative;isolation:isolate;background:#101010}
.hero::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(#101010a6,#101010e0)}
.slides{position:absolute;inset:0;z-index:-2;overflow:hidden}
.slides i{position:absolute;inset:0;background:center/cover no-repeat;opacity:0;will-change:opacity}
.slides i.satu{opacity:1}
.ln{display:block;overflow:hidden;padding:.04em .2em .28em;margin-bottom:-.16em;text-align:center}
.ln span{display:block;transform:translateY(115%)}
.go .ln span{animation:naik 1.3s cubic-bezier(.2,.8,.2,1) .5s both}.go .ln:nth-child(2) span{animation-delay:.75s}.go .ln:nth-child(3) span{animation-delay:1s}
@keyframes naik{to{transform:none}}

/* ANIMASI SCROLL */
/* Muncul saat di-scroll: elemen tampil biasa; animasi hanya jika browser mendukung "animation-timeline" */
@keyframes muncul{from{opacity:0;transform:var(--dari)}to{opacity:1;transform:none}}
@keyframes zoomFoto{from{transform:scale(1.25)}to{transform:none}}
@supports (animation-timeline:view()){
 .rv{--dari:translateY(34px);animation:muncul linear both;animation-timeline:view();animation-range:entry 0% entry 45%}
 .rv.zoom{--dari:scale(.85)}
 .rv.l{--dari:translateX(-40px)}
 .rv.r{--dari:translateX(40px)}
 .arch{--dari:scale(.8);animation:muncul linear both;animation-timeline:view();animation-range:entry 0% entry 55%}
 .arch img{animation:zoomFoto linear both;animation-timeline:view();animation-range:entry 0% cover 45%}
 .cd div{animation:pop linear both;animation-timeline:view();animation-range:entry 0% entry 80%}
}
.arch{width:240px;height:330px;margin:22px auto;border-radius:120px 26px 120px 26px;border:2px solid var(--gold);padding:7px}
.arch img{width:100%;height:100%;object-fit:cover;border-radius:113px 20px 113px 20px}
.cd{display:flex;gap:10px;justify-content:center;margin-top:16px}
.cd div{border:2px solid var(--gold);border-radius:50%;width:74px;height:74px;display:flex;flex-direction:column;justify-content:center;line-height:1.2}
.cd b{display:block;font-size:26px;font-weight:700}.cd span{font-size:12px;color:var(--muted)}
/* Angka hitung mundur dijalankan animasi CSS; nilai awalnya ditentukan PHP lewat variabel di atribut style */
@property --n{syntax:'<integer>';initial-value:0;inherits:false}
@keyframes hitung{from{--n:var(--mulai)}to{--n:0}}
.cd b.n{counter-reset:n var(--n);animation:hitung var(--dur) steps(var(--langkah),jump-start) var(--tunda) var(--ulang) forwards}
.cd b.n::before{content:counter(n)}
@keyframes pop{0%{transform:scale(.5);opacity:0}70%{transform:scale(1.08)}100%{transform:none;opacity:1}}
.gal{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.gal a{display:block;scroll-margin-top:35vh}
.gal img{width:100%;height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:18px 4px 18px 4px;display:block;cursor:zoom-in;transition:filter .4s}
.gal img:hover{filter:brightness(1.15)}
form{display:grid;gap:10px;margin-top:16px}
input,select,textarea{width:100%;padding:13px 14px;border-radius:10px;border:0;font:500 16px Quicksand;background:#fff;color:#111}
textarea{min-height:80px;resize:vertical}
.notice{margin-top:12px;color:var(--gold);font-size:15px}
#wishes-old{display:none}
#ucapan:has(#urut option[value="old"]:checked) #wishes-new{display:none}
#ucapan:has(#urut option[value="old"]:checked) #wishes-old{display:block}
.wishes .wish:nth-child(n+6){display:none}
#ucapan:has(#semua:checked) .wishes .wish{display:block}
#semua:checked~#more{display:none}
.bar{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.bar select{width:auto;padding:5px 10px}
.wish{text-align:left;border-bottom:1px solid #2c2c2c;padding:12px 0;animation:rise .8s both}
.wish b{font-weight:700;font-size:17px}.wish small{color:var(--muted);font-size:12px;margin-left:6px}.wish p{font-size:16px}
/* Tombol musik: iframe kecil berisi tombol bulat (views/musik.php) */
.musik{position:fixed;right:max(16px,calc(50% - 224px));bottom:20px;width:44px;height:44px;border:0;background:transparent;z-index:9}
@keyframes sp{to{transform:rotate(360deg)}}
.lb{position:fixed;inset:0;background:#000d;display:none;align-items:center;justify-content:center;z-index:30}
.lb:target{display:flex}
.lb-x{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.lb img{max-width:94%;max-height:92%}
.unduh{position:absolute;top:14px;right:14px;z-index:2;width:36px;height:36px;border-radius:50%;background:#101010cc;border:1px solid var(--gold);color:var(--gold);display:flex;align-items:center;justify-content:center;transition:background .2s,color .2s}
.unduh:hover,.unduh:focus-visible{background:var(--gold);color:#1a1405;outline:0}
.unduh svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Kelopak jatuh pelan (14 elemen; posisi & kecepatan dari PHP) */
.kelopak{position:fixed;inset:0;pointer-events:none;z-index:8;overflow:hidden}
.kelopak i{position:absolute;top:0;left:var(--x);width:var(--w);height:var(--h);border-radius:50%;background:rgba(212,162,55,.5);animation:jatuh var(--dur) linear var(--tunda) infinite}
@keyframes jatuh{0%{transform:translate(0,-5vh) rotate(0)}25%{transform:translate(var(--g),22vh) rotate(90deg)}50%{transform:translate(0,50vh) rotate(180deg)}75%{transform:translate(calc(var(--g)*-1),78vh) rotate(270deg)}100%{transform:translate(0,105vh) rotate(360deg)}}
@keyframes kb{to{transform:scale(1.18) translateY(-2%)}}
.hero{min-height:100svh;display:flex;flex-direction:column;justify-content:center;align-items:center}
.credit{margin-top:46px;font-size:13px;color:var(--muted);letter-spacing:.04em}.credit a{color:var(--gold);font-weight:700;text-decoration:none;border-bottom:1px solid #e0b04a88}.credit a:hover{border-bottom-color:var(--gold)}
.end{background:linear-gradient(#101010,#10101088 35%,#101010ee),var(--akhir) center 60%/cover;min-height:75vh;display:flex;flex-direction:column;justify-content:center}
/* DESKTOP: cover = kolom foto di tengah, isi = layout lebar */
@media (min-width:900px){
 .wrap{max-width:none}
 section{padding:90px 6vw}
 section>*{max-width:1000px;margin-left:auto;margin-right:auto}
 section>p{max-width:760px}
 .hero>.slides{max-width:none;width:100%;margin:0;left:0;right:0}
 .hero{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center}
 .names{font-size:clamp(72px,7vw,110px)}
 h2{font-size:42px}
 .pair{display:grid;grid-template-columns:1fr 1fr;gap:60px}.pair .arch{margin-top:26px!important}
 .cd div{width:92px;height:92px}.cd b{font-size:32px}
 .gal{grid-template-columns:repeat(3,1fr);gap:14px}
 .gal img,.gal img:nth-child(3n+1){grid-column:auto;height:auto}
 form,.wishes,.bar{max-width:640px}
 .musik{right:20px}
}
@media (max-width:360px){.names{font-size:52px}section{padding:48px 20px}.cd{gap:6px}.cd div{width:64px;height:64px}}
@media (prefers-reduced-motion:reduce){
 .rv,.arch,.arch img,.cd div,.ln span,.wish,.orn,.guest,#cover>*{animation:none!important;transition:none!important}
 .ln span{transform:none}
 #cover.open{display:none}
 .kelopak{display:none}
}

.tigang .cp{max-width:420px;margin:0 auto}
.tigang .rv{text-align:center}
.logo-tigang{color:var(--gold);margin:0 auto 6px;display:flex;justify-content:center}
.logo-tigang svg,.logo-tigang img{width:96px;height:auto;max-height:96px;object-fit:contain}
#cover .tg-nama{font-size:clamp(24px,6.5vw,32px);line-height:1.2}
#cover{gap:10px}
.tigang{padding-top:0;margin-top:-24px}
#cover .cv-judul{font-size:clamp(17px,4.6vw,22px);font-weight:700;letter-spacing:.18em}
#cover .cv-judul2{font-size:clamp(13px,3.6vw,17px)}
.cv-head{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;color:#fff}
.cv-head p{margin:0;font-weight:700;letter-spacing:.18em;line-height:1.3}
.cv-head .h1t{font-size:clamp(17px,4.6vw,22px)}
.cv-head .h2t{font-size:clamp(12px,3.2vw,15px);font-weight:600;letter-spacing:.3em}
.cv-head .h3t{font-size:clamp(13px,3.6vw,17px)}
#cover{justify-content:flex-start;padding:24px 0 36px}
#cover .cv-head{flex:1;justify-content:center;max-width:none;width:100%}
.hero .cv-head{margin:0 auto}
.cv-head{gap:10px}
.cv-head .h1t{font-size:clamp(30px,9vw,42px);letter-spacing:.16em}
.cv-head .h2t{font-size:clamp(15px,4vw,19px);letter-spacing:.35em}
.cv-head .h3t{font-size:clamp(24px,7vw,34px);letter-spacing:.14em}
@media(min-width:900px){.cv-head{gap:14px}.cv-head .h1t{font-size:52px}.cv-head .h2t{font-size:22px}.cv-head .h3t{font-size:42px}}
.cv-head{gap:2px}
.cv-head .h1t,.cv-head .h3t{font-weight:400;letter-spacing:0;text-transform:none;line-height:1.15}
.cv-head .h1t{font-size:clamp(46px,14vw,64px)}
.cv-head .h3t{font-size:clamp(40px,12vw,56px)}
@media(min-width:900px){.cv-head{gap:6px}.cv-head .h1t{font-size:84px}.cv-head .h3t{font-size:72px}}
.cv-head .h2t{font-weight:400;letter-spacing:0;text-transform:none;line-height:1.1;font-size:clamp(28px,8vw,38px)}
@media(min-width:900px){.cv-head .h2t{font-size:48px}}

/* HALAMAN AWAL (hero): judul font biasa tebal, nama font script; sampul tidak diubah */
.hero .cv-head{gap:0}
.hero .cv-head p{letter-spacing:0;text-transform:none;line-height:1.25}
.hero .cv-head .jdl{font-family:Quicksand,sans-serif;font-weight:700;letter-spacing:.06em}
.hero .cv-head .h1t{font-size:clamp(34px,10vw,46px);margin-bottom:14px}
.hero .cv-head .nm{font-family:'Pinyon Script',cursive;font-weight:400;font-size:clamp(28px,8vw,36px)}
.hero .cv-head .amp{font-family:'Pinyon Script',cursive;font-weight:400;font-size:clamp(22px,6vw,28px);margin:2px 0}
.hero .cv-head .h3t{font-size:clamp(22px,6.4vw,28px);margin-top:28px;margin-bottom:6px}
.hero .cv-head .nm-t{font-size:clamp(24px,6.8vw,30px)}
@media(min-width:900px){
 .hero .cv-head .h1t{font-size:60px;margin-bottom:18px}
 .hero .cv-head .nm{font-size:48px}
 .hero .cv-head .amp{font-size:34px}
 .hero .cv-head .h3t{font-size:38px;margin-top:34px}
 .hero .cv-head .nm-t{font-size:40px}
}

/* Judul "Pawiwahan" & "Tigang Sasih" (sampul + halaman awal): Pinyon Script */
#cover .cv-head .h1t,#cover .cv-head .h3t,.hero .cv-head .jdl{font-family:'Pinyon Script',cursive;font-style:normal;font-weight:400;letter-spacing:0;text-transform:none}

/* Nama mempelai & tanda "&" di halaman awal: Playfair Display */
.hero .cv-head .nm,.hero .cv-head .amp{font-family:'Playfair Display',serif;font-style:normal;font-weight:400;letter-spacing:.01em}
.hero .cv-head .nm{font-size:clamp(22px,6vw,28px);line-height:1.35}
.hero .cv-head .nm-t{font-size:clamp(18px,5vw,22px)}
.hero .cv-head .amp{font-size:clamp(20px,5.4vw,24px)}
@media(min-width:900px){.hero .cv-head .nm{font-size:40px}.hero .cv-head .nm-t{font-size:30px}.hero .cv-head .amp{font-size:30px}}

/* Ukuran judul di halaman awal disesuaikan untuk Pinyon Script (Tigang Sasih tetap lebih kecil dari Pawiwahan) */
.hero .cv-head .h1t{font-size:clamp(44px,13vw,60px);line-height:1.15}
.hero .cv-head .h3t{font-size:clamp(32px,9vw,40px);line-height:1.15}
@media(min-width:900px){.hero .cv-head .h1t{font-size:76px}.hero .cv-head .h3t{font-size:52px}}
