/* ============ Wedding Landing — M. Humaidi & Noor Laila ============ */
:root {
  --bg: #f8f2e6;
  --ink: #46331f;
  --muted: #8a7458;
  --gold: #9e6f1e;
  --gold-bright: #e9c766;
  --gold-soft: #e6cf92;
  --dark: #453118;
  --dark-2: #302113;
  --rose: #c98383;
  --card: #fffdf7;
  --line: #ecdfc6;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1100px 460px at 50% -8%, rgba(158,111,30,.07), transparent 70%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 720px; }

/* ============ Animations ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { opacity: 0; animation: fadeUp .9s ease forwards; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.delay-4 { animation-delay: .6s; }
.delay-5 { animation-delay: .75s; }

.fade-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-scroll.visible { opacity: 1; transform: translateY(0); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f5efe4;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(233,199,106,.28), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(201,131,131,.14), transparent 50%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 55%, #2a1d10 100%);
  overflow: hidden;
  padding: 80px 24px;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-video.off { display: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(38,26,15,.48), transparent 70%),
    linear-gradient(160deg, rgba(43,31,20,.62), rgba(48,33,19,.48) 55%, rgba(42,29,16,.72)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.hero-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(92px, 13vw, 150px);
  z-index: 1;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: decorSway 7s ease-in-out infinite;
}
.hero-decor svg { width: 100%; height: 100%; display: block; }
@keyframes decorSway {
  0%, 100% { transform: rotate(-.5deg); }
  50%      { transform: rotate(.5deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-shadow: 0 1px 14px rgba(24,15,8,.7), 0 0 34px rgba(24,15,8,.45);
}

.monogram {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  letter-spacing: .12em;
  color: var(--gold-bright);
  border: 1px solid rgba(233,199,106,.55);
  box-shadow: 0 0 30px -8px rgba(233,199,106,.4), inset 0 0 26px -14px rgba(233,199,106,.7);
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  border-radius: 50%;
}
.monogram span { font-style: italic; margin: 0 .08em; color: #f6e3ae; }
.monogram.small { width: 74px; height: 74px; font-size: 1.5rem; margin-bottom: 14px; }

.eyebrow {
  font-size: .8rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 14px;
}

.couple-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.8rem, 9vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: .02em;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cn-line { display: block; }
.couple-name .amp {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: .52em;
  line-height: 1.35;
  color: var(--gold-bright);
  text-shadow: 0 0 26px rgba(233,199,106,.5);
  margin: 0;
}

.wedding-date {
  margin-top: 18px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: clamp(.72rem, 2.2vw, .9rem);
  color: rgba(245,239,228,.85);
}

/* Countdown */
.countdown {
  display: flex;
  gap: clamp(8px, 2.5vw, 18px);
  justify-content: center;
  margin: 40px 0 36px;
}
.cd-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(233,199,106,.34);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 14px clamp(10px, 3vw, 22px);
  min-width: clamp(64px, 18vw, 96px);
}
.cd-box span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(233,199,106,.4);
  line-height: 1.2;
}
.cd-box label {
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245,239,228,.6);
}

.hero-btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 14px 36px;
  border: 1px solid var(--gold-bright);
  color: var(--gold-bright);
  text-decoration: none;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .74rem;
  border-radius: 999px;
  transition: .35s ease;
}
.hero-btn:hover { background: var(--gold-bright); color: var(--dark); box-shadow: 0 0 30px -6px rgba(233,199,106,.55); }

/* kilau emas berjalan di tombol */
.hero-btn::after,
.gb-submit::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 42%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,246,222,.55) 50%, transparent 100%);
  transform: translateX(0) skewX(-16deg);
  animation: goldSheen 3.6s ease-in-out infinite;
  pointer-events: none;
}
.gb-submit::after { animation-delay: 1.2s; }
@keyframes goldSheen {
  0%, 58%  { transform: translateX(0) skewX(-16deg); }
  100%     { transform: translateX(450%) skewX(-16deg); }
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1.5px solid rgba(233,199,106,.55);
  border-radius: 14px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--gold-bright);
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ============ Section umum ============ */
section { padding: clamp(64px, 10vw, 110px) 0; }

.section-label {
  font-size: .72rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
}
.section-label::before,
.section-label::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin: 0 14px;
  vertical-align: middle;
}
.section-label::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.section-label::after  { background: linear-gradient(90deg, var(--gold), transparent); }
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  text-align: center;
  margin-bottom: 18px;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: .95rem;
}

/* ============ Sambutan ============ */
.welcome {
  background:
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.welcome-text {
  color: var(--muted);
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  margin-top: 8px;
}
.welcome-couple {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-top: 26px;
}

/* ============ Orang Tua ============ */
.family {
  position: relative;
  background:
    radial-gradient(720px 340px at 50% 44%, rgba(233,199,106,.12), transparent 72%),
    linear-gradient(180deg, var(--bg) 0%, #fffdf7 100%);
  border-bottom: 1px solid var(--line);
}
.family-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  max-width: 940px;
  margin: 14px auto 0;
}

.family-card {
  position: relative;
  background: linear-gradient(165deg, #fffdf7 0%, #fbf4e6 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 34px) clamp(18px, 3vw, 30px) clamp(26px, 4vw, 38px);
  text-align: center;
  box-shadow:
    0 16px 36px -26px rgba(74,55,40,.45),
    inset 0 0 0 1px rgba(255,255,255,.7);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.family-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(233,199,106,.34);
  border-radius: 14px;
  pointer-events: none;
  transition: border-color .35s ease;
}
.family-card:hover {
  transform: translateY(-5px);
  border-color: rgba(158,111,30,.45);
  box-shadow:
    0 22px 46px -26px rgba(158,111,30,.55),
    inset 0 0 0 1px rgba(255,255,255,.7);
}
.family-card:hover::before { border-color: rgba(233,199,106,.62); }

.family-orn { display: block; width: 132px; margin: 0 auto 14px; }
.family-orn svg { display: block; width: 100%; height: auto; overflow: visible; }

.family-role { margin-bottom: 16px; }
.family-role span {
  display: inline-block;
  font-size: .66rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(158,111,30,.28);
  background: rgba(233,199,106,.14);
  border-radius: 999px;
  padding: 6px 16px 6px 18px;
}

.family-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.7vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
}
.family-names .fn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.family-names .alm {
  font-family: var(--sans);
  font-style: normal;
  font-size: .58em;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: 3px 9px;
  transform: translateY(-1px);
}
.family-names .fn-amp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: var(--gold);
  font-style: italic;
  font-size: 1.05em;
}
.family-names .fn-amp i {
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(158,111,30,.55));
}
.family-names .fn-amp i:last-child {
  background: linear-gradient(90deg, rgba(158,111,30,.55), transparent);
}

.family-mid {
  position: relative;
  width: clamp(112px, 17vw, 148px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: familyFloat 7.5s ease-in-out infinite;
}
.family-wreath {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.family-mono {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  letter-spacing: .1em;
  color: var(--gold);
  text-shadow: 0 4px 14px rgba(158,111,30,.3);
}
.family-mono span {
  color: var(--gold-bright);
  font-style: italic;
  font-size: .82em;
}
@keyframes familyFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@media (max-width: 640px) {
  .family-grid { grid-template-columns: 1fr; gap: 20px; }
  .family-mid { order: -1; margin: 0 auto; }
  .family-orn { width: 116px; }
}
/* ============ Guestbook ============ */
.guestbook { background: var(--bg); }

.gb-form {
  max-width: 640px;
  margin: 0 auto 52px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 18px 40px -28px rgba(74,55,40,.35);
}
.gb-row { position: relative; margin-bottom: 16px; }

.gb-form input,
.gb-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  background: #faf5ec;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  resize: vertical;
  transition: border-color .25s;
}
.gb-form input:focus,
.gb-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.gb-form textarea { padding-bottom: 28px; }

.char-count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: .68rem;
  color: var(--muted);
  pointer-events: none;
}

.gb-submit {
  width: 100%;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d9a63a 0%, #a9741a 100%);
  border: none;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: .3s ease;
  box-shadow: 0 10px 24px -14px rgba(158,111,30,.8);
}
.gb-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gb-submit:disabled { opacity: .6; cursor: wait; transform: none; }

.gb-status {
  text-align: center;
  font-size: .84rem;
  margin-top: 12px;
  min-height: 1.2em;
  color: var(--gold);
}
.gb-status.err { color: #c0392b; }

/* Wall of messages */
.gb-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.gb-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp .5s ease both;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(158,111,30,.55);
  box-shadow: 0 18px 36px -20px rgba(158,111,30,.55);
}

.gb-card-head { display: flex; align-items: center; gap: 12px; }
.gb-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--gold));
}
.gb-meta { line-height: 1.3; }
.gb-name { font-weight: 600; font-size: .95rem; }
.gb-time { font-size: .72rem; color: var(--muted); }

.gb-msg {
  font-size: .92rem;
  color: #5a4a3d;
  white-space: pre-wrap;
  word-break: break-word;
}

.gb-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  padding: 30px 0;
  font-style: italic;
}

/* ============ Footer ============ */
.footer {
  background: var(--dark);
  color: rgba(245,239,228,.8);
  text-align: center;
  padding: 56px 24px;
  border-top: 1px solid rgba(233,199,106,.35);
}
.footer p { font-size: .88rem; }
.footer .monogram.small {
  color: var(--gold-bright);
  border-color: rgba(233,199,106,.5);
  box-shadow: 0 0 26px -10px rgba(233,199,106,.5), inset 0 0 22px -14px rgba(233,199,106,.7);
  margin: 0 auto 16px;
}
.footer-date {
  margin-top: 8px;
  letter-spacing: .35em;
  font-size: .72rem !important;
  color: var(--gold-bright);
}

/* ============ Envelope Cover (pembuka) ============ */
body.no-scroll { overflow: hidden; height: 100svh; }

body:not(.cover-done) .hero .fade-up { animation-play-state: paused; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(233,199,106,.34), transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(201,131,131,.16), transparent 50%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 55%, #2a1d10 100%);
  transition: opacity .85s ease, visibility .85s;
}
.cover.lift { opacity: 0; visibility: hidden; pointer-events: none; }
.cover.done { display: none; }

.cover-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.cover-eyebrow {
  font-size: .74rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: clamp(28px, 6vh, 48px);
  opacity: 0;
}
.cover.reveal .cover-eyebrow { animation: fadeUp 1s ease both; }

.cover-hint {
  margin-top: clamp(28px, 6vh, 48px);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(245,239,228,.55);
  animation: hintPulse 2.2s ease-in-out infinite;
  transition: opacity .4s;
}
.cover.opening .cover-hint,
.cover.card-out .cover-hint { opacity: 0; animation: none; }
@keyframes hintPulse {
  0%, 100% { opacity: .45; }
  50%      { opacity: 1; }
}

/* --- kelopak bunga berjatuhan --- */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petals span {
  position: absolute;
  top: -8vh;
  width: 14px;
  height: 14px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #f0d489 0%, #d9a63a 55%, rgba(201,131,131,.8) 100%);
  opacity: 0;
}
.cover.reveal .petals span { animation: petalFall linear infinite; }
.petals span:nth-child(1) { left: 8%;  animation-duration: 11s; animation-delay: 0s;   transform: scale(.9); }
.petals span:nth-child(2) { left: 22%; animation-duration: 14s; animation-delay: 2.5s; transform: scale(.6); }
.petals span:nth-child(3) { left: 36%; animation-duration: 10s; animation-delay: 5s;   transform: scale(1.1); }
.petals span:nth-child(4) { left: 50%; animation-duration: 13s; animation-delay: 1.2s; transform: scale(.75); }
.petals span:nth-child(5) { left: 63%; animation-duration: 12s; animation-delay: 4s;   transform: scale(1); }
.petals span:nth-child(6) { left: 75%; animation-duration: 15s; animation-delay: 6.5s; transform: scale(.65); }
.petals span:nth-child(7) { left: 86%; animation-duration: 11s; animation-delay: 3.2s; transform: scale(.95); }
.petals span:nth-child(8) { left: 94%; animation-duration: 13s; animation-delay: 7.5s; transform: scale(.7); }
@keyframes petalFall {
  0%   { opacity: 0; transform: translateY(-8vh) rotate(0deg) translateX(0); }
  8%   { opacity: .75; }
  50%  { transform: translateY(48vh) rotate(200deg) translateX(28px); }
  92%  { opacity: .6; }
  100% { opacity: 0; transform: translateY(112vh) rotate(420deg) translateX(-20px); }
}

/* --- partikel bunga: kelopak beterbangan di seluruh halaman --- */
.petal-field {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.cover-done .petal-field { opacity: 1; }

.petal-field > i {
  position: absolute;
  top: -16vh;
  display: block;
  opacity: 0;
  animation: petalDrift linear infinite;
}
/* tipe A — kelopak klasik */
.petal-field > i.k0 {
  border-radius: 82% 0 82% 0;
  background: linear-gradient(135deg, #f6ecd8 0%, var(--gold-bright) 58%, var(--rose) 100%);
}
/* tipe B — kelopak bulat miring */
.petal-field > i.k1 {
  border-radius: 50% 50% 52% 4%;
  background: linear-gradient(160deg, var(--gold-soft) 0%, #d9a63a 72%, rgba(201,131,131,.9) 100%);
}
/* tipe C — bunga kecil 4 kelopak */
.petal-field > i.k2 {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23f6ecd8'%3E%3Cellipse cx='12' cy='5.4' rx='3.5' ry='5.1'/%3E%3Cellipse cx='12' cy='18.6' rx='3.5' ry='5.1'/%3E%3Cellipse cx='5.4' cy='12' rx='5.1' ry='3.5'/%3E%3Cellipse cx='18.6' cy='12' rx='5.1' ry='3.5'/%3E%3Cellipse cx='7.3' cy='7.3' rx='4.6' ry='3.1' transform='rotate(-45 7.3 7.3)'/%3E%3Cellipse cx='16.7' cy='16.7' rx='4.6' ry='3.1' transform='rotate(-45 16.7 16.7)'/%3E%3Cellipse cx='16.7' cy='7.3' rx='4.6' ry='3.1' transform='rotate(45 16.7 7.3)'/%3E%3Cellipse cx='7.3' cy='16.7' rx='4.6' ry='3.1' transform='rotate(45 7.3 16.7)'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%23e9c766'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes petalDrift {
  0%   { opacity: 0; transform: translate3d(0, -16vh, 0) rotate(0deg); }
  7%   { opacity: var(--po, .75); }
  25%  { transform: translate3d(var(--sw, 26px), 22vh, 0) rotate(120deg); }
  50%  { transform: translate3d(calc(var(--sw, 26px) * -1), 52vh, 0) rotate(240deg); }
  75%  { transform: translate3d(var(--sw, 26px), 82vh, 0) rotate(360deg); }
  93%  { opacity: var(--po, .75); }
  100% { opacity: 0; transform: translate3d(calc(var(--sw, 26px) * -.35), 122vh, 0) rotate(470deg); }
}

/* --- amplop --- */
.env-wrap {
  perspective: 1400px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
}
.cover.reveal .env-wrap {
  animation: envIn 1.1s .2s cubic-bezier(.22,1,.36,1) both;
}
@keyframes envIn {
  from { opacity: 0; transform: translateY(34px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.env {
  position: relative;
  width: min(82vw, 400px);
  aspect-ratio: 3 / 2;
  filter: drop-shadow(0 28px 45px rgba(0,0,0,.45));
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.env-wrap:active .env { transform: scale(.985); }

.env-back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(155deg, #ead9ac 0%, #ddc892 60%, #cdb87f 100%);
}

.env-card {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 34%;
  bottom: 5%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(160deg, #fffcf5 0%, #f8efdc 100%);
  border: 1px solid rgba(158,111,30,.4);
  box-shadow: 0 6px 18px -8px rgba(74,55,40,.35);
  transition: transform 1.05s cubic-bezier(.22,1,.36,1), box-shadow 1.05s ease;
}
.cover.card-out .env-card {
  transform: translateY(-88%) scale(1.04);
  box-shadow: 0 34px 55px -20px rgba(0,0,0,.5);
}
.cover.lift .env-card {
  transform: translateY(-96%) scale(1.22);
  opacity: 0;
  transition: transform .85s ease, opacity .85s ease;
}
.env-card-to {
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.env-card-mono {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  letter-spacing: .1em;
  color: var(--gold);
  border: 1px solid rgba(158,111,30,.55);
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 4px 0;
}
.env-card-mono span { font-style: italic; margin: 0 .08em; color: var(--gold-soft); }
.env-card-names {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  color: var(--ink);
  line-height: 1.2;
}
.env-card-line {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 3px 0;
}
.env-card-date {
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}

.env-front {
  position: absolute;
  left: 0;
  right: 0;
  top: 32%;
  bottom: 0;
  z-index: 3;
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(180deg, rgba(74,55,40,.10), transparent 14%),
    linear-gradient(155deg, #e3cfa4 0%, #d7c08a 55%, #c9b17a 100%);
  clip-path: polygon(0 0, 50% 34%, 100% 0, 100% 100%, 0 100%);
}

.env-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60%;
  z-index: 4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #eeddb4 0%, #e0cc9c 70%, #d3bd87 100%);
  transform-origin: top center;
  backface-visibility: visible;
  transition: transform .85s cubic-bezier(.4,0,.2,1), z-index 0s .42s;
}
.cover.opening .env-flap {
  transform: rotateX(-180deg);
  z-index: 1;
}

.env-seal {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 5;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: .05em;
  color: #fff8ec;
  background: radial-gradient(circle at 35% 30%, #f6df9a 0%, #d4a53c 45%, #9a701f 100%);
  box-shadow:
    0 8px 18px -6px rgba(0,0,0,.55),
    inset 0 2px 3px rgba(255,255,255,.45),
    inset 0 -3px 6px rgba(0,0,0,.28);
  transition: transform .55s ease, opacity .55s ease;
  -webkit-tap-highlight-color: transparent;
}
.env-seal span { display: none; }
.env-seal::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255,248,236,.55);
  border-radius: 50%;
}
.env-seal::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(233,199,106,.6);
  animation: sealGlow 2.4s ease-in-out infinite;
}
@keyframes sealGlow {
  0%, 100% { transform: scale(1);   opacity: .7; }
  50%      { transform: scale(1.14); opacity: 0; }
}
.env-seal:hover { transform: translate(-50%, -50%) scale(1.06); }
.cover.opening .env-seal {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
  pointer-events: none;
}

/* ============ Tirai pembuka (curtain) ============ */
.curtain {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51.5%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 3px, transparent 3px 34px),
    repeating-linear-gradient(90deg, #6f4a1d 0 38px, #87602a 38px 66px, #5c3d18 66px 104px, #7a5322 104px 140px);
  transition: transform 1.5s cubic-bezier(.72,.02,.18,1);
  will-change: transform;
}
.curtain-l {
  left: 0;
  border-right: 2px solid rgba(233,199,106,.6);
  box-shadow: inset -34px 0 44px -22px rgba(0,0,0,.6);
}
.curtain-r {
  right: 0;
  border-left: 2px solid rgba(233,199,106,.6);
  box-shadow: inset 34px 0 44px -22px rgba(0,0,0,.6);
}
.curtain.open .curtain-l { transform: translateX(-101%); }
.curtain.open .curtain-r { transform: translateX(101%); }

.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 3px, transparent 3px 34px),
    repeating-linear-gradient(90deg, #6f4a1d 0 44px, #87602a 44px 76px, #5c3d18 76px 118px);
  border-bottom: 2px solid rgba(233,199,106,.6);
  box-shadow: 0 12px 26px -12px rgba(0,0,0,.55);
}
.curtain-valance::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px;
  background: radial-gradient(circle at 50% 0, #7a5322 10px, transparent 11px) repeat-x;
  background-size: 34px 20px;
}

.curtain-load {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  padding: 46px 64px;
  background: radial-gradient(ellipse at center, rgba(40,27,14,.72) 0%, rgba(40,27,14,.4) 55%, transparent 78%);
  border-radius: 50%;
  transition: opacity .6s ease;
}
.curtain.open .curtain-load { opacity: 0; }
.curtain-mono {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid rgba(233,199,106,.6);
  box-shadow: 0 0 36px -10px rgba(233,199,106,.5);
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: .1em;
  background:
    linear-gradient(115deg, #8a5f22 18%, #f2dc95 42%, #fff6de 50%, #f2dc95 58%, #8a5f22 82%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: monoShine 2s linear infinite;
}
.curtain-mono span { font-style: italic; margin: 0 .08em; }
.curtain-txt {
  display: block;
  font-size: .68rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: rgba(245,239,228,.75);
  animation: hintPulse 1.8s ease-in-out infinite;
}
@keyframes monoShine {
  to { background-position: -220% 0; }
}

/* ============ Hero actions ============ */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btn.ghost {
  background: rgba(255,255,255,.06);
  border-color: rgba(233,199,106,.55);
}
.hero-btn.ghost:hover { background: var(--gold-bright); color: var(--dark); }

/* ============ Sapaan personal (?to=) ============ */
.welcome-to {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(233,199,106,.14);
  border: 1px dashed rgba(158,111,30,.45);
  border-radius: 999px;
  padding: 7px 20px;
  margin-bottom: 14px;
}
.welcome-to[hidden] { display: none; }

/* ============ Detail Acara ============ */
.events { background: linear-gradient(180deg, var(--bg) 0%, #fffdf7 100%); border-bottom: 1px solid var(--line); }

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(18px, 4vw, 30px);
  max-width: 860px;
  margin: 0 auto;
}
.event-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(26px, 5vw, 40px) clamp(20px, 4vw, 34px);
  text-align: center;
  box-shadow: 0 22px 46px -32px rgba(74,55,40,.45);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.event-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(158,111,30,.22);
  border-radius: 14px;
  pointer-events: none;
}
.event-card:hover { transform: translateY(-5px); box-shadow: 0 30px 56px -32px rgba(74,55,40,.5); }

.event-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.event-tag {
  font-size: .7rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.event-time {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 14px;
}
.event-place { font-weight: 600; margin-bottom: 4px; }
.event-addr { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }

.event-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ev-btn {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fffdf7;
  background: linear-gradient(135deg, #a9741a, #7d5413);
  border: 1px solid rgba(233,199,106,.5);
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: .3s ease;
}
.ev-btn:hover { filter: brightness(1.12); box-shadow: 0 0 22px -6px rgba(158,111,30,.6); }
.ev-btn.ghost {
  background: transparent;
  color: var(--gold);
  border-color: rgba(158,111,30,.55);
}
.ev-btn.ghost:hover { background: rgba(233,199,106,.14); color: var(--ink); }

.event-note {
  text-align: center;
  color: var(--muted);
  font-size: .84rem;
  margin-top: 30px;
  font-style: italic;
}

/* ============ RSVP ============ */
.rsvp {
  background:
    radial-gradient(760px 320px at 50% 0%, rgba(158,111,30,.08), transparent 70%),
    var(--bg);
}

.rsvp-stats {
  display: flex;
  gap: clamp(10px, 3vw, 18px);
  justify-content: center;
  margin-bottom: 34px;
}
.rs-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px clamp(14px, 4vw, 30px);
  min-width: clamp(88px, 26vw, 130px);
  text-align: center;
  box-shadow: 0 14px 30px -24px rgba(74,55,40,.4);
}
.rs-box span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  color: var(--gold);
  line-height: 1.2;
}
.rs-box label {
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.rsvp-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 18px 40px -28px rgba(74,55,40,.35);
}
.rsvp-form input[type="text"] {
  width: 100%;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  background: #faf5ec;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  transition: border-color .25s;
}
.rsvp-form input[type="text"]:focus { outline: none; border-color: var(--gold); background: #fff; }

.rsvp-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.rc { position: relative; display: block; cursor: pointer; }
.rc input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.rc-face {
  display: block;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .08em;
  padding: 13px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf5ec;
  color: var(--muted);
  transition: .25s ease;
  user-select: none;
}
.rc:hover .rc-face { border-color: var(--gold-soft); }
.rc input:checked + .rc-face {
  background: linear-gradient(135deg, rgba(233,199,106,.32), rgba(158,111,30,.18));
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(158,111,30,.35), 0 8px 20px -14px rgba(158,111,30,.8);
}
.rc input:focus-visible + .rc-face { outline: 2px solid var(--gold); outline-offset: 2px; }

.rsvp-guests {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #faf5ec;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rsvp-guests label { font-size: .85rem; color: var(--muted); }
.rsvp-guests.hide { display: none; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--gold);
  font-size: 1.05rem;
  cursor: pointer;
  transition: .2s;
  line-height: 1;
}
.stepper button:hover { background: rgba(233,199,106,.2); border-color: var(--gold-soft); }
.stepper input {
  width: 52px;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  border: none;
  background: transparent;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.rsvp-form .gb-submit { width: 100%; }

/* ============ Musik floating ============ */
.music-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(233,199,106,.65);
  background: linear-gradient(145deg, rgba(69,49,24,.94), rgba(48,33,19,.94));
  box-shadow: 0 10px 28px -12px rgba(0,0,0,.6), 0 0 24px -8px rgba(233,199,106,.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: musicFloat 3.4s ease-in-out infinite;
}
.music-btn:hover { transform: scale(1.08); }
.music-btn[hidden] { display: none; }
@keyframes musicFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}
.mb-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.mb-bars i {
  display: block;
  width: 3.5px;
  height: 6px;
  border-radius: 2px;
  background: var(--gold-bright);
}
.music-btn.playing .mb-bars i { animation: eq .9s ease-in-out infinite; }
.music-btn.playing .mb-bars i:nth-child(2) { animation-delay: .15s; }
.music-btn.playing .mb-bars i:nth-child(3) { animation-delay: .3s; }
.music-btn.playing .mb-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq {
  0%, 100% { height: 6px; }
  50%      { height: 20px; }
}
.music-btn:not(.playing) .mb-bars i {
  height: 6px;
  animation: none;
  opacity: .55;
}
.music-btn:not(.playing) .mb-bars i:nth-child(2) { height: 12px; }
.music-btn:not(.playing) .mb-bars i:nth-child(3) { height: 9px; }

/* ============ Footer credit ============ */
.footer-credit {
  margin-top: 14px;
  font-size: .66rem;
  letter-spacing: .04em;
  color: rgba(138,116,88,.75);
}

/* ============ Responsive ============ */
@media (max-width: 520px) {
  .monogram { width: 104px; height: 104px; }
  .cd-box { padding: 11px 8px; }
  .countdown { gap: 7px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .hero-btn { width: min(300px, 86vw); text-align: center; }
  .rsvp-choices { grid-template-columns: 1fr; }
  .music-btn { left: 14px; bottom: 14px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-btn::after,
  .gb-submit::after { display: none; }
  .curtain-panel { transition: none; }
  .curtain-mono,
  .curtain-txt { animation: none; }
  .curtain-mono { background: none; color: var(--gold-bright); }
  .music-btn,
  .music-btn.playing .mb-bars i { animation: none; }
  .event-card:hover { transform: none; }
  .hero-video { display: none; }
  .hero-decor { animation: none; }
  .petal-field { display: none; }
  .family-mid { animation: none; }
}
