/* Tema "Rinai Embun": hujan sebagai rahmat. Arah desain dan alasan tiap keputusan ada di DESIGN.md.
   Dimuat setelah invitation.css hanya bila tema = rinai. Putih kabut, biru embun, teks teal tua.
   Motif: tetes dengan riak dan garis gelombang air. Bidang datar; gradien hanya untuk langit hujan. */
.theme-rinai {
  --bg: #f2f6f5; --bg2: #dfecee; --ink: #2f4a50; --muted: #436269;
  --primary: #3f666e; --deep: #2f4a50; --on-primary: #fff; --accent: #3f666e; --card: #fcfefd;
  --line: rgba(63, 102, 110, .2);
  --kabut: #f2f6f5; --embun: #dfecee; --teal: #5d7f86; --tua: #2f4a50;
  --serif: "Sorts Mill Goudy", "Lora", Georgia, serif;
  --r: 12px; --r-kartu: 22px; /* 12 untuk yang diklik, 22 untuk kartu */
  --langit: linear-gradient(180deg, #cfe0e3 0%, #e3eeef 62%, #edf4f3 100%);
  /* Dua lapis air di kaki halaman */
  --air: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='80' viewBox='0 0 360 80'%3E%3Cpath fill='%23dbe9eb' d='M0 34C30 20 60 20 90 34S150 48 180 34S240 20 270 34S330 48 360 34V80H0z'/%3E%3Cpath fill='%23f2f6f5' d='M0 58C30 70 60 70 90 58S150 46 180 58S240 70 270 58S330 46 360 58V80H0z'/%3E%3C/svg%3E");
  /* Tepi gelombang untuk sambungan antarbagian */
  --ombak: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='20' viewBox='0 0 360 20'%3E%3Cpath d='M0 20V10C30 2 60 2 90 10S150 18 180 10S240 2 270 10S330 18 360 10V20z'/%3E%3C/svg%3E");
  /* Satu garis air */
  --garis: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' d='M0 5C5 1.5 15 1.5 20 5S35 8.5 40 5'/%3E%3C/svg%3E");
  /* Tetes yang jatuh di atas riak */
  --riak: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 72'%3E%3Cpath d='M48 3C48 3 39 17 39 24a9 9 0 0 0 18 0C57 17 48 3 48 3z'/%3E%3Cg fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cellipse cx='48' cy='53' rx='14' ry='4.5'/%3E%3Cellipse cx='48' cy='53' rx='29' ry='9.5'/%3E%3Cellipse cx='48' cy='53' rx='45' ry='15.5'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-rinai .page { box-shadow: 0 0 30px rgba(47, 74, 80, .08); }

/* ---------- Tipografi: Sorts Mill Goudy dipakai tegak, satu ketebalan ---------- */
.theme-rinai h1, .theme-rinai h2, .theme-rinai h3, .theme-rinai .cname, .theme-rinai .names, .theme-rinai .hero-names,
.theme-rinai .h, .theme-rinai .salam, .theme-rinai .to-name, .theme-rinai .wishes h3 {
  font-family: var(--serif); font-style: normal; font-weight: 400;
}
.theme-rinai .eyebrow { text-transform: none; letter-spacing: .02em; font-size: .98rem; color: var(--muted); }

/* ---------- Gerak: gerbang, muncul saat digulir, rintik dan riak di latar (ambient.css) ---------- */
.theme-rinai .sky, .theme-rinai .hero-pat { display: none; }
.theme-rinai .btn-open { animation: fadeUp 1s ease 1.2s both; }
.theme-rinai .countdown [data-cd="s"], .theme-rinai .sound-btn.on::after, .theme-rinai .scroll-hint span { animation: none; }
.js .theme-rinai [data-reveal] { transform: translateY(-12px); transition-duration: 1.3s; } /* turun perlahan seperti air */
.js .theme-rinai [data-reveal="fade"] { transform: none; }
.js .theme-rinai [data-reveal].in { transform: none; }

/* Tetes beriak dan pembatas garis air */
.rn-riak { display: block; width: 88px; height: 66px; margin: 0 auto 12px; background: var(--teal); -webkit-mask: var(--riak) center / contain no-repeat; mask: var(--riak) center / contain no-repeat; }
.theme-rinai .rn-divider { width: 120px; height: 10px; margin: 0 auto 24px; background: var(--teal); -webkit-mask: var(--garis) 0 0 / 40px 10px repeat-x; mask: var(--garis) 0 0 / 40px 10px repeat-x; }

/* ---------- Gerbang: tirai hujan yang surut ke bawah ---------- */
.theme-rinai .gate { color: var(--ink); background: var(--langit); overflow: clip; }
.js .theme-rinai .gate { background: transparent; }
.rn-tirai { position: absolute; inset: 0; z-index: 1; background: var(--air) center bottom / 360px 80px repeat-x, var(--langit); }
/* Garis hujan diam yang sangat tipis */
.rn-tirai::after { content: ""; position: absolute; inset: 0 0 80px; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 37px, rgba(93, 127, 134, .22) 37px 38px, transparent 38px 61px);
  -webkit-mask: repeating-linear-gradient(180deg, transparent 0 46px, #000 46px 82px, transparent 82px 131px); mask: repeating-linear-gradient(180deg, transparent 0 46px, #000 46px 82px, transparent 82px 131px); }
/* Permukaan air bergelombang di atas tirai: terlihat saat tirai surut */
.rn-tirai::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 20px; background: #cfe0e3; -webkit-mask: var(--ombak) 0 0 / 360px 20px repeat-x; mask: var(--ombak) 0 0 / 360px 20px repeat-x; }
.js .rn-tirai { transition: transform 1.6s cubic-bezier(.6, 0, .3, 1) .3s; }
.js body.theme-rinai.is-opening .rn-tirai { transform: translateY(calc(100% + 24px)); }
.theme-rinai .gate-content { width: min(100%, 400px); padding: 48px 30px 96px; }
.js .theme-rinai .gate-content { max-height: 100%; padding-top: 24px; padding-bottom: 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; transition: transform 1.4s cubic-bezier(.6, 0, .3, 1) .3s, opacity .6s ease .3s; }
.js .theme-rinai .gate-content::-webkit-scrollbar { display: none; }
.js body.theme-rinai.is-opening .gate-content { transform: translateY(40vh); opacity: 0; }
.theme-rinai .gate .rn-riak { width: 76px; height: 57px; margin-bottom: 10px; }
.theme-rinai .gate .eyebrow { margin-bottom: 6px; }
.theme-rinai .gate .names { font-size: clamp(2.7rem, 13vw, 3.5rem); line-height: 1.1; margin-bottom: 12px; color: var(--tua); }
.theme-rinai .names i { font: italic 400 .6em var(--serif); color: var(--primary); line-height: 1.3; }
.theme-rinai .cover-date { color: var(--muted); letter-spacing: .01em; margin-bottom: 18px; }
.theme-rinai .to { background: rgba(252, 254, 253, .8); border: 0; border-radius: var(--r-kartu); max-width: 300px; padding: 14px 16px; margin-bottom: 20px; }
.theme-rinai .to-note { color: var(--muted); }
.theme-rinai .sound-note { color: var(--ink); margin-top: 14px; padding: 6px 12px; border-radius: var(--r); background: rgba(252, 254, 253, .8); }
.theme-rinai .btn-open { background: var(--primary); color: #fff; border-radius: var(--r); font-weight: 500; letter-spacing: .01em; padding: 13px 38px; transition: background .25s; }
.theme-rinai .btn-open:hover { background: #33545b; box-shadow: none; transform: none; }
.theme-rinai .btn-open:focus-visible { outline: 3px solid var(--tua); outline-offset: 3px; box-shadow: none; }

/* ---------- Hero: langit hujan dengan air di kaki ---------- */
.theme-rinai .hero { color: var(--ink); background: var(--air) center bottom / 360px 80px repeat-x, var(--langit); }
.theme-rinai .hero-in { padding: 54px 28px 132px; }
.theme-rinai .hero .bismillah { color: var(--tua); font-size: 1.55rem; margin-bottom: 18px; }
.theme-rinai .hero-names { font-size: clamp(3.1rem, 15vw, 4.3rem); line-height: 1.1; color: var(--tua); margin: 4px 0 18px; overflow-wrap: anywhere; }
.theme-rinai .hero-names i { font: italic 400 .52em var(--serif); color: var(--primary); line-height: 1.45; }
.theme-rinai .hero-date { display: inline-block; margin: 0; padding: 4px 8px 18px; color: var(--tua); opacity: 1; letter-spacing: .02em; position: relative; }
.theme-rinai .hero-date::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 120px; height: 10px; margin-left: -60px; background: var(--teal); -webkit-mask: var(--garis) 0 0 / 40px 10px repeat-x; mask: var(--garis) 0 0 / 40px 10px repeat-x; }
.theme-rinai .scroll-hint { bottom: 22px; margin-left: -22px; width: 44px; height: 44px; border: 0; border-radius: 50%; }
.theme-rinai .scroll-hint span { left: 50%; top: 14px; width: 14px; height: 14px; margin-left: -7px; border-radius: 0 50% 50% 50%; background: var(--primary); rotate: 45deg; }

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

/* Mempelai: jendela berpuncak bulat dengan dasar bergelombang */
.theme-rinai .couple { gap: 14px; margin-bottom: 38px; }
.theme-rinai .amp { font: italic 400 2.4rem var(--serif); color: var(--primary); }
.theme-rinai .avatar { width: 176px; margin: 0 auto 20px; }
.theme-rinai .avatar::before { display: none; }
.theme-rinai .avatar::after { content: ""; display: block; width: 100%; height: 10px; margin-top: 10px; background: var(--teal); -webkit-mask: var(--garis) 8px 0 / 40px 10px repeat-x; mask: var(--garis) 8px 0 / 40px 10px repeat-x; }
.theme-rinai .avatar .avatar-frame { width: 100%; height: auto; aspect-ratio: 5 / 6; border: 0; border-radius: 88px 88px var(--r-kartu) var(--r-kartu); box-shadow: none; background: var(--card); }
.theme-rinai .avatar .avatar-frame img { animation: none; }
.theme-rinai .cname { color: var(--tua); font-size: 1.55rem; line-height: 1.35; overflow-wrap: anywhere; }
.theme-rinai .parents { color: var(--muted); }

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

/* Hitung mundur: empat butir air tegak */
.theme-rinai .countdown { gap: 10px; margin-bottom: 34px; max-width: 320px; }
.theme-rinai .countdown div { aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 999px; background: var(--embun); color: var(--tua); }
.theme-rinai .countdown b { font: 400 1.9rem/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.theme-rinai .countdown span { text-transform: none; letter-spacing: 0; font-size: .74rem; opacity: 1; }
.theme-rinai .countdown.done { color: var(--tua); }

/* Acara: tanggal besar di atas garis air */
.theme-rinai .event.ev-split { margin-bottom: 20px; padding: 28px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-kartu); box-shadow: none; }
.theme-rinai .event::before { display: none; }
.theme-rinai .ev-badge { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; color: var(--primary); }
.theme-rinai .ev-badge b { font: 400 3.8rem/1 var(--serif); }
.theme-rinai .ev-badge span { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.theme-rinai .ev-badge::after { content: ""; width: 80px; height: 10px; margin-top: 12px; background: var(--teal); -webkit-mask: var(--garis) 0 0 / 40px 10px repeat-x; mask: var(--garis) 0 0 / 40px 10px repeat-x; }
.theme-rinai .event h3 { color: var(--tua); font-size: 1.55rem; }

/* Adab: butir bertanda tetes */
.theme-rinai .notes li { background: var(--card); border: 0; border-radius: var(--r); padding: 14px 16px 14px 44px; }
.theme-rinai .notes li::before { content: ""; left: 17px; top: 21px; width: 12px; height: 12px; border-radius: 0 50% 50% 50%; background: var(--primary); rotate: 45deg; animation: none; }

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

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

/* Penutup: kembali ke langit hujan */
.theme-rinai .closing { padding: 74px 26px 140px; background: var(--air) center bottom / 360px 80px repeat-x, var(--langit); }
.theme-rinai .closing .intro, .theme-rinai .closing .salam { color: var(--ink); }
.theme-rinai .closing .salam { font-size: 1.1rem; }
.theme-rinai .closing .doa { color: var(--tua); }
.theme-rinai .closing .names.small { color: var(--tua); font-size: 2.25rem; line-height: 1.3; }
.theme-rinai .closing .credit { color: var(--muted); }

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

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