/* ==========================================================================
   Peacock Gate — Digital Wedding Invitation
   Premium, Elegant, Mobile-First
   ========================================================================== */

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

:root {
  --teal: #113f59;
  --gold: #C89B3C;
  --gold-light: #E5C37A;
  --bg-cream: #FBF9F6;
  --text-dark: #2C3E50;
  --text-light: #6C7A89;
  
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-display: 'Cinzel', serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

/* ===== MOBILE APP WRAPPER ===== */
.mobile-app-wrapper {
  width: 100%;
  max-width: 430px; /* iPhone Pro Max width approx */
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-cream);
  background-image: radial-gradient(circle at top, #ffffff 0%, transparent 80%),
                    radial-gradient(circle at bottom, #ffffff 0%, transparent 80%);
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

@media (min-width: 431px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1A1A1D; /* Dark background on desktop to frame the app */
  }
  .mobile-app-wrapper {
    height: 90vh;
    border-radius: 20px;
  }
}

/* ===== VIDEO OVERLAY SCREEN ===== */
.video-overlay-screen {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 60px;
  transition: opacity 0.8s ease;
}

.video-overlay-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-cover-content {
  position: relative;
  z-index: 10;
  transition: opacity 0.4s ease;
}

.video-cover-content.fade-out {
  opacity: 0;
  pointer-events: none;
}

.small-tap-btn {
  background: rgba(200, 155, 60, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 12px 28px;
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
  50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(200,155,60,0.6); }
}

/* ===== YELLOW FLASH LAYER ===== */
.yellow-flash-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff, #fff3cd, #ffc107);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}

.yellow-flash-layer.active {
  opacity: 1;
}

/* ===== MAIN CONTENT ===== */
.main-app-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* Fix for iOS scrolling */
  opacity: 0;
  transition: opacity 1.2s ease;
}

.main-app-content.revealed {
  opacity: 1;
}

.main-app-content::-webkit-scrollbar {
  display: none;
}

/* ===== COMMON SECTION STYLES ===== */
section {
  width: 100%;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--teal);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--gold);
}

/* Scroll Animation Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 80px;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ganesha-icon {
  width: 45px;
  height: auto;
  margin-bottom: 20px;
  animation: float 4s ease-in-out infinite;
}

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

.hero-pretitle {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 5px;
}

.hero-title {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-dark);
  letter-spacing: 1px;
  margin-bottom: 30px;
  font-style: italic;
}

.hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.hero-names .name {
  font-family: var(--font-script);
  font-size: 3.2rem;
  color: var(--teal);
  line-height: 1.1;
}

.hero-names .ampersand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin: 5px 0;
}

.couple-image {
  width: 220px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 30px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.hero-closing {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  font-style: italic;
  max-width: 280px;
}

.scroll-indicator {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
  opacity: 0.7;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ===== DETAILS SECTION ===== */
.details-section {
  background: #ffffff;
  border-top: 1px solid rgba(200,155,60,0.2);
  border-bottom: 1px solid rgba(200,155,60,0.2);
}

.details-box {
  background: var(--bg-cream);
  border: 1px solid rgba(200,155,60,0.3);
  padding: 30px 20px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-dark);
}

.detail-row .icon {
  font-size: 1.2rem;
}

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.direction-btn, .qr-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.direction-btn {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}

.direction-btn:hover {
  background: var(--teal);
  color: #fff;
}

.qr-btn {
  background: transparent;
  color: var(--gold-dark);
  border: 1px solid var(--gold);
}

.qr-btn:hover {
  background: var(--gold);
  color: #fff;
}

/* ===== QR MODAL ===== */
.qr-modal {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.qr-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-content {
  background: var(--bg-cream);
  width: 85%;
  max-width: 320px;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-modal.active .qr-modal-content {
  transform: scale(1);
}

.close-qr {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
}

.qr-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--teal);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.qr-venue-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  font-style: italic;
}

.qr-image-wrapper {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(200,155,60,0.2);
  display: inline-block;
}

.qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* Countdown */
.countdown-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  position: relative;
  border-radius: 8px;
}

/* Stagger boxes */
.stagger-box {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.countdown-wrapper.visible .stagger-box:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.countdown-wrapper.visible .stagger-box:nth-child(2) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.countdown-wrapper.visible .stagger-box:nth-child(3) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.countdown-wrapper.visible .stagger-box:nth-child(4) { transition-delay: 0.7s; opacity: 1; transform: translateY(0); }

/* Glow pass */
.countdown-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(200,155,60,0.2), transparent);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
}

.countdown-wrapper.visible::after {
  animation: passGlow 2s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
}

@keyframes passGlow {
  0% { left: -100%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 200%; opacity: 0; }
}

.cd-box {
  background: var(--bg-cream);
  border: 1px solid rgba(200,155,60,0.3);
  border-radius: 8px;
  padding: 15px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 4px;
  display: inline-block;
}

@keyframes slideNumber {
  0% { transform: translateY(-8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.animate-change {
  animation: slideNumber 0.4s ease-out forwards;
}

.cd-label {
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* After the wedding the boxes count UP (script.js §4): a line above them,
   and a note below. Both stay hidden before the wedding day. */
.cd-caption {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  color: var(--teal);
}
.cd-note {
  margin: 18px 0 0;
  font-family: var(--font-script);
  font-size: 1.9rem;
  line-height: 1.2;
  text-align: center;
  color: var(--teal);
}

/* ===== EVENTS SECTION ===== */
.events-section {
  background: var(--bg-cream);
}

.event-cards {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.event-card {
  background: #ffffff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  border: 1px solid rgba(200,155,60,0.15);
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
}

.event-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--teal);
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.event-info {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.event-venue {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 10px;
  margin-bottom: 20px;
}

/* ===== CLOSING SECTION ===== */
.closing-section {
  background: #ffffff;
  padding-top: 80px;
  padding-bottom: 100px;
}

.closing-names {
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--teal);
  margin-bottom: 20px;
}

.closing-msg, .closing-msg2 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 10px;
}

.share-btn {
  margin-top: 30px;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(17,63,89,0.3);
}

/* ===== MUSIC TOGGLE ===== */
.music-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(5px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

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

.music-toggle.playing {
  animation: musicPulse 2s infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,60,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(200,155,60,0); }
}
