/* ==========================================================
   Base Styles
   ========================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #0b1410;
  color: #faf8f0;
  overflow: hidden;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================
   Event Title
   ========================================================== */

#event-title {
  position: fixed;
  top: 12vh;           /* Higher up to avoid envelope */
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
  
  animation: titleFadeIn 1.2s ease-out 0.2s both;
}

#event-title h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin: 0;
  
  /* Elegant cream color with gold gradient on highlight */
  color: #faf8f0;
  
  /* Subtle text shadow for depth */
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 215, 0, 0.2);
}

#event-title h1 .highlight {
  display: inline-block;
  font-size: 1.15em;
  font-weight: 500;
  letter-spacing: 0.08em;
  
  /* Animated gold gradient */
  background: linear-gradient(
    90deg,
    #e6be46 0%,
    #ffd700 25%,
    #ffed4e 50%,
    #ffd700 75%,
    #e6be46 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  animation: shimmerTitle 4s linear infinite;
  
  /* Enhanced glow for the gold text */
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5))
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Decorative elements around title */
#event-title::before,
#event-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

#event-title::before {
  right: calc(100% + 20px);
}

#event-title::after {
  left: calc(100% + 20px);
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes shimmerTitle {
  to {
    background-position: 200% center;
  }
}

/* Mobile adjustments for title */
@media (max-width: 640px) {
  #event-title {
    top: 8vh;    /* Higher on mobile */
  }
  
  #event-title::before,
  #event-title::after {
    width: 40px;
  }
  
  #event-title::before {
    right: calc(100% + 10px);
  }
  
  #event-title::after {
    left: calc(100% + 10px);
  }
}

#app {
  position: relative;
  z-index: 5;
  min-height: 100vh;
}

/* Ensure layers stack properly */
body > * {
  position: relative;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  #background-layer,
  #envelope-layer {
    display: none !important;
  }
  
  #rsvp-paper {
    position: static;
    transform: none !important;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
  }
}