/* =========================
   GENERAL
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: #5e4055;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, #ffdce9, transparent 35%),
    radial-gradient(circle at bottom right, #ddd6ff, transparent 35%),
    linear-gradient(135deg, #fff8fb, #f8f4ff, #fff5ef);
}
/* =========================
   BACKGROUND
========================= */
.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.heart {
  position: absolute;
  bottom: -30px;
  font-size: 25px;
  color: rgba(214, 133, 170, 0.35);
  animation: floatHeart linear infinite;
}
@keyframes floatHeart {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) rotate(30deg);
    opacity: 0;
  }
}
/* =========================
   PAGE
========================= */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.page.hidden {
  display: none;
}
.content {
  width: 100%;
  max-width: 1000px;
  margin: auto;
}
/* =========================
   TYPOGRAPHY
========================= */
.handwritten {
  font-family: "Parisienne", cursive;
  font-weight: 400;
  color: #a85d82;
}
h1.handwritten {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.15;
}
.section-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 25px;
}
.small-heading {
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9c7a8f;
  margin-bottom: 15px;
}
.subtitle {
  margin-top: 20px;
  font-size: 1rem;
  color: #806579;
}
.instruction {
  margin-bottom: 30px;
  color: #94798b;
}
/* =========================
   LANDING BUTTON
========================= */
.heart-button {
  margin-top: 35px;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.75);
  color: #9e5579;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(160, 100, 140, 0.15);
  transition: 0.3s ease;
}
.heart-button:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 15px 35px rgba(160, 100, 140, 0.25);
}
/* =========================
   LETTER
========================= */
.letter-card {
  max-width: 700px;
  margin: 20px auto 30px;
  padding: 40px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(15px);
  box-shadow:
    0 15px 40px rgba(150, 100, 130, 0.12);
  text-align: left;
  line-height: 1.9;
  color: #624957;
}
/* =========================
   NEXT BUTTON
========================= */
.next-button {
  margin-top: 35px;
  padding: 12px 28px;
  border: 1px solid rgba(180, 110, 150, 0.25);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  color: #9d5f80;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: 0.3s ease;
}
.next-button:hover {
  transform: translateY(-3px);
  background: white;
  box-shadow:
    0 10px 25px rgba(170, 100, 140, 0.15);
}
/* =========================
   REASON CARDS
========================= */
.cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  perspective: 1000px;
}
.reason-card {
  height: 150px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}
.reason-card.flipped {
  transform: rotateY(180deg);
}
.reason-card .front,
.reason-card .back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 20px;
  backface-visibility: hidden;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  box-shadow:
    0 10px 25px rgba(150, 100, 130, 0.12);
  color: #80576d;
  font-size: 0.9rem;
}
.reason-card .back {
  transform: rotateY(180deg);
  background: rgba(255, 235, 244, 0.9);
}
/* =========================
   MEMORIES
========================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  max-width: 800px;
  margin: auto;
}
.photo-card {
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 15px 35px rgba(150, 100, 130, 0.12);
  transition: 0.3s ease;
}
.photo-card:hover {
  transform: translateY(-5px) rotate(1deg);
}
.photo-card img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 15px;
}
.photo-card figcaption {
  padding: 15px 5px 5px;
  font-size: 0.9rem;
  color: #77596b;
}
/* =========================
   TIMELINE
========================= */
.timeline-container {
  max-width: 700px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.timeline-event {
  padding: 25px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 10px 30px rgba(150, 100, 130, 0.1);
  transition: 0.3s ease;
}
.timeline-event:hover {
  transform: translateX(5px);
}
.timeline-event time {
  color: #a85d82;
  font-weight: 500;
}
.timeline-event p {
  margin-top: 8px;
  color: #75596b;
}
/* =========================
   IF YOU WERE
========================= */
.if-you-were-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: auto;
}
.if-card {
  padding: 30px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    0 10px 30px rgba(150, 100, 130, 0.1);
  transition: 0.3s ease;
}
.if-card:hover {
  transform: translateY(-5px);
}
.if-card h3 {
  margin-bottom: 12px;
  color: #a15e80;
  font-weight: 400;
}
.if-card p {
  color: #765a6d;
}
/* =========================
   GIFT BOX
========================= */
#gift-box {
  position: relative;
  width: 150px;
  height: 130px;
  margin: 60px auto 30px;
  cursor: pointer;
  transition: 0.5s ease;
}
.gift-box-body {
  position: absolute;
  left: 15px;
  bottom: 0;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  background: #e9a8c4;
  box-shadow:
    0 15px 30px rgba(150, 90, 120, 0.2);
}
.gift-box-body::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 100%;
  background: #c987a7;
}
.gift-lid {
  position: absolute;
  left: 5px;
  top: 20px;
  width: 140px;
  height: 30px;
  border-radius: 7px;
  background: #d991b0;
  z-index: 2;
  transition: 0.7s ease;
}
#gift-box.open .gift-lid {
  transform: translateY(-70px) rotate(-8deg);
}
#gift-box.open {
  transform: scale(1.05);
}
/* =========================
   SURPRISE MESSAGE
========================= */
#surprise-message {
  padding: 25px;
  font-family: "Parisienne", cursive;
  font-size: 2.5rem;
  color: #a85d82;
  animation: fadeIn 1s ease;
}
#surprise-message.hidden {
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* =========================
   FINAL
========================= */
.final-message {
  max-width: 650px;
  margin: 20px auto;
  line-height: 1.8;
  color: #76596b;
}
.signature {
  margin-top: 30px;
  font-family: "Parisienne", cursive;
  font-size: 3rem;
  color: #a85d82;
}
/* =========================
   MUSIC BUTTON
========================= */
#music-btn {
  position: fixed;
  right: 25px;
  top: 25px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  box-shadow:
    0 8px 25px rgba(150, 100, 130, 0.15);
  transition: 0.3s ease;
}
#music-btn:hover {
  transform: scale(1.1);
}
/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .page {
    padding: 50px 15px;
  }
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .if-you-were-cards {
    grid-template-columns: 1fr;
  }
  .letter-card {
    padding: 25px;
    font-size: 0.9rem;
  }
  .photo-card img {
    height: 350px;
  }
}
@media (max-width: 480px) {
  h1.handwritten {
    font-size: 3.2rem;
  }
  .section-title {
    font-size: 2.8rem;
  }
  .cards-container {
    grid-template-columns: 1fr;
  }
  .reason-card {
    height: 130px;
  }
  .photo-card img {
    height: 300px;
  }
  #surprise-message {
    font-size: 2rem;
  }
}