:root {
  --bg: #fff8fb;
  --text: #2f2a33;
  --muted: #756d79;
  --primary: #b47aea;
  --secondary: #74c8f3;
  --accent-pink: #f7b7d8;
  --accent-lilac: #d8c8ff;
  --accent-sky: #bde8ff;
  --card: rgba(255, 255, 255, 0.72);
  --border: rgba(180, 122, 234, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fff 0%, var(--bg) 45%, #f7f2ff 100%);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  margin: 0;
}

p {
  line-height: 1.7;
  color: var(--muted);
}

.bg-gradient-mesh,
.floral-pattern,
.sparkle-layer,
.heart-layer,
.noise,
.bg-orb {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-gradient-mesh {
  z-index: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(247, 183, 216, 0.45), transparent 30%),
    radial-gradient(circle at 85% 22%, rgba(189, 232, 255, 0.45), transparent 30%),
    radial-gradient(circle at 70% 78%, rgba(216, 200, 255, 0.38), transparent 36%),
    radial-gradient(circle at 22% 85%, rgba(255, 216, 238, 0.35), transparent 32%);
  animation: meshMove 14s ease-in-out infinite alternate;
}

.floral-pattern {
  z-index: 0;
  opacity: 0.26;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(180, 122, 234, 0.16) 0 3px, transparent 3px),
    radial-gradient(circle at 44px 44px, rgba(244, 173, 208, 0.18) 0 3px, transparent 3px),
    radial-gradient(circle at 68px 20px, rgba(116, 200, 243, 0.14) 0 2px, transparent 2px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
  animation: floralDrift 26s linear infinite;
}

.noise {
  opacity: 0.04;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 0;
}

.bg-orb {
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
  animation: floatOrb 12s ease-in-out infinite;
  width: 220px;
  height: 220px;
}

.orb-1 {
  top: -80px;
  left: -50px;
  background: var(--accent-pink);
}

.orb-2 {
  width: 320px;
  height: 320px;
  right: -70px;
  top: 35%;
  background: var(--accent-sky);
  animation-delay: 1.8s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  left: 35%;
  bottom: -120px;
  background: var(--accent-lilac);
  animation-delay: 3s;
}

.sparkle-layer {
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.9), 0 0 28px rgba(214, 140, 255, 0.45);
  animation: twinkle 3.2s ease-in-out infinite;
}

.s1 { top: 8%; left: 18%; animation-delay: 0s; }
.s2 { top: 14%; left: 82%; animation-delay: 0.6s; }
.s3 { top: 36%; left: 10%; animation-delay: 1.3s; }
.s4 { top: 40%; left: 76%; animation-delay: 2s; }
.s5 { top: 62%; left: 24%; animation-delay: 0.9s; }
.s6 { top: 70%; left: 88%; animation-delay: 1.8s; }
.s7 { top: 86%; left: 15%; animation-delay: 2.5s; }
.s8 { top: 90%; left: 62%; animation-delay: 1.1s; }

.heart-layer {
  z-index: 0;
  overflow: hidden;
}

.heart {
  position: absolute;
  color: rgba(180, 122, 234, 0.24);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  animation: floatHeart 11s linear infinite;
  user-select: none;
}

.h1 { left: 6%; bottom: -8%; font-size: 1rem; animation-delay: 0s; }
.h2 { left: 26%; bottom: -10%; font-size: 1.4rem; animation-delay: 2.2s; }
.h3 { left: 52%; bottom: -12%; font-size: 1.1rem; animation-delay: 4.8s; }
.h4 { left: 74%; bottom: -8%; font-size: 1.6rem; animation-delay: 1.3s; }
.h5 { left: 90%; bottom: -14%; font-size: 1rem; animation-delay: 3.5s; }

@keyframes meshMove {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -20px, 0) scale(1.03); }
}

@keyframes floralDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 88px 88px, -44px 44px, 22px -22px; }
}

@keyframes twinkle {
  0%, 100% { transform: scale(0.8); opacity: 0.35; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  15% { opacity: 0.35; }
  100% {
    transform: translateY(-120vh) translateX(18px) rotate(15deg);
    opacity: 0;
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
  }
  50% {
    transform: translateY(-25px) translateX(12px) scale(1.07);
  }
}

.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  z-index: 10;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 2px;
}

.nav-cta {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  background: #fff;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 20px 40px;
}

.hero-content h1 {
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.05;
}

.hero-content h1 span {
  color: var(--primary);
}

.eyebrow {
  font-size: 0.9rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.hero-date {
  margin: 18px 0 28px;
  font-weight: 500;
}

.invited-to {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8a7d93;
}

.guest-name {
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 3.2vw, 1.7rem);
  color: var(--primary);
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  font-size: 0.9rem;
  color: #867b8f;
  animation: bounceHint 1.6s infinite;
}

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

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

.section {
  padding: 90px 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 28px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-intro {
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.opening p,
.opening h2 {
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.grid-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.event-card,
.timeline-item > div,
.rsvp .container,
.location .container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 35px rgba(121, 92, 145, 0.08);
}

.card {
  padding: 28px;
  text-align: center;
  transition: transform 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
}

.nickname {
  color: var(--primary);
  font-weight: 700;
}

.countdown-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.countdown-wrap div {
  background: #ffffffc9;
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  padding: 18px 10px;
}

.countdown-wrap span {
  display: block;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
}

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

.event-card {
  padding: 26px;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--primary), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}

.dot {
  width: 14px;
  height: 14px;
  margin-top: 10px;
  margin-left: 15px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 8px rgba(180, 122, 234, 0.15);
}

.timeline-item > div {
  padding: 16px 20px;
}

.gallery-sub {
  text-align: center;
  margin-bottom: 25px;
}

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

.gallery-item {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(75, 58, 89, 0.12);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-item:hover img {
  transform: scale(1.1) rotate(1deg);
}

.gift .container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 35px rgba(121, 92, 145, 0.08);
  padding: 30px;
  text-align: center;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.gift-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 14px;
}

.gift-number {
  margin: 8px 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.gift-note {
  margin-top: 14px;
  font-weight: 600;
  color: #6d5978;
}

.attendee-admin-link {
  margin-top: 14px;
}

.attendee-admin-link a {
  color: var(--primary);
  font-weight: 600;
}

.map-wrap {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin: 16px 0 18px;
}

.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.rsvp .container,
.location .container {
  padding: 30px;
  text-align: center;
}

.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
  text-align: left;
}

.rsvp-form label {
  font-weight: 600;
  color: #5a4f62;
  margin-top: 8px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form button {
  margin-top: 8px;
  justify-self: start;
}

.rsvp-status {
  min-height: 24px;
  margin: 2px 0 0;
  color: #347c52;
  font-weight: 500;
}

.rsvp-status.error {
  color: #b03e5c;
}

.whatsapp-link {
  margin-top: 14px;
}

.btn {
  display: inline-block;
  border: none;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  transition: 0.35s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(110, 76, 139, 0.2);
}

.btn-primary {
  color: #fff;
  border: none;
  background: linear-gradient(120deg, var(--primary), #d68cff);
}

.footer {
  text-align: center;
  padding: 36px 16px 55px;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(65, 43, 86, 0.3);
  z-index: 20;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(180, 122, 234, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(180, 122, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 122, 234, 0); }
}

@media (max-width: 640px) {
  .countdown-wrap {
    grid-template-columns: repeat(2, 1fr);
  }

  .navbar {
    padding: 12px 14px;
  }

  .section {
    padding: 70px 0;
  }

  .floral-pattern {
    opacity: 0.18;
  }

  .heart {
    opacity: 0.65;
  }
}
