:root {
  --steel: #4A7FA5;
  --steel-dark: #2C5F80;
  --honey: #E8A832;
  --brown: #7A4A2A;
  --cream: #FEFAF2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: url("img/pasto.png") center 50% / contain repeat-x;
}

.space-bottom {
  height: 200px;
}

/* =================== */
/* VISTA 1: SOBRE */
/* =================== */

#envelope-view {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  padding: 140px 20px 20px;
}

#envelope-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0) 10%,
    rgba(255,255,255,0) 90%,
    rgba(255,255,255,1) 100%
  );
}

#envelope-view::after {
  content: "";
  display: block;
  height: 120px;
}

.envelope-wrap {
  position: relative;
  width: min(360px, 92vw);
  transform: translateY(150px);
}

.envelope-body {
  position: relative;
  overflow: visible;
  background: url("img/cartav2.png") center / contain no-repeat;
  width: 100%;
  min-height: 420px;
  padding: 110px 30px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.25));
}

.env-sticker {
  position: absolute;
  top: -130px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  z-index: 20;
}

.env-mini-title {
  position: absolute;
  top: -87px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 1000;
  color: #1F425C;
  opacity: 0.95;
  pointer-events: none;
  z-index: 5;
}

.env-title {
  font-family: 'Pacifico', cursive;
  font-size: 13px;
  color: var(--steel-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  top: -60px;
}

.env-name {
  font-family: 'Allura', cursive;
  font-size: 100px;
  color: #4A7FA5;
  text-align: center;
  letter-spacing: 1px;
  transform: translateY(-65px);
  text-shadow: 
    0.5px 0 0 #4A7FA5,
    -0.5px 0 0 #4A7FA5;
}

.open-btn {
  width: 80px;
  height: 80px;
  margin-top: -40px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.open-btn::before {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 117, 117, 0.55) 55%,
    rgba(232, 168, 50, 0.28) 35%,
    rgba(232, 168, 50, 0.12) 60%,
    transparent 80%
  );
  filter: blur(4px);
  animation: aura-strong 1.5s ease-in-out infinite;
  z-index: -1;
}

@keyframes aura-strong {
  0% { transform: scale(0.9); opacity: 0.65; }
  40% { opacity: 0.4; }
  70% { transform: scale(1.4); opacity: 0.25; }
  100% { transform: scale(1.9); opacity: 0; }
}

.env-hint {
  margin-top: 12px;
  font-size: 11px;
  color: var(--steel-dark);
  font-weight: 1000;
  letter-spacing: 1px;
  opacity: 0.85;
  animation: hint-blink 2s ease-in-out infinite;
}

@keyframes hint-blink {
  0%,100% { opacity: 0.75; }
  50% { opacity: 0.4; }
}

/* =================== */
/* VISTA 2: INVITACIÓN */
/* =================== */

#invitation-view {
  display: none;
  position: relative;
  z-index: 10;
  max-width: 600px;
  margin: 0 auto;

  padding: 110px 14px 60px; /* 🔥 aquí lo bajamos */

  min-height: 100vh;

  background-image: url("img/fondovista2.png");
  background-size: contain;
  background-repeat: repeat-y;
  background-position: top center;
  background-color: #FEFAF2;
}

#invitation-view.visible {
  display: block;
  animation: unfold 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes unfold {
  0% { opacity: 0; transform: scaleY(0.3) translateY(-30px); }
  60% { transform: scaleY(1.03); }
  100% { opacity: 1; transform: scaleY(1) translateY(0); }
}

#invitation-view::before,
#invitation-view::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 70px; /* 🔥 tamaño del difuminado */
  pointer-events: none;
  z-index: 20;
}

#invitation-view::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    #FEFAF2 0%,
    rgba(254, 250, 242, 0.8) 40%,
    rgba(254, 250, 242, 0) 100%
  );
}

#invitation-view::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    #FEFAF2 0%,
    rgba(254, 250, 242, 0.8) 40%,
    rgba(254, 250, 242, 0) 100%
  );
}


/* TEXTOS SUPERIORES */

.top-text {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  color: #2C5F80;
  letter-spacing: 1px;
  line-height: 1.6;
  text-align: center;
  font-weight: 1000;
  margin-bottom: 20px;
}

.invito {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: #4A7FA5;
  text-align: center;
  font-weight: 1000;
}

.primer-ano {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #2C5F80;
  text-align: center;
  margin-top: 5px;
}

.nombre {
  font-family: 'Parisienne', cursive;
  font-size: 70px;
  color: #FDCC5E;
  text-align: center;
  margin-top: 5px;
}

.acompananos {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: #4A7FA5;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 3px;
  font-weight: 1000;
  margin-bottom: 20px;
}

/* IMÁGENES */

.img-winniecayendo {
  position: absolute;

  top: 10px;   /* 🔥 ajusta altura */
  left: 10px; /* 🔥 lo pone al lado derecho del texto */

  width: 120px;

  z-index: 5;
  pointer-events: none;

  animation: flotando 2.5s ease-in-out infinite alternate;
}

.w1 {
  left: 10px;
}

.w2 { /* KANGU */
  left: auto;
  right: 275px;
  top: 300px;
  width: 65px;

  animation: flotando-derecha 3s ease-in-out infinite alternate;
}


@keyframes flotando-derecha {
  from {
    transform: scaleX(-1) translateY(-5px) rotate(-5deg);
  }
  to {
    transform: scaleX(-1) translateY(10px) rotate(5deg);
  }
}

.w3 {     /* IGOR */
  animation-duration: 2.2s;
  left: auto;
  right: 10px;
  top: 550px;
  width: 75px;
}

.w4 { /* PIGGLET */
  animation-duration: 2.8s;
  left: auto;   /* 🔥 clave */
  right: 5px;
  width: 130px;
    top: 150px;   /* 🔥 antes era 10px */

}

@keyframes flotando {
  from {
    transform: translateY(-5px) rotate(-5deg);
  }
  to {
    transform: translateY(10px) rotate(5deg);
  }
}

.img-main {
  width: 40%;
  border-radius: 10px;
  display: block;
  margin: -20px auto 10px;
}

/* FECHA */

.fecha-elegante {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: -10px;
}

.lado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0.4;
}

.linea {
  width: 85%;
  height: 2px;
  background: #2C5F80;
  opacity: 0.4;
}

.mes,
.hora {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #2C5F80;
  font-weight: 900;
}

.centro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 -30px;
}

.dia {
  font-family: 'Cinzel', serif;
  font-size: 38px;
  font-weight: 700;
   color: #1D3F55;
  margin: 0;
  transform: translateY(-27px);
}

.curva-svg {
  width: 120px;
  height: 50px;
  margin-bottom: 0;
}

.curva-svg text {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  letter-spacing: 3px;
  font-weight: 700;
  fill: #666;
}

/* ============================= */
/* PARTE BAJA */
/* ============================= */

.bottom-section {
  text-align: center;
  margin-top: 10px;
  padding: 0 8px 30px;
}

/* separador simple, sin corazones */
.bottom-section .divider-fancy {
  width: 72%;
  height: 1px;
  background: linear-gradient(to right, transparent, #b9a78f, transparent);
  margin: 25px auto 22px;
}

/* DIRECCIÓN */

.address {
  margin: 0 auto 24px;
  max-width: 430px;
  text-align: center;
}

.dir-text {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 17px;
  letter-spacing: 4px;
  color: #2C5F80;
  font-weight: 600;
  margin-bottom: 12px;
}

.dir-title {
  margin: 0;
  font-family: 'Allura', cursive;
  font-size: 30px;
    font-weight: 600;
  line-height: 1.15;
  color: #6e675f;
}

/* puntos simples, sin corazón */
.divider-dots {
  width: 78%;
  margin: 22px auto 0;
  height: 12px;
  background-image: radial-gradient(circle, #b9a78f 2px, transparent 2px);
  background-size: 16px 12px;
  background-repeat: repeat-x;
  background-position: center;
}

/* MAPA INTERACTIVO */
.map-card {
  width: 100%;
  margin: 28px auto 30px;
  border: 4px solid rgba(165, 150, 120, 0.65);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.55);
}

.map-iframe {
  width: 100%;
  height: 210px;
  border: none;
  display: block;
  background: #e8edd5;
}
/* CONTACTO */

.contact-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 700;
  color: #2C5F80;
  margin: 10px auto 22px;
  line-height: 1.7;
}

.contact-row-new {
  display: grid;
  grid-template-columns: 90px 1fr 24px 1fr 90px;
  align-items: center;
  gap: 4px;
  max-width: 520px;
  margin: 0 auto 22px;
}

.contact-character {
  width: 92px;
  height: auto;
  object-fit: contain;
}

.contact-info span {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #6e675f;
  line-height: 1;
}

.contact-info p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: #6e675f;
  margin-top: 6px;
}

.contact-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.contact-divider span {
  width: 2px;
  height: 28px;
  background-image: radial-gradient(circle, #b9a78f 2px, transparent 2px);
  background-size: 2px 8px;
  background-repeat: repeat-y;
}

.contact-divider b {
  display: none;
}

/* FOOTER */

.footer-text {
  font-family: 'Allura', cursive;
  font-size: 45px;
  color: #2C5F80;
  font-weight: 700;
  margin: 8px 0 2px;
}

.footer-divider {
  width: 42%;
  height: 1px;
  background: linear-gradient(to right, transparent, #b9a78f, transparent);
  margin: 0 auto 12px;
}

.footer-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  color: #6e675f;
  line-height: 1.45;
  letter-spacing: 1px;
  margin-bottom: 0;
  opacity: 0.85;
}

/* CONFETTI */

.confetti-area {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}