/* Tema "Songket": tenun Nusantara. Arah desain dan alasan tiap keputusan ada di DESIGN.md.
   Dimuat setelah invitation.css hanya bila tema = songket. Ungu manggis, kapur sirih, perak, satu aksen jambu.
   Motif digambar bertangga di views/partials/songket-defs.php. Tanpa bayangan, tanpa gradien, tanpa emas. */
.theme-songket {
  --bg: #f5f0ea; --bg2: #e9e0da; --ink: #2c1a2e; --muted: #665266;
  --primary: #3d1a3f; --deep: #2a102c; --on-primary: #f5f0ea; --accent: #9c3b5e; --card: #fdfaf6;
  --line: rgba(61, 26, 63, .28);
  --kapur: #f5f0ea; --perak: #bfc3cf; --jambu: #9c3b5e; --redup: #d9cddb;
  --serif: "Marcellus", "Lora", Georgia, serif;
  --r: 4px; /* satu radius kecil: kain ditenun pada kisi, bukan dibulatkan */
  /* Sudut bertangga untuk bidang yang tidak bisa diklik */
  --tangga: polygon(0 16px, 8px 16px, 8px 8px, 16px 8px, 16px 0, calc(100% - 16px) 0, calc(100% - 16px) 8px, calc(100% - 8px) 8px, calc(100% - 8px) 16px, 100% 16px,
    100% calc(100% - 16px), calc(100% - 8px) calc(100% - 16px), calc(100% - 8px) calc(100% - 8px), calc(100% - 16px) calc(100% - 8px), calc(100% - 16px) 100%,
    16px 100%, 16px calc(100% - 8px), 8px calc(100% - 8px), 8px calc(100% - 16px), 0 calc(100% - 16px));
}
.theme-songket .page { box-shadow: none; }

/* ---------- Tipografi: Marcellus hanya punya satu ketebalan ---------- */
.theme-songket h1, .theme-songket h2, .theme-songket h3, .theme-songket .cname, .theme-songket .names, .theme-songket .hero-names,
.theme-songket .h, .theme-songket .salam, .theme-songket .to-name, .theme-songket .wishes h3 {
  font-family: var(--serif); font-style: normal; font-weight: 400;
}
.theme-songket .eyebrow { text-transform: none; letter-spacing: .01em; font-size: 1rem; }

/* ---------- Gerak: gerbang, muncul saat digulir, dan benang di latar (ambient.css) ---------- */
.theme-songket .sky, .theme-songket .hero-pat { display: none; }
.theme-songket .btn-open { animation: fadeUp 1s cubic-bezier(.2, .7, .2, 1) 1.2s both; }
.theme-songket .countdown [data-cd="s"], .theme-songket .sound-btn.on::after, .theme-songket .scroll-hint span { animation: none; }

/* Motif */
.sk-band { display: block; width: 100%; height: 50px; color: var(--perak); pointer-events: none; }
.sk-motif { display: block; width: 52px; height: 52px; margin: 0 auto 14px; color: var(--perak); }
.sk-tabur-ink { fill: #bfc3cf; opacity: .17; }
.theme-songket .sk-divider { display: block; width: 200px; max-width: 70%; margin: 0 auto 24px; color: var(--primary); }
.theme-songket .sk-divider::before, .theme-songket .sk-divider::after { content: none; }
.theme-songket .sk-divider svg { display: block; width: 100%; height: auto; aspect-ratio: 200 / 28; animation: none; }

/* ---------- Gerbang: dua helai kain yang tersibak ---------- */
.theme-songket .gate { color: var(--kapur); }
.theme-songket .door { width: 50%; background: var(--primary); border: 0; box-shadow: none; }
.theme-songket .door-l { width: calc(50% + .5px); }
.theme-songket .door svg.sk-band { position: absolute; inset: auto 0; width: 100%; height: 50px; }
.theme-songket .door svg.sk-band.t { top: 0; transform: scaleY(-1); }
.theme-songket .door svg.sk-band.b { bottom: 0; }
.js .theme-songket .door { transform-origin: 50% 0; transition: transform 1.55s cubic-bezier(.7, 0, .2, 1) .3s; }
.js body.theme-songket.is-opening .door-l { transform: translateX(-112%) skewX(7deg); }
.js body.theme-songket.is-opening .door-r { transform: translateX(112%) skewX(-7deg); }
/* Isi gerbang berada di antara dua pita, di atas bidang polos agar nama tamu terbaca. Pada layar pendek hanya bidang ini yang menggulir. */
.theme-songket .gate-content { width: min(calc(100% - 48px), 372px); padding: 68px 12px; background: var(--primary); clip-path: var(--tangga); }
.js .theme-songket .gate-content { max-height: calc(100% - 108px); padding-top: 14px; padding-bottom: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.js .theme-songket .gate-content::-webkit-scrollbar { display: none; }
.theme-songket .gate .eyebrow { color: var(--perak); margin-bottom: 6px; }
.theme-songket .gate .names { font-size: clamp(2.6rem, 13vw, 3.4rem); line-height: 1.08; margin-bottom: 10px; }
.theme-songket .names i { font: 400 .55em var(--serif); color: var(--perak); line-height: 1.35; }
.theme-songket .cover-date { color: var(--kapur); letter-spacing: 0; margin-bottom: 18px; }
.theme-songket .to { border-color: rgba(191, 195, 207, .55); max-width: 300px; padding: 12px 4px; margin-bottom: 20px; }
.theme-songket .to-note, .theme-songket .sound-note { color: var(--redup); }
.theme-songket .btn-open { background: var(--jambu); color: #fff; border-radius: var(--r); font-weight: 600; letter-spacing: 0; padding: 14px 40px; transition: background .2s; }
.theme-songket .btn-open:hover { background: #842d4d; box-shadow: none; transform: none; }
.theme-songket .btn-open:focus-visible { outline: 3px solid var(--kapur); outline-offset: 3px; box-shadow: none; }

/* ---------- Hero: lembar kain terang, pucuk rebung berhadapan, pita tanggal ---------- */
.theme-songket .hero { background: var(--bg); color: var(--ink); }
.theme-songket .hero > .sk-band { position: absolute; left: 0; color: var(--primary); }
.theme-songket .hero > .sk-band.t { top: 0; transform: scaleY(-1); }
.theme-songket .hero > .sk-band.b { bottom: 0; }
.theme-songket .hero-in { padding: 82px 0 128px; }
.theme-songket .hero .bismillah { color: var(--primary); font-size: 1.65rem; padding: 0 20px; margin-bottom: 14px; }
.theme-songket .hero .sk-motif { color: var(--jambu); }
.theme-songket .hero .eyebrow { color: var(--muted); }
.theme-songket .hero-names { font-size: clamp(3.2rem, 16vw, 4.5rem); line-height: 1.08; color: var(--primary); margin: 4px 0 22px; padding: 0 20px; }
.theme-songket .hero-names i { font: 400 .5em var(--serif); color: var(--jambu); line-height: 1.4; }
.theme-songket .hero-date { margin: 0; padding: 14px 20px; background: var(--primary); color: var(--kapur); opacity: 1; letter-spacing: .02em; border: solid var(--perak); border-width: 1px 0; outline: 4px solid var(--primary); outline-offset: 0; }
.theme-songket .scroll-hint { bottom: 70px; margin-left: -11px; width: 22px; height: 22px; border: 1.5px solid var(--primary); border-radius: 0; transform-origin: center; rotate: 45deg; }
.theme-songket .scroll-hint span { left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 0; background: var(--primary); }

/* ---------- Bagian umum ---------- */
.theme-songket .sec { padding: 60px 26px; }
.theme-songket .h { color: var(--primary); font-size: 2.15rem; }
.theme-songket .salam { color: var(--primary); font-size: 1.3rem; line-height: 1.5; }
.theme-songket .intro { color: var(--muted); }

/* Pita tenun kecil sebagai batas bidang gelap */
.theme-songket #mempelai::before, .theme-songket #hadiah::before {
  content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 12px; opacity: .7; background: var(--perak);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12'%3E%3Cpath d='M8 0h4v3h3v6h-3v3H8V9H5V3h3zM0 5h2v2H0zM18 5h2v2h-2z'/%3E%3C/svg%3E") 50% 0 / 20px 12px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12'%3E%3Cpath d='M8 0h4v3h3v6h-3v3H8V9H5V3h3zM0 5h2v2H0zM18 5h2v2h-2z'/%3E%3C/svg%3E") 50% 0 / 20px 12px repeat-x;
}

/* Mempelai: berdampingan di atas bidang manggis, bingkai bertangga seperti puncak pelaminan */
.theme-songket #mempelai { background: var(--primary); color: var(--kapur); padding: 68px 18px 52px; }
.theme-songket .couple { position: relative; margin-bottom: 40px; gap: 18px; }
.theme-songket .couple:has(.avatar) { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.theme-songket .couple:has(.avatar) article { min-width: 0; }
.theme-songket .amp { font: 400 2rem var(--serif); color: var(--perak); }
.theme-songket .couple:has(.avatar) .amp { position: absolute; left: 50%; top: 82px; width: 34px; height: 34px; margin-left: -17px; display: grid; place-items: center; z-index: 2; font-size: 1.15rem; color: var(--primary); }
.theme-songket .couple:has(.avatar) .amp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--perak); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.theme-songket .avatar { --gable: polygon(0 100%, 0 30%, 10% 30%, 10% 21%, 21% 21%, 21% 13%, 33% 13%, 33% 6%, 43% 6%, 43% 0, 57% 0, 57% 6%, 67% 6%, 67% 13%, 79% 13%, 79% 21%, 90% 21%, 90% 30%, 100% 30%, 100% 100%);
  width: min(100%, 156px); margin-bottom: 18px; padding: 3px; background: var(--perak); clip-path: var(--gable); }
.theme-songket .avatar::before { display: none; }
.theme-songket .avatar .avatar-frame { width: 100%; height: auto; aspect-ratio: 5 / 6; border: 0; border-radius: 0; box-shadow: none; background: var(--kapur); clip-path: var(--gable); }
.theme-songket .avatar .avatar-frame img { animation: none; }
.theme-songket .cname { color: var(--kapur); font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.theme-songket .parents { color: var(--redup); font-size: .86rem; line-height: 1.6; }

/* Ayat: lembar kapur bersudut tangga */
.theme-songket .quote { background: var(--card); border: 0; border-radius: 0; padding: 34px 22px 28px; clip-path: var(--tangga); color: var(--ink); }
.theme-songket .quote::before { inset: auto 22px 0; height: 4px; border: 0; border-radius: 0; opacity: 1; background: var(--jambu); }
.theme-songket .quote .terjemah { font-style: normal; }

/* Hitung mundur: empat belah ketupat */
.theme-songket .countdown { gap: 4px; max-width: 360px; }
.theme-songket .countdown div { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 0; background: var(--primary); color: var(--kapur); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.theme-songket .countdown.done { color: var(--primary); }
.theme-songket .countdown b { font: 400 1.5rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.theme-songket .countdown span { text-transform: none; letter-spacing: 0; font-size: .68rem; opacity: 1; }

/* Acara: kepala bertanggal berwarna manggis, tepi bawah bergerigi seperti pucuk rebung */
.theme-songket .event.ev-split { padding: 0; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; background: var(--card); overflow: hidden; }
.theme-songket .event::before { display: none; }
.theme-songket .ev-badge { position: relative; display: flex; align-items: baseline; justify-content: center; gap: 12px; padding: 20px 16px 22px; background: var(--primary); color: var(--kapur); }
.theme-songket .ev-badge b { font: 400 3.4rem/1 var(--serif); }
.theme-songket .ev-badge span { font-size: 1rem; }
.theme-songket .ev-badge::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 11px; background: var(--primary);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 90% 0, 85% 100%, 80% 0, 75% 100%, 70% 0, 65% 100%, 60% 0, 55% 100%, 50% 0, 45% 100%, 40% 0, 35% 100%, 30% 0, 25% 100%, 20% 0, 15% 100%, 10% 0, 5% 100%); }
.theme-songket .ev-body { padding: 30px 20px 24px; }
.theme-songket .event h3 { color: var(--primary); font-size: 1.55rem; }

/* Adab: daftar bergaris dengan penanda belah ketupat */
.theme-songket .notes { gap: 0; }
.theme-songket .notes li { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 15px 0 15px 32px; }
.theme-songket .notes li:last-child { border-bottom: 1px solid var(--line); }
.theme-songket .notes li::before { content: ""; left: 4px; top: 23px; width: 10px; height: 10px; background: var(--primary); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: none; }

/* Tanda kasih: bidang manggis, lembar rekening bersudut tangga */
.theme-songket #hadiah { background: var(--primary); color: var(--kapur); padding-top: 70px; }
.theme-songket #hadiah .sk-divider { color: var(--perak); }
.theme-songket #hadiah .h { color: var(--kapur); }
.theme-songket #hadiah .intro { color: var(--redup); }
.theme-songket .acc { background: var(--card); color: var(--ink); border: 0; border-radius: 0; box-shadow: none; padding: 24px 18px; clip-path: var(--tangga); overflow-wrap: anywhere; }
.theme-songket .acc .num { font: 400 1.6rem var(--serif); letter-spacing: .04em; }

/* Tombol dan formulir */
.theme-songket .btn { border-radius: var(--r); }
.theme-songket .btn:hover { transform: none; box-shadow: none; }
.theme-songket .btn:focus-visible { outline: 3px solid var(--jambu); outline-offset: 2px; box-shadow: none; }
.theme-songket .rsvp-form input:not([type="radio"]), .theme-songket .rsvp-form select, .theme-songket .rsvp-form textarea { border: 1px solid #8a748b; border-radius: var(--r); }
.theme-songket .rsvp-form input:focus, .theme-songket .rsvp-form select:focus, .theme-songket .rsvp-form textarea:focus { outline: 3px solid var(--jambu); outline-offset: 1px; box-shadow: none; }
.theme-songket .radios label { border-color: #8a748b; border-radius: var(--r); }
.theme-songket .radios label:has(input:checked) { border-color: var(--primary); background: var(--primary); color: var(--kapur); }
.theme-songket .radios input { accent-color: var(--jambu); }
.theme-songket .rsvp-form .btn { background: var(--jambu); border-color: var(--jambu); color: #fff; padding: 14px; }
.theme-songket .wishes h3 { color: var(--primary); }
.theme-songket .wishes li { border-radius: var(--r); }

/* Penutup: ujung kain */
.theme-songket .closing { background: var(--primary); color: var(--kapur); padding: 100px 26px 120px; }
.theme-songket .closing > .sk-band { position: absolute; left: 0; top: 0; z-index: 0; transform: scaleY(-1); }
.theme-songket .closing .sk-divider { color: var(--perak); }
.theme-songket .closing .intro, .theme-songket .closing .salam, .theme-songket .closing .doa { color: var(--kapur); }
.theme-songket .closing .salam { font-size: 1.1rem; }
.theme-songket .closing .names.small { color: var(--kapur); font-size: 2.2rem; line-height: 1.25; }
.theme-songket .closing .credit { color: var(--redup); }

/* Navigasi bawah dan tombol melayang: bidang solid, sudut kecil */
.theme-songket .dock { background: var(--deep); border: 1px solid var(--perak); border-radius: var(--r); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
.theme-songket .dock a { color: var(--redup); border-radius: 2px; }
.theme-songket .dock a.on { background: var(--jambu); color: #fff; }
.theme-songket .dock a:focus-visible { outline-color: var(--kapur); }
.theme-songket .sound-btn.on::after { border-radius: var(--r); display: none; }
.theme-songket .sound-btn, .theme-songket .motion-btn { border-radius: var(--r); background: var(--kapur); border: 1px solid var(--primary); color: var(--primary); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

@media (min-width: 560px) { .theme-songket .page { overflow: hidden; } }

/* Sasaran sentuh minimal 44 px dan teks contoh isian yang cukup kontras */
.theme-songket .btn, .theme-songket .btn.small { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.js .theme-songket .sound-btn, .js .theme-songket .motion-btn { width: 44px; height: 44px; }
.theme-songket .scroll-hint::after { content: ""; position: absolute; inset: -12px; }
.theme-songket .rsvp-form ::placeholder { color: var(--muted); opacity: 1; }
