/* ==========================================================================
   XV AÑOS — MILY RAQUEL — BOSQUE ENCANTADO
   ========================================================================== */

:root {
  /* Colors */
  --bg-color: #f8f5ff;          /* Warm off-white/lilac */
  --text-dark: #3b1f50;         /* Deep purple for text */
  --text-light: #7b2d8e;        /* Lighter purple for accents */
  --accent-gold: #d4af37;       /* Soft gold */
  
  /* Fonts */
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Poppins', sans-serif;
  
  /* Spacing */
  --section-pad: 4rem 1.5rem;
}

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

body {
  font-family: var(--font-serif);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   COVER / ENVELOPE (RE-IMAGINED)
   ========================================================================== */
.cover {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #e8dff5 0%, #d4c4e9 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

/* Sparkles on cover */
.cover::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.8) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.8) 2px, transparent 2px),
    radial-gradient(circle at 40% 70%, rgba(255,255,255,0.6) 1.5px, transparent 1.5px),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,0.9) 1px, transparent 1px);
  background-size: 100px 100px;
  animation: twinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}

.cover.fade-out {
  opacity: 0;
  transform: translateY(-50px) scale(1.05);
  pointer-events: none;
}
.cover.opened {
  display: none;
}

.envelope-container {
  position: relative;
  width: 90%;
  max-width: 400px;
  height: 250px;
  background: #fbf9ff;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(59, 31, 80, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Envelope Flaps */
.env-back {
  position: absolute;
  inset: 0;
  background: #f4effb;
  border-radius: 8px;
}

.env-letter {
  position: absolute;
  top: 20px;
  width: 85%;
  height: 90%;
  background: #fff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1; /* Below flaps */
}

.env-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: #fcfaff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  z-index: 2;
  filter: drop-shadow(2px 0 5px rgba(0,0,0,0.02));
}

.env-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: #fdfcff;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  z-index: 2;
  filter: drop-shadow(-2px 0 5px rgba(0,0,0,0.02));
}

.env-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-light);
  text-transform: uppercase;
}

.env-name {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--text-dark);
  margin-top: 5px;
  line-height: 1;
}

.env-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: #f8f5fe;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  border-radius: 0 0 8px 8px;
  z-index: 3;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
}

.env-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  background: #fdfcff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 8px 8px 0 0;
  z-index: 4;
  filter: drop-shadow(0 4px 6px rgba(123, 45, 142, 0.08));
  transition: transform 0.6s ease-in-out;
  transform-origin: top;
}

.cover.opening .env-top {
  transform: rotateX(150deg);
}

.cover.opening .env-letter {
  animation: extractLetter 0.8s forwards 0.4s;
}

.cover.opening .seal-btn {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  pointer-events: none;
}

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

.seal-btn {
  position: absolute;
  z-index: 5;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  width: 80px;
  height: 80px;
  transition: transform 0.3s ease;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  mix-blend-mode: multiply; /* Removes white background if JPEG */
}

.seal-btn:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(123, 45, 142, 0.25));
}


/* ==========================================================================
   MAIN INVITATION
   ========================================================================== */
.invitation {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-color);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

/* Forest Decor Images */
.floral-decor {
  position: absolute;
  width: 250px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
.floral-decor.top-left {
  top: 0;
  left: 0;
}
.floral-decor.bottom-right {
  bottom: 0;
  right: 0;
  transform: scaleX(-1) scaleY(-1);
}

.section {
  padding: var(--section-pad);
  text-align: center;
  position: relative;
  z-index: 1;
}

.section-title-script {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 6rem;
}

.hero-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-script);
  font-size: 5rem;
  color: var(--text-dark);
  line-height: 0.9;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(123, 45, 142, 0.1);
}

.hero-image-wrap {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--text-light) 0%, #e8dff5 100%);
  margin: 0 auto 2rem;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background-color: #fff;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-date {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.date-number {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--text-dark);
}

.date-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-light);
  margin-top: -5px;
}

.scroll-hint {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}

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

/* ==========================================================================
   QUOTE & PARENTS & BIBLE
   ========================================================================== */
.quote-text, .bible-text, .closing-verse {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.bible-ref, .closing-ref {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.parents-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.parent-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-dark);
}

.parent-and {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--text-light);
  margin: 0.5rem 0;
  line-height: 0.8;
}

/* ==========================================================================
   COUNTDOWN
   ========================================================================== */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 5px;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.countdown-separator {
  width: 4px;
  height: 4px;
  background-color: var(--text-light);
  border-radius: 50%;
  margin: 0 10px;
  transform: translateY(-8px);
}

.event-datetime {
  margin-bottom: 2rem;
  border-top: 1px solid rgba(123, 45, 142, 0.2);
  border-bottom: 1px solid rgba(123, 45, 142, 0.2);
  padding: 1rem 0;
  display: inline-block;
}

.event-date-display {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-dark);
}

/* ==========================================================================
   VENUE
   ========================================================================== */
.venue-box {
  margin-bottom: 2rem;
}

.venue-time {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.venue-divider {
  width: 40px;
  height: 1px;
  background-color: var(--text-light);
  margin: 0 auto 1rem;
}

.venue-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.venue-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #666;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--text-light);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(123, 45, 142, 0.25);
}

.btn-primary:hover {
  background: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 31, 80, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--text-light);
}

.btn-outline:hover {
  background: rgba(123, 45, 142, 0.05);
}

/* ==========================================================================
   GLASS CARDS (For structure)
   ========================================================================== */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 15px 35px rgba(123, 45, 142, 0.05);
}

/* ==========================================================================
   DRESS CODE
   ========================================================================== */
.dc-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.dresscode-illustration {
  width: 100%;
  max-width: 250px;
  margin: 1.5rem auto 1rem;
}

.dresscode-illustration img {
  width: 100%;
  height: auto;
  border-radius: 8px; /* Optional, depends on image */
}

.dc-labels {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dc-color-reserved {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #555;
  background: rgba(255,255,255,0.8);
  padding: 0.8rem;
  border-radius: 8px;
}

.dc-color-dot {
  width: 18px;
  height: 18px;
  background-color: #C8B6E2; /* Lila */
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border: 2px solid #fff;
}

/* ==========================================================================
   CRONOGRAMA / TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}

/* The vertical dashed line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px; /* Aligned with icon centers */
  width: 1px;
  border-left: 1px dashed var(--text-light);
}

.tl-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tl-item:last-child {
  margin-bottom: 0;
}

/* Timeline Custom SVG Icons */
.tl-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background-color: var(--bg-color); /* Hide line behind icon */
  border-radius: 50%;
  z-index: 2;
  /* Add subtle background circle to match clean style */
  box-shadow: 0 0 0 4px var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
}

.tl-icon svg {
  width: 22px;
  height: 22px;
}

.tl-content {
  margin-bottom: 4px;
}

.tl-title {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.tl-desc {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.tl-time {
  position: absolute;
  right: 0;
  top: 10px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
}

/* ==========================================================================
   SHARE MOMENTS & GIFT
   ========================================================================== */
.camera-icon {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.share-text, .confirm-text, .gift-text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto 1rem;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(123, 45, 142, 0.1);
}

.qr-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.gift-sub {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #777;
}

.gift-thanks {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ==========================================================================
   CLOSING & FOOTER
   ========================================================================== */
.decorative-line-small {
  width: 30px;
  height: 1px;
  background-color: var(--text-light);
  margin: 1.5rem auto;
}

.footer {
  background-color: var(--text-dark);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 10;
}

.footer-big-date {
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 1;
  color: #fff;
  opacity: 0.9;
}

.footer-month {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background-color: rgba(255,255,255,0.3);
  margin: 0 auto 1.5rem;
}

.footer-name {
  font-family: var(--font-script);
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.footer-love {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ==========================================================================
   MUSIC TOGGLE
   ========================================================================== */
.btn-music {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(123, 45, 142, 0.2);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(59, 31, 80, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s ease;
}

.btn-music:hover {
  transform: scale(1.05);
  color: var(--text-dark);
}

.btn-music.playing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 45, 142, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(123, 45, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 45, 142, 0); }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   ANIMATIONS (Scroll Reveal)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.tl-item.reveal {
  transition-delay: calc(var(--i) * 0.15s);
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
@media (max-width: 380px) {
  .hero-name { font-size: 4rem; }
  .date-number { font-size: 3.5rem; }
  .countdown-number { font-size: 1.8rem; }
  .tl-time { position: relative; display: block; top: 0; text-align: left; }
}

@media (min-width: 768px) {
  .invitation { max-width: 600px; }
  .hero-name { font-size: 6rem; }
  .countdown-item { width: 80px; }
  .countdown-number { font-size: 2.8rem; }
}
