/* =============================================================================
   Sakura in japan — tier Premium (Wedding26).
   Konsep: Krem + pink sakura + merah marun; ranting sakura + kelopak jatuh di seluruh halaman; bingkai bunga sakura di tepi section; galeri kebun sakura; romantis Jepang musim semi.
   Palet: aksen #d98a9e, kertas #fdf6f1, tinta #4a2c30.
   Tipografi: Great Vibes (script) + Cormorant Garamond + Jost.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/sakura-in-japan.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="sakura-in-japan" />.
============================================================================= */

.sij {
  --sij-acc: #d98a9e;
  --sij-acc-text: #a34a5e;
  --sij-on-acc: #ffffff;
  --sij-paper: #fdf6f1;
  --sij-ink: #4a2c30;
  --sij-muted: rgba(74, 44, 48, 0.68);
  --sij-line: rgba(217, 138, 158, 0.45);
  --sij-card: #fffaf6;
  --sij-dark: #7a2e3a;
  --sij-dark-ink: #fbe9e6;
  --sij-dark-muted: rgba(251, 233, 230, 0.78);
  --sij-dark-line: rgba(251, 233, 230, 0.35);
  --sij-disp-stack: var(--sij-disp), Georgia, "Times New Roman", serif;
  --sij-body-stack: var(--sij-body), system-ui, sans-serif;
  --sij-script-stack: var(--sij-script), "Great Vibes", cursive;

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

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

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

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

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

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

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

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

/* Ranting sakura di atas cover (cabang gelap + bunga pink). */
.sij-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='120' viewBox='0 0 480 120'%3E%3Cpath d='M0 30 C120 10 260 44 480 18' fill='none' stroke='%234a2c30' stroke-width='2'/%3E%3Cpath d='M120 24 C140 44 150 60 146 84' fill='none' stroke='%234a2c30' stroke-width='1.4'/%3E%3Cg fill='%23d98a9e'%3E%3Ccircle cx='60' cy='26' r='7'/%3E%3Ccircle cx='150' cy='18' r='8'/%3E%3Ccircle cx='230' cy='30' r='7'/%3E%3Ccircle cx='320' cy='22' r='8'/%3E%3Ccircle cx='410' cy='20' r='7'/%3E%3Ccircle cx='140' cy='58' r='6'/%3E%3C/g%3E%3Cg fill='%23e8a7b8'%3E%3Ccircle cx='90' cy='20' r='5'/%3E%3Ccircle cx='270' cy='16' r='5'/%3E%3Ccircle cx='360' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 480px 120px;
  opacity: 0.95;
}
/* Kelopak sakura jatuh di seluruh stage (petal pink tersebar). */
.sij-stage {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23d98a9e' fill-opacity='0.20'%3E%3Cpath d='M30 26 C36 16 48 16 50 26 C46 34 34 34 30 26 Z'/%3E%3Cpath d='M120 90 C126 80 138 80 140 90 C136 98 124 98 120 90 Z'/%3E%3Cpath d='M76 140 C82 132 92 132 94 140 C90 146 80 146 76 140 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}
/* Bingkai bunga sakura di tepi section (garis + kelopak). */
.sij-section {
  border-top: 1px solid var(--sij-line);
}
/* Section jadwal: latar marun lembut dengan teks krem. */
.sij-stage > div[data-section-id="schedule"] > .sij-section {
  background: #f3dfe2;
}
/* Judul script merah marun; eyebrow pink tua. */
.sij-title {
  color: #7a2e3a;
}
.sij-eyebrow {
  color: var(--sij-acc-text);
}
/* Foto bundar berbingkai sakura: cincin ganda pink + marun. */
.sij-foto {
  border: 3px solid var(--sij-acc);
  outline: 1px solid #7a2e3a;
  outline-offset: 5px;
  box-shadow: 0 10px 26px rgba(122, 46, 58, 0.22);
}
/* Countdown: angka marun di kotak putih. */
.sij .count-box {
  border-color: var(--sij-acc);
}
.sij .count-num {
  color: #7a2e3a;
}

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

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

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

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

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