/* =========================
   BASE GENERAL
========================= */

body {
  margin: 0;
  background: radial-gradient(circle at top, #f6e6da, #e8d4c4);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: Arial, sans-serif;
}

/* =========================
   INTRO
========================= */

#intro {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #f8e6da, #e8d4c4);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 999;
}

/* Dedicatoria */
.dedication {
  position: absolute;
  top: 15%;
  text-align: center;
}

.dedication-text {
  font-family: "Parisienne", cursive;
  font-size: 52px;
  color: #5a3d2b;
}

.name {
  color: #c2185b;
}

.dedication-line {
  width: 200px;
  height: 2px;
  margin: 10px auto 0;
  background: linear-gradient(to right, transparent, #c2185b, transparent);
}

/* =========================
   SOBRE
========================= */

.envelope {
  position: relative;
  width: 360px;
  height: 240px;
  cursor: pointer;
  animation: float 3s ease-in-out infinite;
}

.envelope-body {
  width: 100%;
  height: 100%;
  background: #f5d6c6;
  border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  position: absolute;
}

.flap {
  width: 100%;
  height: 100%;
  background: #e8bfae;
  clip-path: polygon(0 0, 50% 60%, 100% 0);
  transform-origin: top;
  transition: transform 1s ease;
  position: absolute;
}

.seal {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #ff6f91, #c2185b);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.open-text {
  position: absolute;
  bottom: -50px;
  width: 100%;
  text-align: center;
  color: #5a3d2b;
  opacity: 0.7;
}

/* =========================
   PAPEL CUADERNO
========================= */

.paper {
  width: 90%;
  max-width: 1200px;
  min-height: 750px;
  padding: 80px;
  border-radius: 14px;
  background-color: #fdfdfb;

  /* líneas */
  background-image: repeating-linear-gradient(
    to bottom,
    #fdfdfb 0px,
    #fdfdfb 34px,
    rgba(0, 140, 255, 0.13) 35px,
    #fdfdfb 36px
  );

  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  position: relative;
}

/* línea roja lateral */
.paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 90px;
  width: 2px;
  background: rgba(255, 255, 255, 0);
}

/* =========================
   ESCENA
========================= */

.scene {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tree-container {
  width: 45%;
  display: flex;
  justify-content: center;
}

svg {
  width: 400px;
}

/* =========================
   CARTA
========================= */

.card {
  width: 45%;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  line-height: 36px;
  color: #3a2a20;
  text-shadow: 0.5px 0.5px 0 rgba(0, 0, 0, 0.08);
}

/* Título centrado */
.card h2 {
  font-family: "Playfair Display", serif;
  font-size: 42px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

/* Nombre cálido */
.nombre {
  color: #c2185b;
}

/* Párrafos con sangría */
.card p {
  margin: 0 0 18px 0;
  text-indent: 25px;
}

/* Frase romántica */
.destacado {
  font-size: 28px;
  font-weight: 500;
  text-indent: 0;
  margin-top: 25px;
}

/* =========================
   PIE DE CARTA
========================= */

.letter-footer {
  margin-top: 60px;
  text-align: center;
}

.footer-divider {
  width: 260px;
  height: 1px;
  background: rgba(0, 0, 0, 0.25);
  margin: 0 auto 20px auto;
}

.counter {
  font-size: 20px;
}

#timer {
  font-size: 26px;
  font-weight: 600;
  margin-top: 5px;
}

.footer-text {
  margin-top: 15px;
  font-style: italic;
  text-indent: 0;
}

/* =========================
   SOMBRAS DEL ÁRBOL
========================= */

#hearts {
  filter: drop-shadow(0px 12px 20px rgba(0, 0, 0, 0.25));
}

/* =========================
   ANIMACIÓN
========================= */

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE IPHONE
========================= */

@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }

  .paper {
    padding: 40px 25px;
    min-height: auto;
  }

  .scene {
    flex-direction: column;
    align-items: center;
    gap: 50px;
  }

  .tree-container,
  .card {
    width: 100%;
  }

  svg {
    width: 100%;
    max-width: 320px;
  }

  /* Tipografía móvil */
  .card {
    font-size: 18px;
    line-height: 30px;
  }

  .card h2 {
    font-size: 32px;
  }

  .destacado {
    font-size: 22px;
  }

  #timer {
    font-size: 20px;
  }

  /* Ajustar líneas del cuaderno en móvil */
  .paper {
    background-image: repeating-linear-gradient(
      to bottom,
      #fdfdfb 0px,
      #fdfdfb 28px,
      rgba(0, 140, 255, 0.13) 29px,
      #fdfdfb 30px
    );
  }
}

.heart-leaf {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.romantic-btn {
  display: inline-block;
  padding: 16px 28px;
  background: linear-gradient(135deg, #ff6fa5, #ff3f81);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(255, 63, 129, 0.4);
  transition: all 0.3s ease;
}

.romantic-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(255, 63, 129, 0.6);
  background: linear-gradient(135deg, #ff3f81, #ff6fa5);
}

.romantic-btn:active {
  transform: scale(0.97);
}

.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  opacity: 0.25;
  pointer-events: none;
}
.paper {
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.15),
    inset 0 0 40px rgba(0, 0, 0, 0.03);
}
.paper {
  transform: rotate(-0.5deg);
}
#tree {
  filter: drop-shadow(0px 20px 20px rgba(0, 0, 0, 0.2));
}

.highlight {
  font-weight: 600;
  color: #a44c63;
}

.frase-central {
  font-size: 26px;
  text-align: center;
  font-weight: 500;
  text-indent: 0;
  margin: 30px 0;
}

.fuerte {
  font-weight: 600; /* no 700 para que no se vea exagerado */
  letter-spacing: 0.5px;
}

.fuerte {
  font-weight: 600;
  color: #7a3a45;
}

.frase-central {
  font-size: 26px;
  text-align: center;
  margin: 35px 0;
  text-indent: 0;
}

.impacto {
  font-weight: 600;
  position: relative;
  color: #7c3b4a;
  opacity: 0;
  transform: translateY(15px);
}

.impacto {
  filter: blur(4px);
}
