/* ============================================
   Nirav & Revati Wedding — Beige/Sage Theme
   Inspired by The Digital Yes Majestic Template
   ============================================ */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ivory: 34 33% 91%;
  --sage: 72 13% 45%;
  --sage-dark: 72 19% 32%;
  --sage-light: 55 18% 65%;
  --gold: 42 85% 55%;
  --gold-soft: 42 60% 70%;
  --countdown-bg: 30 27% 91%;
  --radius: 0.5rem;
  --font-display: "span", sans-serif;
  --font-script: "classic-script-mn", cursive;
  --font-body: "span", sans-serif;
  --shadow-soft: 0 2px 15px -3px rgba(58,69,52,.08), 0 4px 6px -2px rgba(58,69,52,.04);
  --shadow-elegant: 0 10px 40px -10px rgba(58,69,52,.15), 0 4px 15px -3px rgba(58,69,52,.08);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background-color: hsl(var(--ivory));
  color: hsl(var(--sage-dark));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== TYPOGRAPHY ===== */
.font-script { font-family: var(--font-script); }
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes envelopeOpen {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(0.8) translateY(-100vh); opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fadeUp { animation: fadeUp 0.8s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.6s ease-out forwards; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ===== INTRO / ENVELOPE SCREEN ===== */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: hsl(var(--ivory));
  cursor: pointer;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}
#intro-screen.opening {
  animation: envelopeOpen 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}
.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, hsl(var(--sage) / 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, hsl(var(--gold) / 0.06) 0%, transparent 50%),
    hsl(var(--ivory));
}
.intro-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
}
.intro-envelope {
  width: 280px;
  max-width: 70vw;
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(58,69,52,0.1));
}
.tap-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--sage-dark) / 0.6);
  animation: pulse 2s ease-in-out infinite;
}

/* ===== MUSIC TOGGLE ===== */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: hsl(var(--sage-dark) / 0.8);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.music-toggle:hover {
  background: hsl(var(--sage-dark));
  transform: scale(1.05);
}
.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.music-bars span {
  display: block;
  width: 3px;
  background: white;
  border-radius: 1px;
  transition: height 0.3s ease;
}
.music-bars.playing span:nth-child(1) { animation: bar1 0.6s ease-in-out infinite; }
.music-bars.playing span:nth-child(2) { animation: bar2 0.5s ease-in-out infinite 0.1s; }
.music-bars.playing span:nth-child(3) { animation: bar3 0.7s ease-in-out infinite 0.2s; }
.music-bars.playing span:nth-child(4) { animation: bar4 0.6s ease-in-out infinite 0.15s; }
.music-bars:not(.playing) span { height: 3px !important; }

@keyframes bar1 { 0%,100% { height: 4px; } 50% { height: 14px; } }
@keyframes bar2 { 0%,100% { height: 8px; } 50% { height: 4px; } }
@keyframes bar3 { 0%,100% { height: 6px; } 50% { height: 16px; } }
@keyframes bar4 { 0%,100% { height: 10px; } 50% { height: 6px; } }

/* ===== NAVIGATION DOTS ===== */
.nav-dots {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.nav-dots.visible { opacity: 1; }
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--sage-dark) / 0.25);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.nav-dot.active {
  background: hsl(var(--sage-dark));
  transform: scale(1.3);
}

/* ===== HERO SECTION ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
#hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.25) 50%,
    rgba(0,0,0,0.4) 100%
  );
}
#hero .hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  padding: 2rem;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 1rem;
}
.hero-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-names .amp {
  font-size: 0.6em;
}
.hero-date {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: white;
  opacity: 0.75;
  animation: float 2s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-indicator .scroll-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
}
.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

/* ===== STRING LIGHTS ===== */
.string-lights {
  width: 100%;
  pointer-events: none;
  position: relative;
  z-index: 1;
  margin-top: -2rem;
}
.string-lights img {
  width: 100%;
  object-fit: contain;
}

/* ===== COUNTDOWN SECTION ===== */
#countdown {
  background: hsl(var(--countdown-bg));
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
}
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: hsl(var(--sage-dark) / 0.5);
  margin-bottom: 0.5rem;
}
.countdown-date-title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: hsl(var(--sage-dark));
  margin-bottom: 2.5rem;
}
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
.countdown-item {
  flex: 1;
  text-align: center;
  padding: 1rem 0.5rem;
  background: hsl(var(--ivory) / 0.8);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: hsl(var(--sage-dark));
  line-height: 1;
  display: block;
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--sage-dark) / 0.5);
  margin-top: 0.25rem;
}

/* ===== ORNATE DECORATION ===== */
.ornate-decoration {
  text-align: center;
  padding: 2rem 1.5rem;
}
.ornate-decoration img {
  max-width: 200px;
  width: 50%;
  margin: 0 auto;
  opacity: 0.7;
}

/* ===== SECTIONS ===== */
.section-padding {
  padding: 5rem 1.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header .script-title {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  color: hsl(var(--sage-dark));
  margin-bottom: 0.5rem;
}
.section-header .subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: hsl(var(--sage-dark) / 0.6);
  letter-spacing: 0.05em;
}
.content-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

/* ===== COUPLE SECTION ===== */
#couple {
  background: hsl(var(--ivory));
}
.couple-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}
.couple-card {
  text-align: center;
  flex: 1 1 180px;
}
.couple-monogram {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1.5px solid hsl(var(--sage) / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}
.couple-monogram:hover {
  box-shadow: var(--shadow-elegant);
  border-color: hsl(var(--sage) / 0.5);
}
.couple-monogram span {
  font-size: 3rem;
  color: hsl(var(--sage-dark));
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.15em;
}
.couple-name {
  font-size: 1.25rem;
  color: hsl(var(--sage-dark));
  margin-bottom: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.couple-role {
  font-size: 0.8rem;
  color: hsl(var(--sage-dark) / 0.5);
  letter-spacing: 0.1em;
  font-style: italic;
}
.couple-heart {
  color: hsl(var(--sage) / 0.4);
  flex: 0 0 auto;
}

/* ===== FLOWER DECORATION ===== */
.flower-decoration {
  text-align: center;
  padding: 0;
  margin: -1rem 0;
  pointer-events: none;
}
.flower-decoration img {
  width: 180px;
  margin: 0 auto;
}

/* ===== EVENTS / TIMELINE ===== */
#events {
  background: hsl(var(--ivory));
}

.day-block {
  text-align: center;
  margin-bottom: 2rem;
}
.day-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.day-badge {
  font-size: 1.1rem;
  font-weight: 500;
  color: hsl(var(--sage-dark));
  letter-spacing: 0.1em;
}
.day-date-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--sage-dark) / 0.5);
}

.timeline-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: hsl(var(--sage) / 0.3);
}
.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  position: relative;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--sage-dark));
  margin-top: 0.35rem;
  flex-shrink: 0;
  position: relative;
  left: 20px;
  z-index: 2;
}
.timeline-content {
  padding-left: 0.5rem;
}
.timeline-time {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--sage-dark) / 0.5);
  margin-bottom: 0.25rem;
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: hsl(var(--sage-dark));
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.timeline-description {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: hsl(var(--sage-dark) / 0.6);
}

/* ===== VENUE SECTION ===== */
#venue {
  background: hsl(var(--countdown-bg));
}
.venue-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
}
.venue-card-header {
  padding: 2rem 2rem 0;
  color: hsl(var(--sage-dark) / 0.4);
}
.venue-info {
  padding: 1.5rem 2rem 2rem;
}
.venue-name {
  font-size: 2rem;
  color: hsl(var(--sage-dark));
  margin-bottom: 0.5rem;
}
.venue-address {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: hsl(var(--sage-dark) / 0.6);
  margin-bottom: 0.5rem;
}
.venue-time {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: hsl(var(--sage-dark) / 0.5);
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.venue-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: hsl(var(--sage-dark) / 0.4);
  font-style: italic;
  margin-bottom: 1.25rem;
}
.venue-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: hsl(var(--sage-dark));
  color: white;
}
.btn-primary:hover { background: hsl(var(--sage-dark) / 0.85); }
.btn-outline {
  background: transparent;
  color: hsl(var(--sage-dark));
  border: 1px solid hsl(var(--sage-dark) / 0.3);
}
.btn-outline:hover {
  background: hsl(var(--sage-dark));
  color: white;
}

.map-container {
  max-width: 500px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.map-container iframe {
  display: block;
}

/* ===== FOOTER ===== */
#footer {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}
#footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: hsl(var(--sage-dark) / 0.85);
}
.footer-content {
  position: relative;
  z-index: 2;
}
.footer-ornament {
  width: 250px;
  max-width: 80%;
  margin: 0 auto 2rem;
  opacity: 0.5;
}
.footer-names {
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: white;
  margin-bottom: 0.75rem;
}
.footer-date {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: white;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}
.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: white;
  opacity: 0.6;
  font-style: italic;
  margin-bottom: 0.75rem;
}
.footer-hashtag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: white;
  opacity: 0.4;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  width: 60px;
  height: 1px;
  background: hsl(var(--sage) / 0.3);
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .section-padding { padding: 6rem 2rem; }
  .countdown-grid { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .couple-cards {
    gap: 1.5rem;
  }
  .couple-heart {
    display: none;
  }
  .intro-envelope {
    width: 220px;
  }
  .venue-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: hsl(var(--ivory)); }
::-webkit-scrollbar-thumb { background: hsl(var(--sage) / 0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--sage) / 0.6); }

/* ===== HIDDEN HELPERS ===== */
.hidden { display: none !important; }
