/* ==========================================================
   Talha & Kaamla Wedding Invitation
   Clean Full-Screen Story with Floating Arrow Navigation
   Noticeable Individual Flower & Crystal Layer Animations
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #110606;
  font-family: 'Montserrat', sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ── Fullscreen Story Container ────────────────────────────── */
.story-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #110606;
}

.story-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 920px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #1c0d0d;
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.55);
}

@media (max-height: 700px) {
  .story-container {
    max-height: 100%;
    aspect-ratio: auto;
  }
}

/* ── Sleek Top Progress Bar ────────────────────────────────── */
.story-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 14px 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.story-progress {
  display: flex;
  gap: 5px;
  width: 100%;
}

.progress-pill {
  flex: 1;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-pill .fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 3px;
  transition: width 0.25s ease;
}

.progress-pill.done .fill,
.progress-pill.active .fill {
  width: 100%;
}

/* ── Floating Side Navigation Chevrons ──────────────────────── */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.nav-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.nav-arrow svg {
  width: 22px;
  height: 22px;
}

.nav-arrow.prev {
  left: 10px;
}

.nav-arrow.next {
  right: 10px;
}

.nav-arrow.hidden {
  display: none !important;
}

/* ── Tap Zones (Screen click navigation for slides) ────────── */
.tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 60;
  cursor: pointer;
}

.tap-zone.left {
  left: 0;
  width: 35%;
}

.tap-zone.right {
  right: 0;
  width: 65%;
}

/* ── Slides ────────────────────────────────────────────────── */
.story-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.985);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.story-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 30;
}

/* Base Image (Static, sharp, un-distorted) */
.slide-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* Slide 2: Couple Picture Cinematic Float */
.story-slide.active .couple-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  animation: romanticSlowFloat 7s ease-in-out infinite alternate;
}

@keyframes romanticSlowFloat {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.025) translateY(-3px);
  }
}

/* Ambient Sparkle Points on Picture Slide */
.sparkle-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 235, 170, 0.8) 50%, transparent 100%);
  pointer-events: none;
  z-index: 6;
  animation: floatSparkle var(--dur, 4s) var(--delay, 0s) ease-in-out infinite alternate;
  box-shadow: 0 0 10px rgba(255, 235, 170, 0.85);
}

@keyframes floatSparkle {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-16px) scale(1.15);
    opacity: 0.95;
  }
  100% {
    transform: translateY(-30px) scale(0.7);
    opacity: 0.4;
  }
}

/* ── Noticeable Transparent Flower & Crystal Layer Animations ─
   Period: 3.2s to 4.5s (noticeable, lively, elegant)
   Rotation: ±3.5deg to ±5deg
   Translation: ±4px to ±6px
   ────────────────────────────────────────────────────────── */
.animated-layer {
  position: absolute;
  height: auto;
  pointer-events: none;
  z-index: 5;
  will-change: transform;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.18));
}

/* Individual Flower Keyframes */
.story-slide.active .animated-layer.peony {
  animation: swayPeony 3.8s ease-in-out infinite alternate;
  transform-origin: 25% 95%;
}

.story-slide.active .animated-layer.foliage-left {
  animation: swayFoliageL 3.2s ease-in-out infinite alternate;
  transform-origin: 10% 95%;
}

.story-slide.active .animated-layer.gypsophila-left {
  animation: swayGypsL 4.2s ease-in-out infinite alternate;
  transform-origin: 35% 95%;
}

.story-slide.active .animated-layer.foliage-right {
  animation: swayFoliageR 3.4s ease-in-out infinite alternate;
  transform-origin: 90% 95%;
}

.story-slide.active .animated-layer.gypsophila-right {
  animation: swayGypsR 4.0s ease-in-out infinite alternate;
  transform-origin: 75% 95%;
}

@keyframes swayPeony {
  0% {
    transform: rotate(-3.5deg) translateY(-4px) scale(1);
  }
  50% {
    transform: rotate(0.8deg) translateY(0px) scale(1.02);
  }
  100% {
    transform: rotate(4.2deg) translateY(4px) scale(1.04);
  }
}

@keyframes swayFoliageL {
  0% {
    transform: rotate(-4.5deg) translateY(-5px);
  }
  100% {
    transform: rotate(4.5deg) translateY(4px);
  }
}

@keyframes swayGypsL {
  0% {
    transform: rotate(-3.2deg) translateY(-3px) scale(0.99);
  }
  100% {
    transform: rotate(3.8deg) translateY(4px) scale(1.03);
  }
}

@keyframes swayFoliageR {
  0% {
    transform: rotate(4.5deg) translateY(-4px);
  }
  100% {
    transform: rotate(-4.2deg) translateY(4px);
  }
}

@keyframes swayGypsR {
  0% {
    transform: rotate(3.8deg) translateY(-4px) scale(1.03);
  }
  100% {
    transform: rotate(-3.2deg) translateY(3px) scale(0.99);
  }
}

/* Crystal Spray & Silk Animations (Invite Slides) */
.story-slide.active .animated-layer.crystal-spray {
  animation: floatCrystal 3.6s ease-in-out infinite alternate;
  transform-origin: 20% 85%;
  filter: drop-shadow(0 2px 10px rgba(255, 235, 180, 0.45));
}

@keyframes floatCrystal {
  0% {
    transform: rotate(-3deg) translateY(-4px) scale(1);
  }
  100% {
    transform: rotate(3deg) translateY(4px) scale(1.03);
  }
}

.story-slide.active .animated-layer.silk-left {
  animation: floatSilkL 4.5s ease-in-out infinite alternate;
  transform-origin: 10% 90%;
}

@keyframes floatSilkL {
  0% {
    transform: rotate(-2.5deg) translateY(-3px);
  }
  100% {
    transform: rotate(2.5deg) translateY(3px);
  }
}

.story-slide.active .animated-layer.silk-right {
  animation: floatSilkR 4.8s ease-in-out infinite alternate;
  transform-origin: 90% 90%;
}

@keyframes floatSilkR {
  0% {
    transform: rotate(2.5deg) translateY(-3px);
  }
  100% {
    transform: rotate(-2.5deg) translateY(3px);
  }
}

/* ── Slide 3: Countdown Overlay ────────────────────────────── */
.countdown-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84%;
  background: rgba(255, 252, 248, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(180, 120, 90, 0.35);
  border-radius: 20px;
  padding: 26px 16px 22px;
  text-align: center;
  box-shadow: 0 10px 35px rgba(60, 15, 10, 0.16);
  z-index: 20;
}

.cd-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8c5a3a;
  margin-bottom: 4px;
}

.cd-event-name {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #5a1e18;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.cd-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}

.cd-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.cd-digit {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 400;
  color: #5a1e18;
  line-height: 1;
}

.cd-lbl {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9a7060;
  margin-top: 6px;
}

.cd-colon {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #c09070;
  padding-top: 2px;
}

/* ── Final Summary & Direct Action End Page ────────────────── */
.summary-slide-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 50;
  pointer-events: auto;
}

.summary-card-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 5, 8, 0.82) 0%, rgba(15, 3, 5, 0.96) 24%, #0d0204 100%);
  padding: 26px 20px 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  z-index: 60;
  pointer-events: auto;
  max-height: 85%;
  overflow-y: auto;
}

.summary-title {
  font-family: 'Cinzel', serif;
  font-size: 1.16rem;
  font-weight: 700;
  color: #f7e6c4;
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}

.summary-couple {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.94rem;
  color: #eed6c4;
  margin-bottom: 4px;
}

.summary-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  padding: 8px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

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

.summary-item svg {
  width: 16px;
  height: 16px;
  color: #d4af37;
  flex-shrink: 0;
}

/* Combined Events List for /invitation */
.combined-events-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 8px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.combined-event-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
}

.combined-event-row strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #f7e6c4;
  margin-bottom: 2px;
}

.combined-event-row span {
  color: #e5b974;
  font-weight: 600;
}

/* ── Action Buttons (High z-index, guaranteed clickable) ────── */
.btn-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.btn-action:active {
  transform: scale(0.97);
}

.btn-action svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-whatsapp-rsvp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
}

.btn-google-maps {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.65);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Venue Maps List for Combined Story */
.venue-maps-title {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #eed6c4;
  margin-top: 4px;
  font-weight: 600;
}

.venue-maps-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.btn-venue-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f7e6c4;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.4);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 1000 !important;
  pointer-events: auto !important;
}

.btn-venue-item:hover, .btn-venue-item:active {
  background: rgba(212, 175, 55, 0.25);
  border-color: #eed6c4;
  color: #ffffff;
}

.btn-venue-item svg {
  width: 15px;
  height: 15px;
  color: #d4af37;
  flex-shrink: 0;
}

/* ── Bottom Tap Prompt ─────────────────────────────────────── */
.tap-prompt {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: promptPulse 2.2s ease-in-out infinite;
}

.tap-prompt svg {
  width: 14px;
  height: 14px;
}

@keyframes promptPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; transform: translateX(2px); }
}

.story-slide:last-child .tap-prompt {
  display: none;
}
