/* =============================================================================
   Arabix — tier Premium (Wedding26).
   Konsep: Lengkung mihrab navy + krem; pola ubin geometris biru-emas; countdown navy berkotak; doa berbingkai pola; islami formal arsitektural.
   Palet: aksen #1f2a5c, kertas #f7f3e8, tinta #232838.
   Tipografi: Cinzel + Figtree.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/arabix.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="arabix" />.
============================================================================= */

.ara {
  --ara-acc: #1f2a5c;
  --ara-acc-text: #1f2a5c;
  --ara-on-acc: #ffffff;
  --ara-paper: #f7f3e8;
  --ara-ink: #232838;
  --ara-muted: rgba(35, 40, 56, 0.68);
  --ara-line: rgba(31, 42, 92, 0.35);
  --ara-card: #fffdf6;
  --ara-dark: #1f2a5c;
  --ara-dark-ink: #f2ead6;
  --ara-dark-muted: rgba(242, 234, 214, 0.75);
  --ara-dark-line: rgba(201, 162, 39, 0.5);
  --ara-disp-stack: var(--ara-disp), "Times New Roman", serif;
  --ara-body-stack: var(--ara-body), system-ui, sans-serif;

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

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

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

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

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

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

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

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

/* Bingkai lengkung mihrab di cover: arch ganda navy + emas. */
.ara-cover-inner {
  border: 2px solid var(--ara-acc);
  border-radius: 220px 220px 10px 10px;
  padding: 84px 26px 44px;
  outline: 1px solid #c9a227;
  outline-offset: 7px;
  background: radial-gradient(
    120px 60px at 50% 0%,
    rgba(201, 162, 39, 0.16),
    transparent 70%
  );
}
/* Pola ubin geometris biru-emas di sisi stage. */
.ara-stage {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%231f2a5c' stroke-opacity='0.10'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3C/g%3E%3Cg fill='none' stroke='%23c9a227' stroke-opacity='0.16'%3E%3Ccircle cx='28' cy='28' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 56px;
}
/* Countdown NAVY berkotak angka putih. */
.ara-stage > div[data-section-id="countdown"] > .ara-section {
  background: var(--ara-dark);
  color: var(--ara-darkInk);
}
.ara-stage > div[data-section-id="countdown"] .ara-eyebrow {
  color: #c9a227;
}
.ara-stage > div[data-section-id="countdown"] .count-box {
  background: rgba(242, 234, 214, 0.08);
  border: 1px solid var(--ara-darkLine);
  border-radius: 6px;
}
.ara-stage > div[data-section-id="countdown"] .count-num {
  color: #f2ead6;
}
.ara-stage > div[data-section-id="countdown"] .count-label {
  color: var(--ara-darkMuted);
}
/* Section acara: kartu krem berbingkai pola (garis ganda navy-emas). */
.ara-stage > div[data-section-id="schedule"] > .ara-section {
  background: var(--ara-card);
  border-top: 3px double #c9a227;
  border-bottom: 3px double #c9a227;
}
/* Foto mempelai: arch mihrab tinggi. */
/* Judul section: serif kapital monumental. */
.ara-title {
  font-family: var(--ara-disp-stack);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 26px;
}

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

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

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

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

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