/* =============================================================================
   Brown Traditional — tier Premium (Wedding26).
   Konsep: Cokelat susu/tan + krem; pola mandala renda cokelat di latar; bingkai foto oval ukir cokelat-emas; nuansa kertas batik cokelat.
   Palet: aksen #8a6a4f, kertas #f5ede3, tinta #3d2c1e.
   Tipografi: Great Vibes (script) + EB Garamond + Karla.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/pretty-pink.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="pretty-pink" />.
============================================================================= */

.pp {
  --pp-acc: #8a6a4f;
  --pp-acc-text: #6b5038;
  --pp-on-acc: #ffffff;
  --pp-paper: #f5ede3;
  --pp-ink: #3d2c1e;
  --pp-muted: rgba(61, 44, 30, 0.68);
  --pp-line: rgba(138, 106, 79, 0.4);
  --pp-card: #fbf6ee;
  --pp-dark: #3d2c1e;
  --pp-dark-ink: #f2e6d4;
  --pp-dark-muted: rgba(242, 230, 212, 0.75);
  --pp-dark-line: rgba(201, 162, 39, 0.4);
  --pp-disp-stack: var(--pp-disp), Georgia, serif;
  --pp-body-stack: var(--pp-body), system-ui, sans-serif;
  --pp-script-stack: var(--pp-script), "Great Vibes", cursive;

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

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

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

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

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

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

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

/* Galeri: gambar langsung anak section → grid 2 kolom. */
.pp-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. */
.pp-section > div > button {
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--pp-acc);
  background: var(--pp-acc);
  color: var(--pp-on-acc);
  font-family: var(--pp-body-stack);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

/* Pola mandala renda cokelat di seluruh latar stage. */
.pp-stage {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%238a6a4f' stroke-opacity='0.13'%3E%3Ccircle cx='36' cy='36' r='30'/%3E%3Ccircle cx='36' cy='36' r='22'/%3E%3Ccircle cx='36' cy='36' r='12'/%3E%3Cpath d='M36 6 L41 30 L36 34 L31 30 Z'/%3E%3Cpath d='M36 66 L41 42 L36 38 L31 42 Z'/%3E%3Cpath d='M6 36 L30 31 L34 36 L30 41 Z'/%3E%3Cpath d='M66 36 L42 31 L38 36 L42 41 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
/* Bingkai ukir klasik: garis ganda cokelat di sekeliling stage. */
.pp-stage {
  border-inline: 1px solid rgba(138, 106, 79, 0.5);
  outline: 1px solid rgba(138, 106, 79, 0.25);
  outline-offset: -9px;
}
/* Foto oval ukir: cincin ganda cokelat-emas + bayangan hangat. */
.pp-foto {
  outline: 1px solid #b08d57;
  outline-offset: 5px;
  box-shadow: 0 12px 28px rgba(107, 80, 56, 0.28);
}
/* Countdown: kotak putih berbingkai ukir cokelat. */
.pp .count-box {
  border: 1px solid var(--pp-acc);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 3px #fbf6ee,
    inset 0 0 0 4px rgba(138, 106, 79, 0.5);
}
.pp .count-num {
  color: var(--pp-acc-text);
}
/* Section jadwal: kartu krem berbingkai ganda. */
.pp-stage > div[data-section-id="schedule"] > .pp-section {
  background: var(--pp-card);
  border-top: 1px solid var(--pp-line);
  border-bottom: 1px solid var(--pp-line);
}

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

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

/* Hormati prefers-reduced-motion: konten tetap lengkap tanpa animasi. */
@media (prefers-reduced-motion: reduce) {
  .pp * {
    animation: none !important;
    transition: none !important;
  }
  .pp.is-js .pp-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. */
.pp-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 700px;
}
.pp-drift--page {
  position: fixed;
  z-index: 40;
}
.pp-drift__item {
  position: absolute;
  top: 0;
  display: block;
  transform-style: preserve-3d;
}
.pp-drift__move {
  display: block;
  animation: pp-drift-spin linear infinite;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
.pp-drift__item svg {
  display: block;
  animation: pp-drift-sway 2.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.25));
}
.pp-drift__item:nth-child(even) svg {
  animation-duration: 3s;
}
.pp-drift--page .pp-drift__item svg {
  opacity: 0.55;
}
@keyframes pp-drift-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pp-drift-sway {
  from {
    transform: translateX(-16px) rotate(-12deg) rotateY(-10deg);
  }
  to {
    transform: translateX(16px) rotate(12deg) rotateY(10deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pp-drift {
    display: none;
  }
}

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

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