/* ==========================================================================
   THEME: ROMANCE ROSÉ & CHAMPAGNE
   Demo 3: Daniel & Mariana • Boda Campestre & Boho
   ========================================================================== */

:root {
  --color-rose-bg: #FAF5F5;
  --color-card-bg: #FFFFFF;
  --color-rose: #C98B92;
  --color-rose-dark: #633338;
  --color-rose-light: #F7EAEB;
  --color-gold: #D6A868;
  --color-text-main: #332123;
  --color-text-muted: #73595C;
  --color-border: #EEDCDC;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
  --font-script: 'Great Vibes', cursive;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-rose-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 10% 10%, rgba(201, 139, 146, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 90% 90%, rgba(214, 168, 104, 0.1) 0%, transparent 50%);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-text-main);
}

.wedding-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.wedding-card {
  background: var(--color-card-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 1.75rem;
  padding: 2.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 35px rgba(92, 38, 44, 0.06);
  text-align: center;
}

/* Retrato Pareja */
.couple-photo-wrapper {
  max-width: 320px;
  margin: 0 auto 1.5rem;
  perspective: 1000px;
}

.couple-photo-frame {
  position: relative;
  border-radius: 1.5rem;
  padding: 8px;
  background: linear-gradient(135deg, #E8C5C8 0%, #FAF5F5 50%, #C98B92 100%);
  box-shadow: 0 16px 35px rgba(92, 38, 44, 0.15), 0 0 20px rgba(232, 197, 200, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.couple-photo-wrapper:hover .couple-photo-frame {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(92, 38, 44, 0.25), 0 0 30px rgba(232, 197, 200, 0.6);
}

.couple-photo-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 1.15rem;
  display: block;
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 4rem 1.25rem 2rem;
}

.hero-names {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--color-rose-dark);
  margin: 0.5rem 0;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #C98B92 0%, #A8656D 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(201, 139, 146, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(201, 139, 146, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-rose-dark);
  border-color: var(--color-rose);
}

.btn-outline:hover {
  background: var(--color-rose-light);
}

/* Countdown */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 440px;
  margin: 1.5rem auto 0;
}

.countdown-box {
  background: #FFFDFD;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1rem 0.5rem;
}

.countdown-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-rose-dark);
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Timeline */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #FFFDFD;
  border: 1px solid var(--color-border);
  padding: 1.25rem;
  border-radius: 1rem;
}

.timeline-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-rose);
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   SOBRE 3D ROMANCE ROSÉ (BOHO CHIC REALISTA)
   ========================================================================== */
#envelope-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(253, 248, 248, 0.98) 0%, rgba(247, 234, 235, 0.99) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  cursor: pointer;
  transition: opacity 1.0s cubic-bezier(0.25, 1, 0.5, 1), filter 1.0s ease, visibility 1.0s ease, transform 1.0s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform, filter, visibility;
}

#envelope-overlay.opened {
  opacity: 0;
  filter: blur(4px);
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.06);
}

.envelope-wrapper {
  position: relative;
  width: 92vw;
  max-width: 560px;
  height: 350px;
  perspective: 1600px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 600px) {
  .envelope-wrapper {
    max-width: 92vw;
    height: 270px;
  }
}

.envelope-wrapper:hover {
  transform: translateY(-6px) rotateX(2deg);
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #FAF4F4 0%, #F5EAEB 50%, #EDE0E2 100%);
  border-radius: 18px;
  box-shadow: 
    0 30px 60px -15px rgba(99, 51, 56, 0.25),
    0 15px 25px -10px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1.5px rgba(201, 139, 146, 0.4);
  overflow: visible;
  transform-style: preserve-3d;
}

.envelope-liner {
  position: absolute;
  inset: 6px;
  background: linear-gradient(135deg, #EAD6D8 0%, #DFCCD0 100%);
  border-radius: 14px;
  z-index: 1;
}

.envelope-letter {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  bottom: 14px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(201, 139, 146, 0.35);
  transform: translateY(35px) scale(0.96);
  opacity: 0;
  transition: transform 1.3s cubic-bezier(0.25, 1, 0.5, 1) 1.0s, opacity 0.8s ease 1.0s, box-shadow 1.3s ease 1.0s;
  will-change: transform, opacity, box-shadow;
}

.envelope-letter::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(201, 139, 146, 0.45);
  border-radius: 8px;
  pointer-events: none;
}

.envelope-wrapper.is-opening .envelope-letter {
  transform: translateY(-145px) scale(1.06);
  opacity: 1;
  box-shadow: 0 30px 60px rgba(99, 51, 56, 0.3), 0 10px 20px rgba(201, 139, 146, 0.2);
  z-index: 5;
}

@media (max-width: 600px) {
  .envelope-wrapper.is-opening .envelope-letter {
    transform: translateY(-100px) scale(1.05);
  }
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FBF7F7 0%, #F6ECEE 100%);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 18px 18px;
  z-index: 3;
  box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.04);
}

.envelope-pocket::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, #FDF9F9 0%, #F5E9EA 60%, #EBDADE 100%);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 4;
  box-shadow: 0 8px 20px rgba(99, 51, 56, 0.12);
  border-radius: 18px 18px 0 0;
}

.envelope-flap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 139, 146, 0.8), transparent);
}

.envelope-wrapper.is-opening .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
  box-shadow: 0 -8px 20px rgba(99, 51, 56, 0.08);
}

.wax-seal {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #FDEBEB 0%, #D48E96 35%, #9E4D57 75%, #5E262C 100%);
  border: 3px solid #FDF0F1;
  box-shadow: 
    0 12px 30px rgba(99, 51, 56, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 4px 8px rgba(255, 255, 255, 0.7),
    inset 0 -4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.45rem;
  z-index: 6;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, filter 0.5s ease;
}

@media (max-width: 600px) {
  .wax-seal {
    width: 82px;
    height: 82px;
    top: 56%;
  }
}

.envelope-wrapper:hover .wax-seal {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 16px 36px rgba(99, 51, 56, 0.45), inset 0 4px 8px rgba(255, 255, 255, 0.8);
}

.envelope-wrapper.is-opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2) translateY(-10px);
  filter: blur(4px);
  pointer-events: none;
}

.palette-container {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.palette-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.floating-music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--color-rose);
  color: var(--color-rose-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
