:root {
  --gold: #b8912f;
  --gold-light: #d4b968;
  --cream: #faf6ee;
  --ink: #3a3428;
  --ink-soft: #6d6455;
  --white: #fffdf8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

.hidden { display: none !important; }

h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* --- Tombol --- */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #fff; }

/* --- Cover --- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(184, 145, 47, 0.15), transparent 60%),
    var(--cream);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.cover.opened { opacity: 0; visibility: hidden; }
.cover-inner { padding: 2rem; max-width: 480px; }
.cover-label {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}
.cover-names {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  font-weight: 400;
  color: var(--ink);
  margin: 1rem 0 1.5rem;
}
.cover-to { color: var(--ink-soft); font-size: 0.95rem; }
.cover-guest { font-weight: 600; font-size: 1.2rem; margin: 0.3rem 0 1.5rem; }
.cover .btn { font-size: 0.95rem; }

/* --- Tombol musik --- */
.music-btn {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--white);
  color: var(--gold);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.music-btn.playing { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Hero --- */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background:
    radial-gradient(ellipse at bottom, rgba(184, 145, 47, 0.12), transparent 65%),
    var(--cream);
}
.hero-label {
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
}
.hero-names {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin: 1.2rem 0;
  color: var(--ink);
}
.hero-names .amp { color: var(--gold); }
.hero-date { font-size: 1.25rem; color: var(--ink-soft); letter-spacing: 0.1em; }

/* --- Section umum --- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}
.section.alt {
  background:
    radial-gradient(ellipse at top left, rgba(184, 145, 47, 0.08), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(184, 145, 47, 0.08), transparent 55%),
    rgba(255, 253, 248, 0.6);
  border: 1px solid rgba(184, 145, 47, 0.18);
  border-radius: 20px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.floral-frame.soft .ornament {
  width: 140px;
  height: 140px;
  opacity: 0.45;
}
@media (max-width: 600px) {
  .floral-frame.soft .ornament { width: 85px; height: 85px; }
}
.section-title {
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 200px;
  height: 16px;
  margin: 0.6rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cline x1='0' y1='10' x2='74' y2='10' stroke='%23b8912f' stroke-width='1'/%3E%3Cline x1='126' y1='10' x2='200' y2='10' stroke='%23b8912f' stroke-width='1'/%3E%3Cellipse cx='84' cy='10' rx='8' ry='2.8' fill='%23b8912f' opacity='.7'/%3E%3Cellipse cx='116' cy='10' rx='8' ry='2.8' fill='%23b8912f' opacity='.7'/%3E%3Cpath d='M100 2 L107 10 L100 18 L93 10 Z' fill='%23b8912f'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* --- Kutipan --- */
.quote {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}

/* --- Mempelai --- */
.couple-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.couple-card {
  flex: 1 1 260px;
  max-width: 340px;
  background: var(--white);
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}
.couple-name { font-size: 1.5rem; color: var(--gold); margin-bottom: 0.5rem; }
.couple-parents { color: var(--ink-soft); }
.couple-amp {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  color: var(--gold);
}

/* --- Hitung mundur --- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cd-box {
  background: var(--white);
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 12px;
  min-width: 90px;
  padding: 1.2rem 0.8rem;
}
.cd-box span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--gold);
}
.cd-box label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* --- Acara --- */
.event-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.event-card {
  flex: 1 1 300px;
  max-width: 400px;
  background: var(--white);
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}
.event-card h3 { color: var(--gold); font-size: 1.4rem; margin-bottom: 0.8rem; }
.event-date { font-weight: 600; font-size: 1.15rem; }
.event-time { color: var(--ink-soft); }
.event-venue { margin-top: 0.8rem; font-weight: 600; }
.event-address { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.2rem; }

/* --- Galeri --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
}
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(184, 145, 47, 0.3);
}

/* --- Amplop --- */
.gifts-note { color: var(--ink-soft); max-width: 560px; margin: 0 auto 2rem; }
.gift-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.gift-card {
  flex: 1 1 280px;
  max-width: 360px;
  background: var(--white);
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
}
.gift-card h3 { color: var(--gold); margin-bottom: 0.4rem; }
.gift-number { font-family: 'Playfair Display', serif; font-size: 1.3rem; letter-spacing: 0.05em; }
.gift-holder { color: var(--ink-soft); margin-bottom: 1rem; }

/* --- RSVP --- */
.rsvp-form {
  max-width: 480px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(184, 145, 47, 0.4);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: 2px solid var(--gold-light);
}
.rsvp-status { font-size: 0.95rem; min-height: 1.4em; }
.rsvp-status.ok { color: #2e7d32; }
.rsvp-status.err { color: #b23b3b; }

.wishes {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
}
.wish {
  background: var(--white);
  border: 1px solid rgba(184, 145, 47, 0.25);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}
.wish-name { font-weight: 600; color: var(--gold); }
.wish-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-left: 0.5rem;
}
.wish-msg { color: var(--ink-soft); margin-top: 0.2rem; }

/* --- Ornamen bunga sudut --- */
.floral-frame { position: relative; overflow: hidden; }
.ornament {
  position: absolute;
  width: 190px;
  height: 190px;
  pointer-events: none;
  opacity: 0.75;
  z-index: 1;
}
.ornament img { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) {
  .ornament { width: 110px; height: 110px; }
}
.ornament.tl { top: 0; left: 0; }
.ornament.tr { top: 0; right: 0; transform: rotate(90deg); }
.ornament.br { bottom: 0; right: 0; transform: rotate(180deg); }
.ornament.bl { bottom: 0; left: 0; transform: rotate(270deg); }
.cover-inner, .hero > *:not(.ornament) { position: relative; z-index: 2; }

/* --- Animasi --- */
.ornament img { animation: sway 7s ease-in-out infinite alternate; transform-origin: top left; }
.ornament.br img { transform-origin: bottom right; }
@keyframes sway {
  from { transform: rotate(-1.6deg); }
  to   { transform: rotate(1.6deg); }
}

/* reveal saat scroll */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* animasi masuk hero setelah cover dibuka */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
body.content-open .hero-label { animation: fade-up 1s ease both 0.15s; }
body.content-open .hero-names { animation: fade-up 1.1s ease both 0.45s; }
body.content-open .hero-date  { animation: fade-up 1.1s ease both 0.8s; }
body:not(.content-open) .hero-label,
body:not(.content-open) .hero-names,
body:not(.content-open) .hero-date { opacity: 0; }

/* transisi halus interaksi */
.event-card, .couple-card, .gift-card, .cd-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover, .couple-card:hover, .gift-card:hover, .cd-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(184, 145, 47, 0.18);
}
.gallery img { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 22px rgba(58, 52, 40, 0.25);
}

/* --- Kelopak bunga berjatuhan --- */
#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -24px;
  border-radius: 70% 30% 65% 35% / 55% 45% 60% 40%;
  background: linear-gradient(135deg, #f3d2d5, #e0a7ad);
  opacity: 0;
  animation: petal-fall linear infinite;
}
.petal.rosegold {
  background: linear-gradient(135deg, #ecd9a8, #d4b968);
}
@keyframes petal-fall {
  0%   { transform: translate(0, -5vh) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.85; }
  25%  { transform: translate(4vw, 25vh) rotate(95deg); }
  50%  { transform: translate(-3vw, 55vh) rotate(200deg); }
  75%  { transform: translate(3vw, 85vh) rotate(310deg); }
  100% { transform: translate(-2vw, 112vh) rotate(430deg); opacity: 0.25; }
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 3.5rem 1.5rem 5rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}
.footer-names {
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: var(--gold);
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .cover-names { font-size: 2.3rem; }
  .cd-box { min-width: 72px; }
  .cd-box span { font-size: 1.7rem; }
}
