/* =============================================================================
   Lilac flower — tier Premium (Wedding26).
   Konsep: Putih + ungu lilac/mauve + pink pucat; cat air lavender di tepi; foto bundar berbingkai sapuan kuas ungu; header ungu.
   Palet: aksen #a86b8a, kertas #fdf9fb, tinta #3d2c36.
   Tipografi: Great Vibes (script) + Cormorant Garamond + Jost.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/lilac-flower.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="lilac-flower" />.
============================================================================= */

.lf {
  --lf-acc: #a86b8a;
  --lf-acc-text: #86536e;
  --lf-on-acc: #ffffff;
  --lf-paper: #fdf9fb;
  --lf-ink: #3d2c36;
  --lf-muted: rgba(61, 44, 54, 0.68);
  --lf-line: rgba(168, 107, 138, 0.4);
  --lf-card: #ffffff;
  --lf-dark: #86536e;
  --lf-dark-ink: #f8ecf2;
  --lf-dark-muted: rgba(248, 236, 242, 0.78);
  --lf-dark-line: rgba(248, 236, 242, 0.35);
  --lf-disp-stack: var(--lf-disp), Georgia, "Times New Roman", serif;
  --lf-body-stack: var(--lf-body), system-ui, sans-serif;
  --lf-script-stack: var(--lf-script), "Great Vibes", cursive;

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

.lf-stage {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.lf-section {
  position: relative;
  padding: 56px 24px;
}

.lf-eyebrow {
  font-family: var(--lf-body-stack);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lf-acc-text);
  text-align: center;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

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

.lf-foto {
  width: min(62%, 240px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid #a86b8a;
  background: color-mix(in srgb, var(--lf-acc) 18%, transparent);
  display: grid;
  place-items: center;
}
.lf-foto span {
  font-family: var(--lf-disp-stack);
  font-size: 56px;
  color: var(--lf-acc-text);
}
.lf-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Countdown bersama (kelas generik dari `@/themes/_shared/motion`). */
.lf .countdown {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  justify-content: center;
}
.lf .count-box {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 16px 4px 14px;
  background: var(--lf-card);
  border: 1px solid var(--lf-line);
  border-radius: 14px;
}
.lf .count-num {
  font-family: var(--lf-disp-stack);
  font-size: clamp(26px, 8vw, 36px);
  font-variant-numeric: tabular-nums;
  display: block;
  color: var(--lf-ink);
}
.lf .count-label {
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--lf-muted);
  margin-top: 6px;
  display: block;
}
.lf .countdown-done {
  font-family: var(--lf-disp-stack);
  font-size: 22px;
  text-align: center;
  margin-top: 28px;
}

/* Galeri: gambar langsung anak section → grid 2 kolom. */
.lf-section > img {
  width: calc(50% - 6px);
  margin: 3px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  vertical-align: top;
}

/* Tombol salin (amplop): satu-satunya <button> anak langsung kartu bank. */
.lf-section > div > button {
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--lf-acc);
  background: var(--lf-acc);
  color: var(--lf-on-acc);
  font-family: var(--lf-body-stack);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

/* Sapuan kuas cat air ungu di tepi stage (blob lavender). */
.lf-stage {
  background-image:
    radial-gradient(
      90px 60px at 2% 8%,
      rgba(168, 107, 138, 0.28),
      transparent 70%
    ),
    radial-gradient(
      70px 50px at 98% 22%,
      rgba(190, 140, 170, 0.25),
      transparent 70%
    ),
    radial-gradient(
      80px 56px at 96% 82%,
      rgba(168, 107, 138, 0.22),
      transparent 70%
    ),
    radial-gradient(
      60px 44px at 4% 92%,
      rgba(190, 140, 170, 0.22),
      transparent 70%
    );
}
/* Header UNGU: section jadwal ungu solid. */
.lf-stage > div[data-section-id="schedule"] > .lf-section {
  background: var(--lf-dark);
  color: var(--lf-darkInk);
}
.lf-stage > div[data-section-id="schedule"] .lf-eyebrow,
.lf-stage > div[data-section-id="schedule"] .lf-title {
  color: var(--lf-darkInk);
}
/* Foto bundar: sapuan kuas = cincin tebal tak rata (border + outline berlapis). */
.lf-foto {
  border: 4px solid var(--lf-acc);
  outline: 6px solid rgba(168, 107, 138, 0.18);
  outline-offset: 3px;
  box-shadow: 0 10px 26px rgba(134, 83, 110, 0.25);
}
/* Countdown: angka ungu di kotak putih. */
.lf .count-box {
  border-color: var(--lf-acc);
}
.lf .count-num {
  color: var(--lf-acc-text);
}
/* Judul script ungu; garis sapuan di bawah judul. */
.lf-title {
  color: #86536e;
}
.lf-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 5px;
  margin: 12px auto 0;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 107, 138, 0.65),
    transparent
  );
}

/* Cover — layar penuh saat JS jalan; wipe ke atas saat dibuka. */
.lf-cover {
  display: none;
}
.lf.is-js .lf-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fdf9fb 0%, #f5e8ef 100%);
  color: #3d2c36;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.lf.is-js.is-open .lf-cover {
  transform: translateY(-100%);
}
.lf-cover-inner {
  position: relative;
  text-align: center;
  max-width: 420px;
  width: calc(100% - 48px);
  padding: 40px 24px;
  margin: 0 auto;
}
.lf-open {
  margin-top: 28px;
  padding: 13px 34px;
  border-radius: 999px;
  border: 1px solid var(--lf-acc);
  background: var(--lf-acc);
  color: var(--lf-on-acc);
  font-family: var(--lf-body-stack);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Tombol musik mengambang (muncul setelah cover dibuka). */
.lf-music {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--lf-acc);
  background: var(--lf-paper);
  color: var(--lf-acc-text);
  display: none;
  place-items: center;
  cursor: pointer;
}
.lf.is-open .lf-music {
  display: grid;
}

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

/* Elemen melayang 3D (drift.tsx): container pakai perspective, tiap item
   translateZ berbeda (-70px s.d. +75px) untuk kedalaman/parallax; hanya
   transform/opacity yang dianimasikan. Sampul juga berlapis 3D halus:
   judul/eyebrow/tombol di translateZ berbeda di atas perspective sampul. */
.lf-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 700px;
}
.lf-drift--page {
  position: fixed;
  z-index: 40;
}
.lf-drift__item {
  position: absolute;
  top: 0;
  display: block;
  transform-style: preserve-3d;
}
.lf-drift__move {
  display: block;
  animation: lf-drift-fall linear infinite;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
.lf-drift__item svg {
  display: block;
  animation: lf-drift-sway 2.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.25));
}
.lf-drift__item:nth-child(even) svg {
  animation-duration: 3s;
}
.lf-drift--page .lf-drift__item svg {
  opacity: 0.55;
}
@keyframes lf-drift-fall {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.78;
  }
  100% {
    transform: translate3d(0, 112vh, 0) rotate(300deg);
    opacity: 0;
  }
}
@keyframes lf-drift-sway {
  from {
    transform: translateX(-16px) rotate(-12deg) rotateY(-10deg);
  }
  to {
    transform: translateX(16px) rotate(12deg) rotateY(10deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lf-drift {
    display: none;
  }
}

/* Lapisan sampul 3D halus: judul paling depan, eyebrow & tombol di belakangnya. */
.lf-cover {
  perspective: 1100px;
}
.lf-cover-inner,
.lf-cover-inner > div {
  transform-style: preserve-3d;
}
.lf-cover-inner .lf-eyebrow {
  transform: translateZ(14px);
}
.lf-cover-inner .lf-title {
  transform: translateZ(30px);
}
.lf-cover-inner .lf-open {
  transform: translateZ(20px);
}

/* === 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. */
.lf.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;
}
.lf.is-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Foto & kartu di dalam section: muncul menyusul (stagger) setelah section. */
.lf.is-js .reveal img,
.lf.is-js .reveal .lf-card,
.lf.is-js .reveal .lf-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;
}
.lf.is-js .reveal.is-visible img,
.lf.is-js .reveal.is-visible .lf-card,
.lf.is-js .reveal.is-visible .lf-foto {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .lf.is-js .reveal,
  .lf.is-js .reveal img,
  .lf.is-js .reveal .lf-card,
  .lf.is-js .reveal .lf-foto {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* Latar berlapis tiap section: semburat aksen di atas + gradien kertas ke aksen. */
.lf-section {
  background:
    radial-gradient(
      120% 55% at 50% 0%,
      color-mix(in srgb, var(--lf-acc) 12%, transparent),
      transparent 62%
    ),
    linear-gradient(
      180deg,
      var(--lf-paper),
      color-mix(in srgb, var(--lf-paper) 84%, var(--lf-acc))
    );
  padding: clamp(84px, 14vw, 128px) 20px;
}
/* Preview lebih panjang: foto mempelai & galeri lebih besar. */
.lf-foto {
  width: min(82%, 320px);
}
.lf-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) .lf-section {
  background:
    radial-gradient(
      110% 50% at 50% 0%,
      color-mix(in srgb, var(--lf-acc) 30%, transparent),
      transparent 65%
    ),
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--lf-acc) 4%, transparent) 0 2px,
      transparent 2px 26px
    ),
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--lf-acc) 4%, transparent) 0 2px,
      transparent 2px 26px
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--lf-acc) 28%, var(--lf-paper)),
      color-mix(in srgb, var(--lf-acc) 20%, var(--lf-paper))
    );
}
/* Bingkai ornamen ganda di tiap section (kartu berbingkai emas/aksen). */
.lf-section {
  border: 2px solid color-mix(in srgb, var(--lf-acc) 60%, transparent);
  outline: 1px solid color-mix(in srgb, var(--lf-acc) 40%, transparent);
  outline-offset: 6px;
  border-radius: 24px;
  margin: 20px 14px;
}
/* Foto mempelai bentuk arch (lengkung atas) + bingkai emas + bayangan. */
.lf-foto {
  border-radius: 999px 999px 18px 18px;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--lf-acc) 45%, transparent);
}
/* Drift lebih kentara: opacity naik (page variant). */
.lf-drift--page .lf-drift__item svg {
  opacity: 0.4;
}

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