/* =============================================================================
   MILENIAL-TEMPLATE (SnowFall Minimalist) — tier Signature (Luxury Wedding26).
   Arah "Salju sage pucat": paling terang/lembut di batch ini — putih, sage
   pucat #C5D1C0, abu-abu lembut, aksen NAVY pada tombol kirim RSVP.
   Ciri pembeda: form "Konfirmasi Kehadiran" (radio Ya/Tidak + tombol navy
   "KIRIM RESPON") yang ditampilkan eksplisit, panel sage untuk mempelai,
   dan salju halus yang jatuh pelan di sampul (titik-titik putih CSS-only,
   mati saat reduced-motion). Tanpa ornamen bunga — hanya panel warna
   solid + garis tipis. Tipografi: DM Serif Display (serif milenial) +
   Great Vibes (script) + Inter (teks). Semua kelas ter-scope `.mt`.
   Tanpa foto latar eksternal — sampul memakai putih + panel sage + salju.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/milenial-template.{hash}.css`. JANGAN di-import dari
   index.tsx (DECISIONS #31) — ia dikirim lewat
   <ThemeStyles slug="milenial-template" />.
============================================================================= */

.mt {
  --mt-acc: #7d9b76;
  --mt-acc-text: #5f7a58;
  --mt-on-acc: #ffffff;
  --mt-paper: #fbfcf9;
  --mt-paper-2: #eef2e9;
  --mt-sage: #c5d1c0;
  --mt-sage-2: #dbe4d6;
  --mt-card: #ffffff;
  --mt-ink: #3a4440;
  --mt-navy: #1f2a44;
  --mt-navy-d: #141d31;
  --mt-muted: rgba(58, 68, 64, 0.64);
  --mt-hairline: rgba(58, 68, 64, 0.14);
  --mt-disp-stack: var(--mt-disp), "DM Serif Display", Georgia, serif;
  --mt-script-stack: var(--mt-script), "Great Vibes", cursive;
  --mt-body-stack: var(--mt-body), "Inter", system-ui, sans-serif;

  position: relative;
  background: var(--mt-paper);
  color: var(--mt-ink);
  font-family: var(--mt-body-stack);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.mt *,
.mt *::before,
.mt *::after {
  box-sizing: border-box;
}
.mt ::selection {
  background: var(--mt-sage);
  color: var(--mt-navy);
}

.mt-stage {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: var(--mt-paper);
}

.mt-section {
  position: relative;
  padding: 64px 24px;
  scroll-margin-top: 12px;
}
.mt-section + .mt-section {
  border-top: 1px solid var(--mt-hairline);
}
/* Panel sage pucat (mempelai) — ciri khas tema ini. */
.mt-section--sage {
  background: var(--mt-sage-2);
  border-top-color: var(--mt-sage);
}
.mt-section--sage .mt-eyebrow {
  color: var(--mt-acc-text);
}

.mt-eyebrow {
  font-family: var(--mt-body-stack);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mt-acc-text);
  text-align: center;
  margin: 0 0 18px;
}

.mt-title {
  font-family: var(--mt-disp-stack);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  text-align: center;
  margin: 8px 0 0;
  color: var(--mt-ink);
}
.mt-section > p {
  line-height: 1.85;
  color: var(--mt-muted);
  text-align: center;
  max-width: 34em;
  margin: 18px auto 0;
}

/* Foto mempelai — sudut membulat lembut, tanpa bingkai, bayangan tipis. */
.mt-foto {
  width: min(64%, 250px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 18px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--mt-paper-2);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px -20px rgba(58, 68, 64, 0.45);
}
.mt-foto span {
  font-family: var(--mt-disp-stack);
  font-size: 58px;
  color: var(--mt-acc-text);
}
.mt-orang {
  text-align: center;
  padding: 14px 0;
}
.mt-orang .mt-title {
  font-family: var(--mt-script-stack);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.1;
}
.mt-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mt-acc-text);
  margin: 12px 0 4px;
}
.mt-parents {
  color: var(--mt-muted);
  font-size: 14px;
  margin: 4px 0 0;
}
.mt-couple-divider {
  text-align: center;
  color: var(--mt-sage);
  font-size: 18px;
  margin: 8px 0;
}
/* Instagram mempelai — pil kecil sage (detail personal template ini). */
.mt-ig {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mt-acc-text);
  background: var(--mt-sage-2);
  border: 1px solid var(--mt-sage);
  border-radius: 999px;
  padding: 6px 14px;
}

/* Countdown — kotak putih, angka sage gelap. */
.mt .countdown {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.mt .count-box {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 18px 4px 14px;
  background: var(--mt-card);
  border: 1px solid var(--mt-hairline);
  border-radius: 16px;
  box-shadow: 0 10px 22px -18px rgba(58, 68, 64, 0.35);
}
.mt .count-num {
  font-family: var(--mt-disp-stack);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 38px);
  font-variant-numeric: tabular-nums;
  display: block;
  color: var(--mt-acc-text);
}
.mt .count-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mt-muted);
  margin-top: 6px;
  display: block;
}
.mt .countdown-done {
  font-family: var(--mt-script-stack);
  font-size: 30px;
  text-align: center;
  margin-top: 28px;
  color: var(--mt-acc-text);
}

/* Kartu acara — putih bersih, garis atas sage. */
.mt-event {
  position: relative;
  border: 1px solid var(--mt-hairline);
  border-top: 4px solid var(--mt-sage);
  border-radius: 16px;
  padding: 28px 20px 24px;
  margin-top: 18px;
  background: var(--mt-card);
  text-align: center;
  box-shadow: 0 10px 24px -20px rgba(58, 68, 64, 0.35);
}
.mt-event .mt-title {
  font-size: 24px;
}
.mt-event-meta,
.mt-event-venue,
.mt-event-address {
  margin: 8px 0 0;
  line-height: 1.7;
}
.mt-event-meta {
  font-family: var(--mt-disp-stack);
  color: var(--mt-acc-text);
}
.mt-event-venue {
  font-weight: 600;
}
.mt-event-address {
  color: var(--mt-muted);
  font-size: 14px;
}

/* Galeri — grid 2 kolom, sudut membulat lembut. */
.mt-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.mt-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}
.mt-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

/* Kisah + amplop — kartu putih bergaris tipis. */
.mt-story-item,
.mt-bank {
  border: 1px solid var(--mt-hairline);
  border-radius: 16px;
  padding: 22px 18px;
  margin-top: 16px;
  background: var(--mt-card);
  text-align: center;
}
.mt-story-item .mt-title,
.mt-bank .mt-title {
  font-size: 22px;
}
.mt-story-date {
  font-family: var(--mt-body-stack);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--mt-acc-text);
  margin: 0 0 6px;
}
.mt-story-text,
.mt-bank-number,
.mt-bank-holder {
  margin: 8px 0 0;
  line-height: 1.7;
}
.mt-story-text {
  color: var(--mt-muted);
}
.mt-bank-number {
  font-family: var(--mt-disp-stack);
  font-size: 20px;
  letter-spacing: 0.04em;
}
.mt-bank-holder {
  color: var(--mt-muted);
  font-size: 14px;
}
.mt-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  background: transparent;
  border: 1.5px solid var(--mt-acc-text);
  color: var(--mt-acc-text);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mt-copy:hover {
  background: var(--mt-acc-text);
  color: #ffffff;
}

/* Buku tamu — tombol kirim NAVY (ciri khas template ini), radio sage. */
.mt .gb-eyebrow,
.mt .gb-note__name {
  color: var(--mt-acc-text);
}
.mt .gb-submit {
  background: var(--mt-navy);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.mt .gb-submit:hover:not(:disabled) {
  background: var(--mt-navy-d);
}
.mt .gb-radio input:checked {
  accent-color: var(--mt-navy);
}
.mt .gb-more,
.mt .gb-gift-trigger {
  color: var(--mt-acc-text);
  border-color: var(--mt-acc-text);
}

/* Sampul — putih + panel sage + salju halus jatuh (CSS-only). */
.mt-cover {
  display: none;
}
.mt.is-js .mt-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--mt-ink);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf9 60%, #eef2e9 100%);
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.mt.is-js.is-open .mt-cover {
  transform: translateY(-100%);
}
/* Salju: titik-titik putih jatuh pelan dengan kecepatan berbeda. */
.mt-snow {
  position: absolute;
  top: -8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  opacity: 0.85;
  animation: mt-snow-fall linear infinite;
  pointer-events: none;
}
.mt-snow--1 {
  left: 12%;
  animation-duration: 11s;
}
.mt-snow--2 {
  left: 28%;
  width: 5px;
  height: 5px;
  animation-duration: 14s;
  animation-delay: 2s;
}
.mt-snow--3 {
  left: 46%;
  animation-duration: 12s;
  animation-delay: 1s;
}
.mt-snow--4 {
  left: 63%;
  width: 5px;
  height: 5px;
  animation-duration: 15s;
  animation-delay: 3s;
}
.mt-snow--5 {
  left: 78%;
  animation-duration: 10s;
  animation-delay: 0.5s;
}
.mt-snow--6 {
  left: 90%;
  width: 6px;
  height: 6px;
  animation-duration: 13s;
  animation-delay: 2.5s;
}
@keyframes mt-snow-fall {
  0% {
    transform: translate3d(0, -4vh, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(-14px, 106vh, 0);
    opacity: 0;
  }
}
.mt-cover__panel {
  background: var(--mt-sage-2);
  border: 1px solid var(--mt-sage);
  border-radius: 24px;
  padding: 40px 22px 30px;
  margin: 16px;
  max-width: 430px;
  width: calc(100% - 32px);
  text-align: center;
}
.mt-cover__inner {
  position: relative;
  text-align: center;
  padding: 0 4px;
  min-width: 0;
}
.mt.is-js .mt-cover__inner > * {
  animation: mt-rise 0.7s both cubic-bezier(0.22, 1, 0.36, 1);
}
.mt.is-js .mt-cover__inner > *:nth-child(2) {
  animation-delay: 0.08s;
}
.mt.is-js .mt-cover__inner > *:nth-child(3) {
  animation-delay: 0.16s;
}
.mt.is-js .mt-cover__inner > *:nth-child(4) {
  animation-delay: 0.24s;
}
.mt.is-js .mt-cover__inner > *:nth-child(5) {
  animation-delay: 0.32s;
}
.mt.is-js .mt-cover__inner > *:nth-child(6) {
  animation-delay: 0.4s;
}
@keyframes mt-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.mt-cover__mono {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid var(--mt-acc-text);
  color: var(--mt-acc-text);
  font-family: var(--mt-disp-stack);
  font-size: 17px;
  margin: 0 0 14px;
  background: #ffffff;
}
.mt-cover__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mt-muted);
  margin: 0 0 12px;
}
.mt-cover__name {
  font-family: var(--mt-disp-stack);
  font-weight: 400;
  font-size: clamp(42px, 11vw, 56px);
  line-height: 1.1;
  color: var(--mt-ink);
  min-width: 0;
}
.mt-cover__name em {
  font-family: var(--mt-script-stack);
  font-weight: 400;
  font-style: normal;
  color: var(--mt-acc-text);
}
.mt-cover__date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mt-ink);
  margin: 16px 0 0;
}
.mt-guest {
  margin-top: 22px;
  color: var(--mt-muted);
}
.mt-guest small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}
.mt-guest strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--mt-ink);
}
.mt-open {
  margin-top: 26px;
  font-family: var(--mt-body-stack);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--mt-navy);
  border: 1px solid var(--mt-navy);
  border-radius: 999px;
  padding: 15px 32px;
  cursor: pointer;
}
.mt-open:hover {
  background: var(--mt-navy-d);
}

/* Tombol musik — tampil setelah dibuka. */
.mt-music {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--mt-hairline);
  background: #ffffff;
  color: var(--mt-ink);
  display: none;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(58, 68, 64, 0.2);
}
.mt.is-open .mt-music {
  display: grid;
}

/* Hormati prefers-reduced-motion: konten tetap lengkap tanpa animasi. */
@media (prefers-reduced-motion: reduce) {
  .mt * {
    animation: none !important;
    transition: none !important;
  }
  .mt-snow {
    display: none;
  }
}

/* Elemen melayang 3D: kepingan salju 3D + titik embun sage yang jatuh berputar (SnowFall). `.{p}-drift` = di dalam sampul
   (absolute, ikut wipe); `--page` = lapisan tipis fixed di seluruh
   undangan (z-40, di bawah sampul z-50). Hanya transform/opacity yang
   dianimasikan; tiap item di translate3d dengan `--z` berbeda supaya ada
   parallax/kedalaman (container perspective 700px). */
.mt-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 700px;
}
.mt-drift--page {
  position: fixed;
  z-index: 40;
}
.mt-drift__item {
  position: absolute;
  top: 0;
  display: block;
  animation: mt-drift-fall linear infinite;
  will-change: transform, opacity;
}
.mt-drift__item svg {
  display: block;
  animation: mt-drift-sway 2.2s ease-in-out infinite alternate;
}
.mt-drift__item:nth-child(even) svg {
  animation-duration: 2.8s;
}
.mt-drift--page .mt-drift__item svg {
  opacity: 0.55;
}
@keyframes mt-drift-fall {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.75;
  }
  100% {
    transform: translate3d(0, 112vh, 0) rotate(280deg);
    opacity: 0;
  }
}
@keyframes mt-drift-sway {
  from {
    transform: translateX(-16px) rotate(-12deg);
  }
  to {
    transform: translateX(16px) rotate(12deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mt-drift {
    display: none;
  }
}

/* Kedalaman 3D sampul: judul & kicker melayang di lapisan Z berbeda. */
.mt.is-js .mt-cover {
  perspective: 900px;
}
.mt-cover__inner {
  transform-style: preserve-3d;
}
.mt-cover__name {
  transform: translateZ(26px);
}
.mt-cover__kicker {
  transform: translateZ(12px);
}

/* Span pembungkus Z (3D): translateZ per item + preserve-3d supaya
   kedalaman tidak ter-flatten oleh animasi fall pada item. */
.mt-drift__item {
  transform-style: preserve-3d;
}
.mt-drift__z {
  display: block;
  transform-style: preserve-3d;
}

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

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