:root {
  --ink: #0e1220;
  --ink-soft: #3a4158;
  --paper: #fff7f0;
  --hot: #ff3d1f;
  --hot-deep: #e02810;
  --cyan: #00c2ff;
  --cyan-deep: #0090d0;
  --lime: #b8f000;
  --flag-green: #009246;
  --flag-red: #ce2b37;
  --gold: #ffe566;
  --flame: #ffb020;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(90% 70% at 0% 0%, #ff8a5c 0%, transparent 50%),
    radial-gradient(80% 60% at 100% 5%, #5ce1ff 0%, transparent 48%),
    radial-gradient(70% 50% at 80% 100%, #ffe566 0%, transparent 45%),
    radial-gradient(60% 40% at 10% 90%, #b8f000 0%, transparent 40%),
    linear-gradient(160deg, #fff4ec 0%, #ffe0d0 40%, #d8f4ff 100%);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.confetti {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  overflow: hidden;
  color: var(--ink);
}

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

.sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(7px * var(--s));
  height: calc(7px * var(--s));
  background: var(--gold);
  border-radius: 1px;
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 14px rgba(255, 229, 102, 0.95);
  animation: twinkle 2.8s var(--ease) var(--d) infinite;
}

.sparkle:nth-child(odd) {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 194, 255, 0.9);
}

.sparkle:nth-child(3n) {
  background: #ff6b4a;
  box-shadow: 0 0 14px rgba(255, 61, 31, 0.85);
}

.sparkle::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(var(--paper), transparent);
  opacity: 0.5;
  border-radius: inherit;
}

.hero__stage {
  position: relative;
  z-index: 3;
  width: min(100%, 64rem);
  display: grid;
  gap: clamp(1.35rem, 3.5vw, 2.75rem);
  align-items: center;
  justify-items: center;
}

.hero__media {
  width: min(100%, 20rem);
  line-height: 0;
}

.hero__photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58svh, 32rem);
  object-fit: contain;
  object-position: center;
}

.hero__content {
  text-align: center;
  max-width: 28rem;
}

.brand-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.75rem, 14vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  display: flex;
}

.brand__digit {
  display: inline-block;
  opacity: 0;
  transform: translateY(36px) rotate(-4deg);
  background: linear-gradient(135deg, #ff8a5c 0%, var(--hot) 35%, #ff6b00 65%, var(--cyan) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px rgba(255, 61, 31, 0.25));
  animation: popIn 0.9s var(--ease) 0.2s forwards, partyShine 4s ease-in-out 1.2s infinite;
}

.brand__digit--delay {
  animation-delay: 0.38s, 1.4s;
  transform: translateY(36px) rotate(4deg);
}

.candle {
  position: relative;
  width: 10px;
  height: clamp(2.6rem, 7vw, 3.8rem);
  margin-top: 0.15em;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.85s forwards;
}

.candle__body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 70%;
  background: linear-gradient(90deg, #fff, #ffe566 40%, #ffb020);
  border-radius: 2px 2px 1px 1px;
  box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.08);
}

.candle__wick {
  position: absolute;
  bottom: 68%;
  left: 50%;
  width: 2px;
  height: 8px;
  transform: translateX(-50%);
  background: #2a2218;
  border-radius: 1px;
}

.candle__flame {
  position: absolute;
  bottom: calc(68% + 6px);
  left: 50%;
  width: 14px;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 70%, #fff6c8 0%, var(--flame) 40%, #ff3d1f 75%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: blur(0.3px);
  animation: flicker 0.9s ease-in-out infinite alternate;
  box-shadow:
    0 0 14px rgba(255, 176, 32, 0.95),
    0 0 32px rgba(255, 61, 31, 0.5);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.5vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
  color: var(--ink);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 1s var(--ease) 0.55s forwards;
}

.hero__lead {
  font-size: clamp(1.02rem, 2.3vw, 1.18rem);
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 26rem;
  margin-inline: auto;
  margin-bottom: 1.6rem;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1s var(--ease) 0.7s forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 1s var(--ease) 0.85s forwards;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border-radius: 6px;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.35s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--hot);
  color: #fff;
  box-shadow: 0 10px 32px rgba(255, 61, 31, 0.4);
}

.btn--primary:hover {
  background: var(--hot-deep);
  box-shadow: 0 14px 36px rgba(255, 61, 31, 0.5);
}

.btn--ghost {
  background: rgba(14, 18, 32, 0.06);
  color: var(--ink);
  border: 1.5px solid rgba(14, 18, 32, 0.22);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(14, 18, 32, 0.1);
}

.rsvp .btn--primary {
  background: linear-gradient(135deg, var(--hot) 0%, #ff6b00 50%, var(--cyan-deep) 100%);
  box-shadow: 0 10px 32px rgba(255, 61, 31, 0.35);
}

.rsvp .btn--primary:hover {
  filter: brightness(1.08);
}

/* —— Sections —— */
.section {
  padding: clamp(4rem, 12vw, 7rem) clamp(1.5rem, 5vw, 3.5rem);
  max-width: 52rem;
  margin-inline: auto;
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 0.85rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.section__lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 28rem;
  margin-bottom: 2.5rem;
}

.details,
.rsvp {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.details.is-visible,
.rsvp.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.facts {
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(14, 18, 32, 0.12);
}

.facts__item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(14, 18, 32, 0.12);
  align-items: baseline;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.details.is-visible .facts__item {
  opacity: 1;
  transform: translateX(0);
}

.details.is-visible .facts__item:nth-child(1) { transition-delay: 0.08s; }
.details.is-visible .facts__item:nth-child(2) { transition-delay: 0.16s; }
.details.is-visible .facts__item:nth-child(3) { transition-delay: 0.24s; }
.details.is-visible .facts__item:nth-child(4) { transition-delay: 0.32s; }

.facts__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-deep);
}

.facts__item:nth-child(2) .facts__label { color: var(--flag-green); }
.facts__item:nth-child(3) .facts__label { color: var(--hot); }
.facts__item:nth-child(4) .facts__label { color: #c9a000; }

.facts__value {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
}

.rsvp {
  text-align: left;
  padding-top: 0;
}

.rsvp .section__eyebrow {
  color: var(--cyan-deep);
}

.footer {
  padding: 2rem clamp(1.5rem, 5vw, 3.5rem) 3rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0.8;
}

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

@keyframes popIn {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes partyShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
    opacity: 0.92;
  }
  50% {
    transform: translateX(-48%) scale(1.05) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-52%) scale(0.96) rotate(-1deg);
    opacity: 0.88;
  }
}

@keyframes twinkle {
  0%, 100% {
    transform: rotate(45deg) scale(0);
    opacity: 0;
  }
  35%, 55% {
    transform: rotate(45deg) scale(1);
    opacity: 1;
  }
}

@media (min-width: 860px) {
  .hero__stage {
    grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    justify-items: stretch;
  }

  .hero__media {
    width: 100%;
    max-width: 22rem;
    justify-self: end;
  }

  .hero__photo {
    max-height: min(78svh, 38rem);
  }

  .hero__content {
    text-align: left;
    justify-self: start;
    max-width: 30rem;
  }

  .hero__lead {
    margin-inline: 0;
  }

  .hero__cta {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand__digit,
  .candle,
  .hero__title,
  .hero__lead,
  .hero__cta,
  .details,
  .rsvp,
  .facts__item {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .candle__flame,
  .sparkle {
    animation: none;
  }

  .confetti {
    display: none;
  }
}
