/* ==========================================================================
   Undangan Pernikahan — Tema Adat Jawa
   Palette: cream/ivory background, sage green, dusty rose, gold accent
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Alex+Brush&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --color-bg: #FBF6EC;
  --color-bg-alt: #F3E9D8;
  --color-sage: #6F7D58;
  --color-sage-light: #A9B48C;
  --color-rose: #D9A9A0;
  --color-gold: #C6A15B;
  --color-text: #4A3F35;
  --color-text-soft: #7A6E60;
  --color-white: #FFFDF8;

  --font-display: 'Cormorant Garamond', serif;
  --font-script: 'Alex Brush', cursive;
  --font-body: 'Jost', sans-serif;

  --section-pad: clamp(48px, 8vw, 96px);
  --radius: 18px;
  --shadow-soft: 0 12px 40px rgba(74, 63, 53, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.65;
}

body.no-scroll { overflow: hidden; height: 100vh; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 .4em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.section { position: relative; padding: var(--section-pad) 0; overflow: hidden; }
.section-alt { background: var(--color-bg-alt); }

.eyebrow {
  font-family: var(--font-body);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--color-sage);
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.divider {
  width: 150px;
  height: 80px;
  margin: 20px auto 34px;
  background: url('../images/motifs/gunungan.webp') no-repeat center / contain;
  opacity: .9;
}

/* soft colored circular backdrop behind icon illustrations */
.icon-badge {
  width: 100px; height: 100px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(111,125,88,.14), rgba(111,125,88,0) 72%);
}
.icon-badge img { width: 72%; height: 72%; object-fit: contain; }
.icon-badge.badge-rose { background: radial-gradient(circle, rgba(217,169,160,.18), rgba(217,169,160,0) 72%); }
.icon-badge.badge-gold { background: radial-gradient(circle, rgba(198,161,91,.18), rgba(198,161,91,0) 72%); }

.batik-strip {
  height: 26px;
  background: url('../images/motifs/batik-border.webp') repeat;
  background-size: 60px 60px;
  opacity: .45;
}

/* ---------------- Parallax layers ---------------- */
.parallax-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.parallax-layer {
  position: absolute;
  will-change: transform;
  opacity: .85;
}
.parallax-layer img, .parallax-layer svg { width: 100%; height: 100%; }

.section > .container { position: relative; z-index: 1; }

/* ---------------- Scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.reveal-left  { transform: translateX(-32px); }
.reveal.reveal-right { transform: translateX(32px); }
.reveal.reveal-zoom  { transform: scale(.88); }
.reveal.is-visible { opacity: 1; transform: translate(0,0) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .parallax-layer { transform: none !important; }
}

/* ==========================================================================
   COVER
   ========================================================================== */
#cover {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, var(--color-bg-alt), var(--color-bg) 70%);
  transition: transform 1s cubic-bezier(.65,0,.35,1), opacity 1s ease;
}
#cover.is-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.cover-inner {
  text-align: center;
  padding: 40px 32px;
  max-width: 440px;
}
.cover-frame {
  position: relative;
  border: 1.5px solid var(--color-gold);
  outline: 1px solid var(--color-gold);
  outline-offset: 6px;
  padding: 44px 28px;
  border-radius: var(--radius);
  background: rgba(255,253,248,.55);
  backdrop-filter: blur(2px);
}
.cover-corner { position: absolute; width: 100px; height: 100px; opacity: .85; }
.cover-corner.tl { top: -14px; left: -14px; }
.cover-corner.tr { top: -14px; right: -14px; transform: scaleX(-1); }
.cover-corner.bl { bottom: -14px; left: -14px; transform: scaleY(-1); }
.cover-corner.br { bottom: -14px; right: -14px; transform: scale(-1,-1); }
.cover-gunungan { width: 130px; margin: 0 auto 14px; opacity: .9; }
.cover-label { letter-spacing: .3em; text-transform: uppercase; font-size: .7rem; color: var(--color-sage); }
.cover-names {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  color: var(--color-text);
  margin: 10px 0;
  line-height: 1.15;
}
.cover-date { font-size: .95rem; letter-spacing: .05em; color: var(--color-text-soft); margin-bottom: 22px; }
.cover-guest { font-size: .85rem; color: var(--color-text-soft); margin-bottom: 6px; }
.cover-guest strong { color: var(--color-text); font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  border: 1px solid var(--color-sage);
  background: var(--color-sage);
  color: var(--color-white);
  font-size: .85rem;
  letter-spacing: .05em;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-outline { background: transparent; color: var(--color-sage); }
.btn-gold { background: var(--color-gold); border-color: var(--color-gold); }

/* floating orbs on cover */
.cover-petal {
  position: absolute;
  width: 48px; height: 48px;
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(12deg); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
#hero { min-height: 92vh; display: flex; align-items: center; }
.hero-illust-pair {
  display: flex; justify-content: center; align-items: flex-end; gap: 4px;
  width: min(90vw, 440px); margin: 0 auto 8px;
  filter: drop-shadow(0 12px 20px rgba(74,63,53,.18));
}
.hero-illust-pair img { width: 50%; }
.hero-names {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 11vw, 3.8rem);
  text-align: center;
  margin: 6px 0;
}
.hero-sub { text-align: center; color: var(--color-text-soft); font-size: .95rem; }
.hero-scroll {
  display: flex; justify-content: center; margin-top: 34px;
}
.hero-scroll span {
  width: 1px; height: 40px; background: var(--color-sage); position: relative; display: block;
  animation: scrolldown 2s ease-in-out infinite;
}
@keyframes scrolldown { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* ==========================================================================
   QUOTE
   ========================================================================== */
.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 3.4vw, 1.4rem);
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  color: var(--color-text);
}
.quote-from { text-align: center; margin-top: 14px; color: var(--color-sage); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }

/* ==========================================================================
   COUPLE
   ========================================================================== */
.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.couple-card { text-align: center; }
.couple-illust {
  width: 100%; max-width: 250px; margin: 0 auto 16px;
  filter: drop-shadow(0 10px 18px rgba(74,63,53,.15));
}
.couple-photo {
  width: 160px; height: 160px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--color-gold); box-shadow: var(--shadow-soft);
}
.couple-photo img { width: 100%; height: 100%; object-fit: cover; }
.couple-name { font-family: var(--font-script); font-size: 1.8rem; margin-bottom: 4px; }
.couple-fullname { font-size: .95rem; font-weight: 500; }
.couple-order { font-size: .8rem; color: var(--color-sage); margin-bottom: 6px; }
.couple-parents { font-size: .82rem; color: var(--color-text-soft); }
.couple-ig {
  display: inline-block; margin-top: 10px; font-size: .78rem; color: var(--color-gold);
  border: 1px solid var(--color-gold); padding: 5px 14px; border-radius: 999px;
}
.couple-amp {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--color-gold);
}

/* ==========================================================================
   EVENT
   ========================================================================== */
.event-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.event-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(198,161,91,.25);
}
.event-label { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 8px; }
.event-date { font-size: .95rem; font-weight: 500; }
.event-time { font-size: .85rem; color: var(--color-text-soft); margin: 2px 0 10px; }
.event-venue { font-size: .85rem; font-weight: 500; }
.event-address { font-size: .8rem; color: var(--color-text-soft); margin-bottom: 14px; }

.countdown {
  display: flex; justify-content: center; gap: 14px; margin: 34px 0 8px;
}
.countdown-item {
  background: var(--color-white);
  border: 1px solid rgba(198,161,91,.35);
  border-radius: 12px;
  padding: 14px 10px;
  min-width: 68px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.countdown-num { font-family: var(--font-display); font-size: 1.7rem; color: var(--color-sage); display: block; }
.countdown-label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-soft); }

/* ==========================================================================
   LOVE STORY
   ========================================================================== */
.timeline { position: relative; margin-top: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--color-gold) 0 6px, transparent 6px 12px);
  transform: translateX(-50%);
}
.timeline-item { position: relative; width: 50%; padding: 0 34px 46px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-icon {
  position: absolute; top: 0; width: 68px; height: 68px; border-radius: 50%;
  background: var(--color-white); border: 2px solid var(--color-gold);
  display: flex; align-items: center; justify-content: center; padding: 10px;
  box-shadow: var(--shadow-soft);
}
.timeline-item:nth-child(odd) .timeline-icon { right: -34px; }
.timeline-item:nth-child(even) .timeline-icon { left: -34px; }
.timeline-year { font-family: var(--font-display); color: var(--color-sage); font-size: 1.1rem; }
.timeline-title { font-size: 1.05rem; font-weight: 500; margin: 2px 0 6px; }
.timeline-desc { font-size: .85rem; color: var(--color-text-soft); }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-item {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(198,161,91,.3); cursor: pointer;
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-rose) 140%);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.gallery-item .gallery-fallback svg { width: 34%; opacity: .55; }

.lightbox {
  position: fixed; inset: 0; background: rgba(74,63,53,.9); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 1.8rem; background: none; border: none;
}

/* ==========================================================================
   GIFT
   ========================================================================== */
.gift-card {
  background: var(--color-white);
  border: 1px solid rgba(198,161,91,.3);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.gift-bank { font-weight: 500; font-size: .95rem; }
.gift-number { font-family: var(--font-display); font-size: 1.2rem; color: var(--color-sage); letter-spacing: .04em; }
.gift-holder { font-size: .78rem; color: var(--color-text-soft); }
.gift-copy {
  border: 1px solid var(--color-sage); background: transparent; color: var(--color-sage);
  padding: 8px 14px; border-radius: 999px; font-size: .75rem; white-space: nowrap;
}
.gift-copy.is-copied { background: var(--color-sage); color: #fff; }
.gift-address { text-align: center; font-size: .85rem; color: var(--color-text-soft); margin-top: 18px; }

/* ==========================================================================
   RSVP / COMMENTS
   ========================================================================== */
.rsvp-summary { display: flex; justify-content: center; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.rsvp-summary .stat { text-align: center; }
.rsvp-summary .stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--color-sage); }
.rsvp-summary .stat span { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-soft); }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: .78rem; margin-bottom: 6px; color: var(--color-text-soft); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(198,161,91,.4); border-radius: 10px;
  background: var(--color-white); font-family: var(--font-body); font-size: .9rem; color: var(--color-text);
}
.form-field textarea { resize: vertical; min-height: 90px; }
.attendance-options { display: flex; gap: 8px; flex-wrap: wrap; }
.attendance-options label {
  flex: 1; min-width: 90px; text-align: center; border: 1px solid rgba(198,161,91,.4); border-radius: 10px;
  padding: 10px 6px; font-size: .78rem; cursor: pointer; transition: background .2s, color .2s;
}
.attendance-options input { display: none; }
.attendance-options input:checked + span { color: var(--color-white); }
.attendance-options label:has(input:checked),
.attendance-options label.is-active { background: var(--color-sage); border-color: var(--color-sage); color: #fff; }

.comment-list { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; max-height: 480px; overflow-y: auto; padding-right: 4px; }
.comment-item {
  background: var(--color-white); border-radius: 14px; padding: 16px 18px;
  border-left: 3px solid var(--color-gold); box-shadow: var(--shadow-soft);
}
.comment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.comment-name { font-weight: 500; font-size: .92rem; }
.comment-badge { font-size: .68rem; padding: 2px 9px; border-radius: 999px; }
.comment-badge.hadir { background: rgba(111,125,88,.15); color: var(--color-sage); }
.comment-badge.tidak_hadir { background: rgba(217,169,160,.25); color: #a15a4f; }
.comment-badge.ragu_ragu { background: rgba(198,161,91,.2); color: var(--color-gold); }
.comment-msg { font-size: .85rem; color: var(--color-text-soft); margin-top: 6px; }
.comment-time { font-size: .68rem; color: var(--color-text-soft); opacity: .7; margin-top: 6px; display: block; }

.load-more { display: block; margin: 18px auto 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
#footer { text-align: center; padding-bottom: 60px; }
.footer-gunungan { width: 130px; margin: 0 auto 16px; opacity: .8; }
.motif-strip { display: block; width: min(100%, 340px); margin: 0 auto; opacity: .9; }
.motif-flank { width: 72px; opacity: .85; margin: 0 auto 18px; }
.footer-names { font-family: var(--font-script); font-size: 2.2rem; }
.footer-thanks { font-size: .9rem; color: var(--color-text-soft); max-width: 420px; margin: 10px auto 20px; }
.footer-credit { font-size: .7rem; color: var(--color-text-soft); opacity: .7; margin-top: 30px; }

/* ==========================================================================
   FLOATING UI
   ========================================================================== */
.floating-ui { position: fixed; right: 18px; bottom: 18px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 46px; height: 46px; border-radius: 50%; background: var(--color-white); border: 1px solid rgba(198,161,91,.4);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-soft); color: var(--color-sage);
  font-size: 1.1rem; transition: transform .2s ease;
}
.fab:hover { transform: translateY(-2px); }
.fab.is-spinning svg { animation: spin 3.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fab.is-hidden { display: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .event-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .couple-grid { grid-template-columns: 1fr; gap: 6px; }
  .couple-amp { transform: rotate(90deg); margin: 6px auto; }
  .timeline::before { left: 22px; }
  .timeline-item, .timeline-item:nth-child(even) { width: 100%; left: 0; text-align: left; padding-left: 84px; padding-right: 10px; }
  .timeline-item:nth-child(odd) .timeline-icon,
  .timeline-item:nth-child(even) .timeline-icon { left: 0; right: auto; }
  .countdown { gap: 8px; }
  .countdown-item { min-width: 56px; padding: 10px 6px; }
  .gift-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cover-frame { padding: 32px 18px; }
}
