:root { --cycle: 36s; }

body.cover-open { overflow: hidden; }

.invite-cover {
  position: fixed;
  inset: 0;
  z-index: 1000000000;
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: #000;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.25s ease, visibility 1.25s ease;
}

.invite-cover.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-panel {
  position: relative;
  width: min(100%, 900px);
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 44%, rgba(66, 89, 126, .2), transparent 31%),
    radial-gradient(ellipse at 14% 12%, rgba(111, 84, 37, .12), transparent 32%),
    radial-gradient(ellipse at 87% 82%, rgba(33, 63, 94, .17), transparent 35%),
    linear-gradient(155deg, #000 0%, #02050a 45%, #000 100%);
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: 0;
  background:
    conic-gradient(from 95deg at 50% 50%, transparent, rgba(212, 225, 255, .035), transparent 18%, rgba(240, 208, 136, .025), transparent 43%),
    radial-gradient(circle at 50% 50%, rgba(206, 223, 255, .08), transparent 22%);
  animation: space-breathe 10s ease-in-out infinite alternate, space-turn 44s linear infinite;
}

.cover-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 25%, rgba(0, 0, 0, .28) 67%, rgba(0, 0, 0, .82) 100%);
}

.cover-content {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 42px 24px;
  color: #fff;
}

.cover-eyebrow {
  position: absolute;
  top: clamp(38px, 8vh, 78px);
  color: rgba(242, 230, 196, .78);
  font: 400 clamp(10px, 1.8vw, 13px) / 1.4 Montserrat, sans-serif;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 231, 164, .35);
  animation: eyebrow-in 1.6s .25s ease both;
}

.moon-button {
  position: relative;
  width: clamp(245px, 52vw, 410px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  color: #fff;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .9));
  animation: moon-arrive 2.1s cubic-bezier(.2, .78, .2, 1) both, moon-float 5.5s 2.1s ease-in-out infinite alternate;
}

.moon-button:focus-visible {
  outline: 1px solid rgba(255, 245, 210, .9);
  outline-offset: 18px;
}

.moon-aura {
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 238, 255, .23) 0%, rgba(184, 203, 236, .09) 36%, transparent 68%);
  filter: blur(4px);
  opacity: .78;
  animation: aura-pulse 4.2s ease-in-out infinite alternate;
  transition: opacity 2.6s ease, transform 2.6s ease;
}

.moon-disc {
  position: absolute;
  inset: 8%;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .96), transparent 14%),
    radial-gradient(circle at 68% 62%, rgba(117, 126, 141, .22), transparent 20%),
    radial-gradient(circle at 42% 74%, rgba(102, 112, 130, .18), transparent 17%),
    radial-gradient(circle at 50% 42%, #fffef4 0%, #e8e9e7 46%, #aeb6c1 74%, #788391 100%);
  box-shadow:
    inset -18px -12px 35px rgba(34, 43, 56, .5),
    inset 10px 8px 25px rgba(255, 255, 255, .42),
    0 0 15px rgba(255, 250, 224, .85),
    0 0 52px rgba(188, 209, 244, .56),
    0 0 110px rgba(131, 163, 214, .22);
}

.moon-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: repeating-radial-gradient(circle at 30% 40%, rgba(61, 69, 82, .11) 0 1px, transparent 1px 12px);
  mix-blend-mode: multiply;
  opacity: .42;
}

.moon-shadow {
  position: absolute;
  z-index: 4;
  top: -2%;
  right: -2%;
  bottom: -2%;
  left: 50%;
  border-radius: 0 999px 999px 0;
  background: radial-gradient(circle at 36% 45%, #05080d 0%, #010205 72%, #000 100%);
  box-shadow: inset 12px 0 18px rgba(112, 139, 184, .09);
  transform: translateX(0);
  transition: transform 2.8s cubic-bezier(.55, .03, .18, 1), opacity 2.4s 1s ease;
}

.moon-crater {
  position: absolute;
  z-index: 2;
  display: block;
  border-radius: 50%;
  background: rgba(89, 99, 116, .18);
  box-shadow: inset 4px 4px 8px rgba(44, 50, 61, .2), 2px 2px 6px rgba(255, 255, 255, .16);
}

.crater-one { width: 15%; height: 15%; left: 25%; top: 25%; }
.crater-two { width: 9%; height: 9%; right: 24%; top: 37%; }
.crater-three { width: 19%; height: 19%; left: 41%; bottom: 18%; }

.moon-name {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: 82%;
  transform: translate(-50%, -45%) scale(.85);
  opacity: 0;
  font-family: "New Icon Script", "Great Vibes", cursive;
  font-size: clamp(46px, 9vw, 76px);
  font-weight: 500;
  line-height: .83;
  background: linear-gradient(180deg, #fff 0%, #fffbee 37%, #e9d190 73%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 4px #222) drop-shadow(0 0 11px rgba(255, 244, 205, .75));
  transition: opacity 1.4s 1.15s ease, transform 1.7s 1.05s cubic-bezier(.2, .8, .2, 1);
}

.cover-instruction {
  position: absolute;
  bottom: clamp(70px, 11vh, 115px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(243, 235, 213, .72);
  font: 500 10px / 1 Montserrat, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  animation: instruction-in 1.6s 1.15s ease both, instruction-pulse 2.8s 2.8s ease-in-out infinite;
  transition: opacity .7s ease, transform .7s ease;
}

.cover-instruction span {
  width: clamp(22px, 5vw, 48px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(235, 219, 174, .7));
}

.cover-instruction span:last-child { transform: rotate(180deg); }

.cover-xv {
  position: absolute;
  bottom: clamp(35px, 5vh, 54px);
  opacity: .72;
  color: #e7d4a4;
  font-family: "New Icon Script", "Great Vibes", cursive;
  font-size: clamp(23px, 4vw, 34px);
  letter-spacing: .04em;
  transition: opacity .7s ease;
}

.cover-stars,
.cover-comets {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.cover-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff9df;
  box-shadow: 0 0 5px #fff, 0 0 13px rgba(185, 211, 255, .88);
  opacity: .18;
  animation: cover-twinkle var(--duration) var(--delay) ease-in-out infinite alternate;
}

.cover-star:nth-child(5n)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: calc(var(--size) * 5);
  background: linear-gradient(transparent, #fff, transparent);
  transform: translate(-50%, -50%);
}

.cover-comet {
  position: absolute;
  z-index: 2;
  left: var(--start-x);
  top: var(--start-y);
  width: var(--length);
  height: 1px;
  opacity: 0;
  transform: rotate(var(--angle));
  transform-origin: right center;
  background: linear-gradient(90deg, transparent 0%, rgba(162, 198, 255, .2) 34%, rgba(255, 250, 222, .94) 100%);
  filter: drop-shadow(0 0 5px rgba(207, 224, 255, .95));
  animation: comet-flight var(--speed) var(--delay) linear infinite;
}

.cover-comet::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px #fff, 0 0 18px #c9dcff;
  transform: translateY(-50%);
}

.invite-cover.is-opening .moon-shadow { transform: translateX(108%); opacity: 0; }
.invite-cover.is-opening .moon-name { opacity: 1; transform: translate(-50%, -45%) scale(1); }
.invite-cover.is-opening .moon-aura { opacity: 1; transform: scale(1.18); }
.invite-cover.is-opening .moon-button { animation: moon-complete 3.6s ease-in-out both; cursor: default; }
.invite-cover.is-opening .cover-instruction { opacity: 0; transform: translateY(12px); animation: none; }
.invite-cover.is-opening .cover-xv { opacity: 0; }
.invite-cover.is-opening .cover-eyebrow { opacity: 0; transition: opacity .8s ease; }

.photo-share-title {
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
}

.photo-share-copy {
  max-width: 520px;
  margin: 10px auto 24px;
  padding: 0 22px;
  color: rgba(255, 255, 255, .88);
  font: 400 13px / 1.8 Montserrat, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000;
}

.moon-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: rgba(239, 220, 164, .72);
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(169, 139, 77, .28));
  box-shadow: 0 8px 26px rgba(0, 0, 0, .36), 0 0 22px rgba(235, 214, 157, .12);
  backdrop-filter: blur(8px);
}

.button-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(255, 239, 192, .35));
}

.moon-pass {
  position: relative;
  width: min(92%, 620px);
  margin: 34px auto 0;
  padding: 13px;
  isolation: isolate;
}

.moon-pass::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(ellipse, rgba(231, 212, 157, .18), transparent 66%);
  filter: blur(14px);
}

.moon-pass-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 116px 1fr;
  min-height: 188px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(250, 234, 184, .58);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 244, 205, .16), transparent 24%),
    linear-gradient(135deg, rgba(20, 34, 50, .92), rgba(4, 10, 18, .94) 55%, rgba(42, 36, 27, .86));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .46), inset 0 0 40px rgba(255, 247, 213, .04), 0 0 28px rgba(230, 209, 150, .1);
  backdrop-filter: blur(14px);
}

.moon-pass-ticket::before,
.moon-pass-ticket::after {
  content: "";
  position: absolute;
  left: 112px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(250, 234, 184, .4);
  border-radius: 50%;
  background: #07120f;
  transform: translateX(-50%);
}

.moon-pass-ticket::before { top: -14px; }
.moon-pass-ticket::after { bottom: -14px; }

.moon-pass-icon {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px dashed rgba(247, 230, 177, .34);
  color: #f7e8b7;
  background: linear-gradient(145deg, rgba(218, 192, 124, .16), rgba(96, 126, 163, .12));
}

.moon-pass-icon svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 231, 166, .32));
}

.moon-pass-copy {
  position: relative;
  padding: 28px 34px;
  text-align: center;
}

.moon-pass-label {
  display: block;
  color: rgba(241, 231, 201, .74);
  font: 500 10px / 1.5 Montserrat, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.moon-pass-copy strong {
  display: block;
  margin: 7px 0 13px;
  color: #fff7df;
  font-family: "New Icon Script", "Great Vibes", cursive;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 400;
  line-height: 1.08;
  text-shadow: 0 0 18px rgba(255, 237, 184, .22), 0 3px 12px rgba(0, 0, 0, .55);
}

.moon-pass-guests {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid rgba(239, 220, 164, .28);
  padding: 9px 22px 0;
  color: #f8e8b5;
  font: 500 25px / 1 Montserrat, sans-serif;
}

.moon-pass-guests small {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.moon-pass-orbit span {
  position: absolute;
  z-index: 2;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff3c9;
  box-shadow: 0 0 9px 2px rgba(255, 238, 185, .56);
  animation: pass-twinkle 2.8s ease-in-out infinite alternate;
}

.moon-pass-orbit span:nth-child(1) { top: 2px; right: 18%; }
.moon-pass-orbit span:nth-child(2) { bottom: 8px; left: 24%; animation-delay: .8s; }
.moon-pass-orbit span:nth-child(3) { top: 28%; right: 1px; animation-delay: 1.4s; }

.moon-field input[readonly] {
  color: #fff1c6;
  border-color: rgba(239, 220, 164, .42);
  background: linear-gradient(135deg, rgba(231, 210, 150, .1), rgba(3, 11, 18, .7));
  cursor: default;
  letter-spacing: .035em;
}

@keyframes pass-twinkle {
  from { opacity: .25; transform: scale(.7); }
  to { opacity: 1; transform: scale(1.45); }
}

.moon-rsvp {
  position: relative;
  width: min(92%, 620px);
  margin: 34px auto 10px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(230, 221, 188, .32);
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 0%, rgba(234, 221, 172, .13), transparent 27%),
    radial-gradient(circle at 0% 100%, rgba(150, 181, 220, .1), transparent 31%),
    rgba(4, 11, 18, .64);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .42), inset 0 0 40px rgba(255, 255, 255, .025);
  backdrop-filter: blur(12px);
  text-align: left;
  overflow: hidden;
}

.moon-rsvp::before {
  content: "✦";
  position: absolute;
  right: 25px;
  top: 14px;
  color: rgba(255, 238, 181, .58);
  font-size: 18px;
  text-shadow: -24px 18px 8px rgba(255, 255, 255, .48), -48px -4px 10px rgba(255, 255, 255, .32);
}

.moon-field {
  display: block;
  margin-bottom: 23px;
}

.moon-field > span,
.attendance-choice legend {
  display: block;
  margin-bottom: 9px;
  color: #eee3c2;
  font: 500 11px / 1.4 Montserrat, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.moon-field input,
.moon-field textarea {
  width: 100%;
  border: 1px solid rgba(225, 219, 195, .28);
  border-radius: 16px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(1, 7, 13, .62);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, .24);
  font: 400 14px / 1.5 Montserrat, sans-serif;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.moon-field textarea { min-height: 125px; resize: vertical; }
.moon-field input::placeholder,
.moon-field textarea::placeholder { color: rgba(255, 255, 255, .46); }
.moon-field input:focus,
.moon-field textarea:focus {
  border-color: rgba(244, 227, 173, .78);
  background: rgba(3, 12, 21, .82);
  box-shadow: 0 0 0 3px rgba(238, 220, 165, .08), 0 0 22px rgba(224, 209, 163, .12);
}

.attendance-choice {
  margin: 0 0 23px;
  padding: 0;
  border: 0;
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attendance-option { position: relative; cursor: pointer; }
.attendance-option input { position: absolute; opacity: 0; pointer-events: none; }
.attendance-option span {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(228, 218, 184, .28);
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .045);
  font: 500 12px / 1.2 Montserrat, sans-serif;
  letter-spacing: .05em;
  transition: .25s ease;
}

.attendance-option input:checked + span {
  border-color: rgba(248, 229, 172, .86);
  color: #fff7dc;
  background: linear-gradient(135deg, rgba(245, 229, 180, .22), rgba(112, 135, 167, .17));
  box-shadow: 0 0 24px rgba(241, 222, 166, .15), inset 0 0 18px rgba(255, 255, 255, .06);
}

.attendance-option input:focus-visible + span { outline: 2px solid #f5e7be; outline-offset: 3px; }
.field-error,
.form-error { display: block; min-height: 18px; margin-top: 7px; color: #ffd0c6; font: 500 11px / 1.45 Montserrat, sans-serif; letter-spacing: .04em; }
.form-error { text-align: center; margin: -6px 0 10px; }

.moon-submit {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(249, 232, 179, .78);
  border-radius: 999px;
  color: #fff8df;
  background: linear-gradient(135deg, rgba(208, 185, 121, .37), rgba(87, 110, 143, .36));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .36), inset 0 0 16px rgba(255, 255, 255, .08);
  cursor: pointer;
  font: 600 12px / 1 Montserrat, sans-serif;
  letter-spacing: .14em;
  transition: transform .2s ease, box-shadow .2s ease;
}

.moon-submit:hover,
.moon-submit:focus-visible { transform: translateY(-2px); box-shadow: 0 13px 33px rgba(0, 0, 0, .42), 0 0 25px rgba(239, 219, 158, .16); outline: none; }

.creator-credit {
  display: inline-block;
  margin: 30px auto 8px;
  color: rgba(234, 226, 199, .78);
  text-decoration: none;
  font: 500 10px / 1.9 Montserrat, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .25s ease, text-shadow .25s ease;
}

.creator-credit strong {
  color: #fff2c8;
  font-family: "New Icon Script", "Great Vibes", cursive;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: none;
}

.creator-credit:hover { color: #fff; text-shadow: 0 0 14px rgba(255, 234, 181, .5); }

@keyframes space-breathe { from { opacity: .45; transform: scale(.96); } to { opacity: 1; transform: scale(1.05); } }
@keyframes space-turn { to { rotate: 360deg; } }
@keyframes moon-arrive { from { opacity: 0; transform: scale(.62); filter: blur(12px); } to { opacity: 1; transform: scale(1); filter: none; } }
@keyframes moon-float { from { transform: translateY(-5px); } to { transform: translateY(7px); } }
@keyframes moon-complete { 0% { transform: scale(1); } 58% { transform: scale(1.035); } 100% { transform: scale(1.11); } }
@keyframes aura-pulse { from { opacity: .45; transform: scale(.92); } to { opacity: .92; transform: scale(1.08); } }
@keyframes eyebrow-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes instruction-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes instruction-pulse { 50% { opacity: .42; } }
@keyframes cover-twinkle { from { opacity: .1; transform: scale(.5); } to { opacity: 1; transform: scale(1.55); } }
@keyframes comet-flight {
  0%, 74% { opacity: 0; translate: -35vw -24vh; }
  77% { opacity: 1; }
  88% { opacity: .82; }
  100% { opacity: 0; translate: 110vw 78vh; }
}

@media (max-width: 600px) {
  .cover-content { padding-inline: 16px; }
  .cover-eyebrow { width: 88%; letter-spacing: .23em; }
  .moon-button { width: min(78vw, 340px); }
  .moon-name { font-size: clamp(42px, 15vw, 65px); }
  .cover-instruction { width: 92%; justify-content: center; gap: 10px; letter-spacing: .18em; }
  .moon-rsvp { width: calc(100% - 24px); padding: 25px 18px; border-radius: 26px; }
  .moon-pass { width: calc(100% - 20px); padding: 8px; }
  .moon-pass-ticket { grid-template-columns: 86px 1fr; min-height: 164px; border-radius: 24px; }
  .moon-pass-ticket::before, .moon-pass-ticket::after { left: 84px; width: 20px; height: 20px; }
  .moon-pass-icon svg { width: 56px; height: 56px; }
  .moon-pass-copy { padding: 22px 14px; }
  .moon-pass-copy strong { font-size: 34px; }
  .attendance-options { grid-template-columns: 1fr; }
  .photo-share-copy { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-panel::before,
  .moon-button,
  .moon-aura,
  .cover-star,
  .cover-comet,
  .cover-eyebrow,
  .cover-instruction { animation: none; }
  .invite-cover { transition-duration: .25s; }
  .moon-shadow { transition-duration: 1s; }
  .moon-name { transition-delay: .25s; transition-duration: .8s; }
}
