/* ===== Wedding Invitation — Elegant Floral Theme ===== */

:root {
  --gold:        #c9a96e;
  --gold-deep:   #a98a4b;
  --gold-soft:   #e7d5b3;
  --cream:       #f6efe3;
  --cream-2:     #fbf6ec;
  --ink:         #3d2f24;
  --ink-soft:    #6b5a4a;
  --rose:        #c98a8a;
  --white:       #ffffff;
  --shadow:      0 12px 40px rgba(60, 40, 20, 0.12);
  --shadow-lg:   0 24px 60px rgba(60, 40, 20, 0.18);
  --radius:      16px;
  --serif:       'Cormorant Garamond', 'Georgia', serif;
  --script:      'Great Vibes', 'Brush Script MT', cursive;
  --sans:        'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream-2);
  line-height: 1.6;
  overflow-x: hidden;
}

body.locked { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ============ Typography ============ */
.couple-script {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 6rem);
  color: var(--white);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.couple-script.big { font-size: clamp(3.8rem, 10vw, 7rem); }
.couple-script span { color: var(--gold); margin: 0 .25em; font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-deep);
}
.eyebrow.gold   { color: var(--gold-soft); }
.eyebrow.center { text-align: center; display: block; }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  color: var(--ink);
  margin: 8px 0 24px;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 12px auto 0;
}

.section-sub {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.15rem;
}

/* ============ Layout ============ */
.section {
  padding: 90px 20px;
  background: var(--cream-2);
}
.container { max-width: 1140px; margin: 0 auto; }
.container.narrow { max-width: 820px; }

/* ============ Parallax ============ */
.parallax {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.parallax-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  bottom: -20%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

/* ============ Particles ============ */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: screen;
  opacity: 0.95;
}
/* Dim the particles slightly on bright/cream sections via a softer blend */
@media (prefers-reduced-motion: reduce) {
  #particles-canvas { display: none; }
}

.overlay-soft   { position: absolute; inset: 0; background: rgba(20, 14, 8, 0.35); }
.overlay-darker { position: absolute; inset: 0; background: rgba(20, 14, 8, 0.55); }

/* ============ Cover (Pintu Pembuka) ============ */
.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  transition: opacity .8s ease, transform .8s ease;
}
.cover.is-open { opacity: 0; transform: scale(1.05); pointer-events: none; }
.cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,14,8,.55), rgba(20,14,8,.7));
}
.cover-inner {
  position: relative;
  text-align: center;
  color: var(--white);
  z-index: 2;
  max-width: 560px;
}
.cover .eyebrow { color: var(--gold-soft); margin-bottom: 18px; }
.cover-date {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  margin: 16px 0 32px;
  color: var(--gold-soft);
}
.invited-to {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(231,213,179,0.4);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 auto 32px;
  backdrop-filter: blur(4px);
}
.invited-label { font-size: .82rem; opacity: .85; }
.invited-name  { font-family: var(--serif); font-size: 1.5rem; color: var(--gold-soft); font-weight: 500; margin-top: 6px; }

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(201,169,110,.5);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-open:hover { transform: translateY(-2px); background: var(--gold-deep); }

/* Floral decorations */
.floral { position: absolute; width: 220px; height: 220px; z-index: 1; opacity: .55; pointer-events: none; }
.floral-tl { top: 0; left: 0;
  background: radial-gradient(circle at 30% 30%, rgba(231,213,179,.6), transparent 60%);
}
.floral-br { bottom: 0; right: 0;
  background: radial-gradient(circle at 70% 70%, rgba(231,213,179,.5), transparent 60%);
}

/* ============ Floating Nav ============ */
.invitation-main { transition: opacity .6s ease; opacity: 0; }
.invitation-main.is-open { opacity: 1; }

.floating-nav {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(201,169,110,.3);
  border-radius: 50px;
  padding: 8px 12px;
  z-index: 90;
  box-shadow: 0 12px 30px rgba(60,40,20,.18);
  backdrop-filter: blur(8px);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.floating-nav::-webkit-scrollbar { display: none; }
.floating-nav a, .floating-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  flex-shrink: 0;
  transition: background .2s, color .2s, transform .2s;
}
.floating-nav a:hover, .floating-nav button:hover { background: var(--gold); color: #fff; transform: translateY(-2px); }
.music-toggle.playing { background: var(--gold); color: #fff; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.hero-inner { position: relative; z-index: 2; color: #fff; max-width: 760px; }
.hero-date {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 12px 0 36px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.countdown > div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(231,213,179,.35);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 14px 6px;
  text-align: center;
}
.countdown span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 600;
  color: #fff;
  line-height: 1;
}
.countdown small {
  display: block;
  font-size: .65rem;
  letter-spacing: .2em;
  margin-top: 6px;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.btn-scroll {
  display: inline-flex;
  margin-top: 48px;
  width: 44px; height: 44px;
  border: 1px solid rgba(231,213,179,.5);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============ Quote ============ */
.quote-section {
  background: var(--cream);
  padding: 80px 20px;
  text-align: center;
}
.quote-mark { font-size: 2rem; color: var(--gold); margin-bottom: 18px; }
.quote-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink);
  line-height: 1.8;
}
.quote-source {
  margin-top: 18px;
  letter-spacing: .25em;
  font-size: .8rem;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ============ Couple ============ */
.section-couple { background: var(--cream-2); }
.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: stretch;
  margin-top: 40px;
}
.couple-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,.18);
  position: relative;
}
.couple-photo {
  width: 180px; height: 180px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background-size: cover;
  background-position: center;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(60,40,20,.18), 0 0 0 2px var(--gold);
}
.couple-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
}
.couple-role {
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--gold-deep);
  margin: 6px 0 16px;
}
.couple-parents { color: var(--ink-soft); font-family: var(--serif); font-size: 1.05rem; }
.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--gold-deep);
  font-size: .9rem;
}
.ig-link:hover { color: var(--gold); }
.couple-amp {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--script); font-size: 5rem; color: var(--gold);
}

/* ============ Parallax break ============ */
.parallax-break {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.break-text { position: relative; z-index: 2; color: #fff; }
.break-text .couple-script { font-size: clamp(2.5rem, 7vw, 4.5rem); }

/* ============ Event ============ */
.section-event { background: var(--cream); }
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.event-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,.2);
  position: relative;
}
.event-card::before {
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid rgba(201,169,110,.25);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
.event-icon {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(201,169,110,.4);
}
.event-card h4 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--ink);
}
.event-date {
  margin-top: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--gold-deep);
}
.event-time {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 8px 0 16px;
  color: var(--ink);
}
.event-place { color: var(--ink-soft); font-family: var(--serif); font-size: 1.05rem; }

.maps-wrap {
  margin-top: 40px;
  text-align: center;
}
.maps-wrap iframe {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, background .2s, box-shadow .2s;
  border: none;
  font-family: inherit;
  font-size: .92rem;
}
.btn.full { width: 100%; justify-content: center; }
.btn-gold {
  background: var(--gold);
  color: #fff;
  margin-top: 20px;
  box-shadow: 0 8px 22px rgba(201,169,110,.4);
}
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-2px); }

/* ============ Story Timeline ============ */
.section-story { background: var(--cream-2); }
.timeline { position: relative; margin-top: 50px; padding: 20px 0; }
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 30px;
}
.timeline-item.left  { margin-right: 50%; padding-right: 50px; text-align: right; }
.timeline-item.right { margin-left: 50%; padding-left: 50px; text-align: left; }
.timeline-dot {
  position: absolute;
  top: 32px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--cream-2);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item.left  .timeline-dot { right: -9px; }
.timeline-item.right .timeline-dot { left: -9px; }
.timeline-card {
  background: #fff;
  padding: 22px 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,.18);
  display: inline-block;
}
.timeline-year {
  font-family: var(--script);
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
}
.timeline-card h4 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 6px 0 8px;
  color: var(--ink);
}
.timeline-card p { color: var(--ink-soft); font-family: var(--serif); font-size: 1.02rem; }

/* ============ Gallery ============ */
.section-gallery { background: var(--cream); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ============ Gift ============ */
.section-gift { background: var(--cream-2); }
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.gift-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,.2);
}
.gift-bank {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
  padding: 8px 22px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: .12em;
  font-size: .85rem;
}
.gift-name { margin: 14px 0 6px; color: var(--ink-soft); font-family: var(--serif); }
.gift-number {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
  margin-bottom: 14px;
}
.btn-copy {
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  color: var(--gold-deep);
  padding: 10px 20px;
  border-radius: 50px;
  font-family: inherit;
  cursor: pointer;
  font-size: .85rem;
  transition: background .2s, color .2s;
}
.btn-copy:hover { background: var(--gold); color: #fff; }

/* ============ RSVP ============ */
.section-rsvp { background: var(--cream); }
.rsvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.rsvp-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,169,110,.2);
}
.rsvp-card h4 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-bottom: 18px;
  color: var(--ink);
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.rsvp-card h4 i { color: var(--gold); }

.form { display: grid; gap: 14px; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form input,
.form select,
.form textarea {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid rgba(201,169,110,.35);
  border-radius: 10px;
  background: var(--cream-2);
  transition: border .2s, background .2s;
  outline: none;
  width: 100%;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--gold);
  background: #fff;
}
.form textarea { resize: vertical; min-height: 90px; }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: .92rem;
}
.alert-success { background: #e9f7ed; color: #2d6a3e; border: 1px solid #b9dfc4; }
.alert-error   { background: #fcebea; color: #9b3a36; border: 1px solid #f0c4c2; }

.messages { margin-top: 26px; max-height: 320px; overflow-y: auto; padding-right: 6px; }
.messages-empty { color: var(--ink-soft); font-style: italic; font-family: var(--serif); }
.message {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(201,169,110,.25);
}
.message:last-child { border-bottom: none; }
.message-avatar {
  flex: 0 0 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.message-name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.message-name small { color: var(--ink-soft); font-weight: 400; margin-left: 4px; }
.message-text { color: var(--ink-soft); font-family: var(--serif); font-size: 1.02rem; margin-top: 2px; }

/* ============ Closing ============ */
.closing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 0;
}
.closing-inner { position: relative; z-index: 2; color: #fff; max-width: 720px; }
.closing-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 20px auto 16px;
  color: var(--gold-soft);
  max-width: 560px;
}
.closing-sign {
  font-family: var(--script);
  font-size: 2rem;
  color: #fff;
  margin-top: 20px;
}
.footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 30px 0;
  width: 100%;
  text-align: center;
  font-size: .82rem;
  color: var(--gold-soft);
  letter-spacing: .1em;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 10, 5, .92);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 95%; max-height: 92vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ============ Reveal Animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s ease, transform .9s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* parallax-driven cards skip the transform transition (JS owns transform) */
.reveal[data-parallax-speed] {
  transform: none;
  transition: opacity 1s ease;
}
.reveal[data-parallax-speed].is-visible {
  transform: none;
}

/* ============ Responsive ============ */
@media (max-width: 820px) {
  .section { padding: 70px 18px; }
  .quote-section { padding: 60px 18px; }
  .couple-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .couple-amp { font-size: 4rem; }
  .timeline::before { left: 18px; }
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    margin: 0;
    padding-left: 50px;
    padding-right: 0;
    text-align: left;
  }
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot { left: 10px; right: auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .maps-wrap iframe { height: 280px; }
  .floating-nav { padding: 6px 8px; gap: 4px; }
  .floating-nav a, .floating-nav button { width: 34px; height: 34px; font-size: .85rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .countdown { gap: 6px; }
  .countdown > div { padding: 10px 4px; }
  .countdown small { font-size: .55rem; letter-spacing: .12em; }
  .invited-name { font-size: 1.25rem; }
  .couple-photo { width: 150px; height: 150px; }
  .closing-sign { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .parallax { background-attachment: scroll; }
}
