* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #55243b;
  --pink: #f8bfd5;
  --rose: #d84f83;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 246, 249, 0.9), transparent 58%),
    radial-gradient(circle at 12% 18%, #ffe1ec 0 2px, transparent 3px),
    radial-gradient(circle at 84% 78%, #ffe1ec 0 2px, transparent 3px),
    var(--pink);
  background-size: auto, 38px 38px, 44px 44px, auto;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
}

main {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.5rem, 7vw, 5.5rem);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 2rem;
  background: rgba(255, 248, 251, 0.73);
  box-shadow: 0 24px 70px rgba(132, 45, 80, 0.16), inset 0 0 0 8px rgba(255, 255, 255, 0.27);
  backdrop-filter: blur(8px);
}

.floral-corners {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #ce7894;
  opacity: 0.68;
  pointer-events: none;
}

.background-heart {
  position: fixed;
  z-index: 0;
  top: 50%;
  left: 50%;
  color: #e879a0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(15rem, 42vw, 34rem);
  line-height: 1;
  opacity: 0.1;
  pointer-events: none;
  transform: translate(-50%, -52%);
}

main::before,
main::after {
  position: absolute;
  left: 50%;
  width: min(78%, 560px);
  height: 1px;
  content: "";
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(189, 49, 95, 0.45), transparent);
}

main::before {
  top: 1.8rem;
}

main::after {
  bottom: 1.8rem;
}

h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.8), 0 12px 30px rgba(153, 43, 86, 0.13);
}

.signature {
  position: relative;
  z-index: 1;
  margin: 2rem 0 0;
  color: #87445f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.07em;
}

.signature-heart {
  display: inline-block;
  margin-left: 0.25em;
  font-size: 1.15em;
  letter-spacing: 0;
  vertical-align: -0.08em;
}

.credit {
  position: fixed;
  z-index: 1;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  color: rgba(85, 36, 59, 0.68);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.sparkle {
  position: fixed;
  z-index: 0;
  color: #fff8fb;
  font-family: Arial, sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  text-shadow: 0 2px 12px rgba(196, 57, 107, 0.28);
  pointer-events: none;
  animation: twinkle 3.2s ease-in-out infinite;
}

.sparkle-one {
  top: 24%;
  right: 18%;
}

.sparkle-two {
  bottom: 22%;
  left: 17%;
  font-size: 1.7rem;
  animation-delay: 1.4s;
}

.sparkle-three,
.sparkle-four,
.sparkle-five,
.sparkle-six {
  position: fixed;
  z-index: 0;
  color: #fffafc;
  font-family: Arial, Helvetica, sans-serif;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(196, 57, 107, 0.35);
  animation: twinkle 3.8s ease-in-out infinite;
}

.sparkle-three {
  top: 17%;
  left: 24%;
  font-size: 1rem;
  animation-delay: 0.7s;
}

.sparkle-four {
  top: 70%;
  right: 16%;
  font-size: 1.2rem;
  animation-delay: 2s;
}

.sparkle-five {
  top: 43%;
  left: 8%;
  font-size: 0.8rem;
  animation-delay: 1.2s;
}

.sparkle-six {
  right: 9%;
  bottom: 37%;
  font-size: 0.9rem;
  animation-delay: 2.7s;
}

.heart {
  position: fixed;
  z-index: 0;
  bottom: -2rem;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(196, 57, 107, 0.2);
  animation: float-heart 9s ease-in infinite;
}

.heart-one {
  left: 13%;
}

.heart-two {
  left: 31%;
  font-size: 0.9rem;
  animation-delay: 3.2s;
}

.heart-three {
  right: 29%;
  font-size: 1rem;
  animation-delay: 1.8s;
}

.heart-four {
  right: 12%;
  animation-delay: 5.1s;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.65;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes float-heart {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-8deg);
  }

  15% {
    opacity: 0.72;
  }

  80% {
    opacity: 0.58;
  }

  100% {
    opacity: 0;
    transform: translate3d(18px, -110vh, 0) rotate(12deg);
  }
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem;
  }

  main {
    border-radius: 1.5rem;
    padding: 4rem 1.5rem;
  }

  h1 {
    font-size: clamp(2rem, 9.5vw, 3.5rem);
    letter-spacing: -0.055em;
  }

  .sparkle-one {
    top: 16%;
    right: 9%;
  }

  .sparkle-two {
    bottom: 17%;
    left: 8%;
  }

  .sparkle-three {
    top: 14%;
    left: 17%;
  }

  .sparkle-four {
    top: 76%;
    right: 9%;
  }

  .sparkle-five {
    top: 42%;
    left: 4%;
  }

  .sparkle-six {
    right: 4%;
    bottom: 36%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
