/* =========================================================================
   STYLE.CSS - TEMPLATE 18: NGỌT NGÀO (Cinelove 61)
   Palette: honey (Sand linen #f8f1ed, gold #c59b27, dark charcoal #3b3232)
   ========================================================================= */

:root, [data-palette="honey"] {
  --bg-sand: #f8f1ed;
  --bg-card: #ffffff;
  --color-gold: #c59b27;
  --color-gold-light: #e8d29b;
  --color-gold-soft: #f4ede4;
  --color-text-main: #3b3232;
  --color-text-muted: #7d7272;
  --color-text-light: #9e9191;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Alex Brush', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 10px 30px rgba(59, 50, 50, 0.06);
  --shadow-elevated: 0 16px 40px rgba(59, 50, 50, 0.12);
  --radius-card: 16px;
  --radius-pill: 9999px;
}

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

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

body {
  background-color: var(--bg-sand);
  color: var(--color-text-main);
  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(--bg-sand);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
  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, #2a2222 40%, #1a1515 70%, #000000 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  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 {
  position: relative;
  background: var(--bg-sand);
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 580px;
  overflow: hidden;
}

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

.hero-overlay-curtain {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(59,50,50,0.85) 100%);
}

.hero-floating-badge {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffffff;
  padding: 0 20px;
  z-index: 2;
}

.hero-script-lead {
  font-family: var(--font-script);
  font-size: 54px;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero-divider-leaf {
  font-size: 13px;
  color: var(--color-gold-light);
  letter-spacing: 6px;
  margin: 6px 0;
}

.hero-date-stamp {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #f7f1eb;
  font-weight: 500;
}

.hero-meta-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 28px;
  text-align: center;
  color: #ffffff;
  z-index: 2;
}

.hero-names-display {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-names-display .amp {
  font-family: var(--font-script);
  color: var(--color-gold-light);
  font-size: 38px;
  font-weight: 400;
  margin: 0 4px;
}

.hero-sub-text {
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--color-gold-light);
  font-weight: 600;
}

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

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

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

.guest-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

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

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

/* ================= COMMON CARD STYLES ================= */
.honey-card, .story-card, .events-card, .gifts-card, .rsvp-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 34px 24px;
  margin: 24px 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 1px solid var(--color-gold-soft);
}

.card-badge-top {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.card-heading-serif {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--color-text-main);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card-gold-line {
  width: 44px;
  height: 2px;
  background: var(--color-gold);
  margin: 12px auto 20px;
  border-radius: 2px;
}

.invitation-text-body p {
  color: var(--color-text-muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 10px;
  text-wrap: balance;
}

/* ================= 3. FAMILIES ================= */
.section-families {
  padding: 0 20px;
}

.families-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.family-card {
  background: var(--bg-card);
  padding: 22px 14px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 1px solid var(--color-gold-soft);
}

.family-badge {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--color-gold-soft);
}

.parents-block p {
  font-size: 13.5px;
  color: var(--color-text-main);
  margin-bottom: 4px;
}

.family-addr {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* ================= 4. COUPLE ================= */
.section-couple {
  padding: 24px 20px 0;
}

.couple-cards-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.person-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 14px;
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 1px solid var(--color-gold-soft);
}

.person-photo-frame {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.person-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-role {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 2px;
}

.person-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-main);
}

.couple-center-divider {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-gold-soft);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ================= 5. INTERVIEW / STORY ================= */
.story-quote {
  font-style: italic;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  text-wrap: balance;
}

.story-photo-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/10;
}

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

/* ================= 6. GALLERY ================= */
.section-gallery {
  padding: 10px 20px 20px;
  text-align: center;
}

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

.gallery-item {
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

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

.gallery-item:hover .gallery-thumb {
  transform: scale(1.05);
}

/* ================= 7. EVENTS ================= */
.main-event-highlight {
  background: var(--color-gold-soft);
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.highlight-lead {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-gold);
  font-weight: 700;
}

.highlight-clock {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  margin: 4px 0;
}

.highlight-date-big {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.1;
}

.highlight-lunar {
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 4px;
}

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

.event-item-box {
  background: var(--bg-sand);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(197, 155, 39, 0.15);
}

.event-name-tag {
  font-weight: 700;
  color: var(--color-gold);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.event-datetime {
  font-size: 13.5px;
  color: var(--color-text-main);
  margin-bottom: 2px;
}

.event-venue {
  font-size: 13.5px;
  color: var(--color-text-main);
  margin-bottom: 2px;
}

.event-address {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.btn-map {
  display: inline-block;
  font-size: 12.5px;
  color: var(--color-gold);
  font-weight: 600;
  text-decoration: none;
}

/* ================= 8. COUNTDOWN ================= */
.section-countdown {
  padding: 0 20px;
}

.countdown-card {
  background: var(--color-gold);
  color: #ffffff;
  padding: 24px 16px;
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: 0 10px 25px rgba(197, 155, 39, 0.35);
}

.countdown-title {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.time-block {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 58px;
}

.time-block .num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.time-block .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  display: block;
}

.time-sep {
  font-size: 20px;
  font-weight: 700;
  opacity: 0.6;
}

/* ================= 9. GIFTS & QR ================= */
.gifts-subtitle {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  text-wrap: balance;
}

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

.gift-box-item {
  background: var(--color-gold-soft);
  padding: 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

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

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

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

.bank-details {
  flex: 1;
}

.bank-name {
  font-size: 14px;
  color: var(--color-gold);
}

.bank-acc {
  font-size: 14px;
  color: var(--color-text-main);
}

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

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

/* ================= 10. RSVP ================= */
.rsvp-desc {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  text-wrap: balance;
}

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

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

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

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

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

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

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

.btn-submit-rsvp {
  width: 100%;
  padding: 13px;
  background: var(--color-gold);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(197, 155, 39, 0.3);
}

.rsvp-msg {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 14px;
  background: #f7ede6;
  color: var(--color-text-main);
  transition: all 0.2s;
}

.rsvp-msg.success {
  background: #eaf7ed;
  color: #27773a;
}

.rsvp-msg.error {
  background: #fde8e8;
  color: #c92a2a;
}

/* ================= 11. THANKS & FOOTER ================= */
.section-thanks {
  position: relative;
  margin-top: 30px;
}

.thanks-image-wrap {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

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

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

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

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

.thanks-signature {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
}

.site-credit-wrap {
  background: #2a2222;
  padding: 16px;
  text-align: center;
}

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

.site-credit-wrap 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-text-muted);
}

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

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