/* =============================================================================
   love line — tier Premium (Wedding26).
   Konsep: Putih + hitam + aksen merah; ilustrasi line-art pengantin garis hitam tipis; foto hitam-putih; teks kecil merah; serif italic + sans; seperti galeri seni.
   Palet: aksen #c0392b, kertas #fdfcf8, tinta #1a1a1a.
   Tipografi: Instrument Serif + Space Grotesk.
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/garis-cinta.{hash}.css`. JANGAN di-import dari index.tsx
   (DECISIONS #31) — ia dikirim lewat <ThemeStyles slug="garis-cinta" />.
============================================================================= */

.gc {
  --gc-acc: #c0392b;
  --gc-acc-text: #a93226;
  --gc-on-acc: #ffffff;
  --gc-paper: #fdfcf8;
  --gc-ink: #1a1a1a;
  --gc-muted: rgba(26, 26, 26, 0.66);
  --gc-line: rgba(26, 26, 26, 0.55);
  --gc-card: #ffffff;
  --gc-dark: #1a1a1a;
  --gc-dark-ink: #f5f2ea;
  --gc-dark-muted: rgba(245, 242, 234, 0.75);
  --gc-dark-line: rgba(245, 242, 234, 0.35);
  --gc-disp-stack: var(--gc-disp), Georgia, serif;
  --gc-body-stack: var(--gc-body), system-ui, sans-serif;

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

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

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

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

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

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

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

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

/* Garis tangan (squiggle) di bawah judul cover & judul section. */
.gc-cover-inner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: 130px;
  height: 10px;
  transform: translateX(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='10'%3E%3Cpath d='M2 6 C22 2 42 8 62 5 C82 2 102 8 128 5' fill='none' stroke='%231a1a1a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 130px 10px;
}
.gc-title::after {
  content: "";
  display: block;
  width: 74px;
  height: 8px;
  margin: 12px auto 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='8'%3E%3Cpath d='M2 5 C14 2 26 7 38 4 C50 2 62 6 72 4' fill='none' stroke='%231a1a1a' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 74px 8px;
}
/* Foto HITAM-PUTIH (konsep line-art). */
.gc-foto img {
  filter: grayscale(1) contrast(1.05);
}
.gc-section > img {
  filter: grayscale(1) contrast(1.05);
}
/* Teks kecil MERAH sebagai aksen: eyebrow merah. */
.gc-eyebrow {
  color: var(--gc-acc-text);
}
/* Judul: serif italic artistik. */
.gc-title {
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
}
/* Bingkai garis tipis di sekeliling stage (galeri). */
.gc-stage {
  border-inline: 1px solid var(--gc-ink);
  outline: 1px solid rgba(26, 26, 26, 0.25);
  outline-offset: -8px;
}
/* Countdown: kotak putih bergaris hitam, angka hitam besar, label merah. */
.gc .count-box {
  border: 1.5px solid var(--gc-ink);
  border-radius: 2px;
}
.gc .count-num {
  color: var(--gc-ink);
}
.gc .count-label {
  color: var(--gc-acc-text);
}
/* Section jadwal: garis hitam ganda di atas-bawah. */
.gc-stage > div[data-section-id="schedule"] > .gc-section {
  border-top: 3px double var(--gc-ink);
  border-bottom: 3px double var(--gc-ink);
}

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

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

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

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

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