:root {
  --gold: #c9a227;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: #3a0509;
}

body {
  font-family: 'Source Serif 4', serif;
  background: linear-gradient(180deg, #4a0a12 0%, #6b0f16 40%, #4a0a12 100%);
  min-height: 100vh;
  color: #f5ead9;
  display: flex;
  justify-content: center;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #e8cf7a; }

input, textarea, select { font-family: 'Source Serif 4', serif; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal: sections start faded/offset and animate in as they enter
   the viewport (see js/app.js setupScrollReveal). */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

.yt-audio-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.music-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(26, 21, 18, 0.85);
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.music-toggle.is-paused { opacity: 0.55; }
.music-toggle span.spin {
  display: inline-block;
  animation: spin 3.5s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .music-toggle span.spin { animation: none; }
}

.page {
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.card { width: 100%; }

.cover {
  height: 100dvh;
  min-height: 480px;
  padding: 24px;
  text-align: center;
  border-bottom: 3px double var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.cover-top { margin-bottom: 10px; }

.label-gold {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.label-gold.small { font-size: 13px; }

.cover h1 {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1px;
}

.subtle { font-size: 13px; color: #f5ead9; opacity: 0.85; }

.framed {
  border: 3px solid var(--gold);
  border-radius: 4px;
  padding: 5px;
  display: inline-flex;
}
.framed img {
  max-width: 100%;
  width: 100%;
  display: block;
  border-radius: 2px;
}

.to-guest { font-size: 13px; line-height: 1.5; color: #f5ead9; }
.guest-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 4px;
  font-style: italic;
}

.btn-gold {
  background: var(--gold);
  color: #1a1512;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  padding: 11px 28px;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-align: center;
}

.pad-lg { padding: 40px 28px; }
.pad-bottom-lg { padding: 8px 28px 40px; }
.pad-xl { padding: 44px 28px; border-top: 3px double var(--gold); }
.pad-rsvp { padding: 44px 28px 56px; }
.tc { text-align: center; }
.left { text-align: left; }
.dark { background: #1a1512; }
.no-margin { margin: 0 !important; }

.italic-gold {
  font-size: 17px;
  font-style: italic;
  color: var(--gold);
  margin: 0 0 20px;
}

.body-text {
  font-size: 16px;
  line-height: 1.9;
  margin: 0 0 20px;
  color: #f5ead9;
  white-space: pre-line;
}

.event-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.event-subtitle {
  font-size: 14px;
  letter-spacing: 1px;
  color: #e8cf7a;
  opacity: 0.9;
  margin-bottom: 22px;
}
.event-person {
  font-size: 20px;
  font-weight: 700;
  color: #f5ead9;
  margin-bottom: 4px;
}
.event-suku { font-size: 15px; color: #e8cf7a; opacity: 0.85; }

.profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.profile { flex: 1; min-width: 150px; max-width: 220px; text-align: center; }
.profile .framed { margin-bottom: 10px; width: 100%; }
.profile-name { font-size: 16px; font-weight: 700; color: var(--gold); }
.profile-title { font-size: 13px; opacity: 0.85; }

.divider { text-align: center; color: var(--gold); font-size: 20px; padding: 0 0 8px; }

.detail-box {
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 24px 20px;
  text-align: left;
  font-size: 16px;
  line-height: 2;
  max-width: 380px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
}

.map-frame {
  border-radius: 6px;
  overflow: hidden;
  border: 3px solid var(--gold);
  margin-bottom: 14px;
}

.pantun {
  font-size: 17px;
  font-style: italic;
  line-height: 1.9;
  color: var(--gold);
  margin: 0;
  white-space: pre-line;
}

.niniak-list {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 28px;
  white-space: pre-line;
}

.tuan-rumah { font-size: 16px; font-weight: 700; }

.wassalam { font-size: 15px; margin: 0; }

.qr-section { text-align: center; }
.qr-box {
  display: inline-block;
  background: #f5ead9;
  padding: 16px;
  border-radius: 8px;
  border: 3px solid var(--gold);
}
.qr-guest-name { margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--gold); }

.rsvp-hint { font-size: 15px; text-align: center; opacity: 0.85; margin: 0 0 28px; }

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto 40px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--gold); }
.field input[type="text"],
.field input[type="number"],
.field textarea {
  background: #2a1e1a;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 10px 12px;
  color: #f5ead9;
  font-size: 15px;
}
.field textarea { resize: vertical; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.radio-row label { display: flex; align-items: center; gap: 6px; }

.submitted-note { text-align: center; font-size: 14px; color: var(--gold); }
.error-note { text-align: center; font-size: 14px; color: #ff8a8a; }

.messages-list {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.message-item {
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 14px 16px;
}
.message-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 8px;
}
.message-name { font-weight: 700; font-size: 15px; color: var(--gold); }
.message-attendance { font-size: 12px; opacity: 0.75; white-space: nowrap; }
.message-body { font-size: 14px; line-height: 1.6; opacity: 0.95; white-space: pre-line; }
.message-reply {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gold);
  font-size: 13px;
  line-height: 1.6;
}
.message-reply .reply-label {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer { text-align: center; padding: 24px; font-size: 12px; opacity: 0.6; }
