/* =========================================================================
   STYLE.CSS - TEMPLATE 20: MƠ MỘNG (Cinelove 38)
   Palette: burgundy (Royal Red #752323, Ivory Cream #fffffa, Gold #d4af37)
   ========================================================================= */

:root, [data-palette="burgundy"] {
  --color-burgundy: #752323;
  --color-burgundy-dark: #521515;
  --color-burgundy-light: #943232;
  --color-ivory: #fffffa;
  --color-gold: #d4af37;
  --color-gold-light: #e8d29b;
  --color-dark: #221818;
  --color-muted: #6e6464;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-card: 18px;
  --radius-pill: 9999px;
  --shadow-royal: 0 14px 40px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 8px 30px rgba(82, 21, 21, 0.15);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-burgundy);
}

body {
  background-color: var(--color-burgundy);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums;
}

.site-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-burgundy);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow-x: hidden;  /* máy cũ (iOS 15 trở xuống) chưa hiểu clip, dùng tạm hidden */
  overflow-x: clip;    /* hidden ép overflow-y thành auto, biến khối này thành vùng cuộn riêng và nuốt mất cú vuốt của khách; clip thì không */
}

/* ================= MUSIC CONTROL ================= */
.audio-control-wrapper {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 999;
}

.audio-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.vinyl-disk {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #381212 40%, #200808 70%, #000000 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-gold-light);
  animation: rotateDisc 6s linear infinite;
  animation-play-state: paused;
}

.audio-toggle.is-playing .vinyl-disk {
  animation-play-state: running;
}

.vinyl-center {
  width: 18px;
  height: 18px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-note-icon {
  width: 10px;
  height: 10px;
  fill: #ffffff;
}

@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================= 1. HERO ================= */
.section-hero {
  padding: 34px 20px 20px;
  text-align: center;
  color: #ffffff;
}

.hero-burgundy-header {
  margin-bottom: 24px;
}

.hero-top-badge {
  font-family: var(--font-script);
  font-size: 38px;
  color: var(--color-gold-light);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-date-top {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 500;
  margin: 4px 0 8px;
}

.hero-couple-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-wrap: balance;
}

.hero-lunar-top {
  font-size: 13px;
  color: var(--color-gold-light);
  font-style: italic;
  margin-top: 4px;
}

.hero-arch-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 200px 200px 20px 20px;
  overflow: hidden;
  box-shadow: var(--shadow-royal);
  border: 4px solid var(--color-gold-light);
  margin: 0 auto;
}

.hero-arch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= 2. GUEST CARD ================= */
.section-guest {
  padding: 10px 20px 0;
}

.guest-card {
  background: var(--color-ivory);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  text-align: center;
  border: 2px solid var(--color-gold-light);
  box-shadow: var(--shadow-card);
}

.guest-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.guest-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--color-burgundy);
  font-weight: 700;
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
  color: var(--color-burgundy);
  margin: 4px 0;
}

.guest-desc {
  font-size: 13px;
  color: var(--color-muted);
}

/* ================= 3. ROYAL IVORY CARD ================= */
.section-main-card {
  padding: 24px 20px 0;
}

.royal-ivory-card {
  background: var(--color-ivory);
  border-radius: var(--radius-card);
  padding: 34px 22px;
  box-shadow: var(--shadow-royal);
  text-align: center;
  border: 2px solid var(--color-gold-light);
}

.card-ornament {
  font-size: 13px;
  color: var(--color-gold);
  letter-spacing: 8px;
  margin-bottom: 4px;
}

.card-title-serif {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-burgundy);
  text-wrap: balance;
}

.card-subtitle-calligraphy {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--color-burgundy);
  margin-top: -2px;
}

.card-divider-gold {
  width: 44px;
  height: 2px;
  background: var(--color-gold);
  margin: 14px auto 24px;
  border-radius: 2px;
}

/* PARENTS ROW */
.parents-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed rgba(117, 35, 35, 0.2);
}

.parent-col {
  flex: 1;
}

.col-head {
  font-size: 11.5px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--color-burgundy);
  margin-bottom: 10px;
}

.p-line {
  font-size: 13px;
  color: var(--color-dark);
  margin-bottom: 3px;
}

.p-address {
  font-size: 11.5px;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 6px;
}

/* COUPLE ARCHES */
.couple-arch-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 30px;
}

.arch-person {
  flex: 1;
  text-align: center;
}

.arch-crop {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 80px 80px 14px 14px;
  overflow: hidden;
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}

.arch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.arch-role {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--color-burgundy);
  font-weight: 700;
}

.arch-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-dark);
}

.arch-amp {
  font-family: var(--font-script);
  font-size: 34px;
  color: var(--color-burgundy);
  flex-shrink: 0;
}

/* COUNTDOWN */
.countdown-section {
  background: var(--color-burgundy);
  color: #ffffff;
  padding: 20px 14px;
  border-radius: 14px;
  margin-bottom: 30px;
  box-shadow: 0 6px 20px rgba(117, 35, 35, 0.3);
}

.cd-header {
  font-size: 11.5px;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--color-gold-light);
}

.cd-timer {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cd-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 52px;
}

.cd-box .val {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.cd-box .unit {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3px;
  display: block;
}

/* CEREMONY DETAILS */
.ceremony-lead {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-burgundy);
  font-weight: 700;
}

.ceremony-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-burgundy);
  margin: 4px 0 8px;
}

.ceremony-time {
  font-size: 14px;
  color: var(--color-dark);
}

.ceremony-date-big {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-burgundy);
  line-height: 1.1;
  margin: 4px 0;
}

.ceremony-lunar {
  font-size: 13px;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.event-boxes-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.event-single-box {
  background: #fcf6ee;
  border: 1px solid var(--color-gold-light);
  border-radius: 12px;
  padding: 16px;
}

.evt-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-burgundy);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.evt-clock, .evt-place {
  font-size: 13.5px;
  color: var(--color-dark);
  margin-bottom: 2px;
}

.evt-addr {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.evt-map-link {
  display: inline-block;
  font-size: 12px;
  color: var(--color-burgundy);
  font-weight: 700;
  text-decoration: none;
}

/* RSVP INNER */
.rsvp-inner-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px dashed rgba(117, 35, 35, 0.2);
}

.rsvp-inner-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-burgundy);
}

.rsvp-inner-sub {
  font-size: 13px;
  color: var(--color-muted);
  margin: 4px 0 18px;
  text-wrap: balance;
}

.rsvp-inner-sub p {
  margin-bottom: 4px;
}

.rsvp-inner-sub p:last-child {
  margin-bottom: 0;
}

.rsvp-form {
  text-align: left;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 5px;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d8cbba;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #ffffff;
  color: var(--color-dark);
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-burgundy);
}

.radio-wrap {
  display: flex;
  gap: 16px;
}

.radio-wrap label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: normal;
  cursor: pointer;
}

.btn-royal-submit {
  width: 100%;
  padding: 13px;
  background: var(--color-burgundy);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(117, 35, 35, 0.35);
  margin-top: 10px;
}

.rsvp-done-banner {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
}

.rsvp-done-banner.success {
  background: #eaf7ed;
  color: #27773a;
  border: 1px solid #c2e7cc;
}

.rsvp-done-banner.error {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

/* ================= 4. STORY BURGUNDY ================= */
.section-story {
  padding: 24px 20px 0;
}

.story-burgundy-card {
  background: var(--color-burgundy-dark);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  text-align: center;
  color: #ffffff;
  box-shadow: var(--shadow-royal);
}

.story-chapter-tag {
  font-family: var(--font-script);
  font-size: 34px;
  color: var(--color-gold-light);
  line-height: 1;
}

.story-quote-lead {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: #ffffff;
  margin: 10px 0 14px;
  line-height: 1.5;
  text-wrap: balance;
}

.story-quote-body {
  font-size: 13.5px;
  color: #f7dcdb;
  line-height: 1.7;
  margin-bottom: 20px;
  text-wrap: balance;
}

.story-quote-body p {
  margin-bottom: 6px;
}

.story-quote-body p:last-child {
  margin-bottom: 0;
}

.story-feature-photo {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-gold-light);
}

.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= 5. GALLERY ================= */
.section-gallery {
  padding: 24px 20px 0;
  text-align: center;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-slot {
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--color-gold-light);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-slot:hover .gallery-img {
  transform: scale(1.05);
}

/* ================= 6. GIFTS ================= */
.section-gifts {
  padding: 24px 20px 0;
}

.gifts-burgundy-card {
  background: var(--color-ivory);
  border-radius: var(--radius-card);
  padding: 30px 20px;
  text-align: center;
  border: 2px solid var(--color-gold-light);
}

.gifts-main-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--color-burgundy);
}

.gifts-lead {
  font-size: 13.5px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.gifts-flex {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-card-box {
  background: #fbf5ee;
  border: 1px solid var(--color-gold-light);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.qr-box {
  width: 88px;
  height: 88px;
  background: #ffffff;
  padding: 5px;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  text-align: center;
}

.qr-pic {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-click {
  font-size: 8.5px;
  color: var(--color-muted);
  display: block;
  margin-top: 2px;
}

.bank-col {
  flex: 1;
}

.bank-title {
  font-size: 14px;
  color: var(--color-burgundy);
  font-weight: 700;
}

.bank-num {
  font-size: 14px;
  color: var(--color-dark);
}

.bank-person {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.btn-copy-gold {
  padding: 6px 14px;
  background: var(--color-burgundy);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ================= 7. THANKS ================= */
.section-thanks {
  margin-top: 34px;
}

.thanks-wrapper {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
}

.thanks-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thanks-curtain {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(82,21,21,0.7) 60%, rgba(82,21,21,0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px 24px;
  color: #ffffff;
  text-align: center;
}

.thanks-title-script {
  font-family: var(--font-script);
  font-size: 54px;
  color: var(--color-gold-light);
  line-height: 1;
}

.thanks-paragraph {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 10px 0 14px;
  color: #f7dcdb;
  text-wrap: balance;
}

.thanks-paragraph p {
  margin-bottom: 6px;
}

.thanks-paragraph p:last-child {
  margin-bottom: 0;
}

.thanks-couple {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.shop-credit {
  background: #180505;
  padding: 16px;
  text-align: center;
}

.shop-credit a.credit {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 1px;
}

.shop-credit a.credit:hover {
  color: #ffffff;
}

/* ================= MODALS ================= */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 34px;
  color: #ffffff;
  cursor: pointer;
}

.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.qr-modal-box {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  max-width: 320px;
  width: 90%;
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-muted);
}

.qr-modal-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-burgundy);
  margin-bottom: 14px;
}

.qr-modal-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto;
}
