/* Tema adat-aceh-hijau — UNDANGAN ADAT ACEH TA-003 "Hijau Zamrud" (Slide 3D),
   kiriman user (undangan-hijau.zip). Ini VERSI KE-2 tema Adat Aceh (V1 =
   marun V4, halaman scroll; V2 = hijau zamrud, slide GESER kiri/kanan).
   Desain: sampul + carousel slide berlatar ornamen atas/bawah + garis emas +
   gradien radial hijau zamrud; motif garis + rencong memakai aset
   /aceh/hijau/*.webp (BEDA dari V4 marun) + rencong.webp bersama.
   Semua aturan di-scope di bawah `.ah` (akar tema CoverGate) supaya tidak
   bocor ke tema lain; keyframe berawalan `ah-`. Aset: /aceh/hijau/ornamen-
   atas.webp, /aceh/hijau/ornamen-bawah.webp, /aceh/hijau/motif-garis.webp,
   /aceh/rencong.webp. Musik: Ranup Lampuan (tombol .ah-music).
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/adat-aceh-hijau.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="adat-aceh-hijau" />. */
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500&display=swap");

.ah {
  --ah-acc: #d4a63a;
  --ah-acc-text: #8a6d1f;
  --ah-on-acc: #fff8e7;
  --ah-paper: #031610;
  --ah-ink: #f6ecd6;
  --ah-disp: "Cinzel Decorative", serif;
  --ah-body: "Montserrat", sans-serif;
  background: #000;
  color: #f6ecd6;
  /* Amiri di depan supaya teks Arab apa pun di tema dirender font Arab
     (Amiri tak punya glif Latin → teks Latin jatuh ke Montserrat). */
  font-family: "Amiri", "Montserrat", sans-serif;
}

/* ---- tombol musik mengambang (muncul setelah sampul dibuka) ---- */
.ah-music {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 55;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #d4a63a;
  background: #031610;
  color: #f1d58a;
  display: none;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.ah.is-open .ah-music {
  display: grid;
}

/* ---- wadah + tipografi ---- */
.ah .hijau * {
  box-sizing: border-box;
  margin: 0;
}
.ah-cover * {
  box-sizing: border-box;
  margin: 0;
}
.ah .hijau {
  font-family: "Montserrat", sans-serif;
  background: #000;
  display: flex;
  justify-content: center;
  color: #f6ecd6;
}
.ah .fr {
  --rx: 0;
  --ry: 0;
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 40%,
    #14543f,
    #072a1f 60%,
    #031610
  );
  touch-action: pan-y;
  user-select: none;
}
.ah .pat {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 2L38 20L20 38L2 20Z' fill='none' stroke='%23d4a63a' stroke-width='1.4'/%3E%3Ccircle cx='20' cy='20' r='2.6' fill='%23d4a63a'/%3E%3C/svg%3E");
  animation: ah-drift 40s linear infinite;
}
@keyframes ah-drift {
  to {
    background-position: 80px 80px;
  }
}
.ah .dust {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f1d58a;
  box-shadow: 0 0 8px #d4a63a;
  opacity: 0;
  animation: ah-up linear infinite;
  z-index: 4;
}
@keyframes ah-up {
  10% {
    opacity: 0.9;
  }
  to {
    transform: translateY(-105vh) translateX(26px);
    opacity: 0;
  }
}
.ah .deco {
  font-family: "Cinzel Decorative", serif;
  color: #d4a63a;
}
.ah .serif {
  font-family: "Cormorant Garamond", serif;
}
.ah .eb {
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #f1d58a;
}
/* Bismillah Arab — JANGAN pakai .eb: letter-spacing memutus sambungan huruf
   Arab dan uppercase tak berlaku. Font Amiri (Naskh, untuk teks Qur'an). */
.ah .bismillah {
  font-family: "Amiri", "Cormorant Garamond", serif;
  font-size: 26px;
  line-height: 1.7;
  color: #f1d58a;
  margin: 0;
}
.ah .gt {
  background: linear-gradient(100deg, #d4a63a 20%, #fff3c4 45%, #d4a63a 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ah-shine 4s linear infinite;
  filter: drop-shadow(1px 1px 0 #6b4a0e) drop-shadow(2px 2px 0 #4a3208)
    drop-shadow(0 7px 6px rgba(0, 0, 0, 0.6));
}
@keyframes ah-shine {
  to {
    background-position: -220% 0;
  }
}

/* ---- carousel slide ---- */
.ah .stage {
  position: absolute;
  inset: 0;
  perspective: 1200px;
}
.ah .sl {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 125px 11%;
  overflow-y: auto;
  scrollbar-width: none;
  text-align: center;
  transition:
    transform 0.9s cubic-bezier(0.65, 0, 0.25, 1),
    opacity 0.7s;
}
.ah .sl::-webkit-scrollbar {
  display: none;
}
.ah .sl > div {
  margin: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ah .sl.on > div > * {
  animation: ah-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.ah .sl.on > div > :nth-child(2) {
  animation-delay: 0.12s;
}
.ah .sl.on > div > :nth-child(3) {
  animation-delay: 0.24s;
}
.ah .sl.on > div > :nth-child(4) {
  animation-delay: 0.36s;
}
.ah .sl.on > div > :nth-child(5) {
  animation-delay: 0.48s;
}
.ah .sl.on > div > :nth-child(6) {
  animation-delay: 0.6s;
}
@keyframes ah-rise {
  from {
    opacity: 0;
    transform: translateY(28px) translateZ(-120px) rotateX(20deg);
  }
}
.ah .orn {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 5;
  animation: ah-glow 4s ease-in-out infinite;
}
.ah .orn.t {
  top: 0;
}
.ah .orn.b {
  bottom: 0;
}
@keyframes ah-glow {
  50% {
    filter: drop-shadow(0 0 9px rgba(241, 213, 138, 0.8));
  }
}
.ah .ln {
  position: absolute;
  top: 24%;
  bottom: 24%;
  width: 1px;
  background: rgba(212, 166, 58, 0.5);
  z-index: 5;
}
.ah .dots {
  position: absolute;
  bottom: 66px;
  left: 0;
  right: 0;
  display: flex;
  gap: 9px;
  justify-content: center;
  z-index: 6;
}
.ah .dots button {
  width: 8px;
  height: 8px;
  border: 1px solid #d4a63a;
  background: transparent;
  transform: rotate(45deg);
  cursor: pointer;
  padding: 0;
  transition: 0.3s;
}
.ah .dots button.on {
  background: #d4a63a;
  transform: rotate(45deg) scale(1.4);
}
.ah .ar {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border-radius: 50%;
  border: 1px solid #d4a63a;
  background: rgba(3, 22, 16, 0.75);
  color: #d4a63a;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.3s;
}
.ah .btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 3px;
  border: 1px solid #d4a63a;
  color: #d4a63a;
  background: transparent;
  font:
    500 11px "Montserrat",
    sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 #7a5410;
}
.ah .btn.fill {
  background: linear-gradient(135deg, #d4a63a, #a47a1c);
  color: #1a120d;
  border: none;
  animation: ah-pulse 2s infinite;
}
.ah .btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7a5410;
}
@keyframes ah-pulse {
  0% {
    box-shadow:
      0 4px 0 #7a5410,
      0 0 0 0 rgba(212, 166, 58, 0.6);
  }
  70% {
    box-shadow:
      0 4px 0 #7a5410,
      0 0 0 14px rgba(212, 166, 58, 0);
  }
  100% {
    box-shadow:
      0 4px 0 #7a5410,
      0 0 0 0 rgba(212, 166, 58, 0);
  }
}
.ah .tilt {
  transform: perspective(700px) rotateX(calc(var(--rx) * 1deg))
    rotateY(calc(var(--ry) * 1deg));
  transition: transform 0.25s ease-out;
}
.ah .m3 {
  position: relative;
  perspective: 700px;
  margin: 10px 0;
}
.ah .m3i {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: ah-spinY 12s linear infinite;
}
.ah .m3i img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
@keyframes ah-spinY {
  to {
    transform: rotateY(360deg);
  }
}

/* ---- rencong sampul: ukuran TETAP 225px di wadah 230px (seperti zip
   asli) — bukan persentase stage — supaya tidak meluber keluar frame. ---- */
.ah-cover .ct {
  position: relative;
  height: 230px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 800px;
}
.ah-cover .rc {
  position: absolute;
  height: 225px;
  left: 50%;
  top: 2px;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}
.ah-cover .rc.l {
  transform: translateX(-50%) translateZ(-90px);
  animation: ah-swl 5s ease-in-out infinite;
}
.ah-cover .rc.r {
  transform: translateX(-50%) translateZ(-90px) scaleX(-1);
  animation: ah-swr 5s ease-in-out infinite;
}
@keyframes ah-swl {
  50% {
    transform: translateX(-50%) translateZ(-90px) rotate(5deg);
  }
}
@keyframes ah-swr {
  50% {
    transform: translateX(-50%) translateZ(-90px) scaleX(-1) rotate(5deg);
  }
}

/* ---- divider rencong ---- */
.ah .dv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 8px 0;
}
.ah .dv i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4a63a);
}
.ah .dv i:last-child {
  transform: scaleX(-1);
}
.ah .dv b {
  position: relative;
  width: 120px;
  height: 40px;
  flex: none;
}
.ah .dv img {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 104px;
  transform: translate(-50%, -50%) rotate(-54deg);
  animation: ah-unsheath 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(241, 213, 138, 0.7));
}
@keyframes ah-unsheath {
  50% {
    transform: translate(-44%, -50%) rotate(-54deg);
  }
}

/* ---- foto mempelai + countdown + kartu + galeri ---- */
.ah .pic {
  width: 112px;
  height: 146px;
  border-radius: 56px 56px 6px 6px;
  border: 2px solid #d4a63a;
  background: linear-gradient(160deg, #1f7a58, #06241a);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 4px #031610,
    0 0 0 5px #d4a63a,
    0 12px 26px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.ah .pic img {
  display: block;
}
.ah .cd {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ah .cd div {
  width: 62px;
  padding: 12px 0;
  border: 1px solid #d4a63a;
  border-radius: 4px;
  background: rgba(6, 36, 26, 0.75);
  box-shadow:
    1px 1px 0 #a47a1c,
    2px 2px 0 #a47a1c,
    3px 3px 0 #8a6414,
    4px 4px 0 #8a6414,
    6px 11px 14px rgba(0, 0, 0, 0.6);
}
.ah .cd b {
  display: block;
  font:
    700 20px "Cinzel Decorative",
    serif;
}
.ah .cd span {
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f1d58a;
}
.ah .card {
  background: rgba(6, 36, 26, 0.8);
  border: 1px solid #d4a63a;
  padding: 10px 12px;
  margin-top: 8px;
  width: 100%;
  text-align: left;
  box-shadow:
    1px 1px 0 #8a6414,
    2px 2px 0 #8a6414,
    3px 3px 0 #6b4a0e,
    6px 10px 16px rgba(0, 0, 0, 0.6);
}

/* ---- section video (FASE J) — kelas generik `_shared/video` ditata dengan
   token tema (adaptasi bk.css barakah). Bingkai `overflow: hidden` + lebar
   100% supaya video tak keluar batas slide. ---- */
.ah-video {
  margin-top: 22px;
  width: 100%;
}
.ah .video-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #06241a;
  border: 1px solid #d4a63a;
  box-shadow: 0 18px 38px -22px rgba(3, 22, 16, 0.55);
}
/* Bingkai YouTube tak membawa rasio inline (bingkai berkas membawanya). */
.ah .video-frame--yt {
  aspect-ratio: 16 / 9;
}
.ah .video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}
.ah .video-mute,
.ah .video-play {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f6ecd6;
  color: #06241a;
}
.ah .video-mute {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(212, 166, 58, 0.5);
  cursor: pointer;
}
.ah .video-lite {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background-color: #06241a;
  background-size: cover;
  background-position: center;
}
/* Peredup agar tombol putar terbaca di atas poster terang. */
.ah .video-lite::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3, 22, 16, 0.3);
}
.ah .video-play {
  position: relative;
  width: 64px;
  height: 64px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.ah .video-play svg {
  margin-left: 3px;
}
.ah .video-mute:focus-visible {
  outline: 2px solid #d4a63a;
  outline-offset: 2px;
}
/* Di dalam bingkai `overflow: hidden` → cincin fokus ke dalam. */
.ah .video-lite:focus-visible {
  outline: 2px solid #d4a63a;
  outline-offset: -5px;
}
.ah .ring {
  width: 100%;
  height: 185px;
  perspective: 800px;
}
.ah .ringi {
  position: relative;
  width: 96px;
  height: 140px;
  margin: 16px auto 0;
  transform-style: preserve-3d;
  animation: ah-ring 22s linear infinite;
}
.ah .ringi div {
  position: absolute;
  inset: 0;
  border: 2px solid #d4a63a;
  background: linear-gradient(160deg, #1f7a58, #06241a);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
}
@keyframes ah-ring {
  to {
    transform: rotateY(-360deg);
  }
}
.ah input,
.ah textarea,
.ah select {
  width: 100%;
  padding: 9px 12px;
  margin-top: 7px;
  background: rgba(246, 236, 214, 0.08);
  border: 1px solid #d4a63a;
  color: #f6ecd6;
  font:
    13px "Montserrat",
    sans-serif;
  border-radius: 3px;
}
.ah select option {
  color: #000;
}

/* ---- cover (wadah CoverGate .ah-cover; wipe disetir .ah.is-open) ---- */
.ah-cover {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 440px;
  z-index: 60;
  overflow: hidden;
  background:
    url(/aceh/hijau/ornamen-atas.webp) top center/100% auto no-repeat,
    url(/aceh/hijau/ornamen-bawah.webp) bottom center/100% auto no-repeat,
    linear-gradient(rgba(212, 166, 58, 0.55), rgba(212, 166, 58, 0.55)) 20px
      20%/1px 60% no-repeat,
    linear-gradient(rgba(212, 166, 58, 0.55), rgba(212, 166, 58, 0.55))
      calc(100% - 20px) 20%/1px 60% no-repeat,
    radial-gradient(ellipse at 50% 45%, #14543f 0%, #072a1f 58%, #031610 100%);
  padding: 20vh 11% 20vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f6ecd6;
  font-family: "Montserrat", sans-serif;
}
.ah-cover .eb {
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #f1d58a;
}
.ah-cover .deco {
  font-family: "Cinzel Decorative", serif;
  color: #d4a63a;
}
.ah-cover .serif {
  font-family: "Cormorant Garamond", serif;
}
.ah-cover .gt {
  background: linear-gradient(100deg, #d4a63a 20%, #fff3c4 45%, #d4a63a 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ah-shine 4s linear infinite;
  filter: drop-shadow(1px 1px 0 #6b4a0e) drop-shadow(2px 2px 0 #4a3208)
    drop-shadow(0 7px 6px rgba(0, 0, 0, 0.6));
}
.ah-cover .m3 {
  position: relative;
  perspective: 700px;
  margin: 10px 0;
}
.ah-cover .m3i {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: ah-spinY 12s linear infinite;
}
.ah-cover .m3i img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ah-cover .btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 3px;
  border: 1px solid #d4a63a;
  color: #d4a63a;
  background: transparent;
  font:
    500 11px "Montserrat",
    sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 #7a5410;
}
.ah-cover .btn.fill {
  background: linear-gradient(135deg, #d4a63a, #a47a1c);
  color: #1a120d;
  border: none;
  animation: ah-pulse 2s infinite;
}
.ah-cover .btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7a5410;
}
.ah.is-open .ah-cover {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.9s ease 0.2s,
    visibility 0s linear 1.2s;
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ah *,
  .ah-cover * {
    animation: none !important;
    transition: none !important;
  }
}
