/* Tema "Pasir Senja": bukit pasir saat matahari rendah. Arah desain dan alasan tiap keputusan ada di DESIGN.md.
   Dimuat setelah invitation.css hanya bila tema = pasir. Krem, aprikot pasir, tanah liat, teks cokelat tua.
   Motif: matahari bergaris dan bukit pasir berlapis. Bidang datar; gradien hanya untuk langit senja. */
.theme-pasir {
  --bg: #f8efe4; --bg2: #f2e1cd; --ink: #503426; --muted: #70493a;
  --primary: #955640; --deep: #503426; --on-primary: #fff; --accent: #955640; --card: #fffaf4;
  --line: rgba(149, 86, 64, .2);
  --krem: #f8efe4; --pasir: #f2e1cd; --aprikot: #eac8a8; --liat: #955640; --tua: #503426;
  --serif: "Tenor Sans", "Plus Jakarta Sans", system-ui, sans-serif;
  --r: 12px; --r-kartu: 22px; /* 12 untuk yang diklik, 22 untuk kartu */
  --langit: linear-gradient(180deg, #f0d3ba 0%, #f5e1cc 55%, #f8ebdd 100%);
  /* Dua lapis bukit di belakang dan satu bukit depan sewarna krem */
  --bk1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='140' viewBox='0 0 360 140'%3E%3Cpath fill='%23eac8a8' d='M0 62C60 20 110 20 180 52S300 104 360 62V140H0z'/%3E%3Cpath fill='%23f2dac0' d='M0 96C50 66 90 70 140 90S310 126 360 96V140H0z'/%3E%3C/svg%3E");
  --bk2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='140' viewBox='0 0 360 140'%3E%3Cpath fill='%23f8efe4' d='M0 120C40 108 100 112 170 122S320 132 360 120V140H0z'/%3E%3C/svg%3E");
  /* Satu lereng untuk sambungan antarbagian */
  --lereng: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='28' viewBox='0 0 360 28'%3E%3Cpath d='M0 28V18C70 2 130 6 200 16S290 34 360 18V28z'/%3E%3C/svg%3E");
}
.theme-pasir .page { box-shadow: 0 0 30px rgba(80, 52, 38, .08); }

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

/* ---------- Gerak: gerbang, muncul saat digulir, butir pasir di latar (ambient.css) ---------- */
.theme-pasir .sky, .theme-pasir .hero-pat { display: none; }
.theme-pasir .btn-open { animation: fadeUp 1s ease 1.2s both; }
.theme-pasir .countdown [data-cd="s"], .theme-pasir .sound-btn.on::after, .theme-pasir .scroll-hint span { animation: none; }
.js .theme-pasir [data-reveal] { transform: translateX(-18px); transition-duration: 1.3s; } /* bergeser pelan seperti pasir tertiup */
.js .theme-pasir [data-reveal="fade"] { transform: none; }
.js .theme-pasir [data-reveal].in { transform: none; }

/* Matahari rendah: lingkaran dengan bagian bawah bergaris */
.ps-surya { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: #d98e66;
  -webkit-mask: linear-gradient(#000 0 56%, transparent 56% 61%, #000 61% 70%, transparent 70% 77%, #000 77% 84%, transparent 84% 93%, #000 93%); mask: linear-gradient(#000 0 56%, transparent 56% 61%, #000 61% 70%, transparent 70% 77%, #000 77% 84%, transparent 84% 93%, #000 93%); }
.theme-pasir .ps-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 22px; }
.theme-pasir .ps-divider::before, .theme-pasir .ps-divider::after { content: ""; flex: none; width: 52px; height: 1px; background: #c98f6c; transform: none; }
.theme-pasir .ps-divider::after { order: 2; }
.theme-pasir .ps-divider .ps-surya { width: 26px; height: 26px; margin: 0; order: 1; }

/* ---------- Gerbang: lapisan bukit bergeser turun ---------- */
.theme-pasir .gate { color: var(--ink); background: var(--langit); overflow: clip; }
.js .theme-pasir .gate { background: transparent; }
.ps-gerbang { position: absolute; inset: 0; z-index: 1; }
.ps-gerbang > div { position: absolute; left: 0; right: 0; bottom: 0; }
.ps-langit { top: 0; background: var(--langit); }
/* Punggung bukit di atas langit: terlihat saat lapisan turun */
.ps-langit::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 28px; background: #e6bd9a; -webkit-mask: var(--lereng) 0 0 / 360px 28px repeat-x; mask: var(--lereng) 0 0 / 360px 28px repeat-x; }
.ps-bukit { height: 140px; }
.ps-bukit.b1 { background: var(--bk1) center bottom / 360px 140px repeat-x; }
.ps-bukit.b2 { background: var(--bk2) center bottom / 360px 140px repeat-x; }
.js .ps-langit { transition: transform 1.5s cubic-bezier(.65, 0, .3, 1) .45s; }
.js .ps-bukit.b1 { transition: transform 1.3s cubic-bezier(.6, 0, .35, 1) .35s; }
.js .ps-bukit.b2 { transition: transform 1s cubic-bezier(.6, 0, .35, 1) .25s; }
.js body.theme-pasir.is-opening .ps-langit { transform: translateY(calc(100% + 32px)); }
.js body.theme-pasir.is-opening .ps-bukit { transform: translateY(105%); }
.theme-pasir .gate-content { width: min(100%, 400px); padding: 48px 30px 104px; }
.js .theme-pasir .gate-content { max-height: 100%; padding-top: 22px; padding-bottom: 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; transition: transform 1.3s cubic-bezier(.6, 0, .3, 1) .3s, opacity .6s ease .3s; }
.js .theme-pasir .gate-content::-webkit-scrollbar { display: none; }
.js body.theme-pasir.is-opening .gate-content { transform: translateY(40vh); opacity: 0; }
.theme-pasir .gate .ps-surya { width: 60px; height: 60px; margin-bottom: 10px; }
.theme-pasir .gate .eyebrow { margin-bottom: 6px; }
.theme-pasir .gate .names { font-size: clamp(2.5rem, 12.5vw, 3.2rem); line-height: 1.2; margin-bottom: 10px; color: var(--tua); }
.theme-pasir .names i { font: 400 .55em var(--serif); color: var(--liat); line-height: 1.35; }
.theme-pasir .cover-date { color: var(--muted); letter-spacing: .03em; margin-bottom: 18px; }
.theme-pasir .to { background: rgba(255, 250, 244, .82); border: 0; border-radius: var(--r-kartu); max-width: 300px; padding: 14px 16px; margin-bottom: 20px; }
.theme-pasir .to-note { color: var(--muted); }
.theme-pasir .sound-note { color: var(--ink); margin-top: 14px; padding: 6px 12px; border-radius: var(--r); background: rgba(255, 250, 244, .82); }
.theme-pasir .btn-open { background: var(--liat); color: #fff; border-radius: var(--r); font-weight: 500; letter-spacing: .01em; padding: 13px 38px; transition: background .25s; }
.theme-pasir .btn-open:hover { background: #7e4734; box-shadow: none; transform: none; }
.theme-pasir .btn-open:focus-visible { outline: 3px solid var(--tua); outline-offset: 3px; box-shadow: none; }

/* ---------- Hero: langit senja dengan bukit di kaki ---------- */
.theme-pasir .hero { color: var(--ink); background: var(--bk2) center bottom / 360px 140px repeat-x, var(--bk1) center bottom / 360px 140px repeat-x, var(--langit); }
.theme-pasir .hero-in { padding: 52px 28px 168px; }
.theme-pasir .hero .ps-surya { width: 84px; height: 84px; }
.theme-pasir .hero .bismillah { color: var(--tua); font-size: 1.55rem; margin-bottom: 16px; }
.theme-pasir .hero-names { font-size: clamp(2.8rem, 14vw, 3.9rem); line-height: 1.2; color: var(--tua); margin: 4px 0 20px; overflow-wrap: anywhere; }
.theme-pasir .hero-names i { font: 400 .5em var(--serif); color: var(--liat); line-height: 1.5; }
.theme-pasir .hero-date { display: inline-block; margin: 0; padding: 9px 4px; border-top: 1px solid #c98f6c; border-bottom: 1px solid #c98f6c; color: var(--tua); opacity: 1; letter-spacing: .05em; }
.theme-pasir .scroll-hint { bottom: 70px; margin-left: -22px; width: 44px; height: 44px; border: 0; border-radius: 50%; }
.theme-pasir .scroll-hint span { left: 50%; top: 14px; width: 12px; height: 12px; margin-left: -6px; background: none; border: solid var(--liat); border-width: 0 2px 2px 0; border-radius: 0; rotate: 45deg; }

/* ---------- Bagian umum: bidang krem dan pasir, disambung lereng ---------- */
.theme-pasir .sec { padding: 62px 26px; background: var(--krem); }
.theme-pasir .sec.alt { background: var(--pasir); padding-top: 78px; padding-bottom: 78px; }
.theme-pasir .sec.alt::before, .theme-pasir .sec.alt::after, .theme-pasir .closing::before {
  content: ""; position: absolute; left: 0; right: 0; height: 28px; background: var(--krem); -webkit-mask: var(--lereng) 0 0 / 360px 28px repeat-x; mask: var(--lereng) 0 0 / 360px 28px repeat-x;
}
.theme-pasir .sec.alt::before { top: -1px; transform: scaleY(-1); }
.theme-pasir .sec.alt::after { bottom: -1px; }
/* Sebelum penutup cukup satu tepi: warna RSVP menggantung ke langit penutup */
.theme-pasir #rsvp::after { display: none; }
.theme-pasir .closing::before { top: -1px; transform: scaleY(-1); background: var(--pasir); }
.theme-pasir .h { color: var(--tua); font-size: 1.75rem; line-height: 1.35; }
.theme-pasir .salam { color: var(--tua); font-size: 1.15rem; line-height: 1.65; }
.theme-pasir .intro { color: var(--muted); }

/* Mempelai: karakter dalam bingkai batu halus, tersusun bergeser */
.theme-pasir .couple { gap: 14px; margin-bottom: 38px; }
.theme-pasir .couple article { width: 100%; }
.theme-pasir .amp { font: 400 2rem var(--serif); color: var(--liat); }
.theme-pasir .avatar { --batu: 46% 54% 42% 58% / 52% 46% 54% 48%; width: 188px; height: 204px; margin: 0 auto 20px; translate: -22px 0; }
.theme-pasir .couple article:nth-of-type(2) .avatar { --batu: 54% 46% 58% 42% / 46% 52% 48% 54%; translate: 22px 0; }
.theme-pasir .avatar::before { inset: 0; translate: 14px 10px; border: 0; border-radius: var(--batu); background: var(--aprikot); animation: none; opacity: 1; z-index: 0; }
.theme-pasir .avatar .avatar-frame { position: relative; z-index: 1; width: 188px; height: 204px; border: 0; border-radius: var(--batu); box-shadow: none; background: var(--card); }
.theme-pasir .avatar .avatar-frame img { animation: none; }
.theme-pasir .cname { color: var(--tua); font-size: 1.3rem; line-height: 1.45; overflow-wrap: anywhere; }
.theme-pasir .parents { color: var(--muted); }

.theme-pasir .quote { background: var(--card); border: 0; border-radius: var(--r-kartu); padding: 30px 22px; }
.theme-pasir .quote::before { content: none; }
.theme-pasir .quote .arab { color: var(--tua); }
.theme-pasir .quote .terjemah { font-style: normal; }

/* Hitung mundur: satu jalur pasir dengan empat angka */
.theme-pasir .countdown { gap: 0; margin-bottom: 36px; padding: 12px 6px; border-radius: var(--r-kartu); background: var(--pasir); }
.theme-pasir .countdown div { background: none; color: var(--tua); border: 0; border-left: 1px solid rgba(149, 86, 64, .3); border-radius: 0; padding: 4px; }
.theme-pasir .countdown div:first-child { border-left: 0; }
.theme-pasir .countdown b { font: 400 1.75rem/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.theme-pasir .countdown span { text-transform: none; letter-spacing: .02em; font-size: .76rem; color: var(--muted); opacity: 1; }
.theme-pasir .countdown.done { color: var(--tua); }

/* Acara: tanggal di dalam matahari separuh yang terbit dari tepi atas kartu */
.theme-pasir .event.ev-split { margin-bottom: 20px; padding: 0 20px 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-kartu); box-shadow: none; overflow: hidden; }
.theme-pasir .event::before { display: none; }
.theme-pasir .ev-badge { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 176px; height: 100px; margin: 18px auto 18px; padding-bottom: 12px; border-radius: 88px 88px 0 0; background: var(--aprikot); color: var(--tua); border-bottom: 3px solid var(--liat); }
.theme-pasir .ev-badge b { font: 400 2.7rem/1.05 var(--serif); }
.theme-pasir .ev-badge span { font-size: .78rem; }
.theme-pasir .event h3 { color: var(--tua); font-size: 1.35rem; }

/* Adab: butir bertanda matahari kecil */
.theme-pasir .notes li { background: var(--card); border: 0; border-radius: var(--r); padding: 14px 16px 14px 44px; }
.theme-pasir .notes li::before { content: ""; left: 16px; top: 20px; width: 13px; height: 13px; border-radius: 50%; background: var(--liat); animation: none; }

/* Tanda kasih */
.theme-pasir .acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-kartu); box-shadow: none; padding: 22px 18px; overflow-wrap: anywhere; }
.theme-pasir .acc .num { font: 400 1.45rem var(--serif); letter-spacing: .05em; color: var(--tua); }

/* Tombol dan formulir */
.theme-pasir .btn, .theme-pasir .btn.small { border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; }
.theme-pasir .btn:hover { transform: none; box-shadow: none; }
.theme-pasir .btn:focus-visible { outline: 3px solid var(--tua); outline-offset: 2px; box-shadow: none; }
.theme-pasir .rsvp-form input:not([type="radio"]), .theme-pasir .rsvp-form select, .theme-pasir .rsvp-form textarea { border: 1px solid #8f6a57; border-radius: var(--r); background: var(--card); }
.theme-pasir .rsvp-form input:focus, .theme-pasir .rsvp-form select:focus, .theme-pasir .rsvp-form textarea:focus { outline: 3px solid var(--liat); outline-offset: 1px; box-shadow: none; }
.theme-pasir .rsvp-form ::placeholder { color: var(--muted); opacity: 1; }
.theme-pasir .radios label { border: 1px solid #8f6a57; border-radius: var(--r); background: var(--card); min-height: 44px; }
.theme-pasir .radios label:has(input:checked) { border-color: var(--liat); background: #f6dfca; }
.theme-pasir .radios input { accent-color: var(--liat); }
.theme-pasir .rsvp-form .btn { background: var(--liat); border-color: var(--liat); color: #fff; padding: 13px; }
.theme-pasir .wishes h3 { color: var(--tua); }
.theme-pasir .wishes li { border: 0; border-radius: var(--r); background: var(--card); }

/* Penutup: kembali ke langit senja */
.theme-pasir .closing { padding: 78px 26px 178px; background: var(--bk2) center bottom / 360px 140px repeat-x, var(--bk1) center bottom / 360px 140px repeat-x, var(--langit); }
.theme-pasir .closing .intro, .theme-pasir .closing .salam { color: var(--ink); }
.theme-pasir .closing .salam { font-size: .98rem; }
.theme-pasir .closing .doa { color: var(--tua); }
.theme-pasir .closing .names.small { color: var(--tua); font-size: 1.85rem; line-height: 1.4; }
.theme-pasir .closing .credit { color: var(--muted); }

/* Navigasi bawah dan tombol melayang */
.theme-pasir .dock { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-kartu); box-shadow: 0 8px 22px rgba(80, 52, 38, .16); -webkit-backdrop-filter: none; backdrop-filter: none; }
.theme-pasir .dock a { color: var(--muted); border-radius: var(--r); }
.theme-pasir .dock a.on { background: var(--pasir); color: var(--tua); }
.theme-pasir .dock a:focus-visible { outline-color: var(--liat); }
.js .theme-pasir .sound-btn, .js .theme-pasir .motion-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--liat); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.theme-pasir .sound-btn.on::after { display: none; }

@media (min-width: 560px) { .theme-pasir .page { border-radius: var(--r-kartu); } }
