/* Rantang — ucapan terima kasih, lukisan cat air bergerak: meja jati beralas batik sogan di dekat jendela pagi,
   rantang enamel bermotif mawar di tengah (tiga susun + tutup dari satu gambar susun & satu gambar tutup, gagang
   SVG). Dibuka: gagang terangkat, tutup dibuka ke samping, susun atas & tengah turun ke kiri-kanan meja, harum &
   kelopak melati naik. Isinya per susun: surat, daftar "terima kasih untuk…" (list `reasons`), foto di piring enamel,
   lalu balasan ("kembalikan rantangnya"). Tanpa JS adegan tidak dipakai dan semua isi langsung terbaca. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f6efe3; --card: #fffcf5; --ink: #33261b; --soft: #6e5c4b; --teak: #7b4a26; --teak2: #5a3418; --enamel: #2f4f8a; --mawar: #c2412f;
  --sage: #6f8a5c; --gold: #d5a24a; --line: #e7d9c2;
  --display: "Fraunces", Georgia, serif; --sans: "Plus Jakarta Sans", system-ui, sans-serif; --hand: "Caveat", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; color: var(--ink); font: 500 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; background: var(--bg); }
img { max-width: 100%; display: block; }
h1, h2, p, figure, ol { margin: 0; }
a { color: var(--teak); }
:focus-visible { outline: 2px solid var(--mawar); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
main { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }

/* ---------- Adegan: .stage berbanding 1536:2752 dan selalu menutup layar; posisi dalam persen.
   Rantang (.rantang) berdiri di tengah meja: kotak 34% × 40% stage, susun 26,7% tinggi kotak, bertumpuk 70%.
   Keadaan dasar = sesudah dibuka; sebelum dibuka (.js:not(.is-open)) rantang utuh tertutup. ---------- */
.scene { position: fixed; top: 0; left: 50%; width: min(100%, 480px); height: 100%; transform: translateX(-50%); z-index: 0; pointer-events: none; overflow: hidden; contain: strict; background: #e9dcc5; display: none; }
.js .scene { display: block; }
.scene-off .scene { visibility: hidden; }
.stage { position: absolute; left: 50%; top: 50%; height: max(100%, calc(min(100vw, 480px) * 1.7917)); aspect-ratio: 1536 / 2752; translate: -50% -50%; }
.latar { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.sinar { position: absolute; left: 10%; top: 8%; width: 80%; height: 70%; background: linear-gradient(170deg, rgba(255, 240, 200, .45), rgba(255, 236, 190, .1) 60%, transparent); clip-path: polygon(20% 0, 70% 0, 100% 100%, 15% 100%); mix-blend-mode: screen; }
.rantang { position: absolute; left: 33%; top: 36%; width: 34%; height: 40%; }
.s, .tutup { position: absolute; left: 0; width: 100%; height: auto; max-width: none; transform-origin: 50% 100%; }
.s1 { top: 73.3%; } .s2 { top: 54.6%; } .s3 { top: 35.9%; }
.tutup { left: 4%; width: 92%; top: 21%; transform-origin: 50% 50%; }
.pegangan { position: absolute; left: 0; top: 4%; width: 100%; height: 88%; overflow: visible; }
.pegangan path { fill: none; stroke: #c9ccd1; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tag { position: absolute; left: 74%; top: 6%; padding: .3em .7em .35em; background: #fffaf0; border-radius: 3px; rotate: 8deg; transform-origin: 0 0; font: 700 min(3.6vmin, 18px)/1 var(--hand); color: var(--teak2); white-space: nowrap; box-shadow: 0 2px 4px rgba(60, 30, 10, .2); }
.tag:empty { display: none; }
.harum i { position: absolute; bottom: 36%; width: 3%; height: 9%; border-radius: 50%; border-left: 2px solid rgba(255, 255, 255, .75); opacity: 0; }
.harum i:nth-child(1) { left: 22%; } .harum i:nth-child(2) { left: 50%; } .harum i:nth-child(3) { left: 77%; }
.kelopak svg { position: absolute; top: 62%; width: 2.6%; aspect-ratio: 1; color: #fffdf6; opacity: 0; }
.kelopak svg:nth-child(1) { left: 20%; } .kelopak svg:nth-child(2) { left: 32%; } .kelopak svg:nth-child(3) { left: 46%; }
.kelopak svg:nth-child(4) { left: 56%; } .kelopak svg:nth-child(5) { left: 70%; } .kelopak svg:nth-child(6) { left: 82%; }

/* Keadaan sesudah dibuka: gagang terangkat, tutup terbang ke kanan atas, susun 3 & 2 turun ke kiri & kanan meja. */
.pegangan { transform: translateY(-40%); opacity: 0; }
.tutup { transform: translate(64%, -150%) rotate(24deg) scale(.9); opacity: 0; }
.s3 { transform: translate(-80%, 140%) scale(.8); }
.s2 { transform: translate(80%, 70%) scale(.8); }
.tag { opacity: 0; }
.js .pegangan { transition: transform .9s cubic-bezier(.5, 0, .3, 1) .2s, opacity .5s ease .6s; }
.js .tutup { transition: transform 1.3s cubic-bezier(.5, 0, .3, 1) .6s, opacity .5s ease 1.4s; }
.js .s3 { transition: transform 1.3s cubic-bezier(.45, 0, .25, 1) 1.4s; }
.js .s2 { transition: transform 1.3s cubic-bezier(.45, 0, .25, 1) 1.8s; }
.js .tag { transition: opacity .4s ease .2s; }
.js:not(.is-open) .pegangan, .js:not(.is-open) .tutup, .js:not(.is-open) .s3, .js:not(.is-open) .s2 { transform: none; opacity: 1; }
.js:not(.is-open) .tag { opacity: 1; }
.no-anim .pegangan, .no-anim .tutup, .no-anim .s, .no-anim .tag { transition: none !important; }

/* ---------- Layar pertama ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 9vh 24px 40px; text-align: center; background: linear-gradient(180deg, #efe2cb, var(--bg)); }
.js .hero { background: none; }
.kicker { font: 700 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--mawar); }
.ketuk { display: none; }
.js:not(.is-open) .ketuk { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 10px; max-width: 480px; margin: 0 auto; padding-bottom: 7vh; cursor: pointer; background: linear-gradient(180deg, transparent 62%, rgba(50, 30, 15, .4)); }
.ketuk .kicker { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.ketuk .hint { padding: 12px 24px; border-radius: 999px; background: var(--enamel); color: #fff; font: 700 14px/1 var(--sans); box-shadow: 0 10px 24px rgba(20, 30, 60, .3); }
.memuat .ketuk { pointer-events: none; } .memuat .ketuk .hint { opacity: .55; }
.label { position: relative; width: min(100%, 320px); padding: 22px 22px 24px; background: var(--card); border-radius: 6px; box-shadow: 0 16px 34px rgba(60, 35, 15, .22); border-top: 6px solid var(--enamel); }
.label::before { content: ""; position: absolute; left: 50%; top: -22px; width: 12px; height: 12px; translate: -50% 0; border-radius: 50%; border: 3px solid var(--enamel); background: var(--bg); }
.label h1 { margin-top: 6px; font: 500 32px/1.12 var(--display); color: var(--teak2); }
.label h1 em { font: 700 44px/1 var(--hand); color: var(--mawar); font-style: normal; }
.dari { margin-top: 6px; font: 600 20px/1.2 var(--hand); color: var(--soft); }
.mouse { position: absolute; left: 50%; bottom: 3vh; width: 20px; height: 32px; margin-left: -10px; border: 2px solid var(--card); border-radius: 12px; opacity: .9; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--card); }
html:not(.js) .mouse { display: none; }

/* ---------- Isi: tiap bagian = satu susun rantang ---------- */
.content { position: relative; z-index: 1; background-color: var(--bg); background-image: radial-gradient(circle at 25% 25%, rgba(123, 74, 38, .07) 0 3px, transparent 3.5px), radial-gradient(circle at 75% 75%, rgba(47, 79, 138, .06) 0 3px, transparent 3.5px); background-size: 34px 34px; }
.content > section { padding: 56px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.nomor { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--enamel); font: 600 22px/1 var(--display); color: var(--enamel); }
.nomor span { font: 700 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--mawar); }
.nomor::before { content: ""; width: 44px; height: 25px; background: url("img/susun.webp") center / contain no-repeat; }
.content h2 { font: 500 28px/1.2 var(--display); color: var(--teak2); }
.content h2 em { font: 700 34px/1 var(--hand); color: var(--mawar); font-style: normal; }
.hint { font-size: 14px; color: var(--soft); }
.orn { pointer-events: none; }
.rangkai { width: 94%; margin-bottom: -26px; position: relative; z-index: 1; }
.kertas { width: 100%; padding: 34px 22px 22px; text-align: left; background: var(--card); border: 10px solid transparent; border-radius: 4px; box-shadow: 0 16px 34px rgba(60, 35, 15, .12);
  border-image: repeating-linear-gradient(45deg, var(--teak) 0 6px, #e9d5b3 6px 9px, var(--teak2) 9px 14px, #e9d5b3 14px 17px) 10; }
.msg { font: 500 24px/1.4 var(--hand); white-space: pre-line; }
.sign { font: 700 26px/1.2 var(--hand); color: var(--mawar); text-align: right; }

/* Susun 2: lauk-pauk kebaikan, kartu enamel berbingkai biru. */
.lauk { width: 100%; list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: lauk; }
.lauk li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 2px var(--enamel), 0 8px 18px rgba(40, 50, 90, .08); text-align: left; font: 500 16px/1.45 var(--display); }
.lauk li:nth-child(even) { box-shadow: inset 0 0 0 2px var(--mawar), 0 8px 18px rgba(120, 40, 30, .08); }
.lauk svg { flex: none; width: 26px; height: 26px; color: #ecd39b; }
.lauk li:nth-child(even) svg { color: #f2b8a6; }

/* Susun 3: foto di piring enamel. */
.piring { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.piring figure { border-radius: 50%; padding: 7px; background: #fffdf8; box-shadow: 0 0 0 4px var(--enamel), 0 12px 24px rgba(40, 40, 70, .2); }
.piring figure:nth-child(4n+2), .piring figure:nth-child(4n+3) { translate: 0 14px; }
.piring img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }

.card { margin: 0 16px; border-radius: 20px; background: var(--card); box-shadow: 0 16px 34px rgba(60, 35, 15, .1); border-top: 6px solid var(--enamel); }
.reply form { width: 100%; display: grid; gap: 10px; }
.quick { display: grid; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--enamel); color: #fff; cursor: pointer; font: 700 14px/1.2 var(--sans); }
.btn.ghost { background: transparent; color: var(--enamel); border: 1.5px solid var(--enamel); }
.reply textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; font: 500 16px/1.4 var(--sans); color: var(--ink); background: #fff; }

.penutup { padding-bottom: 90px !important; }
.tutup-kecil { width: 46%; }
.penutup p:not(.sign) { font: italic 400 22px/1.4 var(--display); color: var(--teak2); }
.penutup .sign { text-align: center; }
.foot { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 0 16px 90px; text-align: center; font-size: 12px; color: var(--soft); background: var(--bg); }

.music-toggle { position: fixed; right: max(14px, calc(50% - 226px)); bottom: 16px; z-index: 50; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--enamel); color: #fff; cursor: pointer; box-shadow: 0 8px 20px rgba(20, 30, 60, .3); }
.music-toggle svg { width: 20px; height: 20px; }
.js:not(.is-open) .music-toggle { display: none; }
.js:not(.is-open) body { overflow: hidden; }

/* ---------- Gerak ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.is-open) .ketuk .hint { animation: denyut 1.6s ease-in-out infinite alternate; }
  .js:not(.is-open) .rantang { animation: goyang 3s ease-in-out infinite; transform-origin: 50% 100%; }
  .js.is-open .harum i { animation: harum 3.4s ease-out 2.4s infinite; } .harum i:nth-child(2) { animation-delay: 3.1s !important; } .harum i:nth-child(3) { animation-delay: 3.8s !important; }
  .js.is-open .kelopak svg { animation: kelopak 7s ease-in-out 2.6s infinite; }
  .kelopak svg:nth-child(2) { animation-delay: 3.4s !important; animation-duration: 8s !important; } .kelopak svg:nth-child(3) { animation-delay: 4.2s !important; }
  .kelopak svg:nth-child(4) { animation-delay: 3s !important; animation-duration: 9s !important; } .kelopak svg:nth-child(5) { animation-delay: 4.8s !important; } .kelopak svg:nth-child(6) { animation-delay: 5.6s !important; animation-duration: 8s !important; }
  .js.is-open .sinar { animation: denyut 6s ease-in-out infinite alternate; }
  .js .label { transition: translate 1.2s cubic-bezier(.3, 1.3, .4, 1) 2.6s, opacity .8s ease 2.6s, rotate 1.2s cubic-bezier(.3, 1.3, .4, 1) 2.6s; transform-origin: 50% 0; }
  .js:not(.is-open) .label { translate: 0 -60px; rotate: -8deg; opacity: 0; }
  .js.is-open .label { animation: ayun 4s ease-in-out 3.8s infinite alternate; }
  .no-anim .label { transition: none; }
  .mouse::after { animation: gulir 1.6s ease-in-out infinite; }
  .anim .reveal { transition: opacity .9s cubic-bezier(.2, .7, .2, 1), translate .9s cubic-bezier(.2, .7, .2, 1); }
  .anim .reveal:not(.in) { opacity: 0; translate: 0 30px; }
  .anim .reveal:not(.in) .nomor::before { translate: 0 -20px; opacity: 0; }
  .nomor::before { transition: translate .8s cubic-bezier(.3, 1.4, .4, 1) .4s, opacity .5s ease .4s; }
  .anim .alasan.in .lauk li { animation: sajikan .7s cubic-bezier(.3, 1.3, .4, 1) both; }
  .lauk li:nth-child(2) { animation-delay: .12s !important; } .lauk li:nth-child(3) { animation-delay: .24s !important; } .lauk li:nth-child(4) { animation-delay: .36s !important; } .lauk li:nth-child(n+5) { animation-delay: .48s !important; }
  .anim .foto.in .piring figure { animation: piring 1s cubic-bezier(.3, 1.2, .4, 1) both; }
  .piring figure:nth-child(2) { animation-delay: .15s !important; } .piring figure:nth-child(3) { animation-delay: .3s !important; } .piring figure:nth-child(4) { animation-delay: .45s !important; }
}
@keyframes denyut { from { opacity: .75; scale: .97; } to { opacity: 1; scale: 1.03; } }
@keyframes goyang { 0%, 82%, 100% { rotate: 0deg; } 86% { rotate: -1.5deg; } 90% { rotate: 1.5deg; } 94% { rotate: -.8deg; } }
@keyframes harum { 0% { opacity: 0; transform: translateY(0) scaleY(.6); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateY(-160%) scaleY(1.3) skewX(16deg); } }
@keyframes kelopak { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: .95; } 100% { opacity: 0; transform: translate(30px, -900%) rotate(260deg); } }
@keyframes ayun { from { rotate: -1.2deg; } to { rotate: 1.2deg; } }
@keyframes sajikan { from { opacity: 0; transform: translateY(-24px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes piring { from { opacity: 0; transform: rotate(-120deg) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes gulir { 0% { translate: 0 0; opacity: 1; } 70% { translate: 0 10px; opacity: 0; } 100% { translate: 0 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; } .js .pegangan, .js .tutup, .js .s, .js .tag { transition: none; } }

/* Video opsional (field "video"). */
.vk { width: min(100%, 440px); margin: 34px auto; padding: 0 20px; text-align: center; flex-direction: column; align-items: center; justify-content: center; }
.vk-judul { margin: 0 0 12px; font-weight: 700; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.vk-layar { position: relative; width: 100%; margin: 0; padding: 10px; border-radius: 20px; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); box-shadow: 0 16px 34px rgba(0, 0, 0, .16); }
.vk-layar video { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.vk-layar figcaption { margin-top: 10px; font-size: 14px; font-style: italic; opacity: .75; }
