/* Tema "Jendela Pagi": cahaya pagi dari jendela berlengkung dengan tirai yang berayun. Arah desain dan alasan tiap keputusan ada di DESIGN.md.
   Dimuat setelah invitation.css hanya bila tema = jendela. Putih tembok, mentega pucat, kayu muda, tombol hijau daun.
   Bentuk serba lengkung. Gradien hanya untuk cahaya pagi. */
.theme-jendela {
  --bg: #fbf8f0; --bg2: #fbf2d8; --ink: #55463a; --muted: #6c5a4b;
  --primary: #55684d; --deep: #3f332a; --on-primary: #fff; --accent: #55684d; --card: #fffdf8;
  --line: rgba(85, 70, 58, .16);
  --tembok: #fbf8f0; --mentega: #fbf2d8; --kuning: #f6e9bd; --daun: #55684d; --kayu: #b8956f; --kayu-muda: #dcc3a3; --tua: #55463a;
  --serif: "Gowun Batang", "Lora", Georgia, serif;
  --tulis: "Parisienne", "Gowun Batang", cursive;
  --r: 16px; --r-kartu: 28px; /* 16 untuk yang diklik, 28 untuk kartu */
  --lengkung: 999px 999px var(--r-kartu) var(--r-kartu);
  --tirai: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 700' preserveAspectRatio='none'%3E%3Cpath fill='%23f3e2ac' d='M0 0H100C96 140 80 270 32 372C60 440 72 560 64 700H0Z'/%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath stroke='%23fbf0c9' stroke-width='9' d='M30 0C34 150 28 280 14 372M70 0C66 140 52 280 24 372M20 384C40 470 44 590 40 700'/%3E%3Cpath stroke='%23e4cb83' stroke-width='3' d='M50 0C52 150 40 290 20 372M88 0C82 140 64 280 29 370M10 384C20 480 22 590 18 700M28 382C54 462 60 590 54 700'/%3E%3C/g%3E%3Cpath fill='%23b8956f' d='M0 362C12 369 23 370 34 363C37 370 36 378 32 384C21 392 10 389 0 381Z'/%3E%3C/svg%3E");
  --jendela: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 76'%3E%3Cpath fill='%23f7ebc0' d='M10 62V30a22 22 0 0 1 44 0v32z'/%3E%3Cpath fill='none' stroke='%23b8956f' stroke-width='2.4' stroke-linejoin='round' d='M10 62V30a22 22 0 0 1 44 0v32zM32 8v54M10 36C22 31 42 31 54 36'/%3E%3Cpath fill='none' stroke='%23b8956f' stroke-width='4' stroke-linecap='round' d='M6 67h52'/%3E%3C/svg%3E");
  --ranting: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 36'%3E%3Cpath fill='none' stroke='%237d8f72' stroke-width='1.6' stroke-linecap='round' d='M12 24C48 6 66 30 90 18S136 8 168 18'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(34 17) rotate(-130)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(44 17) rotate(55)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(66 22) rotate(-55)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(90 18) rotate(-100)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(112 14) rotate(60)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(130 12) rotate(-50)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(150 14) rotate(40)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(168 18) rotate(-8)'/%3E%3C/svg%3E");
  --pot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 56'%3E%3Cpath fill='none' stroke='%237d8f72' stroke-width='1.6' stroke-linecap='round' d='M22 36C22 24 18 16 12 10M22 36C23 22 28 14 34 8M22 36V16'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(12 11) rotate(-150)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(34 9) rotate(-45)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(22 17) rotate(-90)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(17 22) rotate(190)'/%3E%3Cpath fill='%238da182' d='M0 0C5-7 14-7 19 0C14 7 5 7 0 0Z' transform='translate(26 24) rotate(-15)'/%3E%3Cpath fill='%23c98f6d' d='M10 36h24c0 10-3 18-12 18s-12-8-12-18z'/%3E%3C/svg%3E");
  --lambai: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 24' width='360' height='24'%3E%3Cpath d='M0 24V8C24 24 66 24 90 8C114 24 156 24 180 8C204 24 246 24 270 8C294 24 336 24 360 8V24Z'/%3E%3C/svg%3E");
  /* Cahaya pagi yang menyebar dari atas */
  --pagi: radial-gradient(120% 62% at 50% 12%, rgba(247, 221, 138, .42), rgba(247, 221, 138, 0) 70%);
}
.theme-jendela .page { box-shadow: 0 0 30px rgba(85, 70, 58, .1); }

/* ---------- Tipografi: nama bergaya tulisan tangan, judul serif membulat ---------- */
.theme-jendela h1, .theme-jendela h2, .theme-jendela h3, .theme-jendela .h, .theme-jendela .salam, .theme-jendela .to-name, .theme-jendela .wishes h3 {
  font-family: var(--serif); font-style: normal; font-weight: 400;
}
.theme-jendela .names, .theme-jendela .hero-names, .theme-jendela .closing .names.small { font-family: var(--tulis); font-style: normal; font-weight: 400; }
/* Nama lengkap bergelar memakai serif agar gelarnya terbaca */
.theme-jendela .cname { font-family: var(--serif); font-style: normal; font-weight: 400; }
.theme-jendela .eyebrow { text-transform: none; letter-spacing: .02em; font-size: .96rem; color: var(--muted); }

/* ---------- Gerak: gerbang, muncul saat digulir, tirai berayun, bias cahaya (ambient.css) ---------- */
.theme-jendela .sky, .theme-jendela .hero-pat { display: none; }
.theme-jendela .btn-open { animation: fadeUp 1s ease 1.2s both; }
.theme-jendela .countdown [data-cd="s"], .theme-jendela .sound-btn.on::after, .theme-jendela .scroll-hint span { animation: none; }
.js .theme-jendela [data-reveal] { transform: translateY(14px) scale(.98); transition-duration: 1.4s; }
.js .theme-jendela [data-reveal="fade"] { transform: none; }
.js .theme-jendela [data-reveal].in { transform: none; }
@keyframes jd-ayun { 0%, 100% { transform: skewX(0deg) scaleX(1); } 50% { transform: skewX(-1.6deg) scaleX(1.07); } }
@keyframes jd-ayun-kanan { 0%, 100% { transform: scaleX(-1) skewX(0deg); } 50% { transform: scaleX(-1.07) skewX(-1.6deg); } }

/* Jendela lengkung kecil dan pembatas ranting */
.jd-jendela { display: block; width: 56px; height: 66px; margin: 0 auto 12px; background: var(--jendela) center / contain no-repeat; }
.theme-jendela .jd-divider { width: 180px; height: 36px; margin: 0 auto 22px; background: var(--ranting) center / contain no-repeat; }

/* ---------- Gerbang: tirai yang tersibak di depan jendela ---------- */
.theme-jendela .gate { color: var(--ink); background: var(--pagi), var(--mentega); overflow: clip; }
.js .theme-jendela .gate { background: transparent; }
.jd-gerbang { position: absolute; inset: 0; z-index: 1; }
.jd-gerbang > div { position: absolute; }
.jd-latar { inset: 0; background: var(--pagi), var(--mentega); }
.jd-tirai { top: 0; bottom: 0; width: min(34vw, 240px); }
.jd-tirai.l { left: 0; }
.jd-tirai.r { right: 0; }
.jd-tirai::before { content: ""; position: absolute; inset: 0; background: var(--tirai) 0 0 / 100% 100% no-repeat; transform-origin: 0 0; animation: jd-ayun 8s ease-in-out infinite; }
.jd-tirai.r::before { transform: scaleX(-1); transform-origin: 50% 0; animation: jd-ayun-kanan 9s ease-in-out -3s infinite; }
.js .jd-latar { transition: opacity 1s ease .8s; }
.js .jd-tirai { transition: transform 1.7s cubic-bezier(.55, 0, .3, 1) .3s, opacity .7s ease 1.2s; }
.js body.theme-jendela.is-opening .jd-latar { opacity: 0; }
.js body.theme-jendela.is-opening .jd-tirai.l { transform: translateX(-90%) skewX(7deg); opacity: 0; }
.js body.theme-jendela.is-opening .jd-tirai.r { transform: translateX(90%) skewX(-7deg); opacity: 0; }
/* Papan nama berbentuk jendela lengkung; pada layar pendek hanya papan ini yang menggulir */
.theme-jendela .gate-content { width: min(calc(100% - 56px), 360px); margin: 30px 0; padding: 40px 22px 24px; background: var(--card); border: 2px solid var(--kayu-muda); border-radius: 170px 170px var(--r-kartu) var(--r-kartu); outline: 1px solid var(--kayu-muda); outline-offset: 6px; box-shadow: 0 14px 40px rgba(85, 70, 58, .14); }
.js .theme-jendela .gate-content { max-height: calc(100% - 52px); margin: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.js .theme-jendela .gate-content::-webkit-scrollbar { display: none; }
.js body.theme-jendela.is-opening .gate-content { transform: scale(.94) translateY(-10px); }
.theme-jendela .gate .jd-jendela { width: 44px; height: 52px; margin-bottom: 6px; }
.theme-jendela .gate .eyebrow { margin-bottom: 2px; }
.theme-jendela .gate .names { font-size: min(14vw, 3.5rem, calc((min(100vw - 56px, 360px) - 52px) / (var(--huruf, 7) * .48))); line-height: 1.12; margin-bottom: 6px; color: var(--tua); }
.theme-jendela .names i { font: 400 .55em var(--tulis); color: var(--daun); line-height: 1.2; }
.theme-jendela .cover-date { color: var(--tua); letter-spacing: .01em; margin-bottom: 14px; }
.theme-jendela .to { border: 0; background: var(--mentega); border-radius: var(--r-kartu); max-width: 290px; padding: 12px 14px; margin-bottom: 18px; }
.theme-jendela .to-note, .theme-jendela .sound-note { color: var(--muted); }
.theme-jendela .sound-note { margin-top: 12px; }
.theme-jendela .btn-open { background: var(--daun); color: #fff; border-radius: var(--r); font-weight: 500; letter-spacing: .01em; padding: 13px 34px; transition: background .25s; }
.theme-jendela .btn-open:hover { background: #43533d; box-shadow: none; transform: none; }
.theme-jendela .btn-open:focus-visible { outline: 3px solid var(--tua); outline-offset: 3px; box-shadow: none; }

/* ---------- Hero: nama di dalam jendela lengkung, tirai berayun, pot di ambang ---------- */
.theme-jendela .hero { color: var(--ink); background: var(--pagi), var(--tembok); }
.theme-jendela .hero::before, .theme-jendela .hero::after { content: ""; position: absolute; top: 0; bottom: 0; width: 74px; z-index: 2; pointer-events: none; background: var(--tirai) 0 0 / 100% 100% no-repeat; }
.theme-jendela .hero::before { left: 0; transform-origin: 0 0; animation: jd-ayun 8s ease-in-out infinite; }
.theme-jendela .hero::after { right: 0; transform: scaleX(-1); transform-origin: 50% 0; animation: jd-ayun-kanan 9s ease-in-out -3s infinite; }
.theme-jendela .hero-in { padding: 78px 44px 172px; }
.theme-jendela .hero-in::before { content: ""; position: absolute; left: 28px; right: 28px; top: 32px; bottom: 112px; z-index: -1; border: 2px solid var(--kayu-muda); border-radius: var(--lengkung); background: rgba(255, 253, 248, .72); outline: 1px solid var(--kayu-muda); outline-offset: 6px; }
/* Ambang membulat dengan dua pot kecil */
.theme-jendela .hero-in::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 90px; height: 54px; background: var(--pot) 16px 0 / 36px 46px no-repeat, var(--pot) right 16px top 0 / 36px 46px no-repeat, linear-gradient(var(--kayu), var(--kayu)) 0 100% / 100% 0 no-repeat; border-bottom: 10px solid var(--kayu-muda); border-radius: 0 0 999px 999px / 0 0 10px 10px; }
.theme-jendela .hero .jd-jendela { display: none; }
.theme-jendela .hero .bismillah { color: var(--tua); font-size: 1.45rem; margin: 0 0 14px; }
.theme-jendela .hero .eyebrow { font-size: .86rem; margin-bottom: 4px; }
.theme-jendela .hero-names { font-size: min(17vw, 4.6rem, calc((min(100vw, 520px) - 92px) / (var(--huruf, 7) * .48))); line-height: 1.12; color: var(--tua); margin: 6px 0 12px; overflow-wrap: anywhere; }
.theme-jendela .hero-names i { font: 400 .5em var(--tulis); color: var(--daun); line-height: 1.3; }
.theme-jendela .hero-date { display: inline-block; margin: 0; padding: 8px 18px; background: var(--kuning); color: var(--tua); border-radius: var(--r); opacity: 1; letter-spacing: .01em; font-size: .95rem; }
.theme-jendela .scroll-hint { bottom: 30px; margin-left: -22px; width: 44px; height: 44px; border: 0; border-radius: 50%; }
.theme-jendela .scroll-hint span { left: 50%; top: 14px; width: 12px; height: 12px; margin-left: -6px; background: none; border: solid var(--daun); border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; rotate: 45deg; }

/* ---------- Bagian umum: tembok dan mentega, disambung rumbai bergelombang ---------- */
.theme-jendela .sec { padding: 62px 26px; background: var(--tembok); }
.theme-jendela .sec.alt { background: var(--mentega); padding-top: 76px; padding-bottom: 76px; }
.theme-jendela .sec.alt::before, .theme-jendela .sec.alt::after, .theme-jendela .closing::before {
  content: ""; position: absolute; left: 0; right: 0; height: 24px; background: var(--tembok); -webkit-mask: var(--lambai) 50% 0 / 360px 24px repeat-x; mask: var(--lambai) 50% 0 / 360px 24px repeat-x;
}
.theme-jendela .sec.alt::before, .theme-jendela .closing::before { top: -1px; transform: scaleY(-1); }
.theme-jendela .sec.alt::after { bottom: -1px; }
.theme-jendela #rsvp::after { display: none; }
.theme-jendela .closing::before { background: var(--mentega); }
.theme-jendela .h { color: var(--tua); font-size: 1.75rem; line-height: 1.45; }
.theme-jendela .salam { color: var(--tua); font-size: 1.15rem; line-height: 1.75; }
.theme-jendela .intro { color: var(--muted); }

/* Mempelai: karakter di jendela lengkung dengan ambang membulat */
.theme-jendela .couple { gap: 14px; margin-bottom: 40px; }
.theme-jendela .amp { font: 400 2.8rem var(--tulis); color: var(--daun); }
.theme-jendela .avatar { width: 190px; margin: 0 auto 26px; }
.theme-jendela .avatar::before { display: block; content: ""; position: absolute; inset: auto -16px -8px; height: 12px; border: 0; border-radius: 999px; background: var(--kayu-muda); animation: none; opacity: 1; z-index: 1; }
.theme-jendela .avatar .avatar-frame { width: 100%; height: auto; aspect-ratio: 5 / 6; border: 5px solid var(--kayu-muda); border-radius: var(--lengkung); box-shadow: none; background: var(--pagi), var(--card); }
.theme-jendela .avatar .avatar-frame img { animation: none; }
.theme-jendela .cname { color: var(--tua); font-size: 1.35rem; line-height: 1.6; overflow-wrap: anywhere; }
.theme-jendela .parents { color: var(--muted); }

.theme-jendela .quote { background: var(--card); border: 0; border-radius: 120px 120px var(--r-kartu) var(--r-kartu) / 70px 70px var(--r-kartu) var(--r-kartu); padding: 44px 20px 28px; }
.theme-jendela .quote::before { content: none; }
.theme-jendela .quote .arab { color: var(--tua); }
.theme-jendela .quote .terjemah { font-style: normal; }

/* Hitung mundur: empat jendela lengkung kecil */
.theme-jendela .countdown { gap: 10px; margin-bottom: 34px; max-width: 330px; }
.theme-jendela .countdown div { background: var(--mentega); color: var(--tua); border: 2px solid var(--kayu-muda); border-radius: 999px 999px var(--r) var(--r); padding: 20px 2px 12px; }
.theme-jendela .countdown b { font: 400 1.65rem/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.theme-jendela .countdown span { text-transform: none; letter-spacing: 0; font-size: .74rem; opacity: 1; }
.theme-jendela .countdown.done { color: var(--tua); }

/* Acara: kartu berbentuk jendela lengkung, tanggal di puncaknya */
.theme-jendela .event.ev-split { margin-bottom: 24px; padding: 34px 20px 28px; background: var(--card); border: 2px solid var(--kayu-muda); border-radius: 180px 180px var(--r-kartu) var(--r-kartu); box-shadow: none; }
.theme-jendela .event::before { display: none; }
.theme-jendela .ev-badge { display: flex; flex-direction: column; align-items: center; margin-bottom: 14px; color: var(--tua); }
.theme-jendela .ev-badge b { font: 400 3.2rem/1.15 var(--serif); }
.theme-jendela .ev-badge span { font-size: .82rem; color: var(--muted); }
.theme-jendela .ev-badge::after { content: ""; width: 150px; height: 30px; margin-top: 8px; background: var(--ranting) center / contain no-repeat; }
.theme-jendela .event h3 { color: var(--tua); font-size: 1.4rem; }

/* Adab: butir bertanda daun */
.theme-jendela .notes li { background: var(--card); border: 0; border-radius: var(--r); padding: 14px 16px 14px 44px; }
.theme-jendela .notes li::before { content: ""; left: 16px; top: 20px; width: 15px; height: 15px; border-radius: 0 100% 0 100%; background: #7d8f72; animation: none; }

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

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

/* Penutup */
.theme-jendela .closing { padding: 76px 26px 128px; background: var(--pagi), var(--tembok); }
.theme-jendela .closing .intro, .theme-jendela .closing .salam { color: var(--ink); }
.theme-jendela .closing .salam { font-size: 1rem; }
.theme-jendela .closing .doa { color: var(--tua); }
.theme-jendela .closing .names.small { color: var(--tua); font-size: min(2.8rem, calc((min(100vw, 520px) - 60px) / (var(--huruf, 7) * .48))); line-height: 1.3; }
.theme-jendela .closing .credit { color: var(--muted); }

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

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