/* ============================================================
   STRUKTUR & TATA LETAK
   Semua warna diambil dari variabel yang disiapkan themes.css,
   jadi file ini tidak perlu diubah saat berganti tema.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font-family: "Jost", -apple-system, "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }

img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, .serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-wrap: balance;
}
.script {
  font-family: "Parisienne", "Segoe Script", cursive;
  font-weight: 400;
  line-height: 1.15;
}

/* ---------- kolom undangan ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(60% 40% at 12% 8%,  color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(50% 40% at 92% 92%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%),
    var(--stage);
}
.sheet {
  width: 100%;
  max-width: 460px;
  background: var(--bg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
section { padding: 64px 30px; position: relative; }

/* ---------- ornamen botanis ---------- */
.sprig { color: var(--accent); opacity: .5; display: block; }
.corner { position: absolute; width: 132px; height: 132px; pointer-events: none; z-index: 1; }
.corner.tl { top: 0; left: 0; }
.corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner.br { bottom: 0; right: 0; transform: scale(-1, -1); }

.divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0 auto 26px; max-width: 220px; color: var(--gold);
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}
.divider svg { width: 26px; height: 26px; flex: none; opacity: .9; }

.eyebrow {
  font-size: 10.5px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); font-weight: 400; text-align: center; margin: 0 0 10px;
}
h2.title {
  font-size: 34px; margin: 0 0 4px; text-align: center;
  color: var(--heading); font-weight: 500; letter-spacing: .01em;
}
.lead {
  text-align: center; color: var(--muted);
  max-width: 34ch; margin: 10px auto 0; font-size: 14px;
}

/* ---------- halaman sampul ---------- */
#cover {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 50% at 50% 0%, var(--tint-soft), transparent 70%),
    var(--bg);
  transition: transform .95s cubic-bezier(.7, 0, .2, 1), opacity .7s ease .25s;
}
#cover.open { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.cover-inner {
  width: 100%; max-width: 460px; height: 100%;
  padding: 56px 34px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: var(--bg); box-shadow: var(--shadow);
}
.cover-frame {
  position: absolute; inset: 20px;
  border: 1px solid var(--line);
  border-radius: 200px 200px 6px 6px;
  pointer-events: none;
}
.cover-inner > * { position: relative; z-index: 2; }
.cover-kicker {
  font-size: 10.5px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--gold); margin: 0;
}
.cover-names { font-size: clamp(52px, 17vw, 74px); color: var(--heading); margin: 14px 0 6px; }
.cover-date {
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}
.cover-to { margin-top: auto; padding-top: 34px; }
.cover-to p {
  margin: 0; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.cover-guest {
  font-family: "Cormorant Garamond", serif; font-size: 26px;
  color: var(--heading); margin: 6px 0 2px; font-weight: 500;
  text-transform: none; letter-spacing: 0;
}
.cover-note { font-size: 11.5px; color: var(--muted); margin: 0 0 22px; text-transform: none; letter-spacing: 0; }

/* ---------- tombol ---------- */
.btn {
  font-family: "Jost", sans-serif; font-size: 11.5px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  padding: 14px 30px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent); color: var(--paper);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.btn:hover {
  background: var(--accent-deep); border-color: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px var(--accent);
}
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: var(--tint-soft); color: var(--accent-deep); box-shadow: none; }
.btn svg { width: 15px; height: 15px; flex: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- pembuka ---------- */
#pembuka {
  background: var(--tint-soft); text-align: center;
  padding-top: 78px; padding-bottom: 78px;
}
.quote {
  font-size: 19px; font-style: italic; color: var(--heading);
  max-width: 30ch; margin: 0 auto; line-height: 1.72;
}
.quote-src {
  font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin-top: 20px;
}

/* ---------- mempelai ---------- */
.pair { display: flex; flex-direction: column; gap: 34px; margin-top: 36px; }
.person { text-align: center; }
.portrait {
  width: 158px; height: 158px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(150deg, var(--tint), var(--tint-soft));
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.portrait::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  border: 1px dashed var(--gold-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.portrait .mono {
  font-family: "Parisienne", cursive; font-size: 46px;
  color: var(--accent); line-height: 1;
}
.person-name { font-size: 29px; color: var(--heading); margin: 0 0 2px; font-weight: 500; }
.person-role {
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 10px;
}
.person-parents {
  font-size: 13.5px; color: var(--muted); margin: 0 auto;
  max-width: 30ch;
}
.ig {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 11.5px; letter-spacing: .12em; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.ig:hover { border-bottom-color: var(--accent); }
.ig svg { width: 14px; height: 14px; }

.amp {
  font-family: "Parisienne", cursive; font-size: 56px; color: var(--gold);
  text-align: center; line-height: .7; margin: 0;
}

/* ---------- acara & hitung mundur ---------- */
#acara { background: var(--tint-soft); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 30px 0 8px; }
.cd-cell {
  background: var(--paper); border: 1px solid var(--line);
  padding: 14px 4px 11px; text-align: center;
}
.cd-num {
  font-family: "Cormorant Garamond", serif; font-size: 31px; font-weight: 500;
  color: var(--heading); line-height: 1;
  font-variant-numeric: tabular-nums; display: block;
}
.cd-lab {
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px; display: block;
}
.cd-done {
  text-align: center; font-style: italic; color: var(--accent);
  font-family: "Cormorant Garamond", serif; font-size: 21px; margin: 30px 0 8px;
}

.events { display: flex; flex-direction: column; gap: 20px; margin-top: 34px; }
.event {
  background: var(--paper); border: 1px solid var(--line);
  padding: 30px 26px; text-align: center;
}
.event h3 { font-size: 25px; color: var(--heading); margin: 0 0 3px; font-weight: 500; }
.event .when {
  font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.event dl { margin: 0; display: grid; gap: 11px; }
.event dt {
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.event dd { margin: 3px 0 0; font-size: 14.5px; color: var(--ink); }
.event dd.small { font-size: 13px; color: var(--muted); line-height: 1.6; }
.event .btn { margin-top: 22px; }
.calendar-row { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- love story ---------- */
.timeline { margin: 38px 0 0; padding: 0 0 0 30px; list-style: none; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 12%, var(--gold-soft) 88%, transparent);
}
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--gold);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-year {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); display: block;
}
.tl-head {
  font-family: "Cormorant Garamond", serif; font-size: 22px;
  color: var(--heading); margin: 2px 0 5px; font-weight: 500;
}
.tl-body { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- galeri ---------- */
#galeri { background: var(--tint-soft); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 32px; }
.gallery figure {
  margin: 0; position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: linear-gradient(160deg, var(--tint), var(--paper));
  border: 1px solid var(--line);
}
.gallery figure.wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--accent);
}
.ph svg { width: 34px; height: 34px; opacity: .55; }
.ph span {
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}

/* ---------- rsvp ---------- */
.form { display: grid; gap: 15px; margin-top: 32px; }
label {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  font-family: "Jost", sans-serif; font-size: 14.5px; font-weight: 300;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 98px; resize: vertical; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.form .btn { justify-self: center; margin-top: 6px; }
.form-note { font-size: 11.5px; color: var(--muted); text-align: center; margin: 0; min-height: 18px; }
.form-note.err { color: var(--accent-deep); }

/* perangkap bot — tersembunyi dari manusia, tetap terbaca mesin */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tally { display: flex; justify-content: center; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.tally div { text-align: center; }
.tally b {
  display: block; font-family: "Cormorant Garamond", serif;
  font-size: 27px; font-weight: 500; color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.tally span {
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

.wishes {
  margin-top: 26px; display: flex; flex-direction: column; gap: 12px;
  max-height: 400px; overflow-y: auto; padding-right: 5px;
}
.wish { background: var(--paper); border: 1px solid var(--line); padding: 15px 17px; }
.wish-top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.wish-name {
  font-family: "Cormorant Garamond", serif; font-size: 18px;
  color: var(--heading); font-weight: 500;
}
.pill {
  font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.pill.yes { color: var(--accent); border-color: var(--accent); }
.wish-text {
  margin: 7px 0 0; font-size: 14px; color: var(--ink);
  line-height: 1.65; overflow-wrap: anywhere;
}
.wish-time { font-size: 10px; letter-spacing: .1em; color: var(--muted); margin: 8px 0 0; }
.empty {
  text-align: center; color: var(--muted); font-style: italic;
  font-family: "Cormorant Garamond", serif; font-size: 17px; padding: 18px 0; margin: 0;
}

/* ---------- amplop digital ---------- */
#hadiah { background: var(--tint-soft); }
.gifts { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.gift { background: var(--paper); border: 1px solid var(--line); padding: 22px 22px 20px; }
.gift-bank {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}
.gift-num {
  font-family: "Cormorant Garamond", serif; font-size: 25px; letter-spacing: .05em;
  color: var(--heading); margin: 0; font-variant-numeric: tabular-nums; font-weight: 500;
}
.gift-owner { font-size: 12.5px; color: var(--muted); margin: 3px 0 16px; }
.gift.addr .gift-num {
  font-family: "Jost", sans-serif; font-size: 16px; line-height: 1.6;
  letter-spacing: 0; font-weight: 300; color: var(--ink); margin-bottom: 16px;
}
.copy {
  font-family: "Jost", sans-serif; font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); color: var(--accent);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, border-color .2s, color .2s;
}
.copy:hover { background: var(--tint-soft); border-color: var(--accent); }
.copy.done { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.copy svg { width: 13px; height: 13px; }

/* ---------- penutup ---------- */
#penutup {
  text-align: center; padding-top: 76px; padding-bottom: 110px; background: var(--bg);
}
.thanks { font-size: 15px; color: var(--muted); max-width: 32ch; margin: 0 auto 30px; }
.sign {
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}
.sign-names { font-size: 46px; color: var(--heading); margin: 0; }

footer { padding: 26px 30px 34px; text-align: center; background: var(--stage); }
footer p {
  margin: 0; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- navigasi melayang ---------- */
#nav {
  position: fixed; bottom: 14px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  z-index: 50; display: flex; gap: 2px; padding: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .55);
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}
#nav.show { transform: translateX(-50%) translateY(0); }
#nav a {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
  transition: background .2s, color .2s;
}
#nav a:hover, #nav a.active { background: var(--tint-soft); color: var(--accent); }
#nav svg { width: 18px; height: 18px; }

/* ---------- animasi masuk ---------- */
.js-anim .reveal { opacity: 0; transform: translateY(16px); }
.js-anim .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .reveal { opacity: 1; transform: none; }
  .js-anim .reveal.in { transition: none; }
  #cover, #nav, .btn, .copy { transition: none; }
}

@media (min-width: 520px) {
  section { padding-left: 44px; padding-right: 44px; }
  .cover-inner { padding-left: 48px; padding-right: 48px; }
}
