:root {
  --bg-1: #f8d7ff;
  --bg-2: #dce9ff;
  --bg-3: #d3fff4;
  --text-main: #2e2a40;
  --text-soft: #5e5775;
  --card: rgba(255, 255, 255, 0.65);
  --stroke: rgba(255, 255, 255, 0.6);
  --accent: #8c73ff;
  --accent-2: #ff7eb6;
  --shadow: 0 20px 60px rgba(63, 49, 117, 0.2);
}

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

html,
body {
  width: 100%;
  scroll-behavior: smooth;
  background: linear-gradient(140deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  overflow-x: hidden;
}

#particlesCanvas,
#fireworksCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#particlesCanvas {
  z-index: 0;
}

#fireworksCanvas {
  z-index: 3;
}

main {
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero__content,
.celebration__card,
.final__content {
  text-align: center;
  max-width: 900px;
}

.hero__tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.03em;
}

h1,
h2 {
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  margin-bottom: 0.75rem;
}

.hero__subtitle,
.celebration__card p,
.final__content p {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-soft);
}

.btn {
  margin-top: 2rem;
  border: 0;
  border-radius: 18px;
  padding: 0.95rem 1.6rem;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 25px rgba(140, 115, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px rgba(140, 115, 255, 0.45);
  filter: saturate(1.1);
}

.celebration__card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 30px;
  padding: clamp(1.2rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.celebration__card h2,
.gallery__header h2,
.final h2 {
  font-size: clamp(1.7rem, 5vw, 3.4rem);
  margin-bottom: 1rem;
}

.gallery {
  flex-direction: column;
  gap: 1.2rem;
}

.gallery__grid {
  width: min(1200px, 100%);
  min-height: 72svh;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(170px, 1fr));
}

.gallery__item {
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery__item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 25px 45px rgba(63, 49, 117, 0.28);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.final {
  position: relative;
}

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

.sparkles span {
  position: absolute;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  animation: sparkle 4s infinite ease-in-out;
}

.sparkles span:nth-child(1) { top: 20%; left: 12%; animation-delay: 0s; }
.sparkles span:nth-child(2) { top: 25%; right: 16%; animation-delay: 1.3s; }
.sparkles span:nth-child(3) { bottom: 18%; left: 18%; animation-delay: 2.1s; }
.sparkles span:nth-child(4) { bottom: 24%; right: 12%; animation-delay: 2.8s; }
.sparkles span:nth-child(5) { top: 45%; left: 50%; animation-delay: 0.8s; }

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

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

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(22, 15, 38, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(1000px, 100%);
  max-height: 88svh;
  border-radius: 18px;
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.4);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .gallery__grid {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(180px, 1fr));
  }

  .screen {
    padding: 1rem;
  }
}
