/* ==========================================================================
   TIMELESS GRACE — ROYAL NIKKAH & LUXURY GOLD WEDDING INVITATION STYLES
   Inspired by & upgraded from webgencyinvitations.com/timelessgrace
   ========================================================================== */

:root {
  --bg-cream: #fdf4eb;
  --bg-ivory: #f9f0e0;
  --bg-white: #ffffff;
  --gold-primary: #cfab66;
  --gold-bright: #d8ae68;
  --gold-dark: #7d6332;
  --gold-deep: #5c4722;
  --gold-soft: rgba(207, 171, 102, 0.16);
  --text-dark: #3a2d18;
  --text-body: #5a482c;
  --text-muted: #8c7654;
  --border-gold: rgba(207, 171, 102, 0.42);
  --shadow-soft: 0 14px 40px rgba(92, 71, 34, 0.08);
  --shadow-card: 0 22px 55px rgba(92, 71, 34, 0.14);
  --font-cinzel: 'Cinzel', 'Georgia', serif;
  --font-serif: 'Rufina', 'Ovo', 'Georgia', serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-serif);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TOP FLOATING TOOLBAR (Language Switcher & Custom Guest Link)
   ========================================================================== */
.top-floating-bar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  background: rgba(253, 244, 235, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-gold);
  color: var(--gold-deep);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 15px rgba(92, 71, 34, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.pill-btn:hover {
  background: var(--gold-primary);
  color: #fff;
  border-color: var(--gold-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   SECTION 0: ENVELOPE OPENING WITH GOLDEN LIGHT VIDEO (REC 2684631903)
   ========================================================================== */
#weiOverlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: var(--bg-ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}

#weiOverlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#weiImg {
  width: 100%;
  max-width: 440px;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(92, 71, 34, 0.18));
  transition: transform 0.5s ease;
}

#weiOverlay:hover #weiImg {
  transform: scale(1.02);
}

#weiTapWrap {
  position: absolute;
  bottom: 24%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(253, 244, 235, 0.9);
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 24px rgba(92, 71, 34, 0.14);
}

.wei-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold-dark);
  border-top: 2px solid var(--gold-dark);
  transform: rotate(-45deg);
  animation: weiChevron 2s ease-in-out infinite;
}

#weiTapLabel {
  font-family: var(--font-cinzel);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  white-space: nowrap;
}

@keyframes weiChevron {
  0%, 100% { transform: rotate(-45deg) translate(0, 0); opacity: 0.55; }
  50% { transform: rotate(-45deg) translate(2px, -2px); opacity: 1; }
}

/* Video Wrapper that plays the Golden Light Envelope Opening */
#weiVideoWrap {
  position: fixed;
  inset: 0;
  z-index: 9550;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-ivory);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease, visibility 0s 1s;
}

#weiVideoWrap.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}

#weiVideo {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  object-fit: contain;
}

.skip-intro-btn {
  margin-top: 16px;
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: rgba(255, 255, 255, 0.85);
  padding: 7px 18px;
  border-radius: 99px;
  border: 1px solid var(--border-gold);
}

/* ==========================================================================
   SECTION 1: HERO VIDEO ARCH & FLORAL CORNERS (REC 2684632103)
   ========================================================================== */
.hero-arch-section {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 16px 50px;
  text-align: center;
  overflow: hidden;
}

.floral-corner {
  position: absolute;
  top: 0;
  width: 175px;
  z-index: 4;
  pointer-events: none;
}

.floral-left {
  left: -12px;
}

.floral-right {
  right: -12px;
}

.hero-video-frame {
  position: relative;
  width: 100%;
  max-width: 410px;
  margin: 20px auto 0;
  border-radius: 210px 210px 26px 26px;
  overflow: hidden;
  border: 5px solid #ffffff;
  box-shadow: var(--shadow-card), 0 0 0 1.5px var(--gold-primary);
  aspect-ratio: 9 / 15;
  background: var(--bg-ivory);
}

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

.hero-frame-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(58, 45, 24, 0.12) 0%,
    rgba(58, 45, 24, 0.04) 45%,
    rgba(253, 244, 235, 0.94) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 32px 20px 26px;
}

.hero-eyebrow {
  font-family: var(--font-cinzel);
  font-size: 0.74rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
}

.hero-couple-title {
  font-family: var(--font-cinzel);
  font-size: clamp(2rem, 5.5vw, 2.75rem);
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.scroll-down-hint {
  margin-top: 14px;
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.replay-btn-gold {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--gold-dark);
  text-decoration: underline;
}

/* ==========================================================================
   SECTION 2: SCRATCH TO REVEAL THE DATE (REC 2684632403)
   ========================================================================== */
.scratch-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 55px;
  text-align: center;
}

.cinzel-title {
  font-family: var(--font-cinzel);
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}

.scratch-sub {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold-dark);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.tdr-panels {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr;
  gap: 14px;
  max-width: 470px;
  margin: 0 auto;
}

.tdr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tdr-tile {
  position: relative;
  width: 100%;
  height: 86px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-gold);
  box-shadow: 0 8px 24px rgba(125, 99, 50, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.tdr-num {
  font-family: var(--font-cinzel);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--gold-deep);
}

.tdr-num.tdr-month {
  font-size: 1.25rem;
}

.tdr-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.tdr-label {
  font-family: var(--font-cinzel);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-top: 8px;
}

.tdr-married-msg {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--gold-dark);
  margin-top: 14px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tdr-married-msg.show {
  opacity: 1;
}

#tdr-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}

/* ==========================================================================
   SECTION 3: NIKKAH INVITATION ARCH CARD & AYAH (REC 2684632503 & 2684632603)
   ========================================================================== */
.nikkah-section {
  padding: 40px 16px 60px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.nikkah-arch-card {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 260px 260px 28px 28px;
  padding: 58px 28px 46px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.nikkah-arch-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--border-gold);
  border-radius: 250px 250px 20px 20px;
  pointer-events: none;
}

.bismillah-img {
  width: 190px;
  margin: 0 auto 18px;
}

.guest-greeting-title {
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 5vw, 2.7rem);
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.nikkah-invite-line {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 12px 0;
}

.parents-name {
  font-family: var(--font-cinzel);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
}

.couple-highlight-box {
  margin: 24px 0;
  padding: 18px 12px;
  background: var(--bg-cream);
  border-radius: 18px;
  border: 1px solid var(--border-gold);
}

.couple-big-name {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 6.5vw, 3.6rem);
  color: var(--gold-deep);
  line-height: 1.1;
}

.parentage-sub {
  font-family: var(--font-cinzel);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.with-divider {
  font-family: var(--font-cinzel);
  font-size: 0.85rem;
  color: var(--gold-primary);
  margin: 10px 0;
  letter-spacing: 0.2em;
}

.nikkah-closing-text {
  font-size: 1.06rem;
  color: var(--text-body);
  max-width: 420px;
  margin: 18px auto 0;
}

.floral-bottom-cluster {
  width: 220px;
  margin: 22px auto 0;
}

/* Quranic Ayah Card */
.ayah-card {
  margin-top: 36px;
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 22px;
  padding: 32px 24px;
  box-shadow: var(--shadow-soft);
}

.ayah-img {
  width: 240px;
  margin: 0 auto 14px;
}

.ayah-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-deep);
}

.ayah-ref {
  font-family: var(--font-cinzel);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   SECTION 4: WEDDING TIMELINE (REC 2684632703)
   ========================================================================== */
.timeline-section {
  padding: 60px 20px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.tl-list {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tl-row {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.tl-icon-img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-cream);
  padding: 6px;
}

.tl-event-title {
  font-family: var(--font-cinzel);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--gold-deep);
}

.tl-event-sub {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tl-time-badge {
  font-family: var(--font-cinzel);
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--gold-bright);
  padding: 6px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ==========================================================================
   SECTION 5: COUNTDOWN ("The Celebration Begins" - REC 2684632803)
   ========================================================================== */
.countdown-section {
  padding: 55px 20px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.gold-divider-img {
  width: 190px;
  margin: 0 auto 18px;
}

.countdown-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.cd-item {
  background: #ffffff;
  border: 1.5px solid var(--border-gold);
  border-radius: 16px;
  padding: 18px 8px;
  box-shadow: var(--shadow-soft);
}

.cd-num {
  font-family: var(--font-cinzel);
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  font-weight: 600;
  color: var(--gold-deep);
}

.cd-txt {
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 6px;
}

.btn-royal-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #d8ae68 0%, #b5893d 100%);
  color: #ffffff;
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(181, 137, 61, 0.32);
  transition: all 0.25s ease;
}

.btn-royal-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(181, 137, 61, 0.45);
}

.btn-royal-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--gold-deep);
  border: 1.5px solid var(--gold-primary);
  font-family: var(--font-cinzel);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.btn-royal-outline:hover {
  background: var(--gold-primary);
  color: #fff;
}

/* ==========================================================================
   SECTION 6: VENUE & GOOGLE MAPS (REC 2684632903 & 2684633003)
   ========================================================================== */
.venue-section {
  padding: 60px 20px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.venue-showcase-img {
  max-width: 390px;
  margin: 18px auto;
  border-radius: 20px;
}

.map-embed-box {
  margin: 22px auto;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border-gold);
  height: 290px;
}

.map-embed-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   SECTION 7: DRESS CODE & 6 PASTEL SHADES (REC 2684633103)
   ========================================================================== */
.dresscode-section {
  padding: 60px 20px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.dresscode-card {
  background: #ffffff;
  border: 1.5px solid var(--border-gold);
  border-radius: 26px;
  padding: 38px 24px;
  box-shadow: var(--shadow-soft);
}

.dc-pakistani-img {
  width: 240px;
  margin: 16px auto 22px;
  border-radius: 16px;
}

.pastel-shades-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}

.pastel-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 5px 15px rgba(92, 71, 34, 0.14);
}

.dc-reserved-alert {
  background: var(--bg-cream);
  border: 1px dashed var(--gold-primary);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.96rem;
  color: var(--gold-deep);
  margin-top: 16px;
}

/* ==========================================================================
   SECTION 8: GIFT PREFERENCES & RSVP (REC 2684633203 - 2684633703)
   ========================================================================== */
.gifts-rsvp-section {
  padding: 60px 20px 80px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.gift-box-wrap {
  background: #ffffff;
  border: 1.5px solid var(--border-gold);
  border-radius: 26px;
  padding: 34px 24px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-soft);
}

.gift-illust-img {
  width: 140px;
  margin: 0 auto 14px;
}

.account-copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-cream);
  border: 1px dashed var(--gold-primary);
  padding: 10px 14px;
  border-radius: 10px;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
}

.copy-gold-btn {
  background: #ffffff;
  border: 1px solid var(--border-gold);
  color: var(--gold-deep);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}

.copy-gold-btn:hover {
  background: var(--gold-primary);
  color: #fff;
}

.rsvp-royal-card {
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 26px;
  padding: 38px 26px;
  box-shadow: var(--shadow-card);
  text-align: left;
}

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

.form-group label {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background: var(--bg-cream);
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-dark);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-cream);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  cursor: pointer;
}

.qr-nikkah-pass {
  display: none;
  margin-top: 22px;
  background: var(--bg-cream);
  border: 2px solid var(--gold-primary);
  border-radius: 18px;
  padding: 18px;
}

.qr-nikkah-pass.active {
  display: block;
}

.qr-pass-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.qr-img-box {
  width: 104px;
  height: 104px;
  background: #fff;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
}

/* ==========================================================================
   FOOTER & FLOATING AUDIO
   ========================================================================== */
.footer-section {
  padding: 60px 20px 90px;
  text-align: center;
  border-top: 1px solid var(--border-gold);
  background: #ffffff;
}

.floating-audio-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  box-shadow: 0 8px 24px rgba(125, 99, 50, 0.38);
  border: 2px solid #ffffff;
}

.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(58, 45, 24, 0.65);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-modal-backdrop.open {
  display: flex;
}

.custom-modal-box {
  background: #ffffff;
  border: 2px solid var(--border-gold);
  border-radius: 22px;
  max-width: 460px;
  width: 100%;
  padding: 30px 24px;
  position: relative;
  text-align: left;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-cream);
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .tl-row {
    grid-template-columns: 54px 1fr;
  }
  .tl-time-badge {
    grid-column: 2;
    justify-self: start;
    margin-top: -6px;
  }
  .countdown-boxes {
    gap: 8px;
  }
}
