/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, serif;
  background: #F2EFEA;
  overflow-x: hidden;
}
 
/* ===== ESCENA ===== */
.scene {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene.released {
  position: static;
}


/* ===== SOBRE ===== */
.envelope {
  margin: 0;
  position: absolute;
  width: 100%;
  aspect-ratio: 3 / 2;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ead9c6, #dfcbb5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.4s ease, opacity 1.4s ease;
  z-index: 10;
  overflow: hidden;
}

/* ===== TAPA ===== */
.flap {
  position: absolute;
  inset: 0;
  background: #D4BCA1;
  clip-path: polygon(-5% 0, 50% 55%, 105% 0);
  transform-origin: top;
  transition: transform 1s ease;
  z-index: 11;
}

/* ===== SELLO ===== */
.seal {
  width: 60px;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #926F1D, #926F1D);
  border: 3px solid #926F1D;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.3),
    inset 2px 2px 4px rgba(255,255,255,0.2),
    inset -2px -2px 4px rgba(0,0,0,0.4);
  transition: opacity 1s ease;
  z-index: 12;
}

/* ===== BRILLO SELLO ===== */
.seal::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    120deg,
    transparent 40%,
    rgba(255,255,255,0.45) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: seal-shine 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes seal-shine {
  0% { transform: translateX(-100%); opacity:0; }
  40% { opacity:0; }
  50% { opacity:1; }
  60% { opacity:0; }
  100% { transform: translateX(100%); opacity:0; }
}

/* ===== ANIMACIONES SOBRE ===== */
.envelope.open-flap .flap { transform: rotateX(180deg); }
.envelope.open-flap .seal { opacity: 0; }
.envelope.open {
  transform: translateY(-50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 1.4s ease, opacity 1.4s ease; /* 1.4s igual que la tapa */
}


/* ===== INVITACIÓN ===== */
.invitation {
  position: relative;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 1.2s ease, transform 1.2s ease;
  pointer-events: none;
  overflow-y: visible;
  z-index: 5;
}
.invitation.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ===== IMAGEN FIJA ===== */
.invitation-cover {
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  inset: 0;
}
.invitation-cover img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
}
.invitation-cover.show { opacity: 1; }

 
/* Contenedor principal de la portada */
/* Esto asegura que la portada ocupe TODA la pantalla y deje ver la foto */
/* 1. El contenedor debe ser relativo para que los textos se peguen a él */

/* ===== DETALLES ===== */
.details {
  background-color: #F2EFEA;
  min-height: 50vh;
  padding: 50px 20px;
  font-size: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  width: 100%;
  position: relative;
}
.details-flower {
  width: clamp(400px, 45vw, 800px);
  height: auto;
}



.countdown-message {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 700;
  color: #453C30 ;
  text-align: center;
  margin: 20px auto 10px;
}

.love-message {
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  font-weight: 500;
  color: #444;
  max-width: 90%;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto;
}


/* ===== CUENTA REGRESIVA ===== */
.countdown {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 40px 10px;
  color: white;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  background: url('cosas/aaa.jpg') no-repeat center center;
  background-size: cover;
  min-height: 150px;
}

/* overlay para números */
.countdown::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 0;
}
.countdown-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-item .number {
  font-family: 'Kameron', serif;
  font-size: 10vw;
  font-weight: 700;
  min-width: 60px;
  text-align: center;
  color: white;
  padding: 0;
  background: none;
  box-shadow: none;
}
.countdown-item .label {
  margin-top: 5px;
  font-size: 4vw;
  font-weight: 600;
  text-align: center;
}

/* ===== CALENDARIO ===== */
.calendar {
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background-color: #F2EFEA;
  padding: 30px 0;
  position: relative;
}
.calendar img {
  max-width: 40%; /* antes era 40% */
  height: auto;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  border-radius: 10%;
  display: block;
  z-index: 1;
}

.calendar .add-calendar {
  display: inline-block;
  padding: 20px 45px;
  font-size: 20px;
  font-weight: 600;
  color: white;
  background-color: #A18575;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s ease, transform 0.2s ease;
  z-index: 2;
}
.calendar .add-calendar:hover {
  background-color: #453C30;
  transform: translateY(-2px);
}
/* ===== PADRES ===== */
.parents {
  background-color: #F2EFEA;
  padding: 60px 20px;
  text-align: center;
}

.parents h2 {
  font-family: 'Kameron', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 40px;
  color: #453C30;
}

.parents-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.parents-side {
  min-width: 220px;
}

.parents-side h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #444;
  font-weight: 600;
}

.parents-side p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

.parents-divider {
  font-size: 2.5rem;
  font-weight: bold;
  color: #453C30;
}
/* ===== RESPONSIVE PADRES ===== */
@media (max-width: 600px) {
  .parents-group {
    flex-direction: column;
    gap: 25px;
  }

  .parents-divider {
    font-size: 2rem;
  }
}

/* ===== UBICACIÓN ===== */
.location {
  background-color: #F2EFEA;
  padding: 70px 20px;
  text-align: center;
}

.location h2 {
  font-family: 'Kameron', serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #453C30;
  margin-bottom: 40px;
}

/* TARJETA */
.location-card {
  background-color: white;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);

  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* IMAGEN */
.location-card img {
  width: 100%;
  border-radius: 15px;
  object-fit: cover;
}

/* TEXTOS */
.location-card h3 {
  font-size: 1.6rem;
  color: #333;
  margin-top: 10px;
}

.location-date {
  font-family: 'Kameron', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #555;
}

.location-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: #444;
}

.location-address {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}
.location-flower {
  display: block;
  width: clamp(400px, 45vw, 800px);
  height: auto;
  margin: 40px auto 0;
}


/* MAPA */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: 15px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* BOTÓN */
.map-button {
  margin-top: 10px;
  align-self: center;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background-color: #A18575;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.map-button:hover {
  background-color: #453C30;
  transform: translateY(-2px);
}
/* ===== SECCIÓN ===== */
.rsvp-section {
  background: #F2EFEA;
  padding: 60px 20px;
  text-align: center;
}

.rsvp-section h2 {
  font-family: 'Kameron', serif;
  font-size: 2rem;
  color: #453C30;
  margin-bottom: 10px;
}

.rsvp-section p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 25px;
}

/* BOTÓN */
.rsvp-open-btn {
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  background-color: #A18575;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.rsvp-open-btn:hover {
  background-color: #453C30;
  transform: translateY(-2px);
}

/* ===== OVERLAY ===== */
.rsvp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items:flex-end;
  z-index: 9999;
}

.rsvp-overlay.show {
  display: flex;
}

/* ===== MODAL ===== */
.rsvp-modal {
  background: white;
  width: 90%;
  max-width: 420px;
  border-radius: 18px;
  padding: 25px 22px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);

  display: flex;
  flex-direction: column;
  gap: 15px;
}

.rsvp-modal h3 {
  text-align: center;
  font-size: 1.4rem;
  color: #333;
}

/* CAMPOS */
.rsvp-modal label {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
  gap: 6px;
}

.rsvp-modal input,
.rsvp-modal select,
.rsvp-modal textarea {
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: none;
}

/* BOTONES */
.rsvp-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.btn-cancel {
  flex: 1;
  padding: 12px;
  background: #ddd;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-confirm {
  flex: 1;
  padding: 12px;
  background: #A18575;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-confirm:hover {
  background: #453C30;
}


/* Mata cualquier elemento rebelde */
* {
  max-width: 100%;
}

@media (max-width: 320px) {

  .countdown-item .number {
    font-size: 12vw;
  }

  .countdown-item .label {
    font-size: 4.5vw;
  }

  .calendar img {
    max-width: 70%;
  }

  .calendar .add-calendar {
    padding: 14px 25px;
    font-size: 16px;
  }

  .location-card {
    padding: 20px 15px;
  }

  .map-container {
    height: 220px;
  }
  .box-center {
    font-size: 2.2rem; /* más pequeña para que no se corte */
  }
  .box-top {
    font-size: 1.5rem;
  }
  .box-bottom {
    font-size: 1.3rem;
  }
  
}
@media (max-width: 360px) {

  .details {
    padding: 40px 15px;
  }

  .details-flower {
    width: 300px;
  }

  .countdown {
    padding: 30px 10px;
  }

  .countdown-item .number {
    font-size: 11vw;
  }

  .calendar img {
    max-width: 70%;
  }

  .parents-side {
    min-width: auto;
  }
}
@media (max-width: 390px) {

  .countdown-item .number {
    font-size: 10vw;
  }

  .countdown-item .label {
    font-size: 4vw;
  }

  .calendar .add-calendar {
    font-size: 18px;
    padding: 18px 35px;
  }
  .calendar img {
    max-width: 70%;
  }
}
@media (max-width: 430px) {

  .location-card {
    max-width: 95%;
  }

  .map-container {
    height: 260px;
  }

  .rsvp-modal {
    width: 92%;
  }
  .calendar img {
    max-width: 70%;
  }
}
@media (max-width: 600px) {

  .details-flower {
    width: 320px;
  }

  .countdown {
    gap: 10px;
  }

  .parents-group {
    flex-direction: column;
  }

  .parents-divider {
    font-size: 2rem;
  }
  .calendar img {
    max-width: 70%;
  }
}
@media (max-width: 768px) {

  .location-card {
    max-width: 90%;
  }

  .calendar img {
    max-width: 70%;
  }
}
@media (max-width: 1024px) {

  .details {
    padding: 60px 30px;
  }

  .location-card {
    max-width: 80%;
  }
    .hero-sub {
    font-size: 1.2rem;
  }

  .hero-title {
    font-size: 4rem;
  }

  .hero-date {
    font-size: 1.3rem;
  }
}
