:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #151515;
  color: #fff7ff;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.rsvp-page {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(21, 21, 21, 0) 0%, #151515 96%),
    #151515;
}

.rsvp-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  gap: 36px;
  align-items: center;
  overflow: hidden;
  padding: 48px 6vw;
  background:
    url("/assets/mariah-rsvp/birthday-candles-hero.png") right center / cover no-repeat,
    #151515;
}

.rsvp-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: 32px 0;
}

.invite-line {
  margin: 0 0 14px;
  color: #dfa1e7;
  font-size: 2.4rem;
  font-weight: 850;
  line-height: 1;
}

.rsvp-copy h1 {
  max-width: 620px;
  margin: 0;
  color: #fff7ff;
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 0.95;
}

.rsvp-lede {
  max-width: 520px;
  margin: 22px 0 0;
  color: rgba(255, 247, 255, 0.82);
  font-size: 1.22rem;
  line-height: 1.5;
}

.party-details {
  display: grid;
  max-width: 570px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 30px 0 0;
  overflow: hidden;
  border: 1px solid rgba(160, 236, 232, 0.32);
  border-radius: 8px;
  background: rgba(160, 236, 232, 0.28);
}

.party-details div {
  min-height: 104px;
  padding: 16px;
  background: rgba(20, 20, 20, 0.72);
}

.party-details dt {
  margin: 0 0 8px;
  color: #9fe9e5;
  font-size: 0.84rem;
  font-weight: 850;
}

.party-details dd {
  margin: 0;
  color: #fff7ff;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.28;
}

.rsvp-jump,
.submit-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #9fe9e5;
  color: #172124;
  font-weight: 900;
  text-decoration: none;
}

.rsvp-jump {
  margin-top: 28px;
  padding: 12px 20px;
}

.share-note {
  max-width: 480px;
  margin: 16px 0 0;
  color: rgba(255, 247, 255, 0.68);
  line-height: 1.5;
}

.rsvp-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  align-self: center;
  border: 1px solid rgba(255, 247, 255, 0.22);
  border-radius: 8px;
  padding: 24px;
  background: rgba(24, 24, 24, 0.88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.candle-effects {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.candle-effects::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: min(58vw, 840px);
  height: 72vh;
  background:
    radial-gradient(circle at 55% 24%, rgba(255, 221, 145, 0.25), transparent 12rem),
    radial-gradient(circle at 72% 28%, rgba(255, 157, 195, 0.18), transparent 11rem),
    radial-gradient(circle at 82% 42%, rgba(159, 233, 229, 0.16), transparent 13rem);
  mix-blend-mode: screen;
  opacity: 0.85;
  animation: candle-warmth 4.8s ease-in-out infinite alternate;
}

.candle-flame {
  position: absolute;
  width: clamp(46px, 5vw, 84px);
  height: clamp(70px, 7vw, 118px);
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 151, 62, 0.82), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 204, 0.96) 0 24%, rgba(255, 221, 112, 0.7) 38%, transparent 68%);
  filter: blur(5px);
  mix-blend-mode: screen;
  opacity: 0.78;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  animation: candle-flicker var(--speed, 1.9s) ease-in-out infinite alternate;
}

.flame-one {
  left: 61%;
  top: 17%;
  --scale: 0.82;
  --speed: 1.65s;
}

.flame-two {
  left: 70%;
  top: 12%;
  --scale: 1.05;
  --speed: 1.9s;
}

.flame-three {
  left: 80%;
  top: 18%;
  --scale: 0.9;
  --speed: 1.55s;
}

.flame-four {
  left: 90%;
  top: 15%;
  --scale: 0.94;
  --speed: 1.8s;
}

.candle-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fff0a8;
  box-shadow: 0 0 16px rgba(255, 233, 151, 0.82);
  opacity: 0;
  animation: candle-sparkle 3.8s ease-in-out infinite;
}

.spark-one {
  left: 58%;
  top: 28%;
  animation-delay: 0.1s;
}

.spark-two {
  left: 66%;
  top: 12%;
  background: #dfa1e7;
  box-shadow: 0 0 16px rgba(223, 161, 231, 0.72);
  animation-delay: 0.7s;
}

.spark-three {
  left: 75%;
  top: 25%;
  background: #9fe9e5;
  box-shadow: 0 0 16px rgba(159, 233, 229, 0.78);
  animation-delay: 1.2s;
}

.spark-four {
  left: 87%;
  top: 29%;
  animation-delay: 1.8s;
}

.spark-five {
  left: 93%;
  top: 38%;
  background: #ff9bb7;
  box-shadow: 0 0 16px rgba(255, 155, 183, 0.74);
  animation-delay: 2.2s;
}

.spark-six {
  left: 69%;
  top: 43%;
  background: #cde77d;
  box-shadow: 0 0 16px rgba(205, 231, 125, 0.72);
  animation-delay: 2.8s;
}

.form-heading {
  display: grid;
  gap: 8px;
}

.form-heading h2 {
  margin: 0;
  color: #fff7ff;
  font-size: 1.65rem;
  line-height: 1.08;
}

#rsvp-status {
  min-height: 21px;
  margin: 0;
  color: #9fe9e5;
  font-size: 0.94rem;
  line-height: 1.4;
}

#rsvp-status.is-error {
  color: #ff9bb7;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #fff7ff;
}

.field span,
.choice-field legend {
  color: rgba(255, 247, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 820;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 247, 255, 0.2);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 247, 255, 0.1);
  color: #fff7ff;
  outline: none;
}

.field select option {
  color: #171717;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.choice-row label:has(input:focus-visible) {
  border-color: #9fe9e5;
  box-shadow: 0 0 0 3px rgba(159, 233, 229, 0.16);
}

.choice-field {
  border: 0;
  padding: 0;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-row label {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 247, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 247, 255, 0.08);
  cursor: pointer;
}

.choice-row input {
  position: absolute;
  opacity: 0;
}

.choice-row label:has(input:checked) {
  border-color: #f6c36d;
  background: rgba(246, 195, 109, 0.18);
}

.choice-row label:has(input:checked) span {
  color: #ffe7b2;
}

.website-check {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-button {
  width: 100%;
  margin-top: 2px;
  padding: 13px 18px;
  cursor: pointer;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.party-note {
  padding: 28px 6vw 54px;
  background: #151515;
}

.party-note p {
  max-width: 880px;
  margin: 0;
  color: rgba(255, 247, 255, 0.72);
  font-size: 1.04rem;
  line-height: 1.55;
}

.success-toast {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(159, 233, 229, 0.18), transparent 30rem),
    rgba(9, 8, 12, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.success-toast[hidden] {
  display: none;
}

.success-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  position: relative;
  width: min(620px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 247, 255, 0.34);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 46px);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 155, 183, 0.28), transparent 13rem),
    radial-gradient(circle at 88% 18%, rgba(159, 233, 229, 0.24), transparent 12rem),
    linear-gradient(145deg, rgba(255, 247, 255, 0.97), rgba(252, 235, 255, 0.97));
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.5);
  color: #2d2233;
  text-align: center;
  transform: translateY(22px) scale(0.92);
}

.success-toast.is-visible .success-card {
  animation: success-card-pop 620ms cubic-bezier(0.18, 0.98, 0.28, 1.16) both;
}

.toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(45, 34, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #65356e;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.toast-close:hover,
.toast-close:focus-visible {
  border-color: rgba(159, 233, 229, 0.9);
  outline: none;
  box-shadow: 0 0 0 3px rgba(159, 233, 229, 0.28);
}

.success-card::before,
.success-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 12deg, #ff9bb7 12deg 22deg, transparent 22deg 42deg, #9fe9e5 42deg 55deg, transparent 55deg 74deg, #ffe7a6 74deg 86deg, transparent 86deg 105deg, #dfa1e7 105deg 118deg, transparent 118deg 360deg);
  opacity: 0;
  pointer-events: none;
}

.success-card::before {
  left: -76px;
  top: -66px;
}

.success-card::after {
  right: -78px;
  bottom: -74px;
  transform: rotate(34deg);
}

.success-toast.is-visible .success-card::before,
.success-toast.is-visible .success-card::after {
  animation: success-ring 980ms ease-out 120ms both;
}

.success-popper {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 24%, transparent 25%),
    conic-gradient(#ff9bb7 0 18%, #ffe7a6 18% 36%, #9fe9e5 36% 54%, #dfa1e7 54% 72%, #cde77d 72% 100%);
  box-shadow: 0 14px 34px rgba(245, 138, 184, 0.24);
}

.success-popper::before,
.success-popper::after,
.success-popper span {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 46px;
  border-radius: 999px;
  background: #ff5c91;
  transform-origin: 50% 100%;
}

.success-popper::before {
  transform: translate(-50%, -106%) rotate(-38deg);
}

.success-popper::after {
  background: #9fe9e5;
  transform: translate(-50%, -106%) rotate(38deg);
}

.success-popper span:nth-child(1) {
  background: #ffe7a6;
  transform: translate(-50%, -108%) rotate(0deg);
}

.success-popper span:nth-child(2) {
  background: #dfa1e7;
  transform: translate(-50%, -104%) rotate(78deg);
}

.success-popper span:nth-child(3) {
  background: #cde77d;
  transform: translate(-50%, -104%) rotate(-78deg);
}

.success-toast.is-visible .success-popper {
  animation: success-popper-bounce 820ms cubic-bezier(0.2, 0.95, 0.25, 1.18) both;
}

.success-kicker {
  margin: 0 0 10px;
  color: #1f8988;
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.success-card h2 {
  margin: 0;
  color: #df4078;
  font-size: clamp(2.45rem, 7vw, 4.7rem);
  font-weight: 950;
  line-height: 0.92;
}

.success-card p {
  max-width: 510px;
  margin: 18px auto 0;
  color: #4f4458;
  font-size: 1.08rem;
  line-height: 1.5;
}

.success-card .success-parent-note {
  display: inline-flex;
  margin-top: 20px;
  border: 1px solid rgba(245, 138, 184, 0.34);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 233, 244, 0.82);
  color: #973868;
  font-weight: 900;
}

.success-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.firework {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0;
  background: #fff2a8;
  box-shadow:
    0 -54px 0 0 #fff2a8,
    38px -38px 0 0 #ff9bb7,
    54px 0 0 0 #9fe9e5,
    38px 38px 0 0 #dfa1e7,
    0 54px 0 0 #cde77d,
    -38px 38px 0 0 #ffe7a6,
    -54px 0 0 0 #ff9bb7,
    -38px -38px 0 0 #9fe9e5;
}

.firework-one {
  left: 18%;
  top: 25%;
}

.firework-two {
  right: 16%;
  top: 19%;
  transform: scale(0.82);
}

.firework-three {
  right: 24%;
  bottom: 20%;
  transform: scale(0.72);
}

.success-toast.is-visible .firework-one {
  animation: firework-burst 1100ms ease-out 160ms both;
}

.success-toast.is-visible .firework-two {
  animation: firework-burst 1100ms ease-out 360ms both;
}

.success-toast.is-visible .firework-three {
  animation: firework-burst 1100ms ease-out 560ms both;
}

.confetti-strip,
.confetti-dot {
  position: absolute;
  opacity: 0;
}

.confetti-strip {
  width: 10px;
  height: 42px;
  border-radius: 999px;
  background: #9fe9e5;
}

.confetti-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffe7a6;
}

.strip-one {
  left: 26%;
  top: 10%;
  background: #ff9bb7;
}

.strip-two {
  left: 72%;
  top: 8%;
  background: #dfa1e7;
}

.strip-three {
  left: 13%;
  bottom: 18%;
  background: #cde77d;
}

.strip-four {
  right: 10%;
  bottom: 15%;
  background: #9fe9e5;
}

.dot-one {
  left: 35%;
  top: 16%;
}

.dot-two {
  right: 33%;
  top: 12%;
  background: #ff9bb7;
}

.dot-three {
  left: 22%;
  bottom: 10%;
  background: #dfa1e7;
}

.dot-four {
  right: 28%;
  bottom: 12%;
  background: #cde77d;
}

.success-toast.is-visible .confetti-strip {
  animation: confetti-fall 1500ms cubic-bezier(0.18, 0.78, 0.28, 1) both;
}

.success-toast.is-visible .confetti-dot {
  animation: confetti-pop 1300ms cubic-bezier(0.18, 0.78, 0.28, 1) both;
}

.success-toast.is-visible .strip-two,
.success-toast.is-visible .dot-two {
  animation-delay: 120ms;
}

.success-toast.is-visible .strip-three,
.success-toast.is-visible .dot-three {
  animation-delay: 230ms;
}

.success-toast.is-visible .strip-four,
.success-toast.is-visible .dot-four {
  animation-delay: 340ms;
}

@media (max-width: 980px) {
  .rsvp-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 34px 22px 44px;
    background-position: right -140px top;
    background-size: 980px auto;
  }

  .flame-one {
    left: 33%;
    top: 105px;
  }

  .flame-two {
    left: 48%;
    top: 76px;
  }

  .flame-three {
    left: 63%;
    top: 112px;
  }

  .flame-four {
    left: 78%;
    top: 92px;
  }

  .rsvp-copy {
    padding-top: 190px;
  }

  .rsvp-copy h1 {
    font-size: 3.35rem;
  }
}

@media (max-width: 640px) {
  .rsvp-hero {
    background-position: right -125px top;
    background-size: 760px auto;
  }

  .candle-effects::before {
    width: 100vw;
    height: 390px;
    opacity: 0.62;
  }

  .candle-flame {
    width: 38px;
    height: 62px;
    opacity: 0.5;
  }

  .flame-one {
    left: 55%;
    top: 96px;
  }

  .flame-two {
    left: 73%;
    top: 68px;
  }

  .flame-three {
    left: 91%;
    top: 96px;
  }

  .flame-four {
    display: none;
  }

  .rsvp-copy {
    padding-top: 380px;
  }

  .invite-line {
    font-size: 2rem;
  }

  .rsvp-copy h1 {
    font-size: 2.75rem;
  }

  .rsvp-lede {
    font-size: 1.05rem;
  }

  .party-details {
    grid-template-columns: 1fr;
  }

  .party-details div {
    min-height: auto;
  }

  .rsvp-form {
    padding: 18px;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .success-toast {
    align-items: end;
    padding: 18px;
  }

  .success-card {
    padding: 28px 18px 22px;
  }

  .success-popper {
    width: 86px;
    height: 86px;
  }

  .success-card .success-parent-note {
    border-radius: 8px;
  }

  .firework-one {
    left: 16%;
    top: 16%;
  }

  .firework-two {
    right: 16%;
    top: 11%;
  }

  .firework-three {
    display: none;
  }
}

@keyframes candle-flicker {
  0% {
    opacity: 0.56;
    transform: translate(-50%, -50%) scale(calc(var(--scale, 1) * 0.92)) rotate(-2deg);
  }

  42% {
    opacity: 0.9;
    transform: translate(-49%, -52%) scale(calc(var(--scale, 1) * 1.05)) rotate(2deg);
  }

  100% {
    opacity: 0.68;
    transform: translate(-51%, -49%) scale(calc(var(--scale, 1) * 0.98)) rotate(-1deg);
  }
}

@keyframes candle-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: translateY(18px) scale(0.4);
  }

  35% {
    opacity: 0.95;
    transform: translateY(0) scale(1);
  }

  70% {
    opacity: 0.25;
    transform: translateY(-18px) scale(0.7);
  }
}

@keyframes candle-warmth {
  from {
    opacity: 0.55;
    transform: scale(0.98);
  }

  to {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

@keyframes success-card-pop {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.9);
  }

  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.03);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes success-ring {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(0deg);
  }

  45% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.4) rotate(40deg);
  }
}

@keyframes success-popper-bounce {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.72) rotate(-8deg);
  }

  58% {
    opacity: 1;
    transform: translateY(-6px) scale(1.08) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes firework-burst {
  0% {
    opacity: 0;
    box-shadow:
      0 0 0 0 #fff2a8,
      0 0 0 0 #ff9bb7,
      0 0 0 0 #9fe9e5,
      0 0 0 0 #dfa1e7,
      0 0 0 0 #cde77d,
      0 0 0 0 #ffe7a6,
      0 0 0 0 #ff9bb7,
      0 0 0 0 #9fe9e5;
    transform: scale(0.2);
  }

  38% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(-54px) rotate(0deg) scale(0.75);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(170px) rotate(220deg) scale(1);
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.3);
  }

  35% {
    opacity: 1;
    transform: translateY(-18px) scale(1.1);
  }

  100% {
    opacity: 0;
    transform: translateY(60px) scale(0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .candle-effects::before,
  .candle-flame,
  .candle-spark,
  .success-toast.is-visible .success-card,
  .success-toast.is-visible .success-card::before,
  .success-toast.is-visible .success-card::after,
  .success-toast.is-visible .success-popper,
  .success-toast.is-visible .firework,
  .success-toast.is-visible .confetti-strip,
  .success-toast.is-visible .confetti-dot {
    animation: none;
  }
}
