/* =========================================================
   INTRO OVERLAY — Sobre animado
   Hector & Nicole · 11 de julio de 2026
   ========================================================= */

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0D0B09;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.8rem;
  overflow: hidden;
}

#intro-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ----- Escena ----- */
.envelope-scene {
  position: relative;
  z-index: 1;
  perspective: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Contenedor del sobre ----- */
.envelope {
  position: relative;
  width: 340px;
  height: 220px;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* ----- Cuerpo ----- */
.env-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #2B2419 0%, #1A1710 100%);
  border: 1px solid rgba(201, 169, 110, 0.42);
  border-radius: 2px;
  z-index: 1;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(201, 169, 110, 0.06),
    inset 0 0 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* Líneas de doblado interiores (estilo sobre real) */
.env-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top left,
      transparent calc(50% - 0.5px),
      rgba(201, 169, 110, 0.13) 50%,
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(
      to top right,
      transparent calc(50% - 0.5px),
      rgba(201, 169, 110, 0.13) 50%,
      transparent calc(50% + 0.5px)
    );
}

/* ----- Solapa (flap) — rectangular, bisagra en la parte superior ----- */
.env-flap {
  position: absolute;
  top: 0;
  left: -1px;
  right: -1px;
  height: 55%;
  background: linear-gradient(to bottom, #312A1E 0%, #222018 100%);
  border: 1px solid rgba(201, 169, 110, 0.38);
  border-bottom-color: rgba(201, 169, 110, 0.18);
  border-radius: 2px 2px 0 0;
  transform-origin: top center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Sello dorado ----- */
.env-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 38% 38%, #DFC48C, #C9A96E 55%, #9E7638);
  border: 1px solid rgba(201, 169, 110, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #1C1A17;
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.7),
    inset 0 1px 3px rgba(255, 255, 255, 0.22);
  user-select: none;
  pointer-events: none;
}

/* ----- Tarjeta interior ----- */
.env-card {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 290px;
  height: 185px;
  background: #F0EBE3;
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  box-shadow:
    0 10px 48px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(28, 26, 23, 0.06);
}

.env-card__inner {
  text-align: center;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.env-card__inner::before,
.env-card__inner::after {
  content: '';
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(to right, transparent, #C9A96E, transparent);
  margin: 0 auto;
}

.env-card__names {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #1C1A17;
  margin: 0.3rem 0;
}

.env-card__date {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 0.63rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #5A4E3A;
}

.env-card__venue {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #7A6A50;
  margin-top: 0.1rem;
}

/* ----- Botón CTA ----- */
.intro-cta {
  position: relative;
  z-index: 1;
  background: none;
  border: 1px solid rgba(201, 169, 110, 0.32);
  color: rgba(201, 169, 110, 0.75);
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 0.72rem 1.85rem;
  border-radius: 999px;
  cursor: pointer;
  animation: intro-pulse 2.6s ease-in-out infinite;
  transition: color 0.25s, border-color 0.25s;
}

.intro-cta:hover,
.intro-cta:focus-visible {
  color: #C9A96E;
  border-color: rgba(201, 169, 110, 0.62);
  outline: none;
}

@keyframes intro-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
  .envelope {
    width: 270px;
    height: 178px;
  }

  .env-card {
    width: 230px;
    height: 150px;
  }

  .env-card__names {
    font-size: 1.25rem;
  }

  .env-card__date {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
  }

  .env-card__venue {
    font-size: 0.72rem;
  }

  .env-seal {
    width: 44px;
    height: 44px;
    font-size: 0.7rem;
  }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .intro-cta {
    animation: none;
    opacity: 1;
  }
}
