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

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

body {
  font-family: 'Montserrat', 'Helvetica Neue', sans-serif;
  background: #FDFBF7;
  color: #2C2C2C;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================
   OVERLAY
   ============================ */
#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #FDFBF7 0%, #f2efe8 40%, #e5decb 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.overlay-inner {
  text-align: center;
  padding: 2rem;
  max-width: 620px;
  animation: overlayFadeUp 1.2s ease forwards;
}

@keyframes overlayFadeUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ganesha-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.ganesha-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  animation: ganeshaGlow 3s ease-in-out infinite;
}

@keyframes ganeshaGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.overlay-sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: #6B7D5A;
  letter-spacing: 0.18em;
  margin-bottom: 2rem;
  padding: 0.6rem 1.5rem;
  display: inline-block;
  border-top: 1px solid #C5A880;
  border-bottom: 1px solid #C5A880;
}

.overlay-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 500;
  color: #2C2C2C;
  line-height: 1.4;
  margin-bottom: 2.5rem;
  letter-spacing: 0.04em;
}

#enter-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FDFBF7;
  background: #6B7D5A;
  border: none;
  padding: 1rem 2.8rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(107, 125, 90, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#enter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(107, 125, 90, 0.45);
}

#enter-btn:active {
  transform: translateY(-1px);
}

/* ============================
   AUDIO TOGGLE
   ============================ */
#audio-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #C5A880;
  background: rgba(253, 251, 247, 0.92);
  color: #6B7D5A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, background 0.3s ease;
  opacity: 0;
  pointer-events: none;
  animation: audioPulse 3s ease-in-out infinite;
}

#audio-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

#audio-toggle:hover {
  transform: scale(1.1);
  background: #FDFBF7;
  animation-play-state: paused;
}

#audio-toggle .icon-muted {
  display: none;
}

#audio-toggle.muted .icon-sound {
  display: none;
}

#audio-toggle.muted .icon-muted {
  display: block;
}

@keyframes audioPulse {
  0%, 100% { box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08); }
  50% { box-shadow: 0 3px 20px rgba(107, 125, 90, 0.25); }
}

/* ============================
   HERO
   ============================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #FDFBF7 0%, #f5f1e8 50%, #FDFBF7 100%);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 35%, rgba(107, 125, 90, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 65%, rgba(197, 168, 128, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-ornament {
  display: block;
  font-size: 2.2rem;
  color: #C5A880;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.hero-ganesha {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.hero-ganesha img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.75;
}

.hero-shloka {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: #6B7D5A;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.hero-shloka-sign {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: #C5A880;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.hero-script {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #6B7D5A;
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-weight: 500;
  color: #2C2C2C;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-couple {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 500;
  color: #6B7D5A;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 300;
  color: #5a5a5a;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.8;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
  animation: scrollBounce 2.4s ease infinite;
}

.scroll-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C5A880;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: #6B7D5A;
  line-height: 1;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(10px); }
  60% { transform: translateX(-50%) translateY(5px); }
}

/* ============================
   REVEAL ANIMATIONS
   ============================ */
.reveal {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

.reveal.fade-up {
  transform: translateY(40px);
}

.reveal.fade-left {
  transform: translateX(-40px);
}

.reveal.fade-right {
  transform: translateX(40px);
}

.reveal.scale-in {
  transform: scale(0.92);
}

.section-title .title-line {
  display: block;
  width: 0;
  height: 1px;
  background: #C5A880;
  margin: 0.8rem auto 0;
  transition: width 0.8s ease 0.3s;
}

.section-title.active .title-line,
.reveal.active .section-title .title-line {
  width: 50px;
}

/* ============================
   HERO STAGGER
   ============================ */
.hero-container > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-stagger .hero-container > * {
  opacity: 1;
  transform: translateY(0);
}

.hero-container > .hero-shloka {
  transition-delay: 0s;
}

.hero-container > .hero-ganesha {
  transition-delay: 0.15s;
}

.hero-container > .hero-shloka-sign {
  transition-delay: 0.3s;
}

.hero-container > .hero-script {
  transition-delay: 0.45s;
}

.hero-container > .hero-title {
  transition-delay: 0.6s;
}

.hero-container > .hero-couple {
  transition-delay: 0.75s;
}

.hero-container > .hero-text {
  transition-delay: 0.9s;
}

.scroll-indicator {
  opacity: 0;
  transition: opacity 0.6s ease 1.1s;
}

.hero-stagger .scroll-indicator {
  opacity: 1;
}

/* ============================
   HERO AMBIENT LEAVES
   ============================ */
.hero-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.leaf {
  position: absolute;
  font-size: 1.6rem;
  color: #C5A880;
  opacity: 0;
}

.hero-stagger .leaf {
  opacity: 0.25;
}

.leaf-1 {
  top: 8%;
  left: 5%;
  animation: leafDrift1 12s ease-in-out infinite;
}

.leaf-2 {
  bottom: 15%;
  right: 6%;
  animation: leafDrift2 15s ease-in-out infinite;
  font-size: 2rem;
}

.leaf-3 {
  top: 50%;
  left: 92%;
  animation: leafDrift3 10s ease-in-out infinite;
  font-size: 1.2rem;
}

@keyframes leafDrift1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, 30px) rotate(15deg); }
  66% { transform: translate(-10px, 15px) rotate(-10deg); }
}

@keyframes leafDrift2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-25px, -20px) rotate(-12deg); }
  66% { transform: translate(15px, -10px) rotate(8deg); }
}

@keyframes leafDrift3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-30px, 10px) rotate(20deg); }
}

/* ============================
   SECTIONS BASE
   ============================ */
section {
  padding: 5rem 2rem;
}

.section-ornament {
  text-align: center;
  font-size: 1.8rem;
  color: #C5A880;
  margin-bottom: 1rem;
  opacity: 0.6;
  transition: opacity 0.6s ease;
}

.reveal.active .section-ornament {
  animation: ornamentPop 0.6s ease forwards;
}

@keyframes ornamentPop {
  0% { opacity: 0; transform: scale(0.5) rotate(-15deg); }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 500;
  text-align: center;
  color: #2C2C2C;
  margin-bottom: 3rem;
  letter-spacing: 0.04em;
}

.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: #C5A880;
  margin: 0.8rem auto 0;
  transition: width 0.8s ease 0.3s;
}

.reveal.active .section-title::after {
  width: 50px;
}

/* ============================
   FAMILIES
   ============================ */
#families {
  background: #f5f1e8;
}

.families-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}

.family-card.reveal.fade-left {
  transition-delay: 0.1s;
}

.family-card.reveal.fade-right {
  transition-delay: 0.3s;
}

.family-card {
  background: #FDFBF7;
  border: 1px solid #e8e0d0;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.family-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 44, 44, 0.06);
}

.family-role {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C5A880;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e0d0;
}

.family-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 500;
  color: #2C2C2C;
  margin-bottom: 0.75rem;
}

.family-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #8a8a8a;
  margin-bottom: 0.2rem;
  font-weight: 300;
}

.family-sub.grand {
  margin-top: 1rem;
}

.family-rel {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: #2C2C2C;
  line-height: 1.5;
}

.families-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2.5rem;
}

.divider-script {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-style: italic;
  color: #C5A880;
}

/* ============================
   NARRATIVE
   ============================ */
#narrative {
  background: #FDFBF7;
}

.narrative-card {
  max-width: 720px;
  margin: 0 auto;
  background: #f5f1e8;
  border-radius: 20px;
  padding: 3.5rem 3rem;
  text-align: center;
  position: relative;
}

.narrative-card.reveal.scale-in {
  transition-delay: 0.15s;
}

.narrative-card::before,
.narrative-card::after {
  content: '\275D';
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: #C5A880;
  opacity: 0.3;
  position: absolute;
  line-height: 1;
}

.narrative-card::before {
  top: 16px;
  left: 20px;
}

.narrative-card::after {
  bottom: 16px;
  right: 20px;
  transform: rotate(180deg);
}

.narrative-text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 300;
  color: #5a5a5a;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.narrative-closing {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 400;
  color: #6B7D5A;
}

.narrative-closing em {
  font-style: italic;
}

/* ============================
   EVENT
   ============================ */
#event {
  background: #f5f1e8;
}

.couple-photo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.couple-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #C5A880;
  box-shadow: 0 6px 24px rgba(44, 44, 44, 0.1);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
}

.couple-photo:hover img {
  transform: scale(1.03);
  box-shadow: 0 10px 36px rgba(44, 44, 44, 0.15);
}

.reveal.scale-in {
  transition-delay: 0.1s;
}

.reveal.active .couple-photo.reveal.scale-in {
  transition-delay: 0.1s;
}

.event-card {
  max-width: 620px;
  margin: 0 auto;
  background: #FDFBF7;
  border: 1px solid #e8e0d0;
  border-radius: 20px;
  padding: 2.5rem 2rem;
}

.event-card.reveal.fade-up {
  transition-delay: 0.2s;
}

footer.reveal.fade-up {
  transition-delay: 0.1s;
}

.event-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0ebe0;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active .event-row {
  opacity: 1;
  transform: translateY(0);
}

.event-row:nth-child(1) { transition-delay: 0.05s; }
.event-row:nth-child(2) { transition-delay: 0.15s; }
.event-row:nth-child(3) { transition-delay: 0.25s; }
.event-row:nth-child(4) { transition-delay: 0.35s; }

.event-row:last-child {
  border-bottom: none;
}

.event-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7D5A;
  background: rgba(107, 125, 90, 0.08);
  border-radius: 50%;
}

.event-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.event-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C5A880;
}

.event-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: #2C2C2C;
  line-height: 1.4;
  font-weight: 500;
}

.event-value.hashtag {
  color: #6B7D5A;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ============================
   FOOTER
   ============================ */
footer {
  text-align: center;
  padding: 3.5rem 2rem;
  background: #2C2C2C;
  color: #FDFBF7;
}

.footer-ornament {
  font-size: 1.3rem;
  color: #C5A880;
  margin: 0.6rem 0;
  opacity: 0.7;
}

.footer-message {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  font-style: italic;
  color: #b8b8b8;
  margin-bottom: 0.5rem;
}

.footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: #C5A880;
  font-weight: 400;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .overlay-inner {
    padding: 1.5rem;
  }

  .overlay-sanskrit {
    font-size: 1.1rem;
  }

  #enter-btn {
    font-size: 0.85rem;
    padding: 0.85rem 2rem;
  }

  #hero {
    padding: 3rem 1.5rem;
  }

  section {
    padding: 3.5rem 1.5rem;
  }

  .families-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .families-divider {
    padding: 0;
  }

  .narrative-card {
    padding: 2.5rem 1.5rem;
  }

  .event-card {
    padding: 1.5rem 1.25rem;
  }

  .event-row {
    gap: 1rem;
  }

  #audio-toggle {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-couple {
    font-size: clamp(2.4rem, 8vw, 3rem);
  }

  .hero-title {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  }

  .family-card {
    padding: 1.5rem 1rem;
  }

  .event-value {
    font-size: 1rem;
  }

  .event-value.hashtag {
    font-size: 0.85rem;
  }
}
