/* =============================================================================
   Simple Minimalist Deep Purple — Minimalis formal gelap — cover arang, serif kapital Italiana, ranting eucalyptus line-art, foto oval.
   Palet: aksen #2b2b2b di atas #f7f5f2; tinta #1f1f1f. Tipografi: Italiana +
   Inter.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/deep-taupe-eucalyptus.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="deep-taupe-eucalyptus" />.
============================================================================= */

.dte {
  --dte-acc: #2b2b2b;
  --dte-acc-text: #4a4a4a;
  --dte-on-acc: #f7f5f2;
  --dte-paper: #f7f5f2;
  --dte-paper-2: #efedea;
  --dte-card: #ffffff;
  --dte-ink: #1f1f1f;
  --dte-muted: rgba(31, 31, 31, 0.68);
  --dte-hairline: rgba(31, 31, 31, 0.16);
  --dte-disp-stack: var(--dte-disp), Georgia, "Times New Roman", serif;
  --dte-body-stack: var(--dte-body), system-ui, sans-serif;

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

.dte-stage {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  border-inline: 1px solid var(--dte-hairline);
  background-color: var(--dte-paper);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56'><path d='M28 52 V16 M28 26 C20 22 16 16 16 8 M28 34 C36 30 40 24 40 16' fill='none' stroke='%232b2b2b' stroke-opacity='0.09'/><circle cx='16' cy='8' r='2.5' fill='none' stroke='%232b2b2b' stroke-opacity='0.09'/><circle cx='40' cy='16' r='2.5' fill='none' stroke='%232b2b2b' stroke-opacity='0.09'/></svg>");
  background-size: 56px 56px;
}

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

.dte-eyebrow {
  font-family: var(--dte-disp-stack);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dte-acc-text);
  text-align: center;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.dte-eyebrow::before,
.dte-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--dte-acc);
  flex: none;
}

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

/* Kartu entri (mempelai / acara / kisah / amplop) — satu kartu per entri. */
.dte-section > div:has(> .dte-title) {
  background: var(--dte-card);
  border: 1px solid var(--dte-hairline);
  border-radius: 2px;
  padding: 28px 20px;
  margin-top: 16px;
  text-align: center;
}
.dte-section > div:has(> .dte-title):first-of-type {
  margin-top: 0;
}

.dte-foto {
  width: min(62%, 240px);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--dte-acc) 18%, transparent);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--dte-acc);
  outline: 1px solid rgba(43, 43, 43, 0.4);
  outline-offset: 5px;
}
.dte-foto span {
  font-family: var(--dte-disp-stack);
  font-size: 56px;
  color: var(--dte-acc-text);
}

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

/* Cover — gerbang "Buka Undangan" (mekanika CoverGate: .is-js + .is-open). */
.dte-cover {
  display: none;
}
.dte.is-js .dte-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f5f2ec;
  background: #2b2b2b;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.dte.is-js.is-open .dte-cover {
  transform: translateY(-100%);
}
.dte-cover__inner {
  position: relative;
  text-align: center;
  padding: 24px;
  max-width: 430px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(245, 242, 236, 0.6);
  border-radius: 999px 999px 12px 12px;
  padding: 44px 20px 30px;
}
.dte-cover__deco::before {
  content: "\2767";
  font-size: 26px;
  color: rgba(245, 242, 236, 0.75);
}
.dte-cover__kicker {
  font-family: var(--dte-disp-stack);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.75);
  margin: 0 0 14px;
}
.dte-cover__name {
  font-family: var(--dte-disp-stack);
  font-size: 32px;
  line-height: 1.15;
  color: #f5f2ec;
  margin: 0;
}

.dte-guest {
  margin-top: 22px;
  font-size: 13px;
  color: rgba(245, 242, 236, 0.8);
}
.dte-guest small {
  display: block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 4px;
}
.dte-guest strong {
  display: block;
  font-size: 15px;
}
.dte-open {
  margin-top: 26px;
  font-family: var(--dte-disp-stack);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  color: #f5f2ec;
  background: transparent;
  border: 1px solid rgba(245, 242, 236, 0.7);
  border-radius: 999px;
  padding: 14px 30px;
}
.dte-open:hover {
  opacity: 0.88;
}

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

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

/* Elemen melayang 3D: Daun eucalyptus line-art terang naik di arang gelap — naik + bergoyang (SVG, CSS-only).
   `.dte-drift` = di dalam sampul (absolute, ikut wipe); `--page` = lapisan
   tipis fixed di seluruh undangan (z-40, di bawah sampul z-50, svg lebih
   redup). Hanya transform/opacity yang dianimasikan. `--dz` per item =
   translateZ (-80px s.d. 80px) di dalam container ber-perspective. */
.dte-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 800px;
}
.dte-drift--page {
  position: fixed;
  z-index: 40;
}
.dte-drift__item {
  position: absolute;
  top: 0;
  display: block;
  animation: dte-drift-fall linear infinite;
  will-change: transform, opacity;
}
.dte-drift__item svg {
  display: block;
  animation: dte-drift-sway 2.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 3px rgb(255 255 255 / 0.3));
}
.dte-drift__item:nth-child(even) svg {
  animation-duration: 2.8s;
}
.dte-drift--page .dte-drift__item svg {
  opacity: 0.55;
}
@keyframes dte-drift-fall {
  0% {
    transform: translate3d(0, 112vh, var(--dz, 0px)) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.78;
  }
  100% {
    transform: translate3d(0, -12vh, var(--dz, 0px)) rotate(-300deg);
    opacity: 0;
  }
}
@keyframes dte-drift-sway {
  from {
    transform: translateX(-16px) rotate(-14deg);
  }
  to {
    transform: translateX(16px) rotate(14deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dte-drift {
    display: none;
  }
}
/* Kedalaman 3D sampul: container ber-perspective, isi preserve-3d, tiap
   lapisan teks/tombol di translateZ berbeda — nama paling dekat. */
.dte.is-js .dte-cover {
  perspective: 900px;
}
.dte-cover-inner {
  transform-style: preserve-3d;
}
.dte-cover__name {
  transform: translateZ(28px);
}
.dte-cover__kicker {
  transform: translateZ(14px);
}
.dte-guest {
  transform: translateZ(20px);
}
.dte-open {
  transform: translateZ(18px);
}

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

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