/* Undangan ulang tahun ke-4 Ilsya
   Prinsip: satu bintang (angka 4 di sampul), kado yang meledak jadi konfeti,
   lalu tiap bagian muncul saat di-scroll dan hiasannya hidup (lihat "Gerak" di bawah).
   Tiap bagian membawa nuansa satu karakter lewat warna: awan biru, pink bergerigi, ungu tua. */

@font-face { font-family: "Mochiy"; src: url("../fonts/mochiy-pop-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ZenMaru"; src: url("../fonts/zen-maru-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "ZenMaru"; src: url("../fonts/zen-maru-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --lav: #EEE6FA;        /* lavender mist: dasar halaman */
  --lav-deep: #D9CBF2;
  --pink: #F8C8DC;       /* strawberry milk */
  --pink-soft: #FCE4EE;
  --cloud: #D3E8FB;      /* biru langit */
  --plum: #3A2B58;       /* ungu tua: teks & bagian RSVP */
  --plum-soft: #5F4E84;
  --berry: #C23A6C;      /* tombol utama */
  --paper: #FFFCFE;
  --mint: #6FBF8A;

  --f-display: "Mochiy", "Zen Maru Gothic", system-ui, sans-serif;
  --f-body: "ZenMaru", "Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Skala tipe 1.25 */
  --t-sm: .875rem;
  --t-base: 1.0625rem;
  --t-md: 1.3125rem;
  --t-lg: 1.625rem;
  --t-xl: 2.125rem;

  --col: 30rem;
  --pad: clamp(1.25rem, 5vw, 2rem);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--plum);
  background-color: var(--lav);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.7) 0 1.5px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(248,200,220,.8) 0 1.5px, transparent 2px);
  background-size: 46px 46px, 62px 62px;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 6px; }

.h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-lg);
  line-height: 1.2;
  letter-spacing: .01em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .75rem 1.5rem;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--berry { background: var(--berry); color: #fff; box-shadow: 0 4px 0 #8E2550; }
.btn--berry:active { box-shadow: 0 1px 0 #8E2550; transform: translateY(3px); }
.btn--pink { background: var(--pink); color: var(--plum); box-shadow: 0 4px 0 #E59BBB; }
.btn--pink:active { box-shadow: 0 1px 0 #E59BBB; transform: translateY(3px); }
.btn--ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }
.btn--ghost-light { background: transparent; color: var(--pink); box-shadow: inset 0 0 0 2px var(--pink); }
.btn--block { width: 100%; }
@media (hover: hover) {
  .btn--berry:hover { background: #A82E5B; }
  .btn--pink:hover { background: #F5B6D0; }
  .btn--ghost:hover { background: rgba(58,43,88,.07); }
  .btn--ghost-light:hover { background: rgba(248,200,220,.12); }
  .stepper button:hover { background: var(--pink); }
  .choice__opt span:hover { border-color: var(--pink); }
  .music:hover { background: #4B3A6E; }
}
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- 1. Pembuka ---------- */
.opener {
  position: fixed; inset: 0; z-index: 50;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  padding: var(--pad);
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(180deg, var(--cloud) 0%, var(--lav) 55%, var(--pink-soft) 100%);
  transition: transform .9s var(--ease-out) .55s, opacity .5s ease .9s;
}
.js .opener { display: flex; }
.opener.is-open { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.opener__sky .float { position: absolute; fill: #fff; opacity: .9; animation: drift 7s ease-in-out infinite alternate; }
.opener__sky .f1 { width: 26px; top: 12%; left: 14%; fill: var(--pink); }
.opener__sky .f2 { width: 22px; top: 20%; right: 16%; fill: var(--berry); opacity: .5; animation-delay: -2s; }
.opener__sky .f3 { width: 110px; top: 7%; right: -20px; animation-duration: 11s; }
.opener__sky .f4 { width: 18px; top: 38%; left: 5%; fill: #fff; animation-delay: -4s; }

/* Foto sampul dalam bingkai lengkung, berhias pita Kuromi & stroberi */
.portrait { position: relative; }
.portrait__frame {
  height: min(46svh, 21rem); aspect-ratio: 4 / 5;
  border-radius: 999px 999px 1.75rem 1.75rem;
  overflow: hidden;
  border: 6px solid #fff;
  background: var(--pink);
  box-shadow: 0 10px 0 var(--pink), 0 26px 36px -18px rgba(58,43,88,.45);
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__bow { position: absolute; width: 5.5rem; top: -.6rem; left: -1.4rem; --r: -20deg; --sw: 10deg; rotate: var(--r); }
.portrait__berry { position: absolute; width: 3rem; right: -1rem; bottom: 1.4rem; rotate: 14deg; }
.opener.is-open .portrait__frame { scale: 1.06; transition: scale .6s var(--ease-out); }
.gift__burst { position: absolute; inset: 0; pointer-events: none; }
.gift__burst i {
  position: absolute; left: 50%; top: 40%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--c, var(--berry)); opacity: 0;
}
.opener.is-open .gift__burst i { animation: burst .9s var(--ease-out) forwards; }
.opener.is-open .opener__text { opacity: 0; transition: opacity .3s; }

.opener__to { margin: 0; font-size: var(--t-sm); color: var(--plum-soft); }
.opener__name {
  margin: .25rem 0 .5rem;
  font-family: var(--f-display); font-size: var(--t-md); line-height: 1.3;
  max-width: 22ch; margin-inline: auto; overflow-wrap: anywhere;
}
.opener__hint { margin: 0 0 1.5rem; color: var(--plum-soft); }

@keyframes burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
}
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(8px, -10px); } }

/* ---------- Kolom undangan ---------- */
.invite { max-width: var(--col); margin: 0 auto; background: var(--lav); box-shadow: 0 0 0 1px rgba(58,43,88,.05), 0 30px 60px -30px rgba(58,43,88,.35); overflow: hidden; }
.invite > * { padding: 3.5rem var(--pad); }

/* ---------- 2. Sampul ---------- */
.cover {
  position: relative; text-align: center;
  padding-top: 4.5rem; padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--cloud) 0%, #E3EEFC 45%, var(--lav) 100%);
  isolation: isolate;
}
.cover__cloud { position: absolute; fill: #fff; z-index: -1; animation: drift 9s ease-in-out infinite alternate; }
.cover__cloud.c1 { width: 130px; top: 2rem; left: -36px; }
.cover__cloud.c2 { width: 90px; top: 8rem; right: -18px; animation-delay: -3s; opacity: .85; }
.cover__cloud.c3 { width: 160px; bottom: 5.5rem; left: 55%; animation-delay: -6s; opacity: .7; }

.cover__kicker { margin: 0; font-family: var(--f-display); font-size: var(--t-md); color: var(--plum-soft); }

.four { position: relative; width: 15rem; height: 15rem; margin: .5rem auto 1rem; }
.four__num {
  display: block;
  font-family: var(--f-display);
  font-size: 15rem; line-height: 1;
  color: #fff;
  -webkit-text-stroke: 14px var(--lav-deep);
  paint-order: stroke fill;
  text-shadow: 0 10px 0 var(--pink), 0 22px 30px rgba(58,43,88,.18);
}
.four__bow { position: absolute; width: 6.5rem; top: .4rem; left: 1.2rem; --r: -18deg; --sw: 10deg; rotate: var(--r); }
.four__berry { position: absolute; width: 3.6rem; right: .6rem; bottom: 2.2rem; rotate: 12deg; }
.four__tail { position: absolute; width: 5rem; left: 0; bottom: 1.4rem; --r: -8deg; --sw: -12deg; rotate: var(--r); transform-origin: 0 50%; }
.four__star { position: absolute; width: 2rem; right: 1.6rem; top: 1.2rem; fill: #FFD36E; }

.cover__name { font-family: var(--f-display); font-weight: 400; font-size: var(--t-xl); line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; }
.cover__lead { margin: 0 auto; max-width: 30ch; color: var(--plum-soft); }

/* ---------- 3. Hitung mundur ---------- */
.countdown { text-align: center; padding-top: 1rem; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: .625rem; }
.cd__item { background: var(--paper); border-radius: 1.25rem 1.25rem 1.25rem .4rem; padding: .75rem .25rem .6rem; box-shadow: 0 3px 0 var(--lav-deep); }
.cd__num { display: block; font-family: var(--f-display); font-size: var(--t-lg); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd__lbl { font-size: var(--t-sm); color: var(--plum-soft); }
.cd__done { font-family: var(--f-display); font-size: var(--t-md); margin: 0; }

/* ---------- 4. Detail (kartu pink bergerigi) ---------- */
.details { padding-top: 1.5rem; }
.ticket {
  --scallop: 14px;
  position: relative;
  background: var(--pink-soft);
  padding: 2.25rem 1.5rem 1.75rem;
  -webkit-mask:
    radial-gradient(var(--scallop) at 50% 0, #0000 98%, #000) 50% 0 / calc(var(--scallop) * 2.2) 51% repeat-x,
    radial-gradient(var(--scallop) at 50% 100%, #0000 98%, #000) 50% 100% / calc(var(--scallop) * 2.2) 51% repeat-x;
          mask:
    radial-gradient(var(--scallop) at 50% 0, #0000 98%, #000) 50% 0 / calc(var(--scallop) * 2.2) 51% repeat-x,
    radial-gradient(var(--scallop) at 50% 100%, #0000 98%, #000) 50% 100% / calc(var(--scallop) * 2.2) 51% repeat-x;
}
.ticket__berry { position: absolute; width: 2.6rem; right: 1.25rem; top: 1.4rem; rotate: 14deg; }
.facts { margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.facts div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .75rem; align-items: baseline; }
.facts dt { font-size: var(--t-sm); color: var(--plum-soft); }
.facts dd { margin: 0; font-weight: 700; }
.actions { display: grid; gap: .75rem; }

/* ---------- 5. Dress code ---------- */
.dress { text-align: center; }
.dress__row { display: flex; justify-content: center; gap: 2.5rem; margin-bottom: 1rem; }
.dress__item { margin: 0; }
.dress__svg { width: 4.5rem; height: 6rem; margin: 0 auto .4rem; }
.dress__svg--pink { fill: #F49CC0; }
.dress__svg--purple { fill: #9C7BD3; }
.dress__item figcaption { font-weight: 700; }
.dress__note { margin: 0 auto; max-width: 32ch; color: var(--plum-soft); }

/* ---------- 6. Galeri ---------- */
.gallery { text-align: center; }
.gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem .9rem; }
.polaroid { margin: 0; padding: .5rem .5rem 1.6rem; background: var(--paper); box-shadow: 0 6px 16px -8px rgba(58,43,88,.4); }
.polaroid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--lav-deep); }
.polaroid.p0 { transform: rotate(-2.5deg); }
.polaroid.p1 { transform: rotate(2deg) translateY(.6rem); }
.polaroid.p2 { transform: rotate(1.5deg); }
.polaroid.p3 { transform: rotate(-2deg) translateY(.6rem); }

/* ---------- 7. RSVP (ungu tua) ---------- */
.rsvp {
  position: relative;
  background: var(--plum);
  color: #F6EEFF;
  padding-top: 4.5rem;
  overflow: visible;
  background-image:
    radial-gradient(circle at 15% 12%, rgba(248,200,220,.35) 0 1.5px, transparent 2px),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,.25) 0 1.2px, transparent 2px);
  background-size: 54px 54px, 38px 38px;
}
.rsvp__bow { position: absolute; width: 5.5rem; top: -1.6rem; left: 50%; translate: -50% 0; --r: 0deg; --sw: 9deg; transform-origin: 50% 40%; filter: drop-shadow(0 3px 0 rgba(255,255,255,.4)); }
.rsvp .h2 { color: var(--pink); text-align: center; }
.rsvp__lead { text-align: center; margin: 0 auto 1.5rem; max-width: 32ch; color: #D9CCF0; }
.rsvp__lead strong { color: #fff; }
.rsvp__late { background: rgba(248,200,220,.15); border-radius: .75rem; padding: .75rem 1rem; margin: 0 0 1.25rem; text-align: center; }

.form { display: grid; gap: 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: .45rem; padding: 0; }
.opt { font-weight: 500; color: #BFAEDD; }
.field input[type="text"], .field textarea {
  width: 100%; padding: .8rem 1rem;
  border: 2px solid transparent; border-radius: 1rem;
  background: #FFFCFE; color: var(--plum);
  transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input::placeholder, .field textarea::placeholder { color: #9C8DB8; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pink); }
.field [aria-invalid="true"] { border-color: #FF8FB0; }
.field__err { margin: .35rem 0 0; color: #FFB3CB; font-size: var(--t-sm); min-height: 0; }
.field__err:empty { display: none; }
.field__meta { margin: .25rem 0 0; text-align: right; font-size: var(--t-sm); color: #BFAEDD; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.choice__opt { position: relative; margin: 0 !important; }
.choice__opt input { position: absolute; opacity: 0; inset: 0; }
.choice__opt span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3.25rem; padding: .5rem .75rem; border-radius: 1rem;
  border: 2px solid rgba(248,200,220,.45); cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.choice__opt input:checked + span { background: var(--pink); border-color: var(--pink); color: var(--plum); }
.choice__opt input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.counts[hidden] { display: none; }
.stepper { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; background: #FFFCFE; border-radius: 1rem; overflow: hidden; }
.stepper button { height: 3rem; border: 0; background: var(--pink-soft); color: var(--plum); font-size: 1.4rem; font-weight: 700; cursor: pointer; }
.stepper button:active { background: var(--pink); }
.stepper input { width: 100%; height: 3rem; border: 0; text-align: center; font-weight: 700; font-size: 1.15rem; background: transparent; color: var(--plum); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: 2px solid var(--berry); outline-offset: -2px; }

.form__status { margin: 0; text-align: center; color: #FFB3CB; }
.form__status:empty { display: none; }

.thanks { text-align: center; padding: 1rem 0 .5rem; }
.thanks:focus { outline: none; }
.thanks__heart { width: 3.2rem; margin: 0 auto .75rem; fill: var(--pink); animation: pop .6s var(--ease-spring); }
.thanks__title { font-family: var(--f-display); font-size: var(--t-lg); color: var(--pink); margin: 0 0 .25rem; }
.thanks__text { margin: 0 auto 1.25rem; max-width: 30ch; color: #D9CCF0; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 8. Ucapan ---------- */
.wishes { text-align: center; }
.wishes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; max-height: 28rem; overflow-y: auto; text-align: left; overscroll-behavior: contain; }
.wish { background: var(--paper); border-radius: 1.25rem 1.25rem 1.25rem .4rem; padding: .9rem 1.1rem; box-shadow: 0 3px 0 var(--lav-deep); }
.wish:nth-child(3n+2) { border-radius: 1.25rem 1.25rem .4rem 1.25rem; background: var(--pink-soft); box-shadow: 0 3px 0 var(--pink); }
.wish:nth-child(3n) { background: #EAF3FD; box-shadow: 0 3px 0 var(--cloud); }
.wish__msg { margin: 0 0 .35rem; white-space: pre-line; overflow-wrap: anywhere; }
.wish__name { margin: 0; font-size: var(--t-sm); font-weight: 700; color: var(--plum-soft); overflow-wrap: anywhere; }
.wishes__empty { margin: 0; color: var(--plum-soft); }

/* ---------- 9. Penutup ---------- */
.closing { position: relative; text-align: center; background: linear-gradient(180deg, var(--lav) 0%, var(--pink-soft) 100%); padding-bottom: calc(5rem + env(safe-area-inset-bottom)); isolation: isolate; }
.closing__cloud { position: absolute; width: 140px; fill: #fff; opacity: .8; top: 1rem; right: -30px; z-index: -1; }
.closing__big { font-family: var(--f-display); font-size: var(--t-xl); line-height: 1.15; margin: 0 0 .75rem; text-wrap: balance; }
.closing__text { margin: 0 auto 1.5rem; max-width: 30ch; color: var(--plum-soft); }
.closing__from { margin: 0 0 1.5rem; }

/* ---------- Tombol musik ---------- */
.music {
  position: fixed; z-index: 40;
  right: max(1rem, calc(50vw - var(--col) / 2 + 1rem));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 0;
  background: var(--plum); color: var(--pink); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(58,43,88,.6);
}
.music[hidden] { display: none; }
.music svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.music circle { fill: currentColor; }
.music .music__off { display: block; }
.music[aria-pressed="true"] .music__off { display: none; }
.music[aria-pressed="true"] svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-6deg); } }

/* ---------- Layar lebar ---------- */
@media (min-width: 40rem) {
  .invite { margin-block: 2.5rem; border-radius: 2rem; }
}

/* ---------- Gerak ----------
   Semua aturan di sini hanya aktif dengan kelas .motion di <html>, yang dipasang main.js
   kalau pengguna tidak meminta gerak dikurangi. Tanpa JS, semua konten tetap terlihat diam. */

/* Hiasan tambahan (diam tanpa .motion) */
.cover__spark { position: absolute; z-index: -1; fill: #FFD36E; }
.cover__spark.s1 { width: 16px; top: 5.5rem; left: 16%; }
.cover__spark.s2 { width: 11px; top: 14rem; right: 12%; fill: var(--berry); opacity: .6; }
.cover__spark.s3 { width: 13px; bottom: 10rem; left: 8%; fill: #fff; }
.closing__float { position: absolute; z-index: -1; bottom: 4rem; width: 1.3rem; fill: var(--pink); opacity: 0; }
.closing__float.cf1 { left: 10%; --dx: 14px; }
.closing__float.cf2 { right: 14%; width: 1rem; fill: #C9B3EE; --dx: -12px; }
.closing__float.cf3 { left: 46%; width: .9rem; fill: var(--berry); --dx: 8px; }

/* Konfeti (dibuat JS saat kado dibuka & setelah RSVP) */
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -24px; width: 8px; height: 14px; border-radius: 2px;
  animation: fall 3s cubic-bezier(.3, .1, .6, 1) forwards;
}

/* Sampul: masuk berurutan setelah kado dibuka, lalu hiasannya terus hidup */
.motion .cover__kicker, .motion .cover__name, .motion .cover__lead,
.motion .four__num, .motion .four > svg { opacity: 0; }
.motion .is-live .cover__kicker { animation: rise .7s var(--ease-out) .7s both; }
.motion .is-live .four__num    { animation: pop-in .9s var(--ease-spring) .85s both, hover-y 3.6s ease-in-out 2s infinite; }
.motion .is-live .four__bow    { animation: pop-in .6s var(--ease-spring) 1.3s both, sway 2.8s ease-in-out 2s infinite; }
.motion .is-live .four__berry  { animation: pop-in .6s var(--ease-spring) 1.45s both, hover-y 2.4s ease-in-out 2.1s infinite; }
.motion .is-live .four__tail   { animation: pop-in .6s var(--ease-spring) 1.6s both, sway 2.2s ease-in-out 2.2s infinite; }
.motion .is-live .four__star   { animation: pop-in .6s var(--ease-spring) 1.75s both, twinkle 2s ease-in-out 2.4s infinite; }
.motion .is-live .cover__name  { animation: rise .7s var(--ease-out) 1.15s both; }
.motion .is-live .cover__lead  { animation: rise .7s var(--ease-out) 1.35s both; }
.motion .cover__spark { animation: twinkle 2.4s ease-in-out infinite; }
.motion .cover__spark.s2 { animation-delay: -.8s; }
.motion .cover__spark.s3 { animation-delay: -1.6s; }

/* Hiasan yang terus bergerak pelan */
.motion .portrait { animation: hover-y 3.2s ease-in-out infinite; }
.motion .portrait__bow { animation: sway 2.6s ease-in-out infinite; }
.motion .portrait__berry { animation: hover-y 2.2s ease-in-out -.8s infinite; }
.motion .ticket__berry { animation: hover-y 2.6s ease-in-out infinite; }
.motion .rsvp__bow { animation: sway 2.6s ease-in-out infinite; }
.motion .dress__svg { transform-origin: 50% 4%; animation: swing 2.8s ease-in-out infinite; }
.motion .dress__svg--purple { animation-delay: -1.4s; }
.motion .closing__float { animation: float-up 5s ease-out infinite; }
.motion .closing__float.cf2 { animation-delay: -1.7s; }
.motion .closing__float.cf3 { animation-delay: -3.4s; }
.motion .choice__opt input:checked + span { animation: pop-sm .35s var(--ease-spring); }

/* Muncul saat di-scroll: JS memberi .rv lalu .is-in ketika elemen terlihat */
.motion .rv {
  opacity: 0; translate: 0 28px;
  transition: opacity .6s var(--ease-out), translate .8s var(--ease-out), scale .8s var(--ease-spring);
  transition-delay: var(--d, 0s);
}
.motion .rv--pop { scale: .8; }
.motion .rv.is-in { opacity: 1; translate: none; scale: none; }

@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes pop-sm { from { scale: .92; } }
@keyframes hover-y { 50% { translate: 0 -7px; } }
@keyframes sway { 50% { rotate: calc(var(--r, 0deg) + var(--sw, 8deg)); } }
@keyframes swing { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }
@keyframes twinkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.3; rotate: 25deg; } }
@keyframes float-up {
  0% { opacity: 0; translate: 0 0; scale: .6; }
  20% { opacity: .9; }
  100% { opacity: 0; translate: var(--dx, 0) -150px; scale: 1; }
}
@keyframes fall { to { translate: var(--dx, 0) 110vh; rotate: var(--rot, 540deg); } }

/* ---------- Gerak dikurangi ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .opener { transition: opacity .3s ease !important; }
  .opener.is-open { transform: none; }
}
