:root {
  --rose-50: #fff6f8;
  --rose-100: #ffe8ef;
  --rose-200: #ffd8e5;
  --rose-400: #f06a97;
  --rose-500: #e54f83;
  --rose-600: #cc336d;
  --gold-soft: #f2b458;
  --text-main: #4e2f3a;
  --text-soft: #7b5a67;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(127, 73, 95, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top left, var(--rose-100), var(--rose-50) 45%, #fff);
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  color: #592d3c;
  letter-spacing: 0.02em;
}

h2 {
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  left: 12%;
  bottom: -0.28rem;
  width: 76%;
  height: 2px;
  background: linear-gradient(90deg, rgba(204, 51, 109, 0), rgba(242, 180, 88, 0.95), rgba(204, 51, 109, 0));
  transform: scaleX(0.72);
  opacity: 0.72;
  transition: transform 0.8s ease;
}

.reveal.visible h2::after {
  transform: scaleX(1);
}

#petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8%;
  font-size: 0.9rem;
  opacity: 0.65;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  50% {
    transform: translateY(48vh) translateX(16px) rotate(90deg);
  }
  100% {
    transform: translateY(108vh) translateX(-18px) rotate(220deg);
    opacity: 0;
  }
}

.music-player {
  position: relative;
  width: min(380px, 100%);
  margin: 1.6rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(88, 31, 54, 0.86), rgba(120, 44, 80, 0.78));
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 36px rgba(65, 31, 45, 0.34);
  color: #fff5fa;
  transition: box-shadow 0.25s ease;
}

.music-player:hover {
  box-shadow: 0 20px 38px rgba(65, 31, 45, 0.4);
}

.player-cover {
  width: calc(100% - 12px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 0.2rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.player-content {
  flex: 1;
  min-width: 0;
}

.player-track {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: #fff3f8;
}

.player-controls {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.player-toggle {
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, filter 0.22s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.player-toggle:hover {
  transform: translateY(-1px) scale(1.04);
  filter: saturate(1.08);
}

.player-toggle.is-playing {
  transform: scale(0.96);
}

.player-toggle:active {
  transform: scale(0.9);
}

.player-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-progress {
  --progress: 0%;
  width: 100%;
  appearance: none;
  height: 7px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--gold-soft) var(--progress), rgba(255, 255, 255, 0.24) var(--progress));
  transition: background 0.15s linear;
}

.player-progress::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff8dc;
  border: 0;
  box-shadow: 0 0 0 2px rgba(121, 60, 83, 0.2);
}

.player-progress::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff8dc;
  border: 0;
}

.player-time {
  margin-top: 0.2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255, 234, 243, 0.84);
}

.music-section {
  background: linear-gradient(180deg, #fff9fc, #fff4f8);
}

.music-description {
  max-width: 720px;
  margin: 0.65rem auto 0;
  color: var(--text-soft);
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  background-image: linear-gradient(rgba(68, 35, 47, 0.38), rgba(68, 35, 47, 0.25)),
    radial-gradient(circle at 20% 20%, rgba(255, 236, 244, 0.95), rgba(255, 209, 225, 0.88) 40%, rgba(231, 150, 180, 0.78));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  color: var(--white);
}

.hero-kicker {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffe9f2;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 2.2rem;
}

.btn-surprise {
  border: 0;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  color: #fff4f8;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.95rem 2.3rem;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(95, 64, 18, 0.25);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.btn-surprise:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 28px rgba(170, 45, 98, 0.4);
}

.section {
  padding: 5.2rem 1.4rem;
  position: relative;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  margin-bottom: 1.5rem;
}

.message p,
.main-message p,
.tribute p,
.final-message p {
  max-width: 760px;
  margin: 0.72rem auto;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.17rem);
}

.section-description {
  margin: 0 auto 1.3rem;
  color: var(--text-soft);
}

.admiration-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  max-width: 700px;
  margin: 0 auto;
}

.admiration-list li {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(231, 153, 180, 0.25);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
}

.gallery-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fef9fb;
  cursor: pointer;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.55s ease, opacity 0.55s ease;
}

.gallery-item.visible {
  transform: translateY(0);
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.secondary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.extra-gallery .gallery-item img {
  min-height: 190px;
}

.carousel-section {
  background: linear-gradient(170deg, #fffdfd, #fff6fa);
}

.carousel-frame {
  margin: 1.4rem auto 0;
  width: min(980px, 100%);
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, #f8eef2, #f1e4eb);
  position: relative;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.carousel-image.active {
  opacity: 1;
}

.inspire {
  background: linear-gradient(170deg, #fff8fb, #fff);
}

.typewriter-line {
  min-height: 3.4rem;
  margin-top: 1.2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 600;
  color: var(--rose-600);
}

#typewriterText {
  letter-spacing: 0.01em;
}

.cursor {
  display: inline-block;
  margin-left: 0.08em;
  color: var(--gold-soft);
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.inspire-support {
  margin-top: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-soft);
}

.section-glow::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  top: 0.6rem;
  right: max(2rem, 8%);
  background: radial-gradient(circle, rgba(255, 205, 223, 0.35), rgba(255, 205, 223, 0));
  pointer-events: none;
  animation: glowFloat 8s ease-in-out infinite;
}

.section-glow::after {
  content: "✦";
  position: absolute;
  top: 2rem;
  left: max(1rem, 9%);
  color: rgba(216, 178, 110, 0.5);
  font-size: 1.3rem;
  animation: sparkle 4s ease-in-out infinite;
}

@keyframes glowFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(16px);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

.tribute {
  background: linear-gradient(170deg, #fffdfd, #fff6fa);
}

.tribute-highlight {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 6.8vw, 3.45rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--rose-600);
  text-shadow: 0 8px 20px rgba(204, 51, 109, 0.26);
  margin: 0.45rem auto 0.55rem;
}

.timeline-list {
  position: relative;
  max-width: 650px;
  margin: 2.5rem auto 0;
  padding-left: 2.5rem;
  text-align: left;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.7rem;
  width: 2px;
  background: linear-gradient(var(--rose-400), var(--gold-soft));
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 1.15rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 0 4px rgba(216, 178, 110, 0.24);
}

.timeline-item h3 {
  font-size: 1.45rem;
  font-weight: 600;
}

.main-message {
  background: linear-gradient(160deg, #fff, #fff8fa 62%, #fff2f7);
}

.main-message p {
  font-size: clamp(1.05rem, 2vw, 1.26rem);
  max-width: 700px;
}

.final-message {
  padding-bottom: 6rem;
  background: linear-gradient(180deg, #fff7fa, #fff);
}

.final-message h2 {
  margin-bottom: 0.6rem;
}

.final-message .love-line {
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--rose-500);
  font-weight: 600;
  margin-top: 1.3rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.95s ease, transform 0.95s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 17, 23, 0.78);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  width: min(92vw, 980px);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  transform: scale(0.94);
  transition: transform 0.35s ease;
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #5b3340;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .section {
    padding: 4.5rem 1rem;
  }

  .timeline-list {
    padding-left: 2.2rem;
  }

  .secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    line-height: 1.25;
  }

  .btn-surprise {
    width: 100%;
    max-width: 280px;
  }

  .timeline-item h3 {
    font-size: 1.25rem;
  }

  body {
    padding-bottom: 0;
  }

  .music-player {
    width: min(360px, 100%);
    padding: 0.85rem 0.85rem 0.8rem;
    border-radius: 20px;
  }

  .player-cover {
    width: min(220px, 100%);
    border-radius: 14px;
  }

  .player-track {
    font-size: 0.88rem;
  }

  .player-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .carousel-frame {
    width: min(520px, 100%);
    aspect-ratio: 4 / 5;
    border-radius: 18px;
  }

  .typewriter-line {
    min-height: 2.8rem;
    line-height: 1.25;
  }
}
