/* =============================================================================
   KEEPSAKE WEDDING — tier premium (Eksklusif), keepsake vintage ala album
   kenangan: amplop "click to open" + bingkai renda + segel lilin + bingkai
   oval perak ukir + kartu perkamen. Arah "album pernikahan warisan": latar
   krem hangat, aksen olive-emas, hijau gelap di section detail, foto
   berbingkai OVAL perak. Tipografi: Playfair Display (display) +
   EB Garamond (teks) + Great Vibes (nama script).
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/keepsake-wedding-vol-1.{hash}.css`. JANGAN di-import dari
   index.tsx (DECISIONS #31) — ia dikirim lewat
   <ThemeStyles slug="keepsake-wedding-vol-1" />.
============================================================================= */

.kwv {
  --kwv-acc: #8a7a3c;
  --kwv-acc-text: #6b5d2a;
  --kwv-on-acc: #ffffff;
  --kwv-paper: #f6f0e2;
  --kwv-paper-2: #efe7d0;
  --kwv-card: #fffdf6;
  --kwv-ink: #3a332a;
  --kwv-muted: rgba(58, 51, 42, 0.72);
  --kwv-hairline: rgba(138, 122, 60, 0.35);
  --kwv-green: #3f5a34;
  --kwv-silver: #b8b8b8;
  --kwv-disp-stack: var(--kwv-disp), Georgia, "Times New Roman", serif;
  --kwv-script-stack: var(--kwv-script), "Great Vibes", cursive;
  --kwv-body-stack: var(--kwv-body), Georgia, serif;

  position: relative;
  background: var(--kwv-paper);
  color: var(--kwv-ink);
  font-family: var(--kwv-body-stack);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.kwv *,
.kwv *::before,
.kwv *::after {
  box-sizing: border-box;
}
.kwv ::selection {
  background: var(--kwv-acc);
  color: var(--kwv-on-acc);
}

.kwv-stage {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  border-inline: 1px solid var(--kwv-hairline);
  background-color: var(--kwv-paper);
  /* Kertas album: tekstur titik halus. */
  background-image: radial-gradient(
    rgba(138, 122, 60, 0.08) 1px,
    transparent 1.5px
  );
  background-size: 18px 18px;
}

.kwv-section {
  position: relative;
  padding: 56px 24px;
  border-top: 1px solid var(--kwv-hairline);
  scroll-margin-top: 12px;
}
.kwv-section:first-child {
  border-top: 0;
}

.kwv-eyebrow {
  font-family: var(--kwv-disp-stack);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--kwv-acc-text);
  text-align: center;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
/* Bunga pink album mengapit label. */
.kwv-eyebrow::before,
.kwv-eyebrow::after {
  content: "❀";
  font-size: 13px;
  color: var(--kwv-acc);
  letter-spacing: 0;
}

.kwv-title {
  font-family: var(--kwv-disp-stack);
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
  margin: 8px 0 0;
  color: var(--kwv-ink);
}

.kwv-foto {
  width: min(62%, 240px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 16px;
  overflow: hidden;
  /* Bingkai OVAL perak ukir: oval + garis ganda perak. */
  border-radius: 50%;
  border: 2px solid var(--kwv-silver);
  outline: 1px solid var(--kwv-acc);
  outline-offset: 6px;
  background: color-mix(in srgb, var(--kwv-acc) 12%, transparent);
  display: grid;
  place-items: center;
}
.kwv-foto span {
  font-family: var(--kwv-disp-stack);
  font-size: 56px;
  color: var(--kwv-acc-text);
}
.kwv-section:has(.kwv-foto) .kwv-title {
  font-family: var(--kwv-script-stack);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
}

/* Hero: krem album hangat. */
.kwv-hero-sec {
  background: linear-gradient(180deg, var(--kwv-paper-2), var(--kwv-paper));
  text-align: center;
}
.kwv-hero-sec p:not(.kwv-eyebrow) {
  line-height: 1.8;
  color: var(--kwv-muted);
  max-width: 34em;
  margin: 18px auto 0;
}

/* Countdown — HIJAU GELAP "THE DETAILS", kotak krem berbingkai emas. */
.kwv-countdown-sec {
  background:
    radial-gradient(
      120% 90% at 50% 0%,
      rgba(138, 122, 60, 0.25),
      transparent 55%
    ),
    linear-gradient(160deg, #3f5a34, #2c4023);
  color: var(--kwv-paper);
  border-top-color: #2c4023;
}
.kwv-countdown-sec .kwv-eyebrow {
  color: rgba(246, 240, 226, 0.85);
}
.kwv .countdown {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.kwv .count-box {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 16px 4px 14px;
  background: var(--kwv-card);
  border: 1px solid var(--kwv-acc);
  border-radius: 999px 999px 12px 12px;
}
.kwv .count-num {
  font-family: var(--kwv-disp-stack);
  font-size: clamp(26px, 8vw, 36px);
  font-variant-numeric: tabular-nums;
  display: block;
  color: var(--kwv-acc-text);
}
.kwv .count-label {
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--kwv-muted);
  margin-top: 6px;
  display: block;
}
.kwv .countdown-done {
  font-family: var(--kwv-disp-stack);
  font-size: 22px;
  text-align: center;
  margin-top: 28px;
  color: var(--kwv-paper);
}

/* Kartu acara = AMPLOP: krem, lipatan segitiga di atas (clip-path). */
.kwv-event {
  position: relative;
  border: 1px solid var(--kwv-hairline);
  border-radius: 10px;
  padding: 44px 20px 26px;
  margin-top: 18px;
  background: var(--kwv-card);
  text-align: center;
  box-shadow: 0 8px 22px rgba(138, 122, 60, 0.14);
}
/* Lipatan amplop: segitiga krem-gelap di puncak kartu. */
.kwv-event::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: var(--kwv-paper-2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid var(--kwv-hairline);
}
.kwv-event .kwv-title {
  font-size: 24px;
}
.kwv-event p {
  margin: 8px 0 0;
  line-height: 1.7;
}
.kwv-event a {
  display: inline-block;
  margin-top: 18px;
  background: var(--kwv-acc);
  color: var(--kwv-on-acc);
  border-radius: 999px;
  padding: 11px 26px;
  font-family: var(--kwv-disp-stack);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.kwv-story-item,
.kwv-bank {
  border: 1px solid var(--kwv-hairline);
  border-radius: 10px;
  padding: 24px 18px;
  margin-top: 16px;
  background: var(--kwv-card);
  text-align: center;
}
.kwv-story-item .kwv-title,
.kwv-bank .kwv-title {
  font-size: 22px;
}
.kwv-story-item p,
.kwv-bank p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--kwv-muted);
}

/* Galeri: foto oval berbingkai perak. */
.kwv-section > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 999px 999px 12px 12px;
  border: 2px solid var(--kwv-silver);
  margin-top: 14px;
}

/* Cover — TERANG krem + amplop + segel lilin, nama script. */
.kwv-cover {
  display: none;
}
.kwv.is-js .kwv-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--kwv-ink);
  background-color: var(--kwv-paper);
  background-image:
    radial-gradient(rgba(138, 122, 60, 0.08) 1px, transparent 1.5px),
    linear-gradient(
      180deg,
      rgba(246, 240, 226, 0.5) 0%,
      rgba(246, 240, 226, 0.92) 35%,
      rgba(246, 240, 226, 0.92) 65%,
      rgba(246, 240, 226, 0.5) 100%
    );
  background-size:
    18px 18px,
    cover;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.kwv.is-js.is-open .kwv-cover {
  transform: translateY(-100%);
}
@media (prefers-reduced-motion: reduce) {
  .kwv.is-js .kwv-cover {
    transition: none;
  }
}
.kwv-cover-inner {
  position: relative;
  text-align: center;
  padding: 24px;
  max-width: 430px;
  width: 100%;
}
/* Amplop + segel lilin: persegi krem berlipat + lingkaran emas. */
.kwv-cover-inner::before {
  content: "";
  display: block;
  width: 150px;
  height: 96px;
  margin: 0 auto 18px;
  background:
    linear-gradient(
      180deg,
      transparent 0 34px,
      rgba(138, 122, 60, 0.4) 34px 36px,
      transparent 36px
    ),
    var(--kwv-card);
  clip-path: polygon(0 0, 50% 42%, 100% 0, 100% 100%, 0 100%);
  border: 1px solid var(--kwv-acc);
}
.kwv-cover__ornament {
  color: var(--kwv-acc);
  font-size: 22px;
  margin: 0 0 10px;
}
.kwv-cover .kwv-title {
  font-family: var(--kwv-script-stack);
  font-weight: 400;
  font-size: clamp(46px, 12vw, 62px);
  line-height: 1.1;
  color: var(--kwv-acc-text);
}
.kwv-guest {
  margin-top: 22px;
  color: var(--kwv-muted);
}
.kwv-guest small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.kwv-guest strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--kwv-ink);
}
.kwv-open {
  margin-top: 26px;
  font-family: var(--kwv-disp-stack);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kwv-on-acc);
  background: var(--kwv-acc);
  border: 1px solid var(--kwv-acc);
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
}
.kwv-open:hover {
  background: var(--kwv-acc-text);
}
.kwv-open:active {
  transform: translateY(1px);
}

/* Tombol musik. */
.kwv-music {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--kwv-acc);
  background: var(--kwv-card);
  color: var(--kwv-acc-text);
  display: none;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(58, 51, 42, 0.2);
}
.kwv.is-open .kwv-music {
  display: grid;
}

/* Hormati prefers-reduced-motion: konten tetap lengkap tanpa animasi. */
@media (prefers-reduced-motion: reduce) {
  .kwv * {
    animation: none !important;
    transition: none !important;
  }
}

/* Elemen melayang 3D — container `perspective` + tiap item `translate3d`
   dengan `--drift-z` berbeda (-80px s.d. 80px) untuk parallax/kedalaman.
   Hanya transform/opacity yang dianimasikan. */
.kwv-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.kwv-drift--page {
  position: fixed;
  z-index: 40;
}
.kwv-drift__item {
  position: absolute;
  top: 0;
  display: block;
  animation: kwv-drift-fall linear infinite;
  will-change: transform, opacity;
}
.kwv-drift__item svg {
  display: block;
  animation: kwv-drift-sway 2.2s ease-in-out infinite alternate;
}
.kwv-drift__item:nth-child(even) svg {
  animation-duration: 2.8s;
}
.kwv-drift--page .kwv-drift__item svg {
  opacity: 0.55;
}
@keyframes kwv-drift-fall {
  0% {
    transform: translate3d(0, -12vh, var(--drift-z, 0px)) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.78;
  }
  100% {
    transform: translate3d(0, 112vh, var(--drift-z, 0px)) rotate(300deg);
    opacity: 0;
  }
}
@keyframes kwv-drift-sway {
  from {
    transform: translateX(-18px) rotate(-14deg);
  }
  to {
    transform: translateX(18px) rotate(14deg);
  }
}

/* Kedalaman 3D sampul — judul & nama tamu di lapisan translateZ berbeda,
   halus dan tidak mengubah layout. */
.kwv.is-js .kwv-cover {
  perspective: 1000px;
}
.kwv-cover-inner {
  transform-style: preserve-3d;
}
.kwv-cover-inner .kwv-title {
  transform: translateZ(36px);
}
.kwv-cover-inner .kwv-guest {
  transform: translateZ(16px);
}
@media (prefers-reduced-motion: reduce) {
  .kwv-drift {
    display: none;
  }
}

/* === Motion Bali (dedup+motion 12 Nov 2026): reveal-on-scroll, latar, panjang === */
/* Reveal: konten section muncul saat di-scroll (zoom-in halus ala referensi).
   `.is-js` hanya ada setelah JS jalan -> tanpa JS konten tetap terlihat. */
.kwv.is-js .reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.965);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.kwv.is-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Foto & kartu di dalam section: muncul menyusul (stagger) setelah section. */
.kwv.is-js .reveal img,
.kwv.is-js .reveal .kwv-card,
.kwv.is-js .reveal .kwv-foto {
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition:
    opacity 0.9s ease 0.18s,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
}
.kwv.is-js .reveal.is-visible img,
.kwv.is-js .reveal.is-visible .kwv-card,
.kwv.is-js .reveal.is-visible .kwv-foto {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .kwv.is-js .reveal,
  .kwv.is-js .reveal img,
  .kwv.is-js .reveal .kwv-card,
  .kwv.is-js .reveal .kwv-foto {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* Latar berlapis tiap section: semburat aksen di atas + gradien kertas ke aksen. */
.kwv-section {
  background:
    radial-gradient(
      120% 55% at 50% 0%,
      color-mix(in srgb, var(--kwv-acc) 12%, transparent),
      transparent 62%
    ),
    linear-gradient(
      180deg,
      var(--kwv-paper),
      color-mix(in srgb, var(--kwv-paper) 84%, var(--kwv-acc))
    );
  padding: clamp(84px, 14vw, 128px) 20px;
}
/* Preview lebih panjang: foto mempelai & galeri lebih besar. */
.kwv-foto {
  width: min(82%, 320px);
}
.kwv-section > img {
  border-radius: 16px;
  margin-bottom: 18px;
}

/* === Motion Bali v2 (12 Nov 2026): ritme latar selang-seling + bingkai === */
/* Section genap: latar aksen pekat + pola wajik samar (ritme terang-gelap). */
div[data-section-id]:nth-child(even) .kwv-section {
  background:
    radial-gradient(
      110% 50% at 50% 0%,
      color-mix(in srgb, var(--kwv-acc) 30%, transparent),
      transparent 65%
    ),
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--kwv-acc) 4%, transparent) 0 2px,
      transparent 2px 26px
    ),
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--kwv-acc) 4%, transparent) 0 2px,
      transparent 2px 26px
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--kwv-acc) 28%, var(--kwv-paper)),
      color-mix(in srgb, var(--kwv-acc) 20%, var(--kwv-paper))
    );
}
/* Bingkai ornamen ganda di tiap section (kartu berbingkai emas/aksen). */
.kwv-section {
  border: 2px solid color-mix(in srgb, var(--kwv-acc) 60%, transparent);
  outline: 1px solid color-mix(in srgb, var(--kwv-acc) 40%, transparent);
  outline-offset: 6px;
  border-radius: 24px;
  margin: 20px 14px;
}
/* Foto mempelai bentuk arch (lengkung atas) + bingkai emas + bayangan. */
.kwv-foto {
  border-radius: 999px 999px 18px 18px;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--kwv-acc) 45%, transparent);
}
/* Drift lebih kentara: opacity naik (page variant). */
.kwv-drift--page .kwv-drift__item svg {
  opacity: 0.4;
}

/* === Tombol Lihat Lokasi (12 Nov 2026): lengkapi data preview === */
.kwv-maps {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--kwv-acc);
  color: var(--kwv-on-acc, #fff);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
