:root {
  color-scheme: light;
  --rose-100: #fff1f4;
  --rose-200: #ffd9e1;
  --rose-300: #ffb6c6;
  --rose-500: #ff6b8a;
  --coral-500: #ff6f61;
  --berry-700: #7a1d36;
  --berry-800: #5c1428;
  --cream: #fff8f1;
  --ink: #2f1a22;
  --shadow: rgba(92, 20, 40, 0.2);
  --glow: rgba(255, 107, 138, 0.3);
  --gradient: linear-gradient(135deg, #fff6f8 0%, #ffe3ec 45%, #fff3ea 100%);
  --slideshow-tint: linear-gradient(
    120deg,
    rgba(255, 182, 198, 0.45) 0%,
    rgba(255, 111, 97, 0.25) 45%,
    rgba(255, 248, 241, 0.45) 100%
  );
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Work Sans", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--gradient);
  color: var(--ink);
  font-family: var(--font-body);
  position: relative;
  overflow-x: hidden;
}

.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--gradient);
}

.slide {
  position: absolute;
  inset: 0;
  background-color: #f7d6df;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.4s ease;
  filter: saturate(1.05) brightness(0.92);
  transform: scale(1);
}

.slide.is-active {
  opacity: 1;
}

.slideshow-tint {
  position: absolute;
  inset: 0;
  background: var(--slideshow-tint);
  opacity: 0.75;
  box-shadow: inset 0 0 160px rgba(47, 26, 34, 0.2);
}

.particle-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 45vw;
  height: 45vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe0e7, #ffbed0 70%);
  filter: blur(8px);
  opacity: 0.75;
  animation: float 16s ease-in-out infinite;
}

.blob-one {
  top: -12vw;
  left: -8vw;
}

.blob-two {
  bottom: -18vw;
  right: -6vw;
  background: radial-gradient(circle at 60% 40%, #ffe7cf, #ffb6c6 70%);
  animation-delay: -6s;
}

.sparkle {
  position: absolute;
  inset: 12% 10% auto auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 65%);
  opacity: 0.6;
  filter: blur(2px);
  animation: pulse 8s ease-in-out infinite;
}

.card {
  position: relative;
  z-index: 3;
  width: min(720px, 100%);
  padding: clamp(28px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  box-shadow: 0 30px 80px var(--shadow);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.layout {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
}

.side-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.thumb {
  width: clamp(110px, 14vw, 160px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(92, 20, 40, 0.25);
  background: rgba(255, 255, 255, 0.6);
}

.thumb:nth-child(1) {
  transform: rotate(-2deg);
}

.thumb:nth-child(2) {
  transform: rotate(1deg);
}

.thumb:nth-child(3) {
  transform: rotate(-1.5deg);
}

.hero {
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--berry-700);
  margin: 0 0 16px;
  font-weight: 600;
}

h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--berry-800);
  line-height: 1.08;
}

.subhead {
  margin: 0 auto;
  max-width: 560px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
  color: rgba(47, 26, 34, 0.82);
}

.actions {
  margin: 36px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
}

.btn {
  border: none;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral-500), var(--rose-500));
  color: white;
  box-shadow: 0 12px 30px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-ghost {
  background: transparent;
  color: var(--berry-800);
  border: 1.5px solid rgba(122, 29, 54, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 107, 138, 0.12);
}

.btn:focus-visible {
  outline: 3px solid rgba(255, 111, 97, 0.4);
  outline-offset: 3px;
}

.celebration {
  margin-top: 28px;
  text-align: center;
  animation: rise 0.6s ease forwards;
}

.celebration h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--berry-800);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.celebration p {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1.05rem;
}

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

.particle-heart {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  transform: rotate(-45deg);
  animation: float-hearts var(--duration, 14s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.7;
  filter: drop-shadow(0 6px 12px rgba(255, 107, 138, 0.2));
}

.particle-heart::before,
.particle-heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 107, 138, 0.35);
  border-radius: 50%;
}

.particle-heart::before {
  top: -50%;
  left: 0;
}

.particle-heart::after {
  left: 50%;
  top: 0;
}

.butterfly {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: calc(var(--size) * 0.6);
  animation: flutter var(--duration, 12s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.75;
}

.butterfly::before,
.butterfly::after {
  content: "";
  position: absolute;
  top: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 235, 241, 0.95),
    rgba(255, 126, 155, 0.6) 65%,
    rgba(255, 107, 138, 0.2) 100%
  );
  border-radius: 70% 30% 70% 30%;
}

.butterfly::before {
  left: 0;
  transform-origin: right center;
  animation: wing-left 0.7s ease-in-out infinite alternate;
}

.butterfly::after {
  right: 0;
  transform-origin: left center;
  animation: wing-right 0.7s ease-in-out infinite alternate;
}

.butterfly-body {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 70%;
  background: rgba(92, 20, 40, 0.55);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255, 107, 138, 0.4);
}

.heart {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  transform: rotate(-45deg);
  animation: drift 10s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.8;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 107, 138, 0.45);
  border-radius: 50%;
}

.heart::before {
  top: -50%;
  left: 0;
}

.heart::after {
  left: 50%;
  top: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.burst-heart {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: rotate(-45deg);
  animation: burst 900ms ease-out forwards;
  pointer-events: none;
}

.burst-heart::before,
.burst-heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 107, 138, 0.8);
  border-radius: 50%;
}

.burst-heart::before {
  top: -50%;
  left: 0;
}

.burst-heart::after {
  left: 50%;
  top: 0;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(18px) translateX(12px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px) rotate(-45deg);
  }
  50% {
    transform: translateY(-14px) rotate(-45deg);
  }
}

@keyframes float-hearts {
  0%,
  100% {
    transform: translateY(0px) rotate(-45deg);
  }
  50% {
    transform: translateY(-24px) rotate(-45deg);
  }
}

@keyframes flutter {
  0%,
  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }
  50% {
    transform: translate(18px, -12px) rotate(2deg);
  }
}

@keyframes wing-left {
  from {
    transform: rotate(0deg) scaleX(1);
  }
  to {
    transform: rotate(12deg) scaleX(0.85);
  }
}

@keyframes wing-right {
  from {
    transform: rotate(0deg) scaleX(1);
  }
  to {
    transform: rotate(-12deg) scaleX(0.85);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes burst {
  0% {
    transform: translate(0, 0) scale(0.6) rotate(-45deg);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(1) rotate(-45deg);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
  }

  .layout {
    flex-direction: column;
  }

  .side-gallery {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .thumb {
    width: clamp(90px, 28vw, 120px);
  }

  .subhead {
    color: rgba(47, 26, 34, 0.9);
  }
}

@media (max-width: 640px) {
  body {
    padding: 18px;
  }

  .actions {
    margin-top: 28px;
    gap: 12px;
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
  }

  .btn-ghost {
    width: auto;
    min-width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .btn {
    transition: none;
  }
}
