/* ============ RESET ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============ BASE ============ */
html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Schoolbell', cursive;
  overflow: hidden;
}

/* ============ STAGES ============ */
.stage {
  position: fixed;
  inset: 0;
  display: none;
}

.stage.active {
  display: block;
}

.stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ============ PAGE 1 ============ */
#stage-envelope {
  background: url("../assets/bg-firstpage.png") center / cover no-repeat;
}

/* ✉️ ENVELOPE FINAL POSITION (LEFT) */
.envelope-left {
  position: absolute;
  left: 8%;
  top: 50%;
  width: min(720px, 70vw);
  transform: translate(-120%, -50%);
  opacity: 0;
  z-index: 4;
  animation: envelopeIn 1.2s ease-out forwards;
}

.envelope-img {
  width: 150%;
  display: block;
}

.envelope-text {
  position: absolute;
  inset: 0;
  padding: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(18px, 2.5vw, 26px);
}

/* 🌸 FLOWERS FINAL POSITION (RIGHT) */
.flower-right {
  position: absolute;
  right: 35%;
  bottom: 25%;
  width: min(420px, 35vw);
  transform: translateX(120%);
  opacity: 0;
  z-index: 3;
  animation: flowerIn 1.4s ease-out forwards;
}

/* Button */
.open-btn {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 30px;
  border-radius: 999px;
  background: none;
  border: 1px solid rgba(255,255,255,.85);
  color: #fff;
  cursor: pointer;
  z-index: 6;
}

/* Animations */
@keyframes envelopeIn {
  to {
    transform: translate(0, -50%);
    opacity: 1;
  }
}

@keyframes flowerIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============ PAGE 2 ============ */
.stage-letter {
  background: url("../assets/bg-paper.png") center / cover no-repeat;
}

.letter-scene {
  position: relative;
  width: min(1200px, 100vw);
  height: 100svh;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.envelope-open {
  width: 100%;
  max-height: 80%;
  transform: translateY(-10%);
}

.letter {
  position: absolute;
  bottom: 26%;
  width: 75%;
  text-align: center;
}

.letter-line {
  font-size: clamp(32px, 6vw, 44px);
  color: #8a1f1f;
}

.letter-main {
  font-family: 'Homemade Apple', cursive;
  font-size: clamp(40px, 8vw, 70px);
  color: #8a1f1f;
  margin-bottom: 28px;
}

/* Buttons */
.actions button {
  margin: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.btn-yes {
  background: #fff;
  color: #6b1b0f;
}

.btn-no {
  background: #e6e2dc;
}

/* 🌸 PAGE 2 FULLSCREEN FLOWERS */
.flowers-overlay {
  position: fixed;
  inset: 0;
  background: url("../assets/flowers-front.png") center / cover no-repeat;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
}

.flowers-overlay:not(.hidden) {
  opacity: 1;
}

.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 600px) {
  .envelope-left {
    width: 85vw;
    left: 4%;
  }

  .flower-right {
    width: 50vw;
    right: 2%;
  }

  .letter {
    width: 85%;
    bottom: 22%;
  }
}
