:root {
  --slate: #708090;
  --lavender-blush: #fff0f5;
  --pastel-lavender: #d8c4ff;
  --pink: #ffc7dd;
  --white: #ffffff;
  --text: #4d4d61;
  --card-shadow: 0 16px 36px rgba(112, 128, 144, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", "Trebuchet MS", "Segoe UI", sans-serif;
  background: linear-gradient(
    160deg,
    var(--lavender-blush),
    #f7f4ff 40%,
    #f1f3f8 100%
  );
  color: var(--text);
  overflow-x: hidden;
}

body.intro-active {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: "Great Vibes", "Brush Script MT", cursive;
  color: #5c4a73;
  letter-spacing: 0.5px;
}

section {
  padding: 80px 20px;
  position: relative;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(255, 255, 255, 0.85),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 15%,
      rgba(216, 196, 255, 0.35),
      transparent 40%
    ),
    linear-gradient(140deg, #fff7fb, #f5effd 45%, #ecf0f4);
}

.floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -30px;
  font-size: 18px;
  animation: floatUp linear infinite;
  opacity: 0.25;
  color: #cb9fe6;
}

@keyframes floatUp {
  from {
    transform: translateY(0) scale(0.8);
    opacity: 0.12;
  }
  30% {
    opacity: 0.35;
  }
  to {
    transform: translateY(-110vh) scale(1.2);
    opacity: 0;
  }
}

.hero-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text {
  background: rgba(255, 255, 255, 0.75);
  padding: 30px;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(5px);
}

.hero-text h1 {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  margin-bottom: 10px;
}

.typed-line {
  min-height: 32px;
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  color: #6b5b82;
  font-weight: 500;
  margin-top: 12px;
}

.music-wrap {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(145deg, var(--pastel-lavender), #f7cbe0);
  color: #4b4162;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 8px 20px rgba(151, 126, 178, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(151, 126, 178, 0.34);
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.52), transparent 42%),
    radial-gradient(circle at 80% 20%, rgba(216, 196, 255, 0.45), transparent 38%),
    linear-gradient(145deg, rgba(255, 240, 245, 0.97), rgba(244, 235, 252, 0.96));
  backdrop-filter: blur(4px);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro-overlay.hide {
  opacity: 0;
  visibility: hidden;
}

.intro-card {
  width: min(560px, 100%);
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 196, 255, 0.6);
  border-radius: 28px;
  padding: 34px 22px;
  box-shadow: 0 20px 44px rgba(103, 88, 125, 0.22);
}

.intro-tag {
  color: #7f6c90;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.intro-card h2 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 8px;
}

.intro-text {
  color: #6f5b7c;
  margin-bottom: 20px;
}

.intro-btn {
  font-size: 1rem;
  padding: 12px 24px;
}

.boy-wrap {
  display: flex;
  justify-content: center;
  align-items: end;
}

.boy {
  width: 250px;
  height: 320px;
  position: relative;
  animation: bob 3s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.head {
  width: 98px;
  height: 100px;
  border-radius: 50%;
  background: #ffd8c2;
  position: absolute;
  top: 30px;
  left: 78px;
  border: 2px solid #eeb89f;
}

.hair {
  width: 106px;
  height: 58px;
  background: #5d4b4b;
  border-radius: 56px 56px 20px 20px;
  position: absolute;
  top: 24px;
  left: 74px;
}

.eye {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a4352;
  position: absolute;
  top: 72px;
}

.eye.left {
  left: 106px;
}
.eye.right {
  left: 140px;
}

.blush {
  width: 12px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 128, 153, 0.35);
  position: absolute;
  top: 88px;
}

.blush.left {
  left: 95px;
}
.blush.right {
  left: 148px;
}

.smile {
  width: 18px;
  height: 10px;
  border-bottom: 2px solid #8f4d5b;
  border-radius: 0 0 12px 12px;
  position: absolute;
  top: 92px;
  left: 119px;
}

.body {
  width: 140px;
  height: 150px;
  background: linear-gradient(180deg, #acc4dc, #96adc5);
  position: absolute;
  border-radius: 16px;
  top: 122px;
  left: 56px;
}

.arm {
  width: 28px;
  height: 94px;
  background: #ffd8c2;
  position: absolute;
  top: 140px;
  border-radius: 16px;
}

.arm.left {
  left: 42px;
  transform: rotate(20deg);
}

.arm.right {
  left: 182px;
  transform: rotate(-15deg);
}

.flowers {
  position: absolute;
  top: 185px;
  left: 97px;
  font-size: 34px;
  transform: rotate(-10deg);
  filter: drop-shadow(0 4px 8px rgba(92, 74, 115, 0.3));
}

.wish-section {
  text-align: center;
}

.wish-box {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  padding: 34px 24px;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(216, 196, 255, 0.55);
  position: relative;
}

.wish-box::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(216, 196, 255, 0.2),
    rgba(255, 199, 221, 0.2)
  );
  z-index: -1;
  filter: blur(12px);
}

.wish-bubble {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  line-height: 1.7;
  color: #665070;
  animation: glowPulse 2.6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(216, 196, 255, 0.2);
  }
  50% {
    text-shadow: 0 0 14px rgba(216, 196, 255, 0.65);
  }
}

.gallery h2,
.letter h2,
.surprise h2 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 14px;
}

.section-subtitle {
  text-align: center;
  color: #7a6786;
  margin-bottom: 26px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.memory-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(112, 128, 144, 0.15);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid rgba(216, 196, 255, 0.42);
}

.memory-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 34px rgba(167, 131, 202, 0.28);
}

.memory-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.memory-card:hover img {
  transform: scale(1.06);
}

.memory-text {
  padding: 14px 14px 18px;
  color: #6a5a72;
  line-height: 1.5;
  font-size: 0.98rem;
}

.letter {
  overflow: hidden;
}

.letter-card {
  max-width: 780px;
  margin: 0 auto;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 240, 245, 0.95)
  );
  border-radius: 26px;
  padding: 34px 26px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(216, 196, 255, 0.48);
  position: relative;
  z-index: 1;
}

.letter-card p {
  font-size: clamp(1rem, 2.4vw, 1.16rem);
  line-height: 1.9;
  color: #5f4f66;
  white-space: pre-line;
  text-align: center;
}

.tiny-heart {
  position: absolute;
  color: rgba(212, 153, 203, 0.45);
  font-size: 18px;
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-20px) scale(1.2);
    opacity: 0.6;
  }
}

.surprise {
  text-align: center;
  padding-bottom: 110px;
}

.surprise-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px 20px;
  box-shadow: var(--card-shadow);
}

.final-message {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
  margin-top: 22px;
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  color: #5d466f;
  line-height: 1.4;
  font-weight: 600;
}

.final-message.show {
  opacity: 1;
  transform: translateY(0);
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.made-with-love {
  text-align: center;
  padding: 20px 12px 28px;
  font-size: 0.9rem;
  color: #8a7698;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .boy-wrap {
    order: 1;
  }

  .music-wrap {
    justify-content: center;
  }
}
