/* =========================================================================
   RAUHIN — TEMPLATE HERA · hera.css
   Dewi pernikahan & kesetiaan: klasik anggun, putih gading, emas lembut.
   Gaya: undangan cetak premium — kertas gading, garis emas tipis,
   angka Romawi, momen gelap espresso.
   Hierarki huruf: JUDUL besar (Cormorant tipis) ↔ DESKRIPSI kecil (Jost tipis).
   Ubah warna & ukuran huruf di TOKEN.
   ========================================================================= */


/* =========================================================================
   TOKEN
   ========================================================================= */
:root {
  /* terang */
  --paper: #f4eee2;          /* kertas gading (latar utama) */
  --paper-2: #ebe2cf;        /* gading lebih tua (section selang-seling) */
  --paper-hi: #fbf8f1;       /* gading paling terang (kartu, cahaya) */
  --ink: #2a2117;            /* teks utama, kontras 13:1 */
  --muted: #6b5f4d;          /* teks sekunder, kontras 5.4:1 */
  --gold: #b39257;           /* garis & ornamen */
  --gold-text: #86672f;      /* emas untuk teks kecil, kontras 4.6:1 */
  --line: rgba(134, 103, 47, .32);

  /* gelap */
  --espresso: #1b1611;
  --espresso-2: #241d16;
  --on-dark: #f3ecdf;
  --on-dark-muted: rgba(243, 236, 223, .74);
  --gold-light: #d8bf88;     /* emas di atas gelap, kontras 9:1 */
  --line-dark: rgba(216, 191, 136, .28);

  /* foil emas (monogram) */
  --foil: linear-gradient(110deg, #7a5a24 0%, #c9a865 24%, #8a6a30 42%, #d6b979 56%, #7d5e28 76%, #b8964f 100%);

  /* huruf */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --fs-title: clamp(3.25rem, 2.5rem + 3.6vw, 4.25rem);   /* judul section */
  --fs-name: clamp(4rem, 3rem + 5vw, 5.25rem);           /* nama besar */
  --fs-desc: .9375rem;                                    /* deskripsi (15px) */
  --fs-label: .6875rem;                                   /* label kecil (11px) */

  --col: 520px;              /* lebar kolom undangan di layar lebar */
  --pad: clamp(24px, 8vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}


/* =========================================================================
   DASAR
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:not(.js-motion) { scroll-behavior: smooth; }   /* saat animasi aktif, JS yang mengurus gulir halus */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-closed { overflow: hidden; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, blockquote, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.fill, .fill * { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tekstur kertas */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* =========================================================================
   TIPOGRAFI & KOMPONEN BERSAMA
   ========================================================================= */
/* label kecil berjarak lebar */
.label {
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 400;
  letter-spacing: .34em; text-transform: uppercase; line-height: 1.7;
  color: var(--gold-text);
}
.label--muted { color: var(--muted); letter-spacing: .24em; }
.label--light { color: var(--on-dark-muted); }
.label--gold { color: var(--gold-light); }

/* judul besar */
.title {
  font-size: var(--fs-title);
  font-weight: 300; line-height: .95; letter-spacing: -.015em;
  color: var(--ink);
  margin-bottom: 6px;
}
.title--light { color: var(--on-dark); }

/* deskripsi kecil */
.desc {
  max-width: 34ch;
  font-family: var(--sans); font-size: var(--fs-desc); font-weight: 300; line-height: 1.85;
  color: var(--muted);
}
.desc--light { color: var(--on-dark-muted); }

/* tanggal angka Romawi */
.roman { font-size: 1rem; letter-spacing: .42em; margin-right: -.42em; color: var(--gold-text); }
.roman--light { color: var(--gold-light); }

i { font-style: italic; font-weight: 300; }

.ornament { display: block; width: 190px; height: 38px; margin: 0 auto; color: var(--gold); stroke-width: 1; }
.ornament--small { width: 120px; height: 24px; }

/* foil emas berkilau */
.foil {
  color: transparent;
  background: var(--foil); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: sheen 6s var(--ease-io) infinite alternate;
}
@keyframes sheen { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* bingkai passe-partout */
.mat { position: relative; padding: 10px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(42, 33, 23, .55); }
.mat img { width: 100%; height: 100%; object-fit: cover; }

/* tombol: persegi, garis tipis, huruf kapital berjarak */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 34px;
  border: 1px solid var(--gold); background: transparent;
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-text); text-decoration: none; cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s;
  touch-action: manipulation;
}
.btn:hover { background: var(--gold); color: var(--paper); }
.btn:active { transform: scale(.98); }
.btn--solid { background: var(--espresso); border-color: var(--espresso); color: var(--on-dark); }
.btn--solid:hover { background: var(--gold-text); border-color: var(--gold-text); color: #fff; }
.btn--light { border-color: var(--gold-light); color: var(--gold-light); }
.btn--light:hover { background: var(--gold-light); color: var(--espresso); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: wait; }

.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-text); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link svg { width: 16px; height: 16px; }
.link--light { color: var(--gold-light); }


/* =========================================================================
   00 · GERBANG
   ========================================================================= */
.gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden; }
.gate__door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: radial-gradient(120% 60% at 50% 0%, #fbf6ec 0%, transparent 60%), var(--paper);
}
.gate__door--l { left: 0; }
.gate__door--r { right: 0; }
.gate__door::before {                 /* bingkai emas ganda */
  content: ""; position: absolute; inset: 18px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--line);
}
.gate__door--l::before { right: -1px; border-right: 0; }
.gate__door--r::before { left: -1px; border-left: 0; }
.gate__door--l::after, .gate__door--r::after {   /* garis temu kedua pintu, memudar di balik isi */
  content: ""; position: absolute; top: 18px; bottom: 18px; width: 1px;
  background: linear-gradient(var(--line) 0 8%, transparent 16% 86%, var(--line) 94%);
}
.gate__door--l::after { right: 0; }
.gate__door--r::after { left: 0; }

.gate__content { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; width: min(100% - 64px, 360px); padding: 40px 0; text-align: center; }
.gate__names { font-size: clamp(3rem, 2.2rem + 6vw, 4rem); font-weight: 300; font-style: italic; line-height: 1; }
.gate__names i { color: var(--gold); }
.gate__date { font-family: var(--sans); font-size: .8125rem; font-weight: 300; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text); }
.gate__guest { display: grid; gap: 4px; margin: 22px 0 12px; }
.gate__to { font-family: var(--sans); font-size: .625rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.gate__guest-name { font-size: 1.375rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }


/* =========================================================================
   LOADING AWAL — "LILIN KESATUAN"
   Ruang espresso temaram; lilin digambar SVG (posisi lilin tipis & nyala
   diatur hera.js tiap frame). --g = kekuatan cahaya (0..1).
   ========================================================================= */
.loader {
  --g: .3;
  position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 14px;
  overflow: hidden; text-align: center; color: var(--on-dark);
  background: radial-gradient(70% 55% at 50% 45%, var(--espresso-2), var(--espresso) 70%, #120e0a);
  animation: loader-safety 14s step-end forwards;   /* pengaman bila JS gagal */
}
@keyframes loader-safety { to { visibility: hidden; } }
.loader.is-gone { opacity: 0; transition: opacity .5s; pointer-events: none; }
.loader > :not(.loader__glow) { position: relative; }
/* cahaya lilin di ruangan; makin kuat saat lilin tengah menyala */
.loader__glow {
  position: absolute; inset: 0; pointer-events: none; opacity: var(--g);
  background: radial-gradient(45% 38% at 50% 44%, rgba(255, 214, 150, .32), rgba(255, 196, 120, .08) 55%, transparent 75%);
}
.loader__kicker { animation: loader-in 1.4s .2s both; }
.loader__candles { width: auto; height: min(40svh, 320px); overflow: visible; stroke: none; }   /* tanpa garis bawaan svg global */
.loader__flame { overflow: visible; }
.loader__fl { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.6s ease-in-out infinite alternate; }
#flameR .loader__fl { animation-duration: 1.9s; animation-delay: -.6s; }
#flameC .loader__fl { animation-duration: 1.4s; animation-delay: -.3s; }
@keyframes flicker {
  0% { transform: scale(1, 1) skewX(0deg); }
  30% { transform: scale(.94, 1.06) skewX(-2deg); }
  55% { transform: scale(1.03, .96) skewX(1.5deg); }
  80% { transform: scale(.97, 1.04) skewX(-1deg); }
  100% { transform: scale(1, 1) skewX(.5deg); }
}
.loader__flame--c { opacity: 0; }   /* menyala lewat hera.js */
.loader__names { font-family: var(--serif); font-size: clamp(2.5rem, 2rem + 3vw, 3.25rem); font-weight: 300; line-height: 1.05; }
.loader__names > * { display: inline-block; opacity: 0; }   /* tampil lewat hera.js */
.loader__names i { color: var(--gold-light); }
.loader__verse { display: grid; gap: 2px; min-height: 2.6em; opacity: 0; }
.loader__verse i { font-family: var(--serif); font-size: 1.125rem; color: var(--on-dark-muted); }
.loader__count { font-variant-numeric: tabular-nums; min-width: 6ch; animation: loader-in 1.4s .4s both; }
@keyframes loader-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .loader__kicker, .loader__count, .loader__fl { animation: none; }
  .loader__names > * { opacity: 1; }
}

/* segel monogram berbingkai laurel */
.seal { position: relative; display: grid; place-items: center; width: 168px; height: 168px; margin: 6px 0 4px; }
.seal__laurel { position: absolute; top: 4px; width: 78px; height: 150px; color: var(--gold); stroke-width: 1.2; will-change: transform, opacity; }   /* lapisan sendiri: putaran halus */
.seal__laurel--l { left: 6px; }
.seal__laurel--r { right: 6px; }
/* ranting kanan = gambar ranting kiri dicerminkan; cermin dipasang di dalam (use), bukan di bingkainya,
   agar putaran pembuka (titik putar di pangkal ranting) tidak ikut memindahkan posisinya */
.seal__laurel--r use { transform: scaleX(-1); transform-origin: 50% 50%; transform-box: view-box; }
.seal__mono { font-size: 2.875rem; font-weight: 400; font-style: italic; line-height: 1; padding-top: 6px; }
.seal--small { width: 120px; height: 120px; }
.seal--small .seal__laurel { width: 56px; height: 108px; }
.seal--small .seal__mono { font-size: 2rem; }
.seal--light .seal__laurel, .seal--light .seal__mono { color: var(--gold-light); }


/* =========================================================================
   NAVIGASI (tombol + panel melengkung, seperti website utama)
   ========================================================================= */
.nav-btn {
  position: fixed; z-index: 72; top: max(16px, env(safe-area-inset-top)); right: 16px;
  display: grid; place-items: center; width: 52px; height: 52px;
  border: 1px solid var(--espresso); background: var(--espresso); color: var(--gold-light); cursor: pointer;
  transition: background-color .5s, color .5s, border-color .5s, opacity .6s, transform .6s var(--ease);
}
.nav-btn.is-on-dark { background: var(--paper); border-color: var(--paper); color: var(--espresso); }
.nav-btn__lines { position: relative; width: 22px; height: 8px; }
.nav-btn__lines span { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.nav-btn__lines span:first-child { top: 0; }
.nav-btn__lines span:last-child { bottom: 0; }
.nav-btn[aria-expanded="true"] { background: var(--paper); border-color: var(--paper); color: var(--espresso); }
.nav-btn[aria-expanded="true"] .nav-btn__lines span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-btn[aria-expanded="true"] .nav-btn__lines span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.is-closed .nav-btn { opacity: 0; pointer-events: none; transform: translateY(-12px); }

.nav-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(27, 22, 17, .4); opacity: 0; visibility: hidden; transition: opacity .6s var(--ease-io), visibility .6s; }
.nav-overlay.is-open { opacity: 1; visibility: visible; }
.nav-panel { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--espresso); color: var(--on-dark); transform: translateX(calc(100% + 120px)); }
.nav-panel__curve { position: absolute; top: 0; left: -99px; width: 100px; height: 100%; fill: var(--espresso); stroke: none; overflow: visible; }
.nav-panel__inner { height: 100%; display: flex; flex-direction: column; padding: max(92px, 12vh) clamp(28px, 8vw, 56px) max(32px, env(safe-area-inset-bottom)); overflow-y: auto; }
.nav-panel__mono { font-size: 2rem; font-style: italic; line-height: 1; margin-bottom: 28px; color: var(--gold-light); }
.nav-panel__list li { border-bottom: 1px solid var(--line-dark); }
.nav-panel__list li:first-child { border-top: 1px solid var(--line-dark); }
.nav-panel__list a { display: flex; align-items: baseline; gap: 16px; padding: 13px 0; font-size: 1.625rem; font-weight: 300; font-style: italic; line-height: 1.2; text-decoration: none; transition: color .3s, transform .5s var(--ease); }
.nav-panel__list a span { min-width: 2.6em; font-family: var(--sans); font-size: var(--fs-label); font-style: normal; letter-spacing: .22em; color: var(--gold-light); }
.nav-panel__list a:hover, .nav-panel__list a.is-active { color: var(--gold-light); transform: translateX(6px); }
.nav-panel__date { margin-top: auto; padding-top: 32px; text-align: center; }


/* =========================================================================
   PANEL FOTO KIRI (layar lebar)
   ========================================================================= */
.side { display: none; }
@media (min-width: 900px) {
  .side { display: block; position: fixed; inset: 0 var(--col) 0 0; overflow: hidden; background: var(--espresso); }
  .side img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
  .side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 22, 17, .05) 35%, rgba(27, 22, 17, .7) 100%); }
  .side::before { content: ""; position: absolute; inset: 24px; z-index: 1; border: 1px solid rgba(243, 236, 223, .35); pointer-events: none; }
  .side__text { position: absolute; z-index: 2; left: 64px; bottom: 64px; display: grid; gap: 12px; color: var(--on-dark); }
  .side__names { font-size: clamp(3.5rem, 5vw, 5.5rem); font-style: italic; font-weight: 300; line-height: 1; }
  .side__names i { color: var(--gold-light); }
  .side__text .roman { margin-right: 0; }
  .invite { margin-left: auto; width: var(--col); box-shadow: -40px 0 80px -40px rgba(0, 0, 0, .45); }
  .nav-btn { right: 24px; }
}


/* =========================================================================
   SECTION (kerangka umum)
   ========================================================================= */
.invite { position: relative; background: var(--paper); }
.sec {
  --bg: var(--paper);
  position: relative; display: grid; justify-items: center; gap: 18px; padding: 120px var(--pad); text-align: center; overflow: clip; isolation: isolate;
  /* gading bersih dengan cahaya lembut dari atas, seperti kertas katun di bawah lampu */
  background: radial-gradient(110% 46% at 50% 0%, var(--paper-hi) 0%, transparent 72%), var(--bg);
}
.sec.dark { background: radial-gradient(90% 46% at 50% 0%, rgba(216, 191, 136, .14), transparent 72%), var(--espresso); color: var(--on-dark); }

/* garis tepi tipis kiri-kanan, seperti margin kartu undangan cetak */
.sec::before {
  content: ""; position: absolute; inset: 0 14px; z-index: -1; pointer-events: none;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(transparent 4%, #000 22%, #000 80%, transparent 97%);
  mask-image: linear-gradient(transparent 4%, #000 22%, #000 80%, transparent 97%);
}
.sec.dark::before { border-color: var(--line-dark); }

/* PUNCAK SECTION — kubah lengkung (arch) atau atap kuil (pediment) bergantian.
   Pita berwarna section sebelumnya; bentuknya "naik" saat digulir (hera.js → setupCaps) */
.sec[data-cap] { padding-top: 150px; margin-top: -1px; }   /* tumpang 1px agar tidak ada garis sambungan */
.cap { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 76px; pointer-events: none; }
.cap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cap__fill { fill: var(--cap); stroke: none; }
.cap__line { stroke: var(--gold); stroke-width: 1; }
.cap__gem { position: absolute; left: 50%; width: 7px; height: 7px; background: var(--gold); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 4px var(--bg-gem, var(--bg)); }
.dark .cap__gem { background: var(--gold-light); --bg-gem: var(--espresso); }
#pembuka { --cap: var(--espresso); }
#mempelai { --cap: var(--paper); }
#tanggal { --cap: var(--paper-2); }
#acara { --cap: var(--espresso); }
#kisah { --cap: var(--paper); }
#galeri { --cap: var(--paper-2); }
#rsvp { --cap: var(--espresso); }
#hadiah { --cap: var(--paper); }

/* debu emas berkilau (section gelap) */
.dust { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.sec.dark > *:not(.dust):not(.cap) { position: relative; z-index: 1; }

/* judul: huruf muncul satu per satu seperti dipahat */
.title .tw { display: inline-block; vertical-align: top; overflow: clip; padding-bottom: .1em; margin-bottom: -.1em; }
.title .tl { display: inline-block; }


/* =========================================================================
   01 · HERO
   ========================================================================= */
/* ruang kuil yang gelap; foto tampil di jendela lengkung yang berpendar sinar emas */
.hero {
  position: relative; min-height: 100svh; display: grid; justify-items: center; align-content: center;
  padding: max(88px, 11svh) var(--pad) 120px; text-align: center; overflow: clip; isolation: isolate;
  color: var(--on-dark);
  background: radial-gradient(70% 45% at 50% 40%, rgba(216, 191, 136, .2), transparent 70%), var(--espresso);
}
.hero::before {                         /* bingkai ganda tipis */
  content: ""; position: absolute; inset: 14px; z-index: 3; pointer-events: none;
  border: 1px solid var(--line-dark);
  box-shadow: inset 0 0 0 5px var(--espresso), inset 0 0 0 6px rgba(216, 191, 136, .14);
}
.hero__top { margin-bottom: 30px; color: var(--gold-light); }

.hero__arch { position: relative; width: min(66vw, 40svh, 330px); aspect-ratio: 3 / 4.1; }
.hero__media { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--espresso-2); }
.hero__media img { width: 100%; height: 116%; margin-top: -8%; object-fit: cover; animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { scale: 1.02; } to { scale: 1.12; } }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(27, 22, 17, .45)); }

/* dua lengkung emas di sekeliling jendela */
.hero__ring { position: absolute; z-index: 1; border: 1px solid var(--gold-light); border-bottom: 0; border-radius: 999px 999px 0 0; pointer-events: none; }
.hero__ring--1 { inset: -11px -11px 0; }
.hero__ring--2 { inset: -22px -22px 0; border-color: var(--line-dark); }
.hero__key { position: absolute; z-index: 3; left: 50%; top: -22px; width: 9px; height: 9px; background: var(--gold-light); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 5px var(--espresso), 0 0 18px 4px rgba(216, 191, 136, .45); }
.hero__base { position: absolute; z-index: 3; left: -40px; right: -40px; bottom: -9px; height: 9px; border-top: 1px solid var(--gold-light); border-bottom: 1px solid var(--line-dark); }

/* sinar emas berputar pelan di belakang lengkung */
.hero__rays {
  position: absolute; z-index: 0; left: calc(50% - 450px); top: calc(36% - 450px); width: 900px; height: 900px;
  background: repeating-conic-gradient(from 0deg, rgba(216, 191, 136, .3) 0deg .5deg, transparent .5deg 6deg);
  -webkit-mask-image: radial-gradient(circle, #000 14%, transparent 52%);
  mask-image: radial-gradient(circle, #000 14%, transparent 52%);
  animation: rays 140s linear infinite;
}
@keyframes rays { to { rotate: 360deg; } }

.hero__names { position: relative; z-index: 3; margin-top: 30px; font-size: var(--fs-name); font-weight: 300; font-style: italic; line-height: .95; }
.hero__names > * { display: inline-block; }
.hero__names i { color: var(--gold-light); }
.hero__date { margin-top: 16px; color: var(--gold-light); }

/* teks tegak di kiri-kanan, seperti prasasti */
.hero__side {
  position: absolute; z-index: 3; top: 50%; writing-mode: vertical-rl; white-space: nowrap;
  font-family: var(--sans); font-size: .5625rem; letter-spacing: .4em; text-transform: uppercase; color: var(--on-dark-muted);
}
.hero__side--l { left: 26px; transform: translateY(-50%) rotate(180deg); }
.hero__side--r { right: 26px; transform: translateY(-50%); }
@media (max-width: 359px) { .hero__side { display: none; } }

.hero__cue { position: absolute; z-index: 3; left: 50%; bottom: 36px; width: 1px; height: 44px; background: linear-gradient(var(--gold-light), transparent); animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }


/* =========================================================================
   02 · PEMBUKA — monogram samar + kutipan menyala kata demi kata
   ========================================================================= */
.opening { gap: 26px; padding-block: 140px; }
.opening__mark {
  position: absolute; z-index: 0; left: 50%; top: 50%; translate: -50% -50%;
  font-size: 15rem; font-style: italic; font-weight: 300; line-height: 1; white-space: nowrap;
  color: var(--gold); opacity: .07; pointer-events: none;
}
.opening > *:not(.opening__mark):not(.cap) { position: relative; z-index: 1; }
.quote { max-width: 22ch; }
.quote__text { font-size: clamp(1.875rem, 1.5rem + 1.8vw, 2.25rem); font-weight: 300; font-style: italic; line-height: 1.3; color: var(--ink); }
.quote--long { max-width: 34ch; }
.quote--long .quote__text { font-size: clamp(1.375rem, 1.2rem + 1vw, 1.75rem); line-height: 1.4; }
.quote cite { display: block; margin-top: 22px; font-family: var(--sans); font-size: var(--fs-label); font-style: normal; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-text); }


/* =========================================================================
   03 · MEMPELAI — editorial, berselang kiri/kanan
   ========================================================================= */
.couple { --bg: var(--paper-2); }
.couple__list { display: grid; gap: 40px; width: 100%; margin-top: 36px; }
.person { display: grid; gap: 0; width: 100%; }
.person__visual { position: relative; display: grid; padding: 21% 0 46px; }   /* ruang untuk atap kuil */
.person__photo {
  position: relative; width: 74%; aspect-ratio: 3 / 4; justify-self: start; margin-left: 8.2%;
  border-radius: 999px 999px 0 0; isolation: isolate;
}
.person__photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* serambi kuil di belakang foto: atap segitiga, dua pilar ionik, dinding samar, alas */
.portico { position: absolute; z-index: 0; top: -19.6%; bottom: 0; left: -11%; right: -11%; width: 122%; height: 119.6%; overflow: visible; }
.portico path, .portico circle { stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }
.portico .portico__wall { fill: rgba(179, 146, 87, .1); stroke: none; }
.portico .portico__tympanum { fill: var(--paper-hi); stroke: none; }
.portico__col path, .portico__col circle { fill: none; }
.person__role {
  position: absolute; right: 2%; top: 18%;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: .5em; text-transform: uppercase; color: var(--gold-text);
}
.person__nick {
  position: absolute; z-index: 2; right: 0; bottom: 0;
  font-size: var(--fs-name); font-weight: 300; font-style: italic; line-height: .9;
  color: var(--ink);
  text-shadow: 0 0 30px var(--paper-2), 0 0 12px var(--paper-2);
}
.person__info { display: grid; justify-items: start; gap: 6px; margin-top: 28px; text-align: left; }
.person__full { font-size: 1.5rem; font-weight: 500; line-height: 1.25; }
.person__child { margin-top: 8px; }
.person__parents { max-width: 30ch; color: var(--ink); }

/* tombol Instagram mempelai */
.ig-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 16px; padding: 0 20px 0 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper-hi);
  font-family: var(--sans); font-size: .75rem; font-weight: 400; letter-spacing: .08em; color: var(--ink); text-decoration: none;
  transition: border-color .4s, background-color .4s, color .4s, transform .5s var(--ease);
}
.ig-btn svg { width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: var(--espresso); color: var(--gold-light); transition: transform .6s var(--ease); }
.ig-btn:hover { border-color: var(--gold); background: var(--espresso); color: var(--on-dark); }
.ig-btn:hover svg { transform: rotate(-12deg) scale(1.06); background: var(--gold); color: var(--espresso); }
.ig-btn:active { transform: scale(.97); }

/* mempelai kedua: dicerminkan */
.person--alt .person__photo { justify-self: end; margin-left: 0; margin-right: 8.2%; }
.person--alt .person__role { right: auto; left: 2%; }
.person--alt .person__nick { right: auto; left: 0; }
.person--alt .person__info { justify-items: end; text-align: right; }

.couple__amp { display: flex; align-items: center; gap: 18px; justify-self: stretch; color: var(--gold); font-size: 4.5rem; font-weight: 300; font-style: italic; line-height: 1; }
.couple__amp::before, .couple__amp::after { content: ""; flex: 1; height: 1px; background: var(--line); }


/* =========================================================================
   04 · SAVE THE DATE (gelap)
   ========================================================================= */
/* kuil: atap segitiga, pilar bergalur, anak tangga */
.temple { width: 100%; max-width: 380px; margin: 26px 0 10px; color: var(--gold-light); }
.temple__roof { display: block; width: 100%; height: 70px; stroke: currentColor; stroke-width: 1; }
.temple__body {
  display: grid; grid-template-columns: 12px 1fr 12px 1fr 12px 1fr 12px 1fr 12px;
  border-top: 1px solid var(--line-dark);
}
.col {
  position: relative; margin-top: 10px;
  border-left: 1px solid rgba(216, 191, 136, .55); border-right: 1px solid rgba(216, 191, 136, .55);
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(216, 191, 136, .35) 3px 4px);
}
.col::before, .col::after { content: ""; position: absolute; left: -5px; right: -5px; height: 5px; border: 1px solid rgba(216, 191, 136, .7); }
.col::before { top: -6px; border-radius: 3px 3px 0 0; }
.col::after { bottom: -1px; }
.temple__cell { display: grid; justify-items: center; gap: 6px; padding: 30px 2px 24px; }
.temple__num { display: block; overflow: clip; font-style: normal; padding: 2px 0; }
.temple__cell b { display: block; font-family: var(--sans); font-size: 2.125rem; font-weight: 200; line-height: 1; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.temple__cell span { font-family: var(--sans); font-size: .5625rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-light); }
.temple__steps { display: grid; justify-items: center; }
.temple__steps span { display: block; height: 6px; border: 1px solid rgba(216, 191, 136, .5); border-top: 0; }
.temple__steps span:nth-child(1) { width: 100%; border-top: 1px solid rgba(216, 191, 136, .5); }
.temple__steps span:nth-child(2) { width: 104%; }
.temple__steps span:nth-child(3) { width: 108%; }



/* =========================================================================
   05 · RANGKAIAN ACARA — kartu gerbang kuil
   ========================================================================= */
.events { --bg: var(--paper); }
.events__list { display: grid; gap: 28px; width: 100%; margin-top: 30px; }
.event {
  position: relative; display: grid; justify-items: center; gap: 4px;
  padding: 104px 26px 44px;
  background: var(--paper-hi); border: 1px solid var(--line);
  border-radius: 999px 999px 0 0;
  box-shadow: 0 40px 70px -50px rgba(42, 33, 23, .55);
}
.event::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(179, 146, 87, .22); border-radius: inherit; pointer-events: none; }
.event__num { position: absolute; top: 26px; left: 50%; translate: -50% 0; font-size: 4.5rem; font-weight: 300; font-style: italic; line-height: 1; color: var(--gold); opacity: .35; }
.event__name { font-size: 2.375rem; font-weight: 300; font-style: italic; line-height: 1.05; }
.event__date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; max-width: 300px; margin: 24px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event__dow, .event__my { font-family: var(--sans); font-size: var(--fs-label); letter-spacing: .28em; text-transform: uppercase; color: var(--gold-text); }
.event__dd { padding: 10px 18px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-family: var(--sans); font-size: 3rem; font-weight: 200; line-height: 1; color: var(--ink); }
.event__time { font-family: var(--sans); font-size: .8125rem; font-weight: 300; letter-spacing: .14em; color: var(--muted); }
.event .ornament--small { margin: 18px 0 14px; }
.event__venue { font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.event__address { margin-bottom: 24px; }
.events__dress { margin-top: 10px; font-style: italic; }
.map-wrap { display: grid; justify-items: center; gap: 14px; width: 100%; margin-top: 30px; }
.map { width: 100%; aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) sepia(.25) contrast(.95); }


/* =========================================================================
   06 · KISAH CINTA
   ========================================================================= */
.story { --bg: var(--paper-2); }
.story__wrap { position: relative; width: 100%; margin-top: 30px; }
.story__line { display: none; }
.story__list { position: relative; display: grid; justify-items: center; }
.story__link { display: block; width: 1px; height: 76px; margin: 22px 0; background: linear-gradient(var(--gold), rgba(179, 146, 87, .15)); transform-origin: top; }
.story__item { display: grid; justify-items: center; gap: 8px; }

/* medali cameo seperti koin Yunani */
.story__coin { width: 128px; height: 128px; margin-bottom: 14px; perspective: 700px; }
.story__coin-face {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 6px var(--paper), 0 0 0 7px var(--gold), 0 24px 40px -22px rgba(42, 33, 23, .6);
  transform-style: preserve-3d;
}
.story__coin-face::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .55); pointer-events: none; }
.story__coin img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.45) saturate(.85) contrast(1.05); }
.story__roman { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.75rem; font-style: italic; font-weight: 300; color: var(--gold-text); }
.story__coin img:not([hidden]) + .story__roman { display: none; }
.story__chapter { margin-top: 6px; }
.story__title { font-size: 2rem; font-weight: 300; font-style: italic; line-height: 1.1; color: var(--ink); }
.story__text { max-width: 32ch; }


/* =========================================================================
   07 · GALERI (carousel) & VIDEO
   ========================================================================= */
/* galeri kini momen gelap: foto tampil seperti di ruang pamer */
.gallery .gslide { background: var(--espresso-2); box-shadow: 0 40px 60px -36px rgba(0, 0, 0, .8); }
.gallery .carousel__btn { border-color: var(--gold-light); color: var(--gold-light); }
.gallery .carousel__btn:hover { background: var(--gold-light); color: var(--espresso); }
.gallery .carousel__count { color: var(--gold-light); }
.gallery .carousel__line { background: var(--line-dark); }
.gallery .carousel__line span { background: var(--gold-light); }
.gallery .mat { background: var(--espresso-2); border-color: var(--line-dark); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .8); }
.carousel { display: grid; gap: 22px; width: calc(100% + var(--pad) * 2); margin: 26px calc(var(--pad) * -1) 0; }
.carousel__track {
  display: flex; gap: 14px;
  padding: 10px 13% 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.gslide {
  flex: 0 0 100%;          /* = lebar track dikurangi padding 13% kiri-kanan → foto tetangga mengintip */
  aspect-ratio: 4 / 5; padding: 0; border: 0; overflow: hidden;
  scroll-snap-align: center; background: var(--paper); cursor: zoom-in;
  box-shadow: 0 40px 60px -40px rgba(42, 33, 23, .6);
  transform-origin: center; will-change: transform;
}
.gslide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__bar { display: flex; align-items: center; justify-content: center; gap: 20px; }
.carousel__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--gold); border-radius: 50%; background: transparent; color: var(--gold-text); cursor: pointer; transition: background-color .3s, color .3s; }
.carousel__btn:hover { background: var(--gold); color: var(--paper); }
.carousel__btn svg { width: 18px; height: 18px; }
.carousel__count { display: flex; align-items: center; gap: 12px; min-width: 150px; justify-content: center; font-size: 1rem; letter-spacing: .2em; color: var(--gold-text); }
.carousel__line { position: relative; width: 56px; height: 1px; background: var(--line); }
.carousel__line span { position: absolute; inset: 0; background: var(--gold-text); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }

.video { display: grid; justify-items: center; gap: 18px; width: 100%; margin-top: 80px; }
.video__frame { width: 100%; aspect-ratio: 16 / 10; background: var(--espresso); }
.video__frame img, .video__frame iframe { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: cover; border: 0; }
.video__frame img { opacity: .78; }
.video__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(243, 236, 223, .8); border-radius: 50%; background: rgba(27, 22, 17, .25); color: var(--on-dark); cursor: pointer; transition: transform .5s var(--ease), background-color .4s; }
.video__play:hover { transform: scale(1.06); background: rgba(27, 22, 17, .45); }
.video__play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; stroke: none; }
.video__empty { position: absolute; left: 0; right: 0; bottom: 24px; font-family: var(--sans); font-size: var(--fs-label); letter-spacing: .24em; text-transform: uppercase; color: var(--on-dark); }

.lightbox { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 16, 12, .96); color: var(--on-dark); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(20, 16, 12, .96); }
.lightbox img { max-width: 92vw; max-height: 80svh; object-fit: contain; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(243, 236, 223, .35); background: transparent; color: var(--on-dark); cursor: pointer; }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 1rem; letter-spacing: .3em; color: var(--on-dark-muted); }


/* =========================================================================
   08 · RSVP & UCAPAN · FORMULIR
   ========================================================================= */
.form { display: grid; gap: 26px; width: 100%; max-width: 400px; margin-top: 18px; text-align: left; }
.field { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field input[type="text"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 8px 0;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
  transition: border-color .3s;
}
.field select { cursor: pointer; }
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold-text); }
.field__error { font-family: var(--sans); font-size: .8125rem; color: #9d3226; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #9d3226; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.choice label { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border: 1px solid var(--line); cursor: pointer; font-family: var(--sans); font-size: .875rem; font-weight: 300; transition: border-color .3s, background-color .3s; }
.choice input { accent-color: var(--gold-text); }
.choice label:has(input:checked) { border-color: var(--gold-text); background: rgba(179, 146, 87, .1); }
.form__status { min-height: 1.4em; text-align: center; font-style: italic; color: var(--gold-text); }

.wishes { display: grid; gap: 14px; width: 100%; margin-top: 44px; }
.wishes { justify-items: center; }
.wishes__list { width: 100%; text-align: left; border-top: 1px solid var(--line); }   /* tanpa scroll di dalam halaman */
.wish { padding: 22px 4px; border-bottom: 1px solid var(--line); }
.wish__msg { font-size: 1.3125rem; font-weight: 300; font-style: italic; line-height: 1.45; overflow-wrap: anywhere; }
.wish__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-family: var(--sans); font-size: .625rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.wish__name { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.wish__attend { color: var(--gold-text); }


/* =========================================================================
   09 · TANDA KASIH (gelap)
   ========================================================================= */
.gift__list { display: grid; gap: 14px; width: 100%; margin-top: 18px; }
.account { position: relative; display: grid; justify-items: center; gap: 4px; padding: 34px 20px 18px; border: 1px solid var(--line-dark); background: linear-gradient(145deg, rgba(216, 191, 136, .08), rgba(216, 191, 136, .02)); }
.account::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(216, 191, 136, .14); pointer-events: none; }
.account__bank { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .36em; text-transform: uppercase; color: var(--gold-light); }
.account__number { margin-top: 6px; font-family: var(--sans); font-size: 1.625rem; font-weight: 200; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.account__name { font-style: italic; color: var(--on-dark-muted); }


/* =========================================================================
   10 · PENUTUP — foto layar penuh
   ========================================================================= */
.closing { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: var(--on-dark); background: var(--espresso); }
.closing__media { position: absolute; inset: 0; }
.closing__media img { width: 100%; height: 100%; object-fit: cover; }
.closing::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 22, 17, .25) 0%, rgba(27, 22, 17, .55) 45%, rgba(27, 22, 17, .94) 100%); }
.closing::before { content: ""; position: absolute; inset: 16px; z-index: 2; border: 1px solid rgba(243, 236, 223, .3); pointer-events: none; }
.closing__content { position: relative; z-index: 3; display: grid; justify-items: center; gap: 16px; padding: 140px var(--pad) 84px; text-align: center; }
.closing__names { font-size: var(--fs-name); font-weight: 300; font-style: italic; line-height: .95; margin-top: 4px; }
.closing__names i { color: var(--gold-light); }
.closing__salam { font-style: italic; color: var(--on-dark-muted); }
.closing .seal { margin-top: 10px; }
.closing .dust { z-index: 2; }

/* tanda tangan Rauhin + kontak, kecil & tanpa bingkai */
.signature { display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 320px; margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(243, 236, 223, .18); }
.signature__tag { font-size: 1rem; font-style: italic; color: var(--on-dark-muted); }
.signature__brand { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .55em; margin-right: -.55em; color: var(--gold-light); }
.signature__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 4px; }
.signature__links a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-family: var(--sans); font-size: .5625rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-dark-muted); text-decoration: none; transition: color .3s;
}
.signature__links a:hover { color: var(--gold-light); }
.signature__links svg { width: 13px; height: 13px; color: var(--gold-light); }
/* 4 tautan (WA, IG, TikTok, web) tidak muat satu baris di layar sempit → rapi 2 × 2 */
.signature { container-type: inline-size; }
@container (max-width: 370px) { .signature__links { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; justify-items: center; column-gap: 22px; } }


/* =========================================================================
   MUSIK & NOTIFIKASI
   ========================================================================= */
.music {
  position: fixed; z-index: 60; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--gold); border-radius: 50%; background: rgba(244, 238, 226, .9); color: var(--gold-text); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .6s, transform .6s var(--ease);
}
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music__bars i { width: 2px; height: 4px; background: currentColor; }
.music[aria-pressed="true"] .music__bars i { animation: bar 1.1s var(--ease-io) infinite alternate; }
.music[aria-pressed="true"] .music__bars i:nth-child(2) { animation-delay: -.4s; }
.music[aria-pressed="true"] .music__bars i:nth-child(3) { animation-delay: -.8s; }
.music[aria-pressed="true"] .music__bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes bar { from { height: 3px; } to { height: 16px; } }
.is-closed .music { opacity: 0; pointer-events: none; transform: translateY(12px); }
@media (min-width: 900px) { .music { right: 24px; } }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 84px; translate: -50% 20px; padding: 12px 22px; background: var(--espresso); color: var(--on-dark); font-family: var(--sans); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; opacity: 0; visibility: hidden; transition: translate .5s var(--ease), opacity .3s, visibility .5s; }
.toast.is-show { translate: -50% 0; opacity: 1; visibility: visible; }


/* =========================================================================
   GERAK DIKURANGI
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
