/* CRAFID — template Terracotta Rose (kit terracotta-rose / terracotta-rose-foto), dari PSD "Wedding invitation with photo frame".
   Kartu cetak: kertas krem, sapuan kertas sobek, mawar terakota gaya ukiran, bingkai oval emas.
   Satu tampilan terang yang disengaja (kartu undangan), jadi semua warna ditetapkan eksplisit. */
:root {
  color-scheme: light;
  --paper: #f4eee8; --paper-2: #faf6f1; --ink: #6c5f59; --mauve: #8e7e78; --rose: #a7654d; --rose-deep: #864c39;
  --blush: #e9d3c6; --gold: #a08050; --gold-2: #957039; --line: #a080503d;
  --f-serif: 'Libre Baskerville', Baskerville, 'Baskerville Old Face', Georgia, serif;
  --f-script: 'Pinyon Script', 'Great Vibes', 'Snell Roundhand', cursive;
  --f-ar: 'Amiri', 'Traditional Arabic', serif;
  --ease-soft: cubic-bezier(.22, .8, .24, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.75 var(--f-serif); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
.caps { font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
.caps.sm { font-size: 0.64rem; letter-spacing: 0.28em; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.paper { position: relative; background: var(--paper) url("../images/crafid-terracotta/paper.webp") center / cover; }
.fit { display: block; white-space: nowrap; }

/* ---------- bunga bergoyang: tiap tangkai beda amplitudo (--a), tempo (--d), jeda (--dl) ---------- */
.sway { transform-origin: var(--ox, 50%) var(--oy, 100%); animation: sway var(--d, 5.6s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(calc(var(--a, 3deg) * -1)); } to { transform: rotate(var(--a, 3deg)); } }
@keyframes flutter { 0%, 100% { transform: translateY(0) rotate(-4deg) scaleX(1); } 50% { transform: translateY(-6%) rotate(3deg) scaleX(.86); } }

/* =================== 1 · SAMPUL: Save the Date (oval emas) =================== */
.gate { position: fixed; inset: 0; z-index: 50; overflow: hidden; background-color: var(--paper); }
.gate::before { content: ''; position: absolute; inset: 0; background: url("../images/crafid-terracotta/wash.webp") left top / cover no-repeat; opacity: .95; pointer-events: none; }
.gate.gone { opacity: 0; pointer-events: none; transition: opacity .9s ease .35s; }
/* ruang untuk kartu tamu di bawah; grup oval dipaskan ke sisa tinggi tanpa terpotong */
.gate { --foot: 132px; --fb: max(7svh, 28px); --avail: calc(100svh - var(--foot) - var(--fb) - max(4svh, 18px) - 18px); --G: min(100vw, 560px, calc(var(--avail) * 0.9288)); }
.ovg { position: absolute; left: 50%; top: calc(max(4svh, 18px) + max(0px, (var(--avail) - var(--G) * 1.0767) * .5)); width: var(--G); aspect-ratio: 1799 / 1937; translate: -50% 0; pointer-events: none; }
.ovg > img { position: absolute; height: auto; max-width: none; user-select: none; }
.ovg .fa { left: 0; top: 0; width: 62.646%; }
.ovg .fb { left: 30.239%; top: 40.785%; width: 69.761%; }
.ovg .fc { left: 42.69%; top: 32.008%; width: 54.53%; }
.ovg .bf { left: 7.671%; top: 29.788%; width: 11.784%; animation: flutter 3.4s ease-in-out infinite; }
.ovg .ov { left: 29.739%; top: 10.222%; width: 53.808%; }
.oval-txt { position: absolute; left: 29.739%; top: 10.222%; width: 53.808%; aspect-ratio: 968 / 1536; container-type: inline-size; color: var(--gold-2); }
.oval-txt svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.oval-txt svg text { fill: var(--gold-2); font-family: var(--f-serif); font-weight: 700; text-transform: uppercase; }
.oval-txt .arc-k { font-size: 46px; letter-spacing: 14px; }
.oval-txt .arc-s { font-size: 38px; letter-spacing: 6px; font-weight: 400; font-style: italic; text-transform: none; }
.oval-txt .arc-d { font-size: 44px; letter-spacing: 12px; }
.oval-txt .nm { position: absolute; left: 10%; right: 10%; top: 35%; display: grid; text-align: center; color: var(--gold-2); }
.oval-txt .nm .p1, .oval-txt .nm .p2 { font: 400 15cqw/1.05 var(--f-script); }
.oval-txt .nm .p1 { padding-right: 8cqw; }
.oval-txt .nm .p2 { padding-left: 10cqw; }
.oval-txt .nm .j { font: italic 400 5.4cqw/1 var(--f-serif); margin: -1cqw 0 -2cqw; padding-right: 22cqw; }
.gate-foot { position: absolute; z-index: 6; left: 0; right: 0; margin-inline: auto; bottom: calc(var(--fb) + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 40px), 248px);
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 12px 14px 13px; border-radius: 20px;
  background: #fbf7f2c4; border: 1px solid #ffffffc0; box-shadow: 0 18px 40px -26px #864c39; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.to { display: grid; gap: 1px; }
.to .pre { font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mauve); }
.to b { font-weight: 700; font-size: 1.05rem; line-height: 1.35; color: var(--rose-deep); overflow-wrap: anywhere; }
.open { appearance: none; border: 1px solid var(--rose); background: var(--rose); color: #fffaf6; border-radius: 999px; padding: 12px 18px; white-space: nowrap; cursor: pointer; display: inline-flex; gap: 9px; align-items: center;
  font: 700 0.66rem/1 var(--f-serif); letter-spacing: 0.2em; text-transform: uppercase; box-shadow: 0 14px 30px -18px #864c39; position: relative; overflow: hidden; }
.open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.open:hover { background: var(--rose-deep); }

/* =================== 3 · HERO: The Wedding of + jendela foto sobek =================== */
/* Panggung selebar kartu PSD (2480 × 3507). Sisa tinggi layar (--sy) dibagi ke antar-blok,
   jadi bunga menempel ke tepi atas/bawah layar dan teks tetap di tengah. */
.hero { position: relative; min-height: 100svh; overflow: hidden; --W: min(100vw, calc(100svh * 0.70716)); --H: calc(var(--W) * 1.41411); --sy: max(0px, 100svh - var(--H)); }
.hstage { position: absolute; left: 50%; top: 0; height: 100%; min-height: 100svh; width: var(--W); translate: -50% 0; container-type: inline-size; }
.hstage > * { position: absolute; }
.h-ghost { left: -48.31cqw; bottom: 0; width: 89.76cqw; opacity: 1; pointer-events: none; }
.h-roses { left: 50.24cqw; top: 0; width: 67.74cqw; z-index: 3; pointer-events: none; }
.h-win { left: -10.28cqw; top: calc(var(--H) * .0955); width: 120.56cqw; aspect-ratio: 2990 / 2538; z-index: 1;
  -webkit-mask: url("../images/crafid-terracotta/h-mask.webp") center / 100% 100% no-repeat; mask: url("../images/crafid-terracotta/h-mask.webp") center / 100% 100% no-repeat; }
.h-win > img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 40%); }
.h-win > img.ph[src*="default-hero"] { object-position: 50% 50%; }
.h-torn { left: -5.97cqw; top: calc(var(--H) * .5706); width: 42.66cqw; z-index: 2; pointer-events: none; }
.h-kick { left: 6.6cqw; top: calc(var(--H) * .046); z-index: 4; font: 400 9.4cqw/1 var(--f-script); color: #7f6f69; max-width: 46cqw; }
.h-names { left: 2.6cqw; top: calc(var(--H) * .6455 + var(--sy) * .2); z-index: 4; width: 46cqw; color: #7f6f69; display: grid; }
.h-names .p1 { font: 400 8.4cqw/1.05 var(--f-script); }
.h-names .amp { font: 400 5.2cqw/1 var(--f-script); padding-left: 5.8cqw; margin: -.6cqw 0 -2.6cqw; }
.h-names .p2 { font: 400 8.4cqw/1.05 var(--f-script); padding-left: 9cqw; }
.h-foot { right: 7cqw; top: calc(var(--H) * .772 + var(--sy) * .5); z-index: 4; width: 70cqw; display: grid; justify-items: end; gap: 1.6cqw; }
.h-info { text-align: right; display: grid; gap: .5cqw; color: #8e7e78; }
.h-info .d { font: 700 clamp(11px, 2.9cqw, 18px)/1.35 var(--f-serif); letter-spacing: .18em; text-transform: uppercase; }
.h-info .t { font: 400 clamp(9.5px, 2.2cqw, 14px)/1.4 var(--f-serif); letter-spacing: .24em; text-transform: uppercase; }
.h-info .v { font: 700 clamp(11px, 2.9cqw, 18px)/1.35 var(--f-serif); letter-spacing: .18em; text-transform: uppercase; margin-top: 2.2cqw; }
.h-info .a { font: 400 clamp(9.5px, 2.2cqw, 14px)/1.4 var(--f-serif); letter-spacing: .2em; text-transform: uppercase; }
.h-note { font: 400 7.2cqw/1.1 var(--f-script); color: #7f6f69; text-align: right; }

/* foto kosong: bunga PSD memudar ke atas + inisial (tanpa siluet orang) */
.empty-ph { position: absolute; inset: 0; background: linear-gradient(180deg, #efe4d9, #e6d6c8 70%, #e2cfbf); overflow: hidden; }
.empty-ph .efl { position: absolute; height: auto; max-width: none; -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 92%); mask-image: linear-gradient(to top, #000 30%, transparent 92%); }
.empty-ph .ini { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: baseline; gap: .12em; color: var(--gold-2); font-family: var(--f-script); line-height: 1; text-shadow: 0 1px 0 #fff8; }
.empty-ph .ini i { font-style: normal; font-size: .5em; }
.h-win .empty-ph .efl.e1 { left: 32%; bottom: -6%; width: 40%; }
.h-win .empty-ph .efl.e2 { left: 56%; bottom: 4%; width: 28%; }
.h-win .empty-ph .ini { top: 30%; left: 4%; font-size: 17cqw; }
  color: #fffaf6; background: #864c39d9; border-radius: 999px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }

/* =================== bagian isi: masing-masing setinggi layar, isi di tengah =================== */
main { position: relative; }
.sec { position: relative; min-height: 100svh; display: grid; align-content: center; padding-block: clamp(72px, 12vw, 120px); padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); overflow: hidden; background: var(--paper-2); }
.sec.paper { background: var(--paper) url("../images/crafid-terracotta/paper.webp") center / cover; }
.wrap { position: relative; z-index: 2; max-width: 620px; width: 100%; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: center; text-align: center; }
.sec h2 { font-size: clamp(1.25rem, 5.2vw, 1.8rem); letter-spacing: 0.26em; text-transform: uppercase; color: var(--rose); font-weight: 400; }
.sec .kick { font: 400 clamp(1.7rem, 7vw, 2.3rem)/1 var(--f-script); color: var(--gold-2); }
.lead { font-style: italic; color: var(--mauve); max-width: 36ch; }
.ayat { font: 400 clamp(1.6rem, 6.6vw, 2.2rem)/1.9 var(--f-ar); color: var(--rose-deep); direction: rtl; }
.orn { width: 140px; height: 16px; color: var(--gold); }
/* dua tangkai bunga di pojok: di belakang teks, tidak menangkap klik */
.corner { position: absolute; z-index: 1; pointer-events: none; height: auto; max-width: none; width: clamp(120px, 33vw, 250px); }
.corner.tl { top: -3%; left: -9%; } .corner.tr { top: -3%; right: -9%; } .corner.bl { bottom: -4%; left: -9%; } .corner.br { bottom: -4%; right: -9%; }
.corner.flip { scale: -1 1; }
@media (min-width: 900px) { .corner { width: clamp(180px, 20vw, 300px); } .corner.tl, .corner.bl { left: 2%; } .corner.tr, .corner.br { right: 2%; } }

/* mempelai */
.couple { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; width: 100%; }
.person { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; min-width: 0; }
.person .pn { font: 400 clamp(2.6rem, 12vw, 3.6rem)/1.1 var(--f-script); color: var(--rose-deep); max-width: 100%; }
.person .of { font-size: 0.9rem; color: var(--ink); max-width: 32ch; }
.person .of b { display: block; font-weight: 700; color: var(--mauve); letter-spacing: .06em; }
.amp { font: 400 3.2rem/1 var(--f-script); color: var(--gold); }
/* varian berfoto: bingkai oval emas dari PSD */
.pframe { position: relative; width: min(52vw, 190px); aspect-ratio: 968 / 1536; container-type: inline-size; }
.pframe::after { content: ''; position: absolute; inset: 0; background: url("../images/crafid-terracotta/oval.webp") center / 100% 100% no-repeat; z-index: 0; }
.pframe .in { position: absolute; inset: 4.2% 4.6%; border-radius: 999px; overflow: hidden; z-index: 1; }
.pframe .in > img.ph { width: 100%; height: 100%; object-fit: cover; }
.pframe .empty-ph .efl.e1 { left: -18%; bottom: -8%; width: 120%; }
.pframe .empty-ph .ini { top: 30%; font-size: 40cqw; }
.pframe::before { content: ''; position: absolute; inset: 0; border-radius: 999px; box-shadow: inset 0 0 0 1.4cqw #fff6; z-index: 2; pointer-events: none; }
.v-nophoto .pframe { display: none; }

.events { display: grid; gap: 14px; width: 100%; }
.event { border: 1px solid var(--line); border-radius: 999px 999px 22px 22px; padding: 38px 22px 26px; background: #fffdf9b8; display: grid; gap: 7px; justify-items: center; }
.event h3 { font: 400 2rem/1 var(--f-script); color: var(--rose-deep); }
.event .day { font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
.event .t { font-size: 1.5rem; color: var(--rose-deep); font-variant-numeric: tabular-nums; }
.event .v { font-weight: 700; color: var(--mauve); letter-spacing: 0.08em; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.btn { appearance: none; border: 1px solid var(--rose); background: #fffdf9cc; color: var(--rose-deep); border-radius: 999px; padding: 11px 18px; cursor: pointer; text-decoration: none;
  font: 700 0.62rem/1 var(--f-serif); letter-spacing: 0.22em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.btn.solid { background: var(--rose); color: #fffaf6; }
.btn:disabled { opacity: 0.55; cursor: default; }

.count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 440px; }
.tick { display: grid; gap: 4px; padding: 18px 4px 14px; border-radius: 999px 999px 14px 14px; background: #fffdf9c4; border: 1px solid var(--line); }
.tick output { font-size: clamp(1.45rem, 7vw, 2rem); color: var(--rose-deep); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tick span { font-size: 0.56rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mauve); }
.done-note, .it { font-style: italic; color: var(--mauve); }

.gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.gal img, .gal .ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.gal .ph { border: 1px dashed var(--line); background: linear-gradient(160deg, #f1e4d9, #e8d8ca); display: grid; place-items: center; font: italic 400 0.8rem/1.2 var(--f-serif); color: var(--mauve); }

form { display: grid; gap: 14px; width: 100%; text-align: left; position: relative; z-index: 2; }
label, legend { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mauve); font-weight: 700; }
input[type=text], textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfa; padding: 12px 14px; font-size: 0.95rem; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.choice { position: relative; flex: 1 1 120px; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 11px; background: #fffdfa; font-size: 0.86rem; }
.choice input:checked + span { background: var(--rose); border-color: var(--rose); color: #fffaf6; }
.choice input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
.form-note { font-size: 0.86rem; font-style: italic; color: var(--rose-deep); text-align: center; }
.wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; text-align: left; max-height: 360px; overflow-y: auto; position: relative; z-index: 2; }
.wishes li { background: #fffdf9d0; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 2px; }
.wishes li b { color: var(--rose-deep); font-size: 0.92rem; }
.wishes li small { color: var(--mauve); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; }
.wishes li p { font-size: 0.92rem; }
.empty { font-style: italic; color: var(--mauve); font-size: 0.9rem; }

.gifts { display: grid; gap: 12px; width: 100%; justify-items: center; }
.gift { width: 100%; max-width: 420px; border-radius: 20px; padding: 24px 22px; display: grid; gap: 6px; justify-items: center; background: linear-gradient(150deg, #f6ebe2, #eee0d3); border: 1px solid var(--line); }
.gift .bank { font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 700; color: var(--mauve); }
.gift .no { font-size: 1.4rem; letter-spacing: 0.12em; color: var(--rose-deep); font-variant-numeric: tabular-nums; user-select: all; overflow-wrap: anywhere; }
.gift .addr { font-size: 0.95rem; color: var(--rose-deep); max-width: 30ch; }
.tag { font-size: 0.56rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mauve); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; background: #fffdf9; }
.stream { width: 100%; max-width: 460px; border: 1px dashed var(--rose); border-radius: 18px; padding: 24px 20px; display: grid; gap: 10px; justify-items: center; background: #fffdf9b0; }
.story { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 480px; display: grid; text-align: left; }
.story li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding-bottom: 26px; }
.story li::before { content: ''; position: absolute; left: 31px; top: 30px; bottom: 0; width: 1px; background: var(--line); }
.story li:last-child::before { display: none; }
.story .yr { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; background: var(--paper-2); color: var(--rose-deep); font-weight: 700; font-size: 0.88rem; position: relative; z-index: 1; }
.story h3 { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rose); font-weight: 700; padding-top: 8px; }
.story p { font-size: 0.9rem; }
.qr { width: 188px; height: 188px; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; }
.qr canvas, .qr img { width: 164px !important; height: 164px !important; }
.checkin { display: grid; gap: 10px; justify-items: center; }
.preview-note { font-size: 0.7rem; font-style: italic; color: var(--mauve); }
.closing .cl-names { display: grid; justify-items: center; color: var(--rose-deep); width: 100%; }
.closing .cl-names .p1, .closing .cl-names .p2 { font: 400 clamp(2.6rem, 12vw, 3.8rem)/1.1 var(--f-script); max-width: 100%; }
.closing .cl-names .amp { font-size: 2rem; }
footer { text-align: center; padding: 26px 16px calc(26px + env(safe-area-inset-bottom, 0px)); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mauve); background: var(--paper-2); }

.music { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rose); background: #fffaf6e6; color: var(--rose-deep); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -14px #864c39; }
.music svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.music.on svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#petals { position: fixed; inset: 0; z-index: 40; pointer-events: none; width: 100%; height: 100%; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; transition: .4s; background: var(--rose-deep); color: #fffaf6; border-radius: 999px; padding: 10px 18px; font-size: 0.8rem; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { .couple { grid-template-columns: 1fr auto 1fr; align-items: center; } .events { grid-template-columns: 1fr 1fr; } }

/* =================== MOTION: pembukaan sampul 5 detik =================== */
@keyframes rise { from { opacity: 0; translate: 0 7%; scale: .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes bloom { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes fadeUp { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes inkIn { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
@keyframes sheen { 0%, 60% { translate: -120% 0; } 85%, 100% { translate: 120% 0; } }
.motion .gate::before { animation: inkIn 1.6s ease both; }
.motion .ovg .ov { animation: rise 2.4s var(--ease-out) .2s both; }
.motion .ovg .fa { animation: sway var(--d) ease-in-out var(--dl) infinite alternate, bloom 2.6s var(--ease-out) .5s both; }
.motion .ovg .fc { animation: sway var(--d) ease-in-out var(--dl) infinite alternate, bloom 2.6s var(--ease-out) .9s both; }
.motion .ovg .fb { animation: sway var(--d) ease-in-out var(--dl) infinite alternate, bloom 2.6s var(--ease-out) 1.3s both; }
.motion .ovg .bf { animation: flutter 3.4s ease-in-out 4s infinite, bloom 1.4s var(--ease-out) 2.6s both; }
.motion .oval-txt .arc-k { animation: inkIn 1.3s var(--ease-soft) 1.6s both; }
.motion .oval-txt .arc-s { animation: inkIn 1.3s var(--ease-soft) 1.9s both; }
.motion .oval-txt .nm { animation: inkIn 1.8s var(--ease-soft) 2.2s both; }
.motion .oval-txt .arc-d { animation: inkIn 1.3s var(--ease-soft) 3s both; }
.motion .gate-foot { animation: fadeUp 1.1s var(--ease-soft) 3.9s both; }
.motion .open::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, #ffffff66 50%, transparent 65%); translate: -120% 0; animation: sheen 3.6s ease-in-out 5.6s infinite; }
/* transisi buka: oval mendekat, bunga tersibak */
.motion .gate.gone .ovg { scale: 1.5; opacity: 0; transition: scale 1.2s cubic-bezier(.6, 0, .3, 1), opacity .9s ease .2s; }
.motion .gate.gone .gate-foot { opacity: 0; translate: 0 20px; transition: opacity .35s ease, translate .35s ease; animation: none; }
/* hero setelah dibuka */
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes winIn { from { opacity: 0; scale: 1.06; filter: blur(4px); } to { opacity: 1; scale: 1; filter: blur(0); } }
.motion .hero:not(.play) .h-anim { opacity: 0; }
.motion .hero.play .h-win { animation: winIn 1.8s var(--ease-out) .2s both; }
.motion .hero.play .h-roses { animation: sway var(--d) ease-in-out var(--dl) infinite alternate, bloom 2s var(--ease-out) .5s both; }
.motion .hero.play .h-ghost { animation: sway var(--d) ease-in-out var(--dl) infinite alternate, inkIn 2s ease .4s both; }
.motion .hero.play .h-torn { animation: inkIn 1.4s ease .7s both; }
.motion .hero.play .h-kick { animation: wipe 1.8s cubic-bezier(.65, 0, .25, 1) .9s both; }
.motion .hero.play .h-names { animation: wipe 1.8s cubic-bezier(.65, 0, .25, 1) 1.3s both; }
.motion .hero.play .h-foot .h-info { animation: fadeUp 1.1s var(--ease-soft) 1.9s both; }
.motion .hero.play .h-note { animation: wipe 1.6s cubic-bezier(.65, 0, .25, 1) 2.3s both; }
/* muncul saat digulir */
.rv { transition: opacity 1s var(--ease-soft), translate 1s var(--ease-soft), filter 1s var(--ease-soft); }
.rv.rv-pre { opacity: 0; translate: 0 22px; filter: blur(3px); }
.corner { transition: translate 1.6s var(--ease-out), opacity 1.6s ease; }
.sec.sec-pre .corner { translate: 0 40px; opacity: 0; }
@keyframes tickIn { from { opacity: 0; translate: 0 -40%; } to { opacity: 1; translate: 0 0; } }
.tick output.tk { animation: tickIn .45s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .sway, .ovg .bf, .music.on svg { animation: none !important; }
  .gate, .gate *, .hero *, .rv, .corner, .tick output { animation: none !important; transition: none !important; }
  .rv.rv-pre, .sec.sec-pre .corner { opacity: 1; translate: none; filter: none; }
  html { scroll-behavior: auto; }
}
