/* =============================================================================
   Gold Batik — tier Premium (Wedding26).
   Konsep: Hitam pekat + batik emas (mega mendung/kawung) besar di header & footer cover; script emas; foto hitam-putih full-width; ayat Ar-Rum; mewah adat gelap sakral.
   Palet: aksen #c9a227, kertas #0d0c0a, tinta #efe7d2.
   Tipografi: Great Vibes (script) + Cinzel + Jost.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/gold-batik.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="gold-batik" />.
============================================================================= */

.gb {
  --gb-acc: #c9a227;
  --gb-acc-text: #d9b64a;
  --gb-on-acc: #141210;
  --gb-paper: #0d0c0a;
  --gb-ink: #efe7d2;
  --gb-muted: rgba(239, 231, 210, 0.68);
  --gb-line: rgba(201, 162, 39, 0.45);
  --gb-card: #171512;
  --gb-dark: #080706;
  --gb-dark-ink: #efe7d2;
  --gb-dark-muted: rgba(239, 231, 210, 0.7);
  --gb-dark-line: rgba(201, 162, 39, 0.5);
  --gb-disp-stack: var(--gb-disp), "Times New Roman", serif;
  --gb-body-stack: var(--gb-body), system-ui, sans-serif;
  --gb-script-stack: var(--gb-script), "Great Vibes", cursive;

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

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

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

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

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

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

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

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

/* Motif batik kawung emas di latar stage (4 kelopak). */
.gb-stage {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='%23c9a227' stroke-opacity='0.20'%3E%3Cellipse cx='22' cy='11' rx='7' ry='9'/%3E%3Cellipse cx='22' cy='33' rx='7' ry='9'/%3E%3Cellipse cx='11' cy='22' rx='9' ry='7'/%3E%3Cellipse cx='33' cy='22' rx='9' ry='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 44px 44px;
}
/* Mega mendung emas besar di header & footer cover (busur berlapis). */
.gb-cover::before,
.gb-cover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 54px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='54'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='1.4' stroke-opacity='0.7'%3E%3Cpath d='M0 44 Q15 22 30 44 Q45 22 60 44 Q75 22 90 44 Q105 22 120 44'/%3E%3Cpath d='M0 54 Q15 34 30 54 Q45 34 60 54 Q75 34 90 54 Q105 34 120 54'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 54px;
}
.gb-cover::before {
  top: 4%;
}
.gb-cover::after {
  bottom: 4%;
  transform: scaleY(-1);
}
/* Foto HITAM-PUTIH (konsep kunci: foto B&W). */
.gb-foto img {
  filter: grayscale(1) contrast(1.06);
}
.gb-foto {
  outline: 1px solid rgba(201, 162, 39, 0.5);
  outline-offset: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}
/* Galeri juga hitam-putih. */
.gb-section > img {
  filter: grayscale(1) contrast(1.05);
}
/* Judul script emas; eyebrow kapital emas. */
.gb-title {
  color: #e3c15c;
}
.gb-eyebrow {
  color: #d9b64a;
}
/* Countdown: kotak hitam berbingkai emas. */
.gb .count-box {
  background: #080706;
  border-color: var(--gb-line);
}
.gb .count-num {
  color: #e3c15c;
}
/* Section jadwal: pita batik emas di atas (garis ganda). */
.gb-stage > div[data-section-id="schedule"] > .gb-section {
  border-top: 3px double var(--gb-acc);
  border-bottom: 3px double var(--gb-acc);
}

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

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

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

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

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