/* Karangan — ucapan wisuda, lukisan cat air bergerak: halaman gedung kampus saat sore keemasan, jalan setapak
   berjajar papan bunga. Dibuka: papan bunga utama (papan.webp) naik dari bawah dan berdiri, tulisannya muncul
   baris demi baris seperti dirangkai (clip-path), topi toga dilempar ke udara, kelopak berguguran. Isinya: kartu
   ucapan, tangga perjalanan (list `journey`) yang naik ke anak tangga terakhir "hari ini", album, balasan.
   Tanpa JS adegan tidak dipakai dan semua isi langsung terbaca. */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 700; src: url("fonts/playfair-display.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 700; src: url("fonts/playfair-display-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Parisienne"; src: url("fonts/parisienne.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mulish"; font-weight: 300 700; src: url("fonts/mulish.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #f6efe2; --card: #fffdf7; --ink: #23263a; --soft: #646678; --navy: #1f2f5c; --navy2: #15204a; --merah: #c2364a; --gold: #c99a3e;
  --pink: #e98aa2; --line: #e8dcc6;
  --display: "Playfair Display", Georgia, serif; --sans: "Mulish", system-ui, sans-serif; --script: "Parisienne", 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(--navy); }
:focus-visible { outline: 2px solid var(--gold); 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; latar kampus + topi toga + kelopak. ---------- */
.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: #f1e3c8; 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; transform-origin: 50% 40%; }
.sinar { position: absolute; left: 0; top: 0; width: 100%; height: 60%; background: radial-gradient(70% 60% at 80% 0, rgba(255, 230, 170, .55), transparent 70%); mix-blend-mode: screen; }
.lempar img { position: absolute; top: 100%; width: 13%; height: auto; max-width: none; opacity: 0; }
.lempar img:nth-child(1) { left: 8%; } .lempar img:nth-child(2) { left: 22%; --x: 30%; } .lempar img:nth-child(3) { left: 38%; --x: -40%; } .lempar img:nth-child(4) { left: 52%; --x: 20%; }
.lempar img:nth-child(5) { left: 66%; --x: -30%; } .lempar img:nth-child(6) { left: 80%; --x: -50%; } .lempar img:nth-child(7) { left: 45%; --x: 60%; width: 10%; }
.kelopak i { position: absolute; top: -3%; width: 1.6%; height: 1%; border-radius: 50% 0; background: var(--c, var(--pink)); opacity: 0; }
.kelopak i:nth-child(1) { left: 6%; } .kelopak i:nth-child(2) { left: 16%; --c: #f6d36b; } .kelopak i:nth-child(3) { left: 27%; } .kelopak i:nth-child(4) { left: 38%; --c: #fff; }
.kelopak i:nth-child(5) { left: 49%; } .kelopak i:nth-child(6) { left: 59%; --c: #f6d36b; } .kelopak i:nth-child(7) { left: 68%; } .kelopak i:nth-child(8) { left: 77%; --c: #fff; }
.kelopak i:nth-child(9) { left: 86%; } .kelopak i:nth-child(10) { left: 94%; --c: #f6d36b; }
.js .latar { transition: transform 3s cubic-bezier(.4, 0, .2, 1); }
.js:not(.is-open) .latar { transform: scale(1.12); }
.no-anim .latar { transition: none; }

/* ---------- Layar pertama: papan bunga ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 40px 24px 7vh; text-align: center; background: linear-gradient(180deg, #f1e3c8, var(--bg)); }
.js .hero { background: none; }
.kicker { font: 700 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--merah); }
.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: 8vh; cursor: pointer; background: linear-gradient(180deg, transparent 55%, rgba(20, 25, 50, .45)); }
.ketuk .kicker { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.ketuk .hint { padding: 12px 24px; border-radius: 999px; background: var(--navy); color: #fff; font: 700 14px/1 var(--sans); box-shadow: 0 10px 24px rgba(20, 25, 60, .35); }
.memuat .ketuk { pointer-events: none; } .memuat .ketuk .hint { opacity: .55; }
.papan { position: relative; width: min(94%, 390px); }
.papan-img { width: 100%; height: auto; }
/* Bidang putih papan: x 13–87%, y 14–76% gambar; rangkaian atas menjuntai sampai ±30%. */
.tulisan { position: absolute; left: 16%; right: 16%; top: 29%; bottom: 26%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.t-salam { font: 400 clamp(20px, 6.6vw, 28px)/1.1 var(--script); color: var(--merah); }
.tulisan h1 { font: 700 clamp(26px, 9vw, 40px)/1.05 var(--display); color: var(--navy); overflow-wrap: anywhere; text-transform: uppercase; letter-spacing: .02em; }
.t-gelar { font: italic 600 clamp(13px, 3.8vw, 16px)/1.25 var(--display); color: var(--merah); }
.t-kampus { font: 700 10px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.t-dari { margin-top: 6px; font: 700 12px/1.2 var(--sans); color: var(--navy); }
.mouse { position: absolute; left: 50%; bottom: 2vh; 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 ---------- */
.content { position: relative; z-index: 1; background-color: var(--bg); background-image: linear-gradient(90deg, rgba(31, 47, 92, .04) 1px, transparent 1px), linear-gradient(rgba(31, 47, 92, .04) 1px, transparent 1px); background-size: 26px 26px; }
.content > section { padding: 56px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.lbl { font: 700 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--merah); }
.content h2 { font: 600 28px/1.2 var(--display); color: var(--navy); }
.content h2 em { font: 400 34px/1 var(--script); color: var(--merah); font-style: normal; }
.hint { font-size: 14px; color: var(--soft); }
.orn { pointer-events: none; }
.rangkai { width: 94%; margin-bottom: -30px; position: relative; z-index: 1; }
.kartu { position: relative; width: 100%; padding: 40px 24px 26px; background: var(--card); border-radius: 4px; text-align: left; box-shadow: 0 16px 34px rgba(30, 30, 60, .12); border-left: 6px solid var(--navy); }
.kartu::after { content: ""; position: absolute; right: 18px; top: -8px; width: 28px; height: 46px; background: linear-gradient(var(--merah), var(--merah)) top / 100% 70% no-repeat; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.msg { font: italic 500 19px/1.6 var(--display); white-space: pre-line; color: var(--ink); }
.sign { margin-top: 10px; font: 400 30px/1.2 var(--script); color: var(--merah); text-align: right; }

/* Tangga perjalanan: anak tangga makin ke kanan dan naik, puncaknya "hari ini". */
.anak-tangga { width: 100%; list-style: none; padding: 0; display: flex; flex-direction: column-reverse; gap: 8px; }
.anak-tangga li { --i: 0; position: relative; display: flex; align-items: center; gap: 10px; width: 64%; margin-left: calc(var(--i) * 7.2%); padding: 12px 14px; background: var(--card); text-align: left; border-bottom: 4px solid var(--navy); box-shadow: 0 8px 18px rgba(30, 30, 60, .08); }
.anak-tangga li:nth-child(2) { --i: 1; } .anak-tangga li:nth-child(3) { --i: 2; } .anak-tangga li:nth-child(4) { --i: 3; } .anak-tangga li:nth-child(5) { --i: 4; } .anak-tangga li:nth-child(6) { --i: 5; } .anak-tangga li:nth-child(7) { --i: 5; }
.kapan { flex: none; min-width: 46px; font: 700 13px/1 var(--sans); color: var(--merah); }
.momen { font: 500 15px/1.4 var(--display); }
.anak-tangga .puncak { background: var(--navy); color: #fff; border-bottom-color: var(--gold); }
.puncak svg { flex: none; width: 28px; height: 28px; color: #fff; }
.puncak .momen { font-weight: 700; }

/* Album: foto berbingkai navy dengan sudut emas. */
.grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid figure { position: relative; padding: 6px; background: var(--navy); }
.grid figure::before, .grid figure::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold); }
.grid figure::before { left: 3px; top: 3px; border-right: 0; border-bottom: 0; } .grid figure::after { right: 3px; bottom: 3px; border-left: 0; border-top: 0; }
.grid figure:nth-child(3n+1) { grid-column: 1 / -1; }
.grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grid figure:not(:nth-child(3n+1)) img { aspect-ratio: 1; }

.card { margin: 0 16px; border-radius: 18px; background: var(--card); box-shadow: 0 16px 34px rgba(30, 30, 60, .1); border-top: 6px solid var(--navy); }
.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(--navy); color: #fff; cursor: pointer; font: 700 14px/1.2 var(--sans); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.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; }
.toga-ikon { width: 54px; height: 54px; color: var(--navy); }
.penutup p:not(.sign) { font: italic 500 22px/1.4 var(--display); color: var(--navy); }
.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(--navy); color: #fff; cursor: pointer; box-shadow: 0 8px 20px rgba(20, 25, 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; }
  /* Papan naik & berdiri, lalu tulisan dirangkai baris demi baris. */
  .js .papan { transition: translate 1.3s cubic-bezier(.3, 1.25, .4, 1) .3s, rotate 1.3s cubic-bezier(.3, 1.25, .4, 1) .3s; transform-origin: 50% 100%; }
  .js:not(.is-open) .papan { translate: 0 80vh; rotate: -4deg; }
  .js .tulisan > * { transition: clip-path .9s cubic-bezier(.5, 0, .2, 1); clip-path: inset(0 0 0 0); }
  .js:not(.is-open) .tulisan > * { clip-path: inset(0 100% 0 0); }
  .js .tulisan > :nth-child(1) { transition-delay: 1.5s; } .js .tulisan > :nth-child(2) { transition-delay: 1.9s; } .js .tulisan > :nth-child(3) { transition-delay: 2.4s; }
  .js .tulisan > :nth-child(4) { transition-delay: 2.7s; } .js .tulisan > :nth-child(5) { transition-delay: 3s; }
  .no-anim .papan, .no-anim .tulisan > * { transition: none !important; }
  .js.is-open .papan { animation: goyang 5s ease-in-out 3.6s infinite alternate; }
  .js.is-open .lempar img { animation: lempar 7s cubic-bezier(.25, .6, .4, 1) infinite; }
  .js.is-open .lempar img:nth-child(1) { animation-delay: 2.4s; } .js.is-open .lempar img:nth-child(2) { animation-delay: 2.6s; } .js.is-open .lempar img:nth-child(3) { animation-delay: 2.5s; }
  .js.is-open .lempar img:nth-child(4) { animation-delay: 2.8s; } .js.is-open .lempar img:nth-child(5) { animation-delay: 2.45s; } .js.is-open .lempar img:nth-child(6) { animation-delay: 2.7s; } .js.is-open .lempar img:nth-child(7) { animation-delay: 2.9s; }
  .js.is-open .kelopak i { animation: gugur 8s linear infinite; }
  .kelopak i:nth-child(2n) { animation-delay: 3.2s !important; animation-duration: 9s !important; } .kelopak i:nth-child(3n) { animation-delay: 4.4s !important; animation-duration: 7s !important; }
  .kelopak i:nth-child(1), .kelopak i:nth-child(5), .kelopak i:nth-child(7) { animation-delay: 2.8s; }
  .js.is-open .sinar { animation: denyut 6s ease-in-out infinite alternate; }
  .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 .tangga.in .anak-tangga li { animation: naikTangga .7s cubic-bezier(.3, 1.3, .4, 1) both; animation-delay: calc(var(--i) * .15s + .1s); }
  .anim .tangga.in .anak-tangga .puncak { animation-delay: 1.1s; }
  .anim .galeri.in .grid figure { animation: muncul .8s cubic-bezier(.3, 1.2, .4, 1) both; }
  .grid figure:nth-child(2) { animation-delay: .12s !important; } .grid figure:nth-child(3) { animation-delay: .24s !important; } .grid figure:nth-child(n+4) { animation-delay: .36s !important; }
}
@keyframes denyut { from { opacity: .75; scale: .97; } to { opacity: 1; scale: 1.03; } }
@keyframes goyang { from { rotate: -.6deg; } to { rotate: .6deg; } }
@keyframes lempar { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 5% { opacity: 1; } 32% { transform: translate(var(--x, 0), -620%) rotate(380deg); } 60% { opacity: 1; transform: translate(calc(var(--x, 0) * 1.4), 40%) rotate(720deg); } 61%, 100% { opacity: 0; transform: translate(0, 40%); } }
@keyframes gugur { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 8% { opacity: .9; } 100% { opacity: 0; transform: translate(40px, 10500%) rotate(540deg); } }
@keyframes naikTangga { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes muncul { from { opacity: 0; transform: scale(.85); } 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 .papan, .js .tulisan > *, .js .latar { transition: none !important; } }

/* 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; }
