/* ============================================
   HERO — the sealed envelope opening
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 20px 80px;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 6px;
  transform: rotate(-2deg);
  display: inline-block;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  color: var(--maroon-deep);
  line-height: 1.08;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.hero-title em {
  font-style: italic;
  color: var(--rose);
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 46px;
  line-height: 1.6;
}

/* envelope */
.envelope-wrap {
  perspective: 1400px;
  margin-bottom: 6px;
}
.envelope {
  width: 280px;
  height: 190px;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.envelope:hover {
  transform: translateY(-4px);
}
.env-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--paper-soft), var(--paper-dark));
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-page);
  overflow: hidden;
  z-index: 1;
}
.env-body::before {
  /* bottom triangle fold */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent 49%, rgba(59, 42, 30, 0.05) 50%);
  clip-path: polygon(0 100%, 50% 40%, 100% 100%);
}
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(200deg, var(--maroon), var(--maroon-deep));
  clip-path: polygon(0 0, 100% 0, 50% 78%);
  transform-origin: top center;
  transition: transform 0.9s cubic-bezier(0.7, -0.2, 0.3, 1.3);
  z-index: 3;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
.envelope.open .env-flap {
  transform: rotateX(180deg);
}
.env-seal {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--rose), var(--maroon) 70%);
  box-shadow:
    inset 0 -3px 6px rgba(0, 0, 0, 0.3),
    0 3px 8px rgba(74, 22, 32, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-family: var(--font-hand);
  font-size: 1.3rem;
  font-weight: 700;
  z-index: 4;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.envelope.open .env-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
}
.env-letter {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 20px;
  height: 150px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid rgba(59, 42, 30, 0.3);
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(74, 22, 32, 0.2), 0 0 0 1px rgba(59, 42, 30, 0.1);
  transition:
    opacity 0.8s ease 0.4s,
    visibility 0s linear 1.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 16px;
  text-align: center;
}
.envelope.open .env-letter {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.8s ease 0.4s,
    visibility 0s linear 0.4s;
}
.env-letter p {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--maroon-deep);
  line-height: 1.5;
}

.hero-hint {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.5; }
}
.envelope-wrap.open + .hero-hint {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.scroll-indicator {
  margin-top: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease 0.8s, visibility 0s linear 1.4s;
}
.scroll-indicator svg {
  width: 28px;
  height: 28px;
  color: var(--gold);
  animation: bounceDown 1.8s ease-in-out infinite;
}
.envelope-wrap.open ~ .scroll-indicator {
  opacity: 0.8;
  visibility: visible;
  transition: opacity 0.6s ease 0.8s, visibility 0s linear 0.8s;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* burst hearts on open — small, tasteful */
.burst-particle {
  position: fixed;
  z-index: 1500;
  pointer-events: none;
  top: 50%;
  left: 50%;
}

@media (min-width: 900px) {
  .hero {
    padding: 100px 20px 50px;
  }
}

@media (max-width: 768px) {
  .envelope {
    width: 240px;
    height: 164px;
  }
  .env-letter {
    height: 128px;
    bottom: 18px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.1rem;
  }
}
