:root {
  color-scheme: dark;
  --ink: #18162f;
  --ink-soft: #252041;
  --cream: #fff8ef;
  --paper: #f9efe7;
  --pink: #f0a7bd;
  --blue: #92c9ea;
  --gold: #d8b06d;
  --muted: rgba(255, 248, 239, 0.68);
  --line: rgba(255, 255, 255, 0.14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.locked,
html.locked body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
}

body.locked {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.locked .intro {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  z-index: 60;
}

body.locked main > section:not(.intro) {
  visibility: hidden;
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.intro {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.18fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 5rem);
  overflow: hidden;
  padding: clamp(2rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.07), transparent 34%),
    linear-gradient(155deg, #17152d 0%, #24203e 50%, #151329 100%);
  isolation: isolate;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .45;
  background-image:
    radial-gradient(circle at 17% 20%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 14%, rgba(255,255,255,.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 64%, rgba(255,255,255,.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 12% 77%, rgba(255,255,255,.35) 0 1px, transparent 1.5px);
}

.glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
  z-index: -1;
}

.glow-pink {
  background: var(--pink);
  top: -12%;
  left: -15%;
}

.glow-blue {
  background: var(--blue);
  right: -16%;
  bottom: -10%;
}

.ambient-confetti {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease .25s;
}

.intro.is-revealed .ambient-confetti {
  opacity: .78;
}

.ambient-confetti span {
  position: absolute;
  top: -12%;
  left: var(--x);
  width: 7px;
  height: 13px;
  border-radius: 2px;
  background: var(--color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--color) 28%, transparent);
  opacity: .58;
  animation: ambientFall var(--speed) linear var(--delay) infinite;
  will-change: transform;
}

.ambient-confetti span.round {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ambient-confetti span.soft {
  width: 10px;
  height: 16px;
  filter: blur(1.2px);
  opacity: .3;
}

.intro-copy {
  position: relative;
  width: min(100%, 620px);
  text-align: center;
  z-index: 3;
  transition: opacity .45s ease, transform .45s ease;
}

.eyebrow {
  margin: 0 0 .9rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.035em;
}

h1 {
  max-width: 16ch;
  margin: 0 auto .7rem;
  font-size: clamp(2.7rem, 5.2vw, 5.4rem);
  line-height: .98;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 9vw, 5.6rem);
  line-height: .96;
}

.tap-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: .9rem 0 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .68rem 1.15rem;
  background: rgba(255,255,255,.06);
  color: var(--cream);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.balloon-button {
  position: relative;
  width: min(46vw, 560px);
  height: min(78vh, 660px);
  justify-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 30px 45px rgba(0,0,0,.28));
  animation: float 4.6s ease-in-out infinite;
  z-index: 2;
  touch-action: manipulation;
}

.balloon-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  transform: translate3d(0, 0, 0) rotate(0deg);
  transition: transform .18s ease-out;
  will-change: transform;
}

.balloon-button:hover,
.balloon-button:focus-visible {
  filter: drop-shadow(0 34px 56px rgba(146,201,234,.2));
}

.balloon-button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 8px;
  border-radius: 50%;
}

.balloon-button.popping {
  animation: pop .42s cubic-bezier(.18,.89,.32,1.35) forwards;
}

.intro-copy.is-hidden {
  opacity: 0;
  transform: translateY(-14px);
}

.reveal-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  width: min(92%, 640px);
  height: fit-content;
  margin: auto;
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(.98);
  pointer-events: none;
  z-index: 4;
}

.reveal-message.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .9s ease .2s, transform .9s ease .2s;
}

.reveal-message h2 {
  margin-bottom: .45rem;
}

.reveal-message > p:not(.eyebrow) {
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4vw, 1.65rem);
}

.submit-button,
.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.35rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.submit-button:hover,
.map-link:hover,
.map-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.reveal-cue {
  display: grid;
  justify-items: center;
  gap: .7rem;
  margin-top: clamp(3rem, 9vh, 5.5rem);
  color: rgba(255,248,239,.82);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  animation: cuePulse 2.2s ease-in-out infinite;
}

.reveal-cue i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  font-style: normal;
  animation: nudge 1.4s ease-in-out infinite;
}

.reveal-cue:hover,
.reveal-cue:focus-visible {
  color: var(--cream);
}

.section-shell {
  width: min(100% - 2.5rem, 1040px);
  margin: 0 auto;
  text-align: center;
}

.invitation {
  position: relative;
  display: grid;
  align-items: center;
  padding: 4.6rem 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(240,167,189,.35), transparent 28%),
    radial-gradient(circle at 90% 85%, rgba(146,201,234,.38), transparent 30%),
    var(--paper);
}

.invitation .section-shell {
  text-align: center;
}

.invitation h2 {
  margin-bottom: 1rem;
}

.lede {
  max-width: 570px;
  margin: 0 auto 2.5rem;
  color: rgba(24,22,47,.68);
  font-size: 1.08rem;
  line-height: 1.7;
}

.invitation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 700px;
  margin: 0 auto;
}

.event-card,
.team-invite {
  display: grid;
  align-content: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(24,22,47,.1);
  border-radius: 28px;
  background: rgba(255,255,255,.46);
  box-shadow: 0 20px 55px rgba(50,35,60,.08);
  backdrop-filter: blur(14px);
}

.date-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.date-day {
  padding-right: 1.25rem;
  border-right: 1px solid rgba(24,22,47,.22);
  font-family: var(--serif);
  font-size: clamp(5rem, 20vw, 8rem);
  line-height: .8;
}

.date-meta {
  display: grid;
  gap: .4rem;
  justify-items: center;
}

.date-meta strong {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 400;
}

.date-meta small {
  color: rgba(24,22,47,.65);
  font-size: .92rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-top: 1px solid rgba(24,22,47,.14);
  border-bottom: 1px solid rgba(24,22,47,.14);
}

.countdown div {
  display: grid;
  gap: .3rem;
  padding: 1.35rem .3rem;
}

.countdown div + div {
  border-left: 1px solid rgba(24,22,47,.14);
}

.countdown strong {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 6vw, 3.2rem);
  font-weight: 400;
}

.countdown span {
  color: rgba(24,22,47,.55);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.team-intro {
  margin: 0 auto 1.8rem;
  color: rgba(24,22,47,.62);
  font-size: 1.05rem;
}

.team-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.team-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  justify-items: center;
  align-items: center;
  min-height: 104px;
  padding: 1.15rem;
  border: 1px solid rgba(24,22,47,.1);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 14px 35px rgba(37,32,65,.07);
}

.team-blue {
  background: linear-gradient(135deg, rgba(146,201,234,.35), rgba(255,255,255,.42));
}

.team-pink {
  background: linear-gradient(135deg, rgba(240,167,189,.34), rgba(255,255,255,.42));
}

.team-color {
  width: 34px;
  height: 34px;
  border: 6px solid rgba(255,255,255,.62);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(24,22,47,.12);
}

.team-blue .team-color { background: #73b9e4; }
.team-pink .team-color { background: #e994ae; }

.team-card div {
  display: grid;
  gap: .35rem;
  justify-items: center;
}

.team-card strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
}

.team-card small {
  color: rgba(24,22,47,.62);
  font-size: .8rem;
  line-height: 1.4;
}

.details,
.teams,
.rsvp {
  padding: 4.8rem 0;
  background: var(--ink);
}

.details h2 {
  max-width: 10ch;
  margin-right: auto;
  margin-left: auto;
}

.location-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  justify-items: center;
  align-items: center;
  max-width: 820px;
  margin: 2rem auto 0;
  padding: .9rem .9rem clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(16px);
}

.map-preview {
  width: 100%;
  min-height: 250px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink-soft);
}

.map-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.location-card h3 {
  margin-bottom: .35rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.location-card p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.location-copy {
  display: grid;
  justify-items: center;
}

.teams {
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(146,201,234,.34), transparent 33%),
    radial-gradient(circle at 85% 100%, rgba(240,167,189,.34), transparent 33%),
    var(--paper);
}

.teams h2 {
  margin-bottom: .7rem;
}

.teams .team-invite {
  max-width: 760px;
  margin: 0 auto;
}

.rsvp {
  color: var(--ink);
  background:
    linear-gradient(150deg, rgba(240,167,189,.18), transparent 40%),
    linear-gradient(330deg, rgba(146,201,234,.2), transparent 42%),
    var(--cream);
}

.rsvp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 760px;
}

.rsvp-copy {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.rsvp-copy p:last-child {
  color: rgba(24,22,47,.65);
  font-size: 1.05rem;
  line-height: 1.7;
}

.rsvp-form {
  display: grid;
  gap: .8rem;
  padding: clamp(1.35rem, 4vw, 2.2rem);
  border: 1px solid rgba(24,22,47,.12);
  border-radius: 26px;
  background: rgba(255,255,255,.54);
  box-shadow: 0 24px 70px rgba(50,35,60,.11);
  backdrop-filter: blur(15px);
  text-align: left;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.rsvp-form > label,
.rsvp-form legend {
  margin-top: .45rem;
  font-size: .9rem;
  font-weight: 800;
}

.rsvp-form label span {
  color: rgba(24,22,47,.52);
  font-weight: 500;
}

.rsvp-form input[type="text"],
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(24,22,47,.17);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.rsvp-form textarea {
  min-height: 125px;
  resize: vertical;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  border-color: #786a8b;
  box-shadow: 0 0 0 4px rgba(120,106,139,.12);
}

fieldset {
  margin: .7rem 0;
  border: 0;
  padding: 0;
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .8rem;
}

.attendance-options label {
  position: relative;
  cursor: pointer;
}

.attendance-options input {
  position: absolute;
  opacity: 0;
}

.attendance-options span {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid rgba(24,22,47,.17);
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  color: var(--ink) !important;
  font-weight: 800 !important;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.attendance-options input:checked + span {
  border-color: transparent;
  background: linear-gradient(120deg, rgba(240,167,189,.7), rgba(146,201,234,.72));
  transform: translateY(-1px);
}

.attendance-options input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.submit-button {
  width: 100%;
  margin-top: .8rem;
  background: var(--ink);
  color: var(--cream);
}

.submit-button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.form-status {
  min-height: 1.5rem;
  margin: .2rem 0 0;
  color: #4b3d62;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
}

.form-status.is-success {
  color: #356449;
}

.form-status.is-error {
  color: #9a3e4f;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-12px) rotate(1.2deg); }
}

@keyframes pop {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(.02); opacity: 0; }
}

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(4px); }
}

@keyframes cuePulse {
  0%, 100% { opacity: .62; }
  50% { opacity: 1; }
}

@keyframes ambientFall {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
    opacity: 0;
  }
  10%, 84% { opacity: .58; }
  100% {
    transform: translate3d(var(--drift), 124vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .intro {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: .5rem;
    padding: 1.7rem 1.1rem 1rem;
  }

  .intro-copy {
    align-self: start;
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 3.5rem);
  }

  .balloon-button {
    width: min(94vw, 430px);
    height: min(62svh, 560px);
    align-self: center;
  }

  .ambient-confetti span:nth-child(n + 14) {
    display: none;
  }

  .rsvp-layout,
  .invitation-grid {
    grid-template-columns: 1fr;
  }

  .invitation,
  .details,
  .teams,
  .rsvp {
    padding: 3.8rem 0;
  }

  .invitation h2,
  .details h2,
  .teams h2,
  .rsvp h2 {
    margin-bottom: .75rem;
  }

  .lede {
    margin-bottom: 1.8rem;
  }

  .location-card {
    margin-top: 1.5rem;
  }

  .map-preview {
    min-height: 230px;
    aspect-ratio: 4 / 3;
  }

  .map-link {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .date-lockup {
    gap: .9rem;
  }

  .date-day {
    padding-right: .9rem;
  }

  .countdown span {
    font-size: .6rem;
    letter-spacing: .08em;
  }

  .attendance-options {
    grid-template-columns: 1fr;
  }

  .team-options {
    grid-template-columns: 1fr;
  }

  .event-card,
  .team-invite {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient-confetti { display: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
