/* ==========================================================================
   SAHAJ & KHUSHI — THE WEDDING CELEBRATION
   Hero Section Inspired by Reference Design + 6 Vertically Stacked Functions
   ========================================================================== */

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

/* Ensure no overflow restrictions on html/body for rock-solid position:sticky */
html {
  width: 100%;
  background-color: #000;
}

body {
  width: 100%;
  background-color: #000;
  color: #fff;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  touch-action: pan-y;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-container {
  width: 100%;
  position: relative;
  background-color: #000;
}

/* ==========================================================================
   HERO SECTION (MATCHING REFERENCE DESIGN)
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: max(40px, 12vh);
  overflow: hidden;
  background-color: #f7e6d4;
  z-index: 2;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

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

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 520px;
  padding: 0 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Laurel Wreath & Intertwined Monogram */
.hero-monogram-container {
  position: relative;
  width: 155px;
  height: 86px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-wreath-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.hero-monogram-letters {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.mono-initial {
  font-family: 'Pinyon Script', cursive;
  font-size: 58px;
  line-height: 1;
  color: #3b2b10;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.mono-left {
  transform: translate(-4px, -6px);
}

.mono-amp {
  font-family: 'Pinyon Script', cursive;
  font-size: 28px;
  color: #b48a5a;
  transform: translate(-1px, -2px);
  margin: 0 -4px;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.mono-right {
  transform: translate(4px, 5px);
}

/* Couple Names (Prominent & Regal) */
.hero-names {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(44px, 10vw, 68px);
  font-weight: 600;
  color: #3b2b10;
  line-height: 1.12;
  letter-spacing: 0.025em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 12px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.55);
}

.italic-cap {
  font-style: italic;
  font-weight: 700;
  font-size: 1.18em;
  display: inline-block;
  margin-right: -2px;
}

.name-amp {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.95em;
  color: #3b2b10;
  margin: 0 4px;
}

/* Subtitle Line */
.hero-sub-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
}

.sub-rule {
  width: 36px;
  height: 1.2px;
  background: rgba(90, 72, 43, 0.5);
}

.sub-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #4e3d22;
}

/* Palace Silhouette Motif */
.hero-palace-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.hero-palace-img {
  width: 110px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Location */
.hero-location {
  font-family: 'Montserrat', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #3b2b10;
  margin-bottom: 8px;
}

/* Dates */
.hero-event-dates {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #3b2b10;
}

/* Bottom Circular Scroll Indicator Button */
.hero-scroll-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.3s ease, border-color 0.3s ease;
  animation: gentleBob 2.4s infinite ease-in-out;
}

.hero-scroll-btn:hover {
  transform: translateX(-50%) scale(1.08);
  border-color: #ffffff;
}

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

/* ==========================================================================
   FUNCTION SECTIONS (PINNED ANIMATIONS)
   ========================================================================== */
.function-section {
  position: relative;
  width: 100%;
  height: 280vh;
  background-color: #000;
}

.function-section:last-child {
  height: 220vh;
}

.sticky-viewport {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: #000;
}

.function-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #000;
}

/* ==========================================================================
   FUNCTION DETAILS CARD (VERTICALLY CENTERED, BIGGER & NOTICEABLE)
   ========================================================================== */
.event-details {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s;
  will-change: opacity, transform;
  z-index: 10;
}

.event-details.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* Royal Invitation Box */
.event-card {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(
    145deg,
    rgba(14, 10, 8, 0.93) 0%,
    rgba(24, 16, 12, 0.90) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(225, 190, 120, 0.6);
  border-radius: 24px;
  padding: 30px 28px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.88),
              0 0 36px rgba(212, 175, 55, 0.24),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.event-sub {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: #f7e2a9;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 12px;
}

.event-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 700;
  line-height: 1.14;
  color: #fffaf0;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9), 0 0 24px rgba(212, 175, 55, 0.25);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.event-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0d58e;
  margin-bottom: 14px;
}

.event-divider {
  width: 64px;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(225, 195, 130, 0.9),
    transparent
  );
  margin: 0 auto 14px;
}

.event-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .hero-section {
    padding-top: max(28px, 9vh);
  }
  .hero-monogram-container {
    width: 135px;
    height: 75px;
    margin-bottom: 8px;
  }
  .mono-initial {
    font-size: 50px;
  }
  .mono-amp {
    font-size: 25px;
  }
  .hero-names {
    font-size: 42px;
    margin-bottom: 10px;
    gap: 0 8px;
  }
  .sub-rule {
    width: 28px;
  }
  .sub-text {
    font-size: 11px;
    letter-spacing: 0.28em;
  }
  .hero-palace-img {
    width: 95px;
  }
  .hero-location {
    font-size: 14px;
    letter-spacing: 0.4em;
    margin-bottom: 6px;
  }
  .hero-event-dates {
    font-size: 13px;
    letter-spacing: 0.22em;
  }

  .event-details {
    padding: 16px;
  }
  .event-card {
    padding: 24px 20px 22px;
    border-radius: 20px;
  }
  .event-sub {
    font-size: 10px;
    padding: 3px 11px;
    margin-bottom: 10px;
  }
  .event-title {
    font-size: 28px;
  }
  .event-date {
    font-size: 13px;
  }
  .event-desc {
    font-size: 13.5px;
    line-height: 1.55;
  }
}
