/* =============================================================================
   HENRY & CECILY (CHATEAU WATERCOLOR) — tier premium (Eksklusif), chateau
   watercolor editorial: mawar pink + kuda putih + piano grand + timeline
   pernikahan sebagai section tersendiri. Arah "dongeng chateau yang mewah":
   latar krem-putih, aksen sage + mawar pink, kartu perkamen, grid foto
   "Precious Moment". Tipografi: Playfair Display (display editorial) +
   EB Garamond (teks) + Great Vibes (aksen script).
   CSS ini SUMBER KEBENARAN; `scripts/build-theme-css.mjs` menyalinnya ke
   `public/themes/henry-cecily-chateau.{hash}.css`. JANGAN di-import dari
   index.tsx (DECISIONS #31) — ia dikirim lewat
   <ThemeStyles slug="henry-cecily-chateau" />.
============================================================================= */

.hcc {
  --hcc-acc: #7a8b6f;
  --hcc-acc-text: #5a6b52;
  --hcc-on-acc: #ffffff;
  --hcc-paper: #faf7ef;
  --hcc-paper-2: #f3ecdc;
  --hcc-card: #fffdf7;
  --hcc-ink: #33302a;
  --hcc-muted: rgba(51, 48, 42, 0.72);
  --hcc-hairline: rgba(122, 139, 111, 0.35);
  --hcc-rose: #a85a78;
  --hcc-disp-stack: var(--hcc-disp), Georgia, "Times New Roman", serif;
  --hcc-script-stack: var(--hcc-script), "Great Vibes", cursive;
  --hcc-body-stack: var(--hcc-body), Georgia, serif;

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

.hcc-stage {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  border-inline: 1px solid var(--hcc-hairline);
  background-color: var(--hcc-paper);
  /* Cat air chateau: bercak sage + mawar pucat di latar. */
  background-image:
    radial-gradient(
      240px 110px at 10% 6%,
      rgba(122, 139, 111, 0.12),
      transparent 70%
    ),
    radial-gradient(
      220px 110px at 90% 40%,
      rgba(168, 90, 120, 0.1),
      transparent 70%
    ),
    radial-gradient(
      240px 110px at 20% 90%,
      rgba(122, 139, 111, 0.1),
      transparent 70%
    );
}

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

.hcc-eyebrow {
  font-family: var(--hcc-disp-stack);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hcc-acc-text);
  text-align: center;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
/* Mawar pink mengapit label. */
.hcc-eyebrow::before,
.hcc-eyebrow::after {
  content: "❀";
  font-size: 13px;
  color: var(--hcc-rose);
  letter-spacing: 0;
}

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

.hcc-foto {
  width: min(62%, 240px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 16px;
  overflow: hidden;
  /* Bingkai mawar: arch + garis ganda sage-mawar. */
  border-radius: 999px 999px 10px 10px;
  border: 1px solid var(--hcc-acc);
  outline: 1px solid var(--hcc-rose);
  outline-offset: 5px;
  background: color-mix(in srgb, var(--hcc-acc) 12%, transparent);
  display: grid;
  place-items: center;
}
.hcc-foto span {
  font-family: var(--hcc-disp-stack);
  font-size: 56px;
  color: var(--hcc-acc-text);
}
.hcc-section:has(.hcc-foto) .hcc-title {
  font-family: var(--hcc-script-stack);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
}

/* Hero: krem chateau dengan cat air. */
.hcc-hero-sec {
  background: linear-gradient(180deg, var(--hcc-paper-2), var(--hcc-paper));
  text-align: center;
}
.hcc-hero-sec p:not(.hcc-eyebrow) {
  line-height: 1.8;
  color: var(--hcc-muted);
  max-width: 34em;
  margin: 18px auto 0;
}

/* Countdown — sage gelap, kotak krem berbingkai mawar. */
.hcc-countdown-sec {
  background:
    radial-gradient(
      120% 90% at 50% 0%,
      rgba(122, 139, 111, 0.3),
      transparent 55%
    ),
    linear-gradient(160deg, #5a6b52, #42503c);
  color: var(--hcc-paper);
  border-top-color: #42503c;
}
.hcc-countdown-sec .hcc-eyebrow {
  color: rgba(250, 247, 239, 0.85);
}
.hcc .countdown {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.hcc .count-box {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 16px 4px 14px;
  background: var(--hcc-card);
  border: 1px solid var(--hcc-rose);
  border-radius: 999px 999px 12px 12px;
}
.hcc .count-num {
  font-family: var(--hcc-disp-stack);
  font-size: clamp(26px, 8vw, 36px);
  font-variant-numeric: tabular-nums;
  display: block;
  color: var(--hcc-acc-text);
}
.hcc .count-label {
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hcc-muted);
  margin-top: 6px;
  display: block;
}
.hcc .countdown-done {
  font-family: var(--hcc-disp-stack);
  font-size: 22px;
  text-align: center;
  margin-top: 28px;
  color: var(--hcc-paper);
}

/* Kartu acara: perkamen krem, bingkai sage ganda, judul serif. */
.hcc-event {
  position: relative;
  border: 1px solid var(--hcc-acc);
  border-radius: 16px;
  padding: 30px 20px 26px;
  margin-top: 18px;
  background: var(--hcc-card);
  text-align: center;
  box-shadow: 0 8px 22px rgba(122, 139, 111, 0.14);
}
.hcc-event::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(122, 139, 111, 0.4);
  border-radius: 10px;
  pointer-events: none;
}
.hcc-event .hcc-title {
  font-size: 24px;
}
.hcc-event p {
  margin: 8px 0 0;
  line-height: 1.7;
}
.hcc-event a {
  display: inline-block;
  margin-top: 18px;
  background: var(--hcc-acc);
  color: var(--hcc-on-acc);
  border-radius: 999px;
  padding: 11px 26px;
  font-family: var(--hcc-disp-stack);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
/* TIMELINE: kartu kisah dengan garis vertikal + titik mawar di kiri. */
.hcc-story-item {
  position: relative;
  border: 1px solid var(--hcc-hairline);
  border-radius: 14px;
  padding: 24px 18px 24px 34px;
  margin-top: 16px;
  margin-left: 12px;
  background: var(--hcc-card);
  text-align: left;
}
.hcc-story-item::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hcc-rose);
  border: 2px solid var(--hcc-card);
  box-shadow: 0 0 0 2px var(--hcc-rose);
}
.hcc-story-item::after {
  content: "";
  position: absolute;
  left: -6.5px;
  top: 48px;
  bottom: -18px;
  width: 2px;
  background: var(--hcc-acc);
  opacity: 0.5;
}
.hcc-story-item:last-child::after {
  display: none;
}
.hcc-story-item .hcc-title {
  font-size: 22px;
  text-align: left;
}
.hcc-story-item p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--hcc-muted);
}
.hcc-bank {
  border: 1px solid var(--hcc-hairline);
  border-radius: 14px;
  padding: 24px 18px;
  margin-top: 16px;
  background: var(--hcc-card);
  text-align: center;
}
.hcc-bank .hcc-title {
  font-size: 22px;
}
.hcc-bank p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--hcc-muted);
}

/* Galeri: grid foto berbingkai mawar (Precious Moment). */
.hcc-section > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 999px 999px 12px 12px;
  border: 1px solid var(--hcc-rose);
  margin-top: 14px;
}

/* Cover — TERANG krem chateau + mawar, nama serif kapital. */
.hcc-cover {
  display: none;
}
.hcc.is-js .hcc-cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--hcc-ink);
  background-color: var(--hcc-paper);
  background-image:
    radial-gradient(
      280px 120px at 50% 8%,
      rgba(168, 90, 120, 0.14),
      transparent 70%
    ),
    radial-gradient(
      240px 110px at 85% 82%,
      rgba(122, 139, 111, 0.14),
      transparent 70%
    ),
    linear-gradient(180deg, #f3ecdc, var(--hcc-paper) 55%, #f3ecdc);
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
.hcc.is-js.is-open .hcc-cover {
  transform: translateY(-100%);
}
@media (prefers-reduced-motion: reduce) {
  .hcc.is-js .hcc-cover {
    transition: none;
  }
}
.hcc-cover-inner {
  position: relative;
  text-align: center;
  padding: 24px;
  max-width: 430px;
  width: 100%;
}
/* Bingkai mawar: arch ganda sage + mawar. */
.hcc-cover-inner::before {
  content: "";
  display: block;
  width: 130px;
  height: 92px;
  margin: 0 auto 18px;
  border: 1px solid var(--hcc-acc);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  box-shadow:
    inset 0 0 0 6px var(--hcc-paper),
    inset 0 0 0 7px var(--hcc-rose);
}
.hcc-cover__ornament {
  color: var(--hcc-rose);
  font-size: 22px;
  margin: 0 0 10px;
}
.hcc-cover .hcc-title {
  font-size: clamp(32px, 9vw, 44px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hcc-guest {
  margin-top: 22px;
  color: var(--hcc-muted);
}
.hcc-guest small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.hcc-guest strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--hcc-ink);
}
.hcc-open {
  margin-top: 26px;
  font-family: var(--hcc-disp-stack);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hcc-on-acc);
  background: var(--hcc-acc);
  border: 1px solid var(--hcc-acc);
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
}
.hcc-open:hover {
  background: var(--hcc-acc-text);
}
.hcc-open:active {
  transform: translateY(1px);
}

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

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

/* Elemen melayang 3D — container `perspective` + tiap item `translate3d`
   dengan `--drift-z` berbeda (-80px s.d. 80px) untuk parallax/kedalaman.
   Hanya transform/opacity yang dianimasikan. */
.hcc-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.hcc-drift--page {
  position: fixed;
  z-index: 40;
}
.hcc-drift__item {
  position: absolute;
  top: 0;
  display: block;
  animation: hcc-drift-fall linear infinite;
  will-change: transform, opacity;
}
.hcc-drift__item svg {
  display: block;
  animation: hcc-drift-sway 2.2s ease-in-out infinite alternate;
}
.hcc-drift__item:nth-child(even) svg {
  animation-duration: 2.8s;
}
.hcc-drift--page .hcc-drift__item svg {
  opacity: 0.55;
}
@keyframes hcc-drift-fall {
  0% {
    transform: translate3d(0, -12vh, var(--drift-z, 0px)) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  85% {
    opacity: 0.78;
  }
  100% {
    transform: translate3d(0, 112vh, var(--drift-z, 0px)) rotate(300deg);
    opacity: 0;
  }
}
@keyframes hcc-drift-sway {
  from {
    transform: translateX(-18px) rotate(-14deg);
  }
  to {
    transform: translateX(18px) rotate(14deg);
  }
}

/* Kedalaman 3D sampul — judul & nama tamu di lapisan translateZ berbeda,
   halus dan tidak mengubah layout. */
.hcc.is-js .hcc-cover {
  perspective: 1000px;
}
.hcc-cover-inner {
  transform-style: preserve-3d;
}
.hcc-cover-inner .hcc-title {
  transform: translateZ(36px);
}
.hcc-cover-inner .hcc-guest {
  transform: translateZ(16px);
}
@media (prefers-reduced-motion: reduce) {
  .hcc-drift {
    display: none;
  }
}

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

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