:root {
  color-scheme: dark;
  --space: #060817;
  --panel: #111831;
  --ink: #f8f6ff;
  --muted: #c9c8df;
  --cyan: #4df7ff;
  --pink: #ff52bd;
  --violet: #a57bff;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font: 16px/1.6 Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 8%, #152654 0, transparent 30%),
    radial-gradient(circle at 85% 35%, #2d124c 0, transparent 26%),
    var(--space);
}

.shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  place-items: center;
  row-gap: clamp(28px, 5vw, 44px);
  padding: 32px 20px;
}

.card {
  width: min(680px, 100%);
  padding: clamp(32px, 7vw, 64px);
  text-align: center;
  border: 1px solid #5964a4;
  border-radius: 24px;
  background: linear-gradient(145deg, #121a39, #090d20);
  box-shadow: 0 0 0 1px #4df7ff26, 0 22px 60px #0009, 0 0 42px #ff52bd24;
}

.cats {
  font-size: 30px;
  letter-spacing: 10px;
  filter: drop-shadow(0 0 9px var(--pink));
}

.names,
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
}

.names {
  margin: 20px 0 4px;
  font-size: clamp(34px, 8vw, 48px);
  text-shadow: 0 0 18px var(--violet);
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  letter-spacing: 5px;
  text-transform: uppercase;
}

h1 {
  margin: 28px 0 10px;
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1.08;
  text-shadow: 0 0 18px #ff52bd80;
}

.dates {
  color: var(--cyan);
}

.status {
  margin: 28px auto 0;
  max-width: 34rem;
  color: var(--muted);
}

.status[data-state="error"] {
  color: #ffd3ec;
}

.help {
  margin: 14px auto 0;
  color: #9796b5;
  font-size: 14px;
}

.laser-banner {
  visibility: hidden;
  margin-bottom: 26px;
  position: relative;
  overflow: visible;
  aspect-ratio: 1823 / 863;
}

.invitation-ready .laser-banner {
  visibility: visible;
}

/* The art leaves a gap of sky between the two cats; the names sit in it, so
   the cats read as flanking them. */
.masthead {
  position: absolute;
  z-index: 2;
  /* Held inside the gap of sky between the two cats, so the names never
     crowd a face at narrow widths. */
  top: 0;
  bottom: 0;
  left: 28%;
  right: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.masthead .names {
  margin: 0 0 6px;
  font-size: clamp(22px, 5.2vw, 52px);
  text-shadow: 0 0 18px var(--violet), 0 2px 14px #000b, 0 0 42px #000a;
}

.masthead .eyebrow {
  font-size: clamp(9px, 1.5vw, 14px);
  letter-spacing: clamp(2px, 0.6vw, 5px);
  text-shadow: 0 2px 10px #000c;
}

.no-gifts {
  margin: 30px 0 4px;
  color: #6f6e8a;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
}

.laser-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #5964a4;
  border-radius: 24px;
  box-shadow: 0 0 0 1px #4df7ff26, 0 22px 60px #0009, 0 0 42px #ff52bd24;
}

/* The overlay follows the full page; only its non-interactive beams paint. */
.laser-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* Panel surfaces stay below the beams; their content paints above them. */
.hero > *,
.card > * {
  position: relative;
  z-index: 2;
}

.laser-beam {
  stroke: var(--beam-color);
  stroke-linecap: round;
}

/* Soft concentric glow without per-frame, full-page blur filters. */
.laser-haze { stroke-width: 42px; opacity: .015; }
.laser-wide { stroke-width: 28px; opacity: .03; }
.laser-soft { stroke-width: 16px; opacity: .06; }
.laser-near { stroke-width: 9px; opacity: .14; }
.laser-core { stroke-width: 4px; opacity: .6; }

.laser-color-0 { --beam-color: var(--pink); }
.laser-color-1 { --beam-color: var(--cyan); }

.cats {
  animation: catGlow 2.4s ease-in-out infinite alternate;
}

@keyframes catGlow {
  to {
    filter: drop-shadow(0 0 18px var(--cyan));
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cats {
    animation: none;
  }
}

.hero {
  text-align: center;
  padding: 31px 22px;
  border: 1px solid #5964a4;
  border-radius: 24px;
  background: linear-gradient(135deg, #111d44, #251040);
}

.kicker {
  color: var(--cyan);
  letter-spacing: 4px;
  margin: 12px 0;
}

.person {
  border-top: 1px solid #3c4173;
  margin-top: 40px;
  padding-top: 32px;
  text-align: left;
}

.subhead {
  margin: 32px 0 12px;
  color: var(--cyan);
  font-size: 21px;
}

.event {
  padding: 20px 0;
  border-bottom: 1px solid #303762;
}

.event-name {
  display: block;
  margin-bottom: 6px;
}

.event-missing .event-name {
  color: var(--pink);
}

.event-missing .event-name::after {
  content: " — please choose";
  font-weight: normal;
}

.choice,
.checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.choice label,
.checks label {
  padding: 5px 9px;
  border: 1px solid #424a7e;
  border-radius: 99px;
  background: #161d3b;
}

.choice label:has(input:checked) {
  border-color: var(--pink);
  box-shadow: 0 0 10px #ff52bd77;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.kid-care {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.meta a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta a:hover {
  color: var(--pink);
}

.meta a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 2px;
}

.meta em {
  color: var(--cyan);
  font-style: normal;
}

input,
textarea {
  font: inherit;
  color: #fff;
  background: #070b1b;
  border: 1px solid #4b558b;
  border-radius: 7px;
  padding: 10px;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  padding: 0;
  accent-color: var(--pink);
}

textarea {
  width: 100%;
  min-height: 80px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  margin-top: 13px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
}

.submit {
  width: 100%;
  margin-top: 27px;
  padding: 15px;
  border: 1px solid var(--cyan);
  border-radius: 9px;
  background: linear-gradient(90deg, #932cff, #ff3ba9);
  color: #fff;
  font: 22px Georgia, serif;
}

@media (max-width: 600px) {
  .fields {
    grid-template-columns: 1fr;
  }
}

/* The saved-RSVP celebration: brighter beams, a glowing card, a disco cat. */
.laser-overlay-party .laser-core { opacity: .85; }
.laser-overlay-party .laser-near { opacity: .26; }
.laser-overlay-party .laser-soft { opacity: .11; }

.celebrating {
  border-color: var(--pink);
  box-shadow: 0 0 34px #ff52bd55, 0 0 70px #4df7ff33;
}

.disco-cat {
  display: block;
  width: 220px;
  max-width: 60vw;
  margin: 18px auto 0;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  box-shadow: 0 0 24px var(--pink), 0 0 38px var(--cyan);
}

@media (prefers-reduced-motion: no-preference) {
  .celebrating {
    animation: celebrate-glow 2.4s ease-in-out infinite;
  }

  @keyframes celebrate-glow {
    0%, 100% { box-shadow: 0 0 34px #ff52bd55, 0 0 70px #4df7ff33; }
    50% { box-shadow: 0 0 46px #4df7ff66, 0 0 90px #ff52bd44; }
  }
}

.add-calendar {
  display: inline-block;
  margin-top: 8px;
  color: var(--cyan);
}

.contact {
  margin-top: 14px;
  color: #9796b5;
  font-size: 14px;
}

.contact a {
  color: var(--cyan);
}

.egg {
  display: none;
  position: fixed;
  z-index: 99;
  right: 18px;
  bottom: 18px;
  width: 220px;
  max-width: 55vw;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  box-shadow: 0 0 24px var(--pink), 0 0 38px var(--cyan);
  cursor: pointer;
}

.egg img { display: block; width: 100%; border-radius: inherit; }
.disco-cat-link { display: block; width: fit-content; margin: 0 auto; }
.egg:focus-visible, .disco-cat-link:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.egg:focus-within { display: block; }

.egg.egg-visible {
  display: block;
}

/* Ceiling Cat watches from the top edge when the random egg picks him. */
.egg.egg-ceiling {
  top: 0;
  right: auto;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: 80vw;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.event-video { color: inherit; text-decoration: none; }
.event-video:hover { text-decoration: underline; }
.event-video:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.rsvp-celebration-poster {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 24px auto 0;
  border-radius: 12px;
}
