/* ========= RESET & BASE ========= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --paper: #efeee9;
  --paper-alt: #e6e4de;
  --line: #1a1a1a;

  /* Font substitutions (see note): Citadel Script & Buffalo & Atteron are paid/
     Canva-exclusive fonts and can't be loaded here, so free look-alikes are used. */
  --font-hero-script: 'Beau Rivage', cursive;      /* was Citadel Script */
  --font-name-script: 'Mrs Saint Delafield', cursive; /* was Buffalo */
  --font-invite: 'Cinzel', serif;                   /* was Atteron */
  --font-verse: 'Roboto Mono', monospace;
  --font-serif: 'EB Garamond', serif;
  --font-caps: 'Cormorant Garamond', serif;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.7;
  overflow-x: hidden;
}

.section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.section .content { position: relative; z-index: 2; width: 100%; padding: 90px 24px; text-align: center; }

/* Generic layered background system: ::before = photo/illustration, ::after = texture overlay */
.section::before,
.section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.script-title {
  font-family: var(--font-hero-script);
  font-size: 56px;
  font-weight: 400;
  margin-bottom: 32px;
}
.script-title.small { font-size: 44px; margin-bottom: 0; }

.divider { border: none; border-top: 1px solid var(--line); width: 140px; margin: 20px auto; }

.divider-deco { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px auto; width: 260px; }
.divider-deco span:not(.dot) { flex: 1; height: 1px; background: var(--line); }
.divider-deco .dot { font-size: 12px; }

/* ========= SCROLL REVEAL ANIMATION ========= */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Directional variants for the Bride/Groom rows & Story section */
.anim-left, .anim-right, .anim-up-delay, .anim-down {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.anim-left  { transform: translateX(-30px); }
.anim-right { transform: translateX(30px); transition-delay: 0.15s; }
.anim-up-delay { transform: translateY(20px); transition-delay: 0.2s; }
.anim-down  { transform: translateY(-20px); }

.anim-left.in-view, .anim-right.in-view, .anim-up-delay.in-view, .anim-down.in-view {
  opacity: 1;
  transform: none;
}

/* Fail-safe: Ensure photos & content are visible if JavaScript is slow */
img {
  max-width: 100%;
  height: auto;
}

/* ========= MUSIC TOGGLE ========= */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 6s linear infinite;
  animation-play-state: paused;
}
.music-toggle.playing { animation-play-state: running; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========= NAVBAR ========= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(160,158,152,0.92);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#navbar.nav-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-inner {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 18px 12px;
  flex-wrap: wrap;
}
.nav-link {
  font-family: var(--font-caps);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
}

/* ========= COVER (page 1) ========= */
.cover { min-height: 100vh; }
.cover::before { background-image: url('img/cover-bg.jpg'); }
.cover::after  { background-image: url('img/texture-overlay.png'); opacity: 0.11; }

.cover .content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 64px 24px 56px;
  color: #fff;
}
.verse-block { margin-top: 0; }
.verse {
  font-family: var(--font-verse);
  font-size: 13px;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 12px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.verse-ref {
  font-family: var(--font-verse);
  font-size: 11px;
  letter-spacing: 3px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
/* Guest Name Block on Cover */
.guest-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 24px;
}
.guest-label {
  font-family: var(--font-caps);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.guest-name {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 1px;
  padding: 6px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

.names-block { display: flex; flex-direction: column; align-items: center; }
.invite-line {
  font-family: var(--font-invite);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.couple-names { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.script-name {
  font-family: var(--font-hero-script);
  font-size: 106px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.amp { font-family: var(--font-hero-script); font-size: 44px; margin: 4px 0; }
.scroll-indicator {
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  animation: bounce-down 1.8s ease-in-out infinite;
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ========= STORY (page 2 part A) ========= */
.story::after { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.story-text {
  max-width: 520px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-style: italic;
}

/* ========= INFO: BRIDE & GROOM ========= */
.info::after { background-image: url('img/texture-overlay.png'); opacity: 0.22; }
.info .content { padding: 80px 24px; }
.couple-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: left;
}
.couple-photo {
  flex: 0 0 200px;
  height: 280px;
  border-radius: 100px 100px 8px 8px;
  overflow: hidden;
}
.couple-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.couple-text {
  flex: 1;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* bio-block menempel ke sisi foto Bride (kiri) */
}

/* Baris kedua (Groom): foto di kanan, jadi teksnya digeser biar nempel ke foto, bukan melar ke kiri */
.couple-row + .couple-row { justify-content: flex-end; }
.couple-row + .couple-row .couple-text { flex: 1; align-items: flex-end; } /* bio-block menempel ke sisi foto Groom (kanan) */
.couple-row + .couple-row .parent-names { align-items: center; }
.title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 0; width: 100%; } /* width:100% wajib biar garis tetap panjang */
.title-line { flex: 1; height: 1px; background: var(--line); }


.bio-block { text-align: center; margin-top: -10px; } /* teks rata tengah di dalam bloknya */
.couple-name { font-family: var(--font-caps); font-size: 22px; margin-bottom: 8px; }
.couple-label { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.parent-names {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-caps);
  font-size: 22px;
  line-height: 1.5;
  gap: 2px;
}
.parent-names .amp-center { align-self: center; }

/* ========= DETAILS (page 3) ========= */
.details::before { background-image: url('img/flower-details.jpg'); opacity: 0.30; }
.details::after  { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.details { background: var(--paper-alt); }
.details-block { max-width: 420px; margin: 0 auto; }
.details-heading { font-family: var(--font-caps); font-size: 18px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.details-text { font-style: italic; font-size: 18px; }
.maps-btn {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-caps);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 10px 28px;
  color: var(--ink);
  text-decoration: none;
}
.maps-btn:hover { background: var(--ink); color: var(--paper); }

/* ========= GALLERY (page 4) ========= */
.gallery::before { background-image: url('img/bg-gallery.jpg'); opacity: 0.30; }
.gallery::after { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.gallery-item {
  aspect-ratio: 1;
  background: linear-gradient(150deg, #8a8886, #cbc9c3);
  position: relative;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-video {
  max-width: 640px;
  margin: 32px auto 0;
}
.gallery-video video {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(150deg, #8a8886, #cbc9c3);
  display: block;
}
.video-label { font-family: var(--font-caps); font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ========= RSVP (page 5, terpisah dari gallery) ========= */
.rsvp::before { background-image: url('img/flower-rsvp.jpg'); opacity: 0.17; }
.rsvp::after  { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.rsvp-title { font-family: var(--font-caps); font-size: 44px; letter-spacing: 4px; margin-bottom: 8px; }
.rsvp-sub { font-family: var(--font-caps); font-size: 16px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 32px; }

.countdown { display: flex; justify-content: center; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.cd-item { display: flex; flex-direction: column; align-items: center; }
.cd-item span { font-family: var(--font-caps); font-size: 32px; }
.cd-item small { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

.save-date-btn {
  font-family: var(--font-caps);
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 14px 36px;
  cursor: pointer;
  color: var(--ink);
  margin-bottom: 48px;
}
.save-date-btn:hover { background: var(--ink); color: var(--paper); }

.rsvp-note { font-family: var(--font-caps); font-size: 16px; margin-bottom: 32px; text-transform: capitalize; }

.qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 12px auto 0;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-caps);
  font-size: 12px;
  padding: 12px;
  text-align: center;
}

/* ========= AMPLOP DIGITAL ========= */
.amplop::after { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.amplop { background: var(--paper-alt); }
.amplop-sub {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 40px;
  line-height: 1.8;
}
.amplop-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
}
.bank-card {
  background: var(--paper);
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 12px;
  padding: 28px 24px;
  min-width: 200px;
  flex: 1;
  max-width: 220px;
  text-align: center;
  transition: box-shadow 0.3s ease;
}
.bank-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.bank-logo-name {
  font-family: var(--font-caps);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.bank-label {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.bank-holder {
  font-family: var(--font-caps);
  font-size: 16px;
  margin-bottom: 16px;
}
.bank-number-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bank-number {
  font-family: var(--font-verse);
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 500;
}
.copy-btn {
  font-family: var(--font-caps);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s ease;
}
.copy-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.copy-btn.copied { background: #4caf50; color: #fff; border-color: #4caf50; }
.qris-card .qr-placeholder { width: 140px; height: 140px; font-size: 11px; }

/* ========= BUKU TAMU ========= */
.buku-tamu::after { background-image: url('img/texture-overlay.png'); opacity: 0.11; }
.guest-form-wrap {
  max-width: 480px;
  margin: 0 auto 48px;
}
.guest-form { text-align: left; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-caps);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(26,26,26,0.2);
  border-radius: 6px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-input:focus, .form-textarea:focus { border-color: var(--ink); }
.attendance-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.attend-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 15px;
}
.attend-opt input[type="radio"] { accent-color: var(--ink); width: 16px; height: 16px; }
.guest-submit-btn {
  width: 100%;
  font-family: var(--font-caps);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 40px;
  padding: 14px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.25s ease;
}
.guest-submit-btn:hover { background: transparent; color: var(--ink); }
.form-note {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 12px;
  font-style: italic;
}
.form-success { text-align: center; padding: 40px 24px; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-msg {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Wishes list */
.wishes-list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wish-card {
  background: var(--paper);
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 10px;
  padding: 20px 24px;
  text-align: left;
  animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wish-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wish-name {
  font-family: var(--font-caps);
  font-size: 16px;
  font-weight: 600;
}
.wish-attend {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
}
.wish-msg {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ========= FOOTER ========= */
.footer { padding: 60px 24px 80px; text-align: center; }
.monogram-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.monogram { font-family: var(--font-hero-script); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }
.monogram-bar { font-family: var(--font-serif); font-weight: 300; margin: 0 4px; }
.footer-text { font-family: var(--font-caps); font-size: 14px; letter-spacing: 1px; color: var(--ink-soft); }

/* ========= RESPONSIVE ========= */
@media (max-width: 640px) {
  .script-name { font-size: 64px; }
  .script-title { font-size: 42px; }
  .script-title.small { font-size: 34px; }
  .couple-row { flex-direction: column; text-align: center; justify-content: center; }
  .couple-row + .couple-row { justify-content: center; } /* override flex-end */
  .couple-text,
  .couple-row + .couple-row .couple-text {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .bio-block { text-align: center; margin: 0 auto; }
  .couple-row + .couple-row .couple-photo { align-self: flex-end; } /* foto Groom ke kanan di mobile */
  .title-row { justify-content: center; }
  .nav-inner {
    gap: 8px;
    padding: 10px 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: space-around;
  }
  .nav-link {
    font-size: 11px;
    letter-spacing: 0.5px;
  }
  .parent-name { font-size: 20px; }
  .verse { font-size: 12px; max-width: 90%; }
  .invite-line { font-size: 14px; }
}

@media (max-width: 400px) {
  .nav-inner {
    gap: 4px;
    padding: 8px 2px;
  }
  .nav-link {
    font-size: 10px;
    letter-spacing: 0.2px;
  }
}
