﻿/* =========================================================
   Undangan Nikah — Folihati & Rizky
   Tema: maroon / krem / gold · adat Jawa
   ======================================================= */

:root {
  --maroon: #6e1f2a;
  --maroon-2: #8f2b39;
  --maroon-dark: #4a1119;
  --wine: #54121f;
  --cream: #f4e9d8;
  --cream-2: #ece0c9;
  --paper: #fbf7ee;
  --gold: #c8a24a;
  --gold-2: #e2c98c;
  --ink: #59483d;
  --muted: #8d7c6d;

  --floral-w: clamp(44px, 13vw, 104px);
  --pad: calc(var(--floral-w) * 0.78);
  --stage: 620px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.7;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(200, 162, 74, .14) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(110, 31, 42, .09) 0 2px, transparent 3px),
    repeating-linear-gradient(45deg, rgba(110, 31, 42, .025) 0 16px, transparent 16px 32px),
    repeating-linear-gradient(-45deg, rgba(110, 31, 42, .025) 0 16px, transparent 16px 32px);
  background-size: 48px 48px, 64px 64px, auto, auto;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Floral frame ---------- */
.frame {
  position: fixed;
  top: 0; bottom: 0; left: 50%;
  width: min(100vw, var(--stage));
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
body.opened.past-welcome .frame { opacity: 1; }
.floral {
  position: absolute; top: -30px; bottom: -30px;   /* ruang gerak agar tak ada celah saat bergeser */
  width: var(--floral-w);
  background-image: url("../assets/ornament/floral-tile.svg");
  background-repeat: repeat-y;
  background-size: var(--floral-w) auto;
  filter: drop-shadow(0 0 8px rgba(84, 18, 31, .2));
  will-change: transform;
  animation: floralSway 12s ease-in-out infinite alternate;
}
/* Transform (bukan background-position): GPU-composited, tidak repaint tiap frame */
@keyframes floralSway { from { transform: translateY(0); } to { transform: translateY(-22px); } }
@keyframes floralSwayR { from { transform: scaleX(-1) translateY(0); } to { transform: scaleX(-1) translateY(-22px); } }
.floral-left { left: 0; }
.floral-right { right: 0; transform: scaleX(-1); animation-name: floralSwayR; }

/* ---------- Invitation column ---------- */
.invitation {
  position: relative;
  z-index: 3;
  max-width: var(--stage);
  margin: 0 auto;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(84, 18, 31, .18), inset 0 0 0 1px rgba(200, 162, 74, .35);
  overflow: hidden;
}

.section { padding: 46px var(--pad); text-align: center; position: relative; }
.section + .section { border-top: 1px solid rgba(200, 162, 74, .25); }

.script { font-family: var(--script); font-weight: 400; color: var(--maroon); margin: 0; }
.sec-head { margin-bottom: 22px; }
.sec-script { font-size: clamp(2.1rem, 9vw, 2.9rem); line-height: 1.15; }
.sec-script.on-dark { color: var(--gold-2); text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }

.divider { width: min(210px, 72%); margin: 6px auto 0; opacity: .92; }
.divider-sm { width: 150px; margin: 8px auto 0; }

/* ---------- Cover ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--paper);
  transition: opacity 1s ease, visibility 1s ease;
}
.cover.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.cover.is-hidden .cover-inner { transform: scale(1.5); opacity: 0; }

.cover-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 22%;
  filter: saturate(1.05);
  transform: scale(1.12);           /* sedikit lebih besar agar terasa "lembut" tanpa blur全屏 yang berat */
  transition: transform 1.5s ease;
}
.cover.is-hidden .cover-bg { transform: scale(1.75); }
.cover-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 8, 14, .72) 0%, rgba(74, 17, 25, .55) 45%, rgba(30, 6, 11, .9) 100%),
    radial-gradient(120% 80% at 50% 30%, rgba(84, 18, 31, .15) 0%, rgba(30, 6, 11, .75) 100%);
}

.cover-inner {
  position: relative; z-index: 3;
  width: min(100%, 430px);
  padding: 30px 24px;
  text-align: center;
  transition: transform 1.1s ease, opacity 1s ease;
}

/* ---------- Animasi buka: cover memudar, tirai muncul ---------- */
.cover.opening .cover-inner {
  opacity: 0; transform: scale(1.6) translateY(-20px);
  transition: opacity .8s ease, transform 1.1s cubic-bezier(.4, 0, .2, 1);
}
.cover.opening .cover-bg {
  transform: scale(1.8); opacity: 0;
  transition: transform 2s ease, opacity 1.2s ease;
}
.cover.opening .cover-veil { opacity: 0; transition: opacity 1s ease; }
.cover.opening .scroll-hint { opacity: 0; }

.cover-crest { display: block; font-size: 1.5rem; color: var(--gold-2); margin-bottom: 2px; }
.script-lg { font-size: clamp(2rem, 8.5vw, 2.7rem); color: var(--gold-2); margin-bottom: 12px; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }

.cover-photo-arch {
  width: min(210px, 58vw);
  margin: 0 auto 16px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 999px 999px 16px 16px;
  border: 4px solid rgba(251, 247, 238, .92);
  outline: 1px solid var(--gold-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.cover-photo-arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

.cover-names {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 12vw, 3.8rem);
  line-height: 1.02; letter-spacing: .02em;
  margin: 0 0 6px; color: #fff;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .55);
}
.cover-names .amp { font-family: var(--script); font-weight: 400; color: var(--gold-2); display: inline-block; padding: 0 .12em; }
.cover-date { font-family: var(--serif); font-style: italic; font-size: 1.25rem; letter-spacing: .05em; color: var(--gold-2); margin: 0 0 24px; }

.cover-guest-box {
  display: inline-block; padding: 12px 24px; border: 1px solid rgba(226, 201, 140, .6);
  border-radius: 12px; background: rgba(30, 6, 11, .55); margin-bottom: 24px;
}
.guest-label { font-size: .76rem; letter-spacing: .06em; margin: 0; color: #ecdfc4; }
.guest-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 3px 0 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.5em; border: none; border-radius: 999px;
  font-family: var(--sans); font-size: .92rem; font-weight: 500; letter-spacing: .05em;
  text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--maroon-dark);
  box-shadow: 0 8px 22px rgba(200, 162, 74, .42), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200, 162, 74, .55); }
.btn:active { transform: translateY(0); }
.btn-ico { font-size: 1.05em; }
.btn-open { padding: .9em 2.2em; font-size: 1.05rem; animation: pulseGold 2.6s infinite; }
.btn-map { margin-top: 20px; background: linear-gradient(180deg, var(--maroon-2), var(--maroon)); color: #f7ecd8; box-shadow: 0 8px 22px rgba(84, 18, 31, .38); }
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 8px 22px rgba(200, 162, 74, .42); }
  50% { box-shadow: 0 8px 32px rgba(200, 162, 74, .85); }
}

.scroll-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 1.6rem; color: var(--gold-2); animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* =========================================================
   WELCOME — scene Jawa beranimasi
   ======================================================= */
.welcome {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 52px var(--pad) 250px;
  text-align: center;
  background: #e8dcc8;
}
/* Rumah Jawa: dari besar → kecil */
.welcome .house {
  position: absolute; inset: 0; z-index: 1;
  background: #efe3cc url("../assets/img/scene-jawa.webp") center bottom / cover no-repeat;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.85);
  transform-origin: 50% 80%;
  will-change: transform;
  transition: transform 2.8s cubic-bezier(.22, .72, .2, 1) .4s;
}
body.opened .welcome .house { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1); }

.welcome-content { position: relative; z-index: 3; max-width: 430px; margin: 0 auto; }
.welcome-content > * { opacity: 0; transform: translateY(40px) scale(.9); }
body.opened .welcome-content > * { animation: rise 1.1s cubic-bezier(.18, .89, .32, 1.25) forwards; }
body.opened .welcome-content > *:nth-child(1) { animation-delay: 1.8s; }
body.opened .welcome-content > *:nth-child(3) { animation-delay: 2.3s; }
body.opened .welcome-content > *:nth-child(4) { animation-delay: 2.6s; }
body.opened .welcome-photo { animation: photoBloom 1.3s cubic-bezier(.18, .9, .28, 1.3) 2.0s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes photoBloom {
  from { opacity: 0; transform: translateY(26px) scale(.7); }
  to { opacity: 1; transform: none; }
}

.welcome .script-lg { color: var(--maroon-2); text-shadow: 0 1px 10px rgba(255, 255, 255, .6); margin-bottom: 2px; }
.welcome-names {
  font-family: var(--serif); font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  font-size: clamp(2.1rem, 9.5vw, 3rem); line-height: 1.1;
  color: var(--maroon); margin: 0 0 6px;
  text-shadow: 0 1px 12px rgba(255, 255, 255, .65), 0 2px 18px rgba(74, 17, 25, .16);
}
.welcome-names .amp { font-family: var(--script); text-transform: none; letter-spacing: 0; color: var(--maroon-2); padding: 0 .08em; }
.welcome-photo {
  width: min(178px, 50vw);
  margin: 6px auto 3px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 999px 999px 16px 16px;
  border: 4px solid rgba(251, 247, 238, .95);
  outline: 1px solid var(--gold-2);
  box-shadow: 0 18px 44px rgba(74, 17, 25, .28);
}
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.welcome-date {
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; letter-spacing: .04em;
  color: var(--maroon); margin: -8px 0 0; text-shadow: 0 1px 10px rgba(255, 255, 255, .6);
}

.arabic { font-size: 1.55rem; color: var(--maroon); margin: 0 0 12px; }
.opening { max-width: 460px; margin: 0 auto 8px; }
.salam { font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin: 0 0 6px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); margin: 18px auto 0; max-width: 420px; }
.quote-src { font-size: .78rem; letter-spacing: .1em; color: var(--maroon); margin: 8px 0 20px; text-transform: uppercase; }
.welcome-text { max-width: 400px; margin: 0 auto; }

/* ---------- Mempelai ---------- */
.person { max-width: 400px; margin: 0 auto; }
.photo-arch {
  width: min(240px, 64vw);
  margin: 0 auto 18px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 999px 999px 18px 18px;
  border: 5px solid var(--paper);
  outline: 1px solid var(--gold-2);
  box-shadow: 0 16px 40px rgba(84, 18, 31, .24);
  cursor: zoom-in;
}
.photo-arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .6s ease; }
.photo-arch:hover img { transform: scale(1.05); }

.person-name { font-family: var(--serif); font-size: clamp(1.45rem, 5.8vw, 1.8rem); font-weight: 600; color: var(--maroon); margin: 0 0 4px; }
.person-role { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0; }
.person-parents { font-family: var(--serif); font-style: italic; font-size: 1.12rem; margin: 2px 0 0; }

.amp-line { margin: 8px 0; }
.amp-line span { font-family: var(--script); font-size: 2.6rem; color: var(--gold); }

/* ---------- Blessing / countdown (foto latar) ---------- */
.blessing { position: relative; overflow: hidden; min-height: 72vh; display: flex; align-items: center; justify-content: center; padding: 74px var(--pad); text-align: center; }
.blessing-bg { position: absolute; inset: -12% 0; background-size: cover; background-position: center; will-change: transform; }
.blessing-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(38, 8, 14, .78), rgba(74, 17, 25, .62) 50%, rgba(38, 8, 14, .82)); }
.blessing-content { position: relative; z-index: 2; color: #fff; }

.count-grid { display: flex; justify-content: center; gap: 10px; margin: 18px 0 16px; flex-wrap: wrap; }
.count-box {
  min-width: 66px; padding: 13px 6px; border-radius: 14px;
  background: rgba(251, 247, 238, .18);
  border: 1px solid rgba(226, 201, 140, .55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.count-num { display: block; font-family: var(--serif); font-size: 1.95rem; font-weight: 600; color: var(--gold-2); line-height: 1; }
.count-box small { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #e9dcc4; }
.count-date { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 6px 0 0; color: #fff; }

/* ---------- Acara ---------- */
.card {
  position: relative; max-width: 372px; margin: 10px auto 0;
  padding: 40px 30px 36px; border-radius: 20px;
  background: radial-gradient(130% 95% at 50% 0%, #fffefb 0%, var(--cream-2) 100%);
  border: 1px solid var(--gold-2);
  box-shadow: 0 18px 46px rgba(84, 18, 31, .17), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.card::after {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1px solid rgba(200, 162, 74, .45); border-radius: 14px;
}
.card-corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); opacity: .9; z-index: 1; }
.card-corner.tl { top: 13px; left: 13px; border-right: none; border-bottom: none; border-top-left-radius: 9px; }
.card-corner.tr { top: 13px; right: 13px; border-left: none; border-bottom: none; border-top-right-radius: 9px; }
.card-corner.bl { bottom: 13px; left: 13px; border-right: none; border-top: none; border-bottom-left-radius: 9px; }
.card-corner.br { bottom: 13px; right: 13px; border-left: none; border-top: none; border-bottom-right-radius: 9px; }

.card-crest { font-size: 1.35rem; color: var(--gold); line-height: 1; margin: 0 0 8px; }
.card-day { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-weight: 500; }
.card-date { margin: 0; }
.card-date span { display: block; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); letter-spacing: .02em; }
.card-date b { font-family: var(--serif); font-weight: 600; font-size: 1.78rem; color: var(--maroon); letter-spacing: .01em; }
.card-sep { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0; color: var(--gold); }
.card-sep span { display: block; width: 62px; height: 1px; }
.card-sep span:first-child { background: linear-gradient(90deg, transparent, var(--gold)); }
.card-sep span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.card-sep i { font-style: normal; font-size: .85rem; }
.card-label { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.card-venue { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; color: var(--maroon-dark); margin: 0; letter-spacing: .01em; }
.card-addr { font-size: .92rem; color: var(--ink); margin: 7px 0 0; line-height: 1.6; }

.map-embed { max-width: 360px; margin: 20px auto 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--gold-2); box-shadow: 0 12px 30px rgba(84, 18, 31, .16); }
.map-embed iframe { width: 100%; height: 210px; border: 0; display: block; }

/* ---------- Dresscode ---------- */
.dress-card { max-width: 400px; margin: 0 auto; }
.dress-text { max-width: 360px; margin: 0 auto 22px; }
.swatches { display: flex; justify-content: center; gap: 20px; }
.swatch { width: 60px; height: 60px; border-radius: 50%; display: inline-block; border: 3px solid #fff; box-shadow: 0 8px 18px rgba(84, 18, 31, .24); }
.swatch-maroon { background: var(--maroon); }
.swatch-gold { background: linear-gradient(160deg, var(--gold-2), var(--gold)); }
.swatch-cream { background: var(--paper); border-color: var(--gold-2); }

/* ---------- Closing ---------- */
.closing { position: relative; overflow: hidden; padding: 92px var(--pad); text-align: center; }
.closing-bg { position: absolute; inset: -12% 0; background-size: cover; background-position: center 30%; will-change: transform; }
.closing-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 6, 11, .82), rgba(74, 17, 25, .68) 50%, rgba(30, 6, 11, .9)); }
.closing-content { position: relative; z-index: 2; color: #f3e8d4; }
.closing-text { max-width: 420px; margin: 6px auto 20px; color: #f0e4cd; }
.closing-names { font-family: var(--script); font-size: clamp(2.4rem, 10vw, 3.2rem); color: var(--gold-2); margin: 8px 0 4px; }
.closing-salam { font-family: var(--serif); font-style: italic; font-size: 1rem; color: #ecdfc4; margin: 6px 0 0; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 26px var(--pad) 34px; }
.footer-made { font-family: var(--sans); font-size: .78rem; letter-spacing: .04em; color: var(--muted); margin: 0; }
.footer-credit { font-family: var(--sans); font-size: .68rem; letter-spacing: .02em; color: var(--muted); opacity: .8; margin: 6px 0 0; }

/* ---------- Cover caption ---------- */
.cover-caption {
  margin: 18px 0 16px; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 5.5vw, 1.8rem); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

/* ---------- Ucapan & Doa ---------- */
.rsvp-form { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.rsvp-input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--gold-2); background: #fffdf8;
  font-family: var(--sans); font-size: .95rem; color: var(--ink);
}
.rsvp-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 162, 74, .18); }
.rsvp-textarea { min-height: 96px; resize: vertical; }
.rsvp-submit { align-self: center; margin-top: 4px; }
.rsvp-list { max-width: 420px; margin: 22px auto 0; text-align: left; }
.rsvp-item { background: #fffdf8; border: 1px solid rgba(200, 162, 74, .4); border-radius: 12px; padding: 12px 15px; margin-bottom: 10px; box-shadow: 0 6px 16px rgba(84, 18, 31, .07); }
.ri-name { font-family: var(--serif); font-weight: 600; color: var(--maroon); margin: 0 0 3px; font-size: 1.05rem; }
.ri-msg { margin: 0; font-size: .93rem; color: var(--ink); }
.rsvp-empty { text-align: center; color: var(--muted); font-size: .9rem; font-style: italic; }

/* ---------- Amplop Digital ---------- */
.gift-text { max-width: 380px; margin: 0 auto 20px; }
.gift-cards { display: flex; flex-direction: column; gap: 14px; max-width: 360px; margin: 0 auto; }
.gift-card {
  position: relative; padding: 22px 18px 20px; border-radius: 16px; text-align: center;
  background: radial-gradient(130% 95% at 50% 0%, #fffefb 0%, var(--cream-2) 100%);
  border: 1px solid var(--gold-2); box-shadow: 0 12px 28px rgba(84, 18, 31, .13);
}
.gc-type { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; font-weight: 500; }
.gc-no { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; color: var(--maroon-dark); margin: 0; letter-spacing: .05em; }
.gc-holder { font-size: .85rem; color: var(--muted); margin: 5px 0 14px; }
.btn-copy {
  display: inline-flex; align-items: center; gap: .4em; cursor: pointer;
  padding: .5em 1.2em; border-radius: 999px; border: 1px solid var(--gold);
  background: transparent; color: var(--maroon); font-family: var(--sans);
  font-size: .82rem; letter-spacing: .03em; transition: background .2s ease;
}
.btn-copy:hover { background: var(--gold-2); }
.footer .heart { color: var(--maroon-2); }

/* ---------- Music button ---------- */
.music-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--maroon-2), var(--wine));
  color: var(--gold-2); font-size: 1.3rem;
  box-shadow: 0 8px 22px rgba(84, 18, 31, .45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
body.opened .music-btn { opacity: 1; transform: none; }
.music-btn.is-playing .music-ico { animation: spin 3.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30, 6, 11, .95); opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease; padding: 20px;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.lightbox-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: var(--gold-2); font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- Reveal saat di-scroll ---------- */
/* Tanpa blur: di HP filter blur ber-transform = repaint masif tiap frame → lemot */
.reveal {
  opacity: 0; transform: translateY(60px) scale(.9);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(.18, .89, .32, 1.2);
}
.reveal.in { opacity: 1; transform: none; }

/* Anak-anak muncul satu per satu (pop up) */
.stagger > * {
  opacity: 0; transform: translateY(55px) scale(.88);
  transition: opacity .9s ease, transform 1.15s cubic-bezier(.18, .89, .32, 1.25);
}
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: .1s; }
.stagger.in > *:nth-child(2) { transition-delay: .25s; }
.stagger.in > *:nth-child(3) { transition-delay: .4s; }
.stagger.in > *:nth-child(4) { transition-delay: .55s; }
.stagger.in > *:nth-child(5) { transition-delay: .7s; }
.stagger.in > *:nth-child(6) { transition-delay: .85s; }
.stagger.in > *:nth-child(7) { transition-delay: 1s; }
.stagger.in > *:nth-child(8) { transition-delay: 1.15s; }
.stagger.in > *:nth-child(9) { transition-delay: 1.3s; }
.stagger.in > *:nth-child(10) { transition-delay: 1.45s; }

.card.stagger > .card-corner { opacity: 1; transform: none; transition: none; }

/* Foto mempelai: pop dengan zoom */
.stagger > .photo-arch { transform: translateY(50px) scale(.6); }
.stagger.in > .photo-arch { transform: none; }

/* Foto latar: muncul dulu, lalu isinya */
.scene-in .blessing-bg,
.scene-in .closing-bg { opacity: 0; transform: scale(1.2); transition: opacity 1.5s ease, transform 1.8s cubic-bezier(.22, .72, .2, 1); }
.scene-in.in .blessing-bg,
.scene-in.in .closing-bg { opacity: 1; transform: scale(1); }

/* Veil untuk transisi fade-through-dark */
.scene-in { position: relative; }
.scene-in::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(30, 6, 11, 0); pointer-events: none;
  transition: background 0.6s ease;
}
.scene-in.in::before { background: rgba(30, 6, 11, 0); }
/* ---------- Parallax interaktif (mouse, desktop) ---------- */
[data-parallax] { will-change: transform; }
/* Setelah zoom rumah selesai, matikan transisi transform agar parallax mouse
   langsung mengikuti (smoothed oleh lerp di JS) — tanpa ini zoom terpotong 0,2s */
body.zoom-done .welcome .house { transition: none; }

/* Hemat kerja render di HP: bagian di bawah lipatan tidak dilayout/dipaint
   sampai mendekati viewport. (welcome & cover sengaja tidak diberi) */
.blessing, .section, .closing, .footer { content-visibility: auto; contain-intrinsic-size: auto 480px; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger > * { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .scene-in .blessing-bg,
  .scene-in .closing-bg { opacity: 1 !important; }
  .btn-open, .scroll-hint, .music-btn.is-playing .music-ico,
  body.opened .welcome-content > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .welcome .house { transform: none !important; animation: none !important; transition: none !important; --px: 0px !important; --py: 0px !important; }
  .cover-bg, .cover-inner { transition: none !important; }
  .floral { animation: none !important; }
}

@media (min-width: 620px) {
  .section { padding: 56px 0; }
  .count-box { min-width: 80px; }
  .welcome { padding-bottom: 300px; }
}
