/* RIWAYAH STUDIO — BESPOKE 3D WEBPAGE INVITATION STYLESHEET */

:root {
  --emerald-deep: #05140d;
  --emerald-noir: #0a2218;
  --emerald-card: #0d2c20;
  --gold-primary: #c8a261;
  --gold-light: #edd8af;
  --gold-dark: #8c6a28;
  --cream-silk: #fbf9f5;
  --text-muted: rgba(251, 249, 245, 0.75);
  --border-gold: rgba(200, 162, 97, 0.35);
  --glass-bg: rgba(13, 44, 32, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--emerald-deep);
  color: var(--cream-silk);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ============================================================
   3D ROYAL GATE OVERLAY
   ============================================================ */
#gateOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  background-color: #030d08;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s ease;
}

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

.gate-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: radial-gradient(circle at 50% 50%, #0e3425 0%, #061811 100%);
  border: 1px solid var(--border-gold);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.85);
  transition: transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gate-panel::before {
  content: '';
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(200, 162, 97, 0.25);
  background: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(200, 162, 97, 0.03) 35px, rgba(200, 162, 97, 0.03) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(200, 162, 97, 0.03) 35px, rgba(200, 162, 97, 0.03) 70px);
}

.gate-left {
  left: 0;
  transform-origin: left center;
  border-right: 2px solid var(--gold-primary);
}

.gate-right {
  right: 0;
  transform-origin: right center;
  border-left: 2px solid var(--gold-primary);
}

#gateOverlay.opened .gate-left {
  transform: rotateY(-110deg);
}

#gateOverlay.opened .gate-right {
  transform: rotateY(110deg);
}

/* 3D Gate Handles & Center Seal */
.center-seal-wrapper {
  position: absolute;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.6s ease;
}

.center-seal-wrapper:hover {
  transform: scale(1.05);
}

#gateOverlay.opened .center-seal-wrapper {
  transform: scale(0.7);
  opacity: 0;
  pointer-events: none;
}

.royal-seal {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #dfba73 0%, #c5a059 50%, #8c6a28 100%);
  border: 4px solid #ecd6a7;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(200, 162, 97, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #05140d;
  position: relative;
  animation: pulseGold 2.5s infinite;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 25px rgba(200, 162, 97, 0.4); }
  50% { box-shadow: 0 15px 45px rgba(0,0,0,0.9), 0 0 45px rgba(200, 162, 97, 0.8); }
}

.seal-monogram {
  font-family: 'Cinzel', serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.seal-bismillah {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 4px;
}

.gate-cta-pill {
  margin-top: 20px;
  background: rgba(6, 24, 17, 0.9);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 10px 24px;
  border-radius: 30px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  animation: bounceCta 2s infinite ease-in-out;
}

@keyframes bounceCta {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ============================================================
   FLOATING AUDIO CONTROLLER
   ============================================================ */
.floating-audio-pill {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 8000;
  background: rgba(6, 24, 17, 0.85);
  border: 1px solid var(--gold-primary);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}

.floating-audio-pill:hover {
  transform: scale(1.04);
  background: rgba(10, 34, 24, 0.95);
}

.soundwave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.soundwave span {
  width: 3px;
  background: var(--gold-light);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.floating-audio-pill.playing .soundwave span:nth-child(1) { animation: wave 1s infinite ease-in-out 0.1s; }
.floating-audio-pill.playing .soundwave span:nth-child(2) { animation: wave 1s infinite ease-in-out 0.3s; }
.floating-audio-pill.playing .soundwave span:nth-child(3) { animation: wave 1s infinite ease-in-out 0.2s; }
.floating-audio-pill.playing .soundwave span:nth-child(4) { animation: wave 1s infinite ease-in-out 0.4s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.audio-text {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-light);
}

/* ============================================================
   MAIN INVITATION CONTAINER (MOBILE-FIRST)
   ============================================================ */
.invitation-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
}

/* Architectural Card Wrappers */
.royal-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 35px 25px;
  margin-bottom: 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: center;
}

.royal-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(200, 162, 97, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

/* Corner Accents on Cards */
.corner-ornament {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-primary);
  opacity: 0.8;
}
.corner-tl { top: 12px; left: 12px; border-top: 2px solid; border-left: 2px solid; }
.corner-tr { top: 12px; right: 12px; border-top: 2px solid; border-right: 2px solid; }
.corner-bl { bottom: 12px; left: 12px; border-bottom: 2px solid; border-left: 2px solid; }
.corner-br { bottom: 12px; right: 12px; border-bottom: 2px solid; border-right: 2px solid; }

/* Section Badges */
.card-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(200, 162, 97, 0.12);
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ============================================================
   HERO / REVEAL SECTION
   ============================================================ */
.bismillah-svg {
  width: 220px;
  height: auto;
  margin: 10px auto 20px;
  display: block;
  fill: var(--gold-light);
}

.brand-monogram-top {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 162, 97, 0.08);
}

.monogram-text {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  color: var(--gold-light);
  font-weight: 700;
}

.family-invitation-intro {
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream-silk);
  opacity: 0.9;
  margin-bottom: 25px;
}

.couple-names-block {
  margin: 25px 0;
}

.groom-name, .bride-name {
  font-family: 'Cinzel', serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #edd8af 0%, #c5a059 50%, #dfba73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.ampersand {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  color: var(--gold-light);
  margin: 8px 0;
  opacity: 0.8;
  display: block;
}

.nikah-proclamation {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-top: 15px;
}

.wedding-date-highlight {
  margin-top: 15px;
  font-size: 18px;
  font-weight: 500;
  color: var(--cream-silk);
}

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.timer-slot {
  background: rgba(6, 24, 17, 0.7);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 14px 6px;
  text-align: center;
}

.timer-number {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.timer-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream-silk);
  opacity: 0.7;
  margin-top: 6px;
}

/* ============================================================
   EVENT TIMELINE / ITINERARY
   ============================================================ */
.event-item {
  border-bottom: 1px solid rgba(200, 162, 97, 0.2);
  padding: 20px 0;
  text-align: left;
}

.event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.event-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.event-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--gold-light);
  font-weight: 600;
}

.event-time-tag {
  font-size: 13px;
  color: var(--gold-primary);
  background: rgba(200, 162, 97, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

.event-date-text {
  font-size: 14px;
  color: var(--cream-silk);
  margin-bottom: 6px;
}

.event-venue-text {
  font-size: 13px;
  opacity: 0.75;
}

.dress-code-pill {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gold-light);
  background: rgba(6, 24, 17, 0.6);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(200, 162, 97, 0.25);
}

/* ============================================================
   GOOGLE MAPS & VENUE
   ============================================================ */
.venue-map-preview {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  overflow: hidden;
  margin: 15px 0;
}

.venue-map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #c5a059 0%, #8c6a28 100%);
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  color: #05140d;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 162, 97, 0.35);
}

/* ============================================================
   INTERACTIVE RSVP FORM
   ============================================================ */
.rsvp-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.rsvp-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.rsvp-input, .rsvp-select, .rsvp-textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(6, 24, 17, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  color: var(--cream-silk);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.rsvp-input:focus, .rsvp-select:focus, .rsvp-textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(200, 162, 97, 0.2);
}

.rsvp-textarea {
  resize: vertical;
  min-height: 80px;
}

/* RSVP Confirmation Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--emerald-card);
  border: 1.5px solid var(--gold-primary);
  border-radius: 16px;
  padding: 35px 25px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   WISHES WALL / GUESTBOOK
   ============================================================ */
.wishes-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 15px;
  padding-right: 5px;
}

.wishes-list::-webkit-scrollbar {
  width: 4px;
}

.wishes-list::-webkit-scrollbar-thumb {
  background: var(--gold-primary);
  border-radius: 4px;
}

.wish-item {
  background: rgba(6, 24, 17, 0.6);
  border: 1px solid rgba(200, 162, 97, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  text-align: left;
}

.wish-author {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.wish-text {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
}

/* ============================================================
   FOOTER & RIWAYAH BRANDING
   ============================================================ */
.invitation-footer {
  text-align: center;
  padding: 30px 15px 10px;
}

.footer-brand-crest {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
}

.footer-brand-name {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.footer-subtitle {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.6;
  margin-top: 4px;
}

.footer-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 12px;
  display: inline-block;
  margin-top: 10px;
  border-bottom: 1px dotted var(--gold-primary);
}
