/* Layout: a party-invitation stack. Foil "70" balloons over a stage where dancers parade,
   then gold-framed invitation and RSVP cards on a midnight royal-blue ground.
   Single dark theme by design: the invitation lives in one blue-and-gold world. */
:root {
  --night: #07122B;
  --night-2: #0A1838;
  --navy: #0C1C44;
  --navy-2: #13285E;
  --royal: #1F4FBF;
  --sky: #8DB4FF;
  --gold: #E6B94A;
  --gold-hi: #FFE39A;
  --gold-lo: #A67818;
  --cream: #FFF5DD;
  --muted: #B9C3DE;
  --line: rgba(230, 185, 74, 0.32);
  --line-strong: rgba(230, 185, 74, 0.72);
  --gold-wash: rgba(230, 185, 74, 0.12);
  --gold-glow: rgba(230, 185, 74, 0.45);
  --sky-wash: rgba(141, 180, 255, 0.08);
  --sky-line: rgba(141, 180, 255, 0.28);
  --royal-glow: rgba(31, 79, 191, 0.5);
  --night-glass: rgba(7, 18, 43, 0.6);
  --glint: rgba(255, 255, 255, 0.55);
  --shadow: rgba(2, 6, 18, 0.6);
  --ok: #8FE3B0;
  --ok-wash: rgba(143, 227, 176, 0.1);
  --err: #FF9C8A;
  --err-wash: rgba(255, 156, 138, 0.1);
  --r-sm: 10px;
  --r-md: 16px;
  --font-script: "Birthstone Bounce", "Segoe Script", "Brush Script MT", cursive;
  --font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--sky); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--gold); color: var(--night); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

#app { position: relative; }

/* Global pause switch for every animation on the page */
html.motion-paused *, html.motion-paused *::before, html.motion-paused *::after {
  animation-play-state: paused !important;
}

/* ---------- Shared type ---------- */
.eyebrow {
  margin: 0;
  font: 500 12px/1.3 var(--font-body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.script { font-family: var(--font-script); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background:
    radial-gradient(120% 55% at 50% 0%, var(--royal-glow), transparent 64%),
    radial-gradient(70% 34% at 50% 58%, var(--gold-wash), transparent 70%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  padding-block: 58px 0;
}
.hero-text { display: grid; justify-items: center; min-width: 0; }
.hero-name {
  margin: 4px 0 0;
  font-family: var(--font-script);
  font-weight: 500;
  font-size: clamp(58px, 17vw, 132px);
  line-height: 0.98;
  color: var(--cream);
  text-shadow: 0 2px 22px var(--shadow);
  overflow-wrap: anywhere;
}
.hero-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  white-space: nowrap;
  font: 500 11.5px/1.3 var(--font-body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.hero-tag::before, .hero-tag::after {
  content: "";
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero-tag::after { transform: scaleX(-1); }
.hero-when {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-where { display: none; margin: 2px 0 0; color: var(--muted); }
.hero-text .hero-cta { display: none; }
.seventy {
  width: min(64vw, 300px);
  margin-top: 6px;
}
.seventy svg { display: block; width: 100%; height: auto; overflow: visible; }

.motion-toggle {
  position: absolute;
  top: 12px;
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--night-glass);
  color: var(--gold-hi);
  font: 500 11.5px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.motion-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.motion-toggle .mt-play { display: none; }
.motion-toggle[aria-pressed="true"] .mt-play { display: inline; }
.motion-toggle[aria-pressed="true"] .mt-pause { display: none; }
.motion-toggle:hover { border-color: var(--line-strong); }

.stage {
  position: relative;
  z-index: 1;
  height: 200px;
  overflow: hidden;
  margin-top: -6px;
}

/* ---------- Main cards ---------- */
.page-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 36px;
  max-width: 760px;
  padding-block: 34px 20px;
}
.card {
  position: relative;
  padding: 42px 22px 32px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background:
    radial-gradient(90% 40% at 50% 0%, var(--sky-wash), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--night-2) 100%);
  box-shadow: 0 34px 60px -34px var(--shadow);
  scroll-margin-top: 16px;
}
.card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--gold-glow);
}
.corner.tl { top: 2.5px; left: 2.5px; }
.corner.tr { top: 2.5px; right: 2.5px; }
.corner.bl { bottom: 2.5px; left: 2.5px; }
.corner.br { bottom: 2.5px; right: 2.5px; }

.card-head { display: grid; justify-items: center; text-align: center; gap: 2px; margin-bottom: 26px; }
.card-title {
  margin: 2px 0 6px;
  font-family: var(--font-script);
  font-weight: 500;
  font-size: clamp(46px, 12.5vw, 64px);
  line-height: 1;
  color: var(--gold-hi);
}
.card-lede { margin: 0; max-width: 44ch; color: var(--muted); }
.card-lede.is-note { color: var(--cream); font-size: 20px; font-weight: 400; letter-spacing: 0.01em; white-space: pre-line; }

/* Invitation facts */
.facts { display: grid; margin: 0; }
.fact {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 6px;
  text-align: center;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.fact:first-child { border-top: 0; padding-top: 4px; }
.fact dt {
  font: 500 12px/1.3 var(--font-body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.fact dd { margin: 0; display: grid; justify-items: center; gap: 3px; min-width: 0; }
.fact-main { font-size: 20px; font-weight: 400; line-height: 1.35; color: var(--cream); overflow-wrap: anywhere; }
.fact-sub { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.fact-note { color: var(--cream); font-size: 18px; }
.fact-tbd { color: var(--muted); font-style: italic; }
.fact-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 400;
  color: var(--sky);
  text-decoration: none;
  border-bottom: 1px solid var(--sky-line);
  padding-bottom: 1px;
}
.fact-link:hover { color: var(--cream); border-color: var(--cream); }
.fact-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fact-place {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 14px 10px;
  border-radius: var(--r-sm);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.fact-place:hover { background: var(--gold-wash); }
.fact-place:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.fact-go {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 400;
  color: var(--sky);
  border-bottom: 1px solid var(--sky-line);
  padding-bottom: 1px;
}
.fact-go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.map-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.invite-cta { justify-self: center; margin-top: 22px; }
.invite-actions { display: flex; justify-content: center; }

/* ---------- RSVP form ---------- */
.form { display: grid; gap: 24px; text-align: left; }
.field { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label {
  padding: 0;
  font: 500 12.5px/1.35 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.field-label .optional { letter-spacing: 0.04em; text-transform: none; color: var(--muted); font-weight: 400; }
.input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  font: 400 17px/1.4 var(--font-body);
  color: var(--cream);
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--muted); opacity: 0.6; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
textarea.input { min-height: 104px; resize: vertical; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }

.choice-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.choice-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 14px;
  text-align: center;
  line-height: 1.3;
  font-weight: 400;
  color: var(--cream);
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice-pill:hover { border-color: var(--line-strong); }
.choice-row input:checked + .choice-pill {
  color: var(--night);
  font-weight: 600;
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 8px 22px -12px var(--gold-glow);
}
.choice-row input:focus-visible + .choice-pill { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.stepper {
  display: inline-flex;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--night);
  overflow: hidden;
}
.stepper button {
  width: 54px;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--gold-hi);
  font: 400 24px/1 var(--font-body);
  cursor: pointer;
}
.stepper button:hover { background: var(--gold-wash); }
.stepper button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: -3px; }
.stepper input {
  width: 64px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  text-align: center;
  font: 500 20px/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input:focus { outline: none; background: var(--gold-wash); }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.guest-names { display: grid; gap: 10px; }
.guest-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 12px; }
.guest-row label { font-size: 14px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }
.form-error { margin: 0; color: var(--err); font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons & shared UI ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1.2 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-gold {
  color: var(--night);
  font-weight: 600;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, var(--gold-lo) 130%);
  border-color: var(--gold-hi);
  box-shadow: 0 10px 26px -12px var(--gold-glow), inset 0 1px 0 var(--glint);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn-gold:active:not(:disabled) { transform: translateY(0); }
.btn-ghost { color: var(--gold-hi); background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--gold-wash); }
.btn-quiet {
  min-height: 0;
  padding: 6px 2px;
  color: var(--sky);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--sky-line);
}
.btn-quiet:hover { color: var(--cream); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14.5px; }
.btn-block { width: 100%; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.notice {
  padding: 14px 16px;
  border: 1px solid var(--sky-line);
  border-radius: var(--r-sm);
  background: var(--sky-wash);
  color: var(--cream);
}
.notice.is-ok { border-color: var(--ok); background: var(--ok-wash); }
.notice.is-err { border-color: var(--err); background: var(--err-wash); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--cream);
}
.chip-gold { color: var(--gold-hi); background: var(--gold-wash); border-color: var(--line-strong); }
.chip-muted { color: var(--muted); background: var(--sky-wash); border-color: var(--sky-line); }

.copybox {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--night);
  color: var(--cream);
  font: 400 16px/1.5 var(--font-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}

/* ---------- Footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-block: 28px 72px;
  text-align: center;
}
.foot-ornament { display: flex; align-items: center; gap: 12px; }
.foot-ornament::before, .foot-ornament::after {
  content: "";
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.foot-ornament::after { transform: scaleX(-1); }
.foot-ornament span { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.foot-sign {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  color: var(--gold-hi);
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .card { padding: 54px 48px 42px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact, .fact:first-child { border-top: 0; padding: 18px 16px; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .fact:nth-child(even) { border-left: 1px solid var(--line); }
  .fact:last-child:nth-child(odd) { grid-column: 1 / -1; border-left: 0; }
}
@media (min-width: 768px) {
  .stage { height: 260px; }
  .seventy { width: min(56vw, 400px); }
}
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    justify-items: start;
    column-gap: 40px;
    text-align: left;
    padding-block: 64px 0;
  }
  .hero-text { justify-items: start; }
  .hero-tag::before { display: none; }
  .hero-when { font-size: 18px; color: var(--cream); margin-top: 22px; }
  .hero-where { display: block; font-size: 17px; }
  .hero-text .hero-cta { display: flex; margin-top: 26px; }
  .hero-name { font-size: clamp(72px, 7.4vw, 116px); }
  .hero-tag { font-size: 12.5px; letter-spacing: 0.3em; }
  .seventy { justify-self: center; width: min(34vw, 400px); margin-top: 0; }
  .stage { margin-top: -26px; }
}

@media (max-width: 359px) {
  .choice-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-toggle { display: none; }
  .btn { transition: none; }
}

/* ---------- Foil 70 ---------- */
.ha-seventy { display: block; width: 100%; height: auto; overflow: visible; }
.ha-seventy .ha-num, .ha-seventy .ha-strings { transform-box: view-box; }
.ha-seventy .ha-n7 { transform-origin: 110px 290px; animation: ha-bob7 3.8s ease-in-out infinite; }
.ha-seventy .ha-n0 { transform-origin: 284px 298px; animation: ha-bob0 4.4s ease-in-out -1.6s infinite; }
.ha-seventy .ha-strings { transform-origin: 198px 438px; animation: ha-sway 4.1s ease-in-out infinite; }
@keyframes ha-bob7 {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(-1.5deg); }
}
@keyframes ha-bob0 {
  0%, 100% { transform: translateY(-1px) rotate(1.5deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
@keyframes ha-sway {
  0%, 100% { transform: skewX(-1.6deg); }
  50% { transform: skewX(1.6deg); }
}

/* ---------- Rising balloons (fixed layer behind the page) ---------- */
.ha-balloons {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ha-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ha-b {
  position: absolute;
  bottom: 0;
  width: var(--bw, 60px);
  transform: translateY(105%);
  animation: ha-rise 20s linear infinite;
  will-change: transform;
}
.ha-b svg { display: block; width: 100%; height: auto; overflow: visible; }
.ha-bs {
  transform-origin: 50% 100%;
  animation: ha-bsway 3.4s ease-in-out infinite alternate;
}
.ha-b:nth-child(3n) .ha-bs { animation-duration: 4.2s; animation-delay: -1.1s; }
.ha-b:nth-child(3n + 1) .ha-bs { animation-duration: 3s; animation-delay: -2s; }
.ha-far { opacity: 0.78; }
@keyframes ha-rise {
  from { transform: translateY(105%); }
  to { transform: translateY(-100vh); }
}
@keyframes ha-bsway {
  from { transform: rotate(-6deg) translateX(-4px); }
  to { transform: rotate(6deg) translateX(4px); }
}
.ha-b1  { left: 3%;  --bw: 64px; --park: 62vh; animation-duration: 19s; animation-delay: -3s; }
.ha-b2  { left: 13%; --bw: 38px; --park: 30vh; animation-duration: 30s; animation-delay: -17s; }
.ha-b3  { left: 22%; --bw: 70px; --park: 78vh; animation-duration: 21s; animation-delay: -12s; }
.ha-b4  { left: 31%; --bw: 42px; --park: 18vh; animation-duration: 28s; animation-delay: -6s; }
.ha-b5  { left: 42%; --bw: 58px; --park: 48vh; animation-duration: 18s; animation-delay: -9s; }
.ha-b6  { left: 52%; --bw: 36px; --park: 12vh; animation-duration: 32s; animation-delay: -25s; }
.ha-b7  { left: 62%; --bw: 68px; --park: 70vh; animation-duration: 22s; animation-delay: -1s; }
.ha-b8  { left: 71%; --bw: 44px; --park: 26vh; animation-duration: 27s; animation-delay: -14s; }
.ha-b9  { left: 80%; --bw: 62px; --park: 56vh; animation-duration: 20s; animation-delay: -7s; }
.ha-b10 { left: 89%; --bw: 40px; --park: 9vh;  animation-duration: 31s; animation-delay: -21s; }
.ha-b11 { left: 8%;  --bw: 52px; --park: 88vh; animation-duration: 24s; animation-delay: -19s; }
.ha-b12 { left: 47%; --bw: 46px; --park: 36vh; animation-duration: 26s; animation-delay: -2s; }
.ha-b13 { left: 68%; --bw: 56px; --park: 90vh; animation-duration: 23s; animation-delay: -16s; }
.ha-b14 { left: 92%; --bw: 60px; --park: 40vh; animation-duration: 21s; animation-delay: -11s; }
@media (max-width: 600px) {
  .ha-b { width: calc(var(--bw, 60px) * 0.74); }
  .ha-xs-hide { display: none; }
}

/* ---------- Hero sparkles ---------- */
.ha-sparkles { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ha-sparkles svg { width: 100%; height: 100%; display: block; }
.ha-sp { transform-box: fill-box; transform-origin: center; animation: ha-tw 3.4s ease-in-out infinite; }
.ha-tw1 { animation-duration: 2.6s; animation-delay: -0.4s; }
.ha-tw2 { animation-duration: 3.4s; animation-delay: -1.7s; }
.ha-tw3 { animation-duration: 4.2s; animation-delay: -2.9s; }
.ha-tw4 { animation-duration: 3s; animation-delay: -0.9s; }
.ha-tw5 { animation-duration: 5s; animation-delay: -3.6s; }
@keyframes ha-tw {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- Stage backdrop ---------- */
.ha-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ha-sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 64px;
  overflow: hidden;
  background: linear-gradient(180deg, #11295F 0%, #0B1D4A 55%, #08163A 100%);
  border-top: 1px solid rgba(141, 180, 255, 0.35);
  box-shadow: 0 -10px 24px -14px rgba(141, 180, 255, 0.45);
}
.ha-waves {
  display: block;
  width: 200%;
  height: 100%;
  animation: ha-drift 46s linear infinite;
}
.ha-waves path { vector-effect: non-scaling-stroke; }
@keyframes ha-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ha-palm { position: absolute; bottom: 22px; height: 176px; aspect-ratio: 160 / 220; }
.ha-palm-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ha-palm-l { left: -38px; }
.ha-palm-r { right: -38px; transform: scaleX(-1); }
.ha-fronds { transform-box: view-box; transform-origin: 92px 52px; animation: ha-palm 7s ease-in-out infinite; }
.ha-palm-r .ha-fronds { animation-delay: -3.2s; }
@keyframes ha-palm {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2.5deg); }
}
.ha-spot {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: min(1000px, 150vw);
  height: 230px;
  transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 100%, rgba(255, 227, 154, 0.17), rgba(141, 180, 255, 0.09) 48%, transparent 100%);
}
.ha-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: linear-gradient(180deg, #0A1A40, #050D22);
}
.ha-floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E6B94A 14%, #FFE39A 50%, #E6B94A 86%, transparent);
  box-shadow: 0 0 14px 1px rgba(230, 185, 74, 0.55);
}
.ha-floor::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 36px;
  background: linear-gradient(to top, rgba(230, 185, 74, 0.13), transparent);
}
@media (min-width: 768px) {
  .ha-palm { height: 236px; }
  .ha-palm-l { left: -16px; }
  .ha-palm-r { right: -16px; }
  .ha-sea { height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .ha-seventy .ha-n7 { animation: none; transform: rotate(-3deg); }
  .ha-seventy .ha-n0 { animation: none; transform: translateY(-3px) rotate(3deg); }
  .ha-seventy .ha-strings, .ha-bs, .ha-sp, .ha-waves, .ha-fronds { animation: none; }
  .ha-b { animation: none; transform: translateY(calc(var(--park) * -1)); }
  .ha-sp { opacity: 0.7; }
}

/* ---------- Parade ---------- */
.dn-parade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --dur: 26s;
  --n: 5;
  --w: 89px;
}
.dn-dancer {
  position: absolute;
  left: 0;
  bottom: 22px;
  height: 168px;
  aspect-ratio: 132 / 250;
  animation: dn-parade var(--dur) linear infinite;
  animation-delay: calc(var(--dur) / var(--n) * (var(--n) - 1 - var(--i)) * -1);
  will-change: transform;
}
.dn-fig { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes dn-parade {
  from { transform: translateX(-130px); }
  to { transform: translateX(calc(100vw + 10px)); }
}
.dn-k0 { --i: 0; } .dn-k1 { --i: 1; } .dn-k2 { --i: 2; } .dn-k3 { --i: 3; }
.dn-k4 { --i: 4; } .dn-k5 { --i: 5; } .dn-k6 { --i: 6; } .dn-k7 { --i: 7; }
.dn-k5, .dn-k6, .dn-k7 { display: none; }
@media (min-width: 640px) {
  .dn-parade { --n: 6; --dur: 30s; }
  .dn-k5 { display: block; }
}
@media (min-width: 768px) {
  .dn-parade { --w: 122px; }
  .dn-dancer { height: 232px; }
}
@media (min-width: 1000px) {
  .dn-parade { --n: 8; --dur: 36s; }
  .dn-k6, .dn-k7 { display: block; }
}

/* ---------- Pivots (viewBox units) ---------- */
.dn-fig g { transform-box: view-box; }
.dn-body { transform-origin: 60px 216px; }
.dn-upper { transform-origin: 60px 104px; }
.dn-head { transform-origin: 60px 50px; }
.dn-hips { transform-origin: 60px 140px; }
.dn-leg-l { transform-origin: 54px 104px; }
.dn-leg-r { transform-origin: 66px 104px; }
.dn-ua-l { transform-origin: 45px 60px; }
.dn-ua-r { transform-origin: 75px 60px; }
.dn-fa-l { transform-origin: 45px 85px; }
.dn-fa-r { transform-origin: 75px 85px; }
.dn-kb { transform-origin: 106.6px 22.3px; animation: dn-kb 1.6s ease-in-out infinite; }

/* ---------- Shared moves (beat = 0.5s) ---------- */
@keyframes dn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }
@keyframes dn-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-9px); } 70% { transform: translateY(-2px); } }
@keyframes dn-step { 0%, 50%, 100% { transform: translateY(0); } 25% { transform: translateY(-6px); } }
@keyframes dn-tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes dn-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes dn-hipsway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes dn-kb { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

.dn-fig .dn-leg-l { animation: dn-step 1s ease-in-out infinite; }
.dn-fig .dn-leg-r { animation: dn-step 1s ease-in-out -0.5s infinite; }
.dn-fig .dn-body { animation: dn-bob 0.5s ease-in-out infinite; }

/* Drummer: alternating hand strikes on the drumhead */
.dn-s-drum .dn-ua-l { transform: rotate(15deg); }
.dn-s-drum .dn-ua-r { transform: rotate(-15deg); }
.dn-s-drum .dn-fa-l { transform: rotate(-62deg); animation: dn-strike-l 0.5s ease-in-out infinite; }
.dn-s-drum .dn-fa-r { transform: rotate(62deg); animation: dn-strike-r 0.5s ease-in-out -0.25s infinite; }
.dn-s-drum .dn-head { animation: dn-tilt 1s ease-in-out infinite; }
@keyframes dn-strike-l { 0%, 100% { transform: rotate(-80deg); } 45% { transform: rotate(-60deg); } }
@keyframes dn-strike-r { 0%, 100% { transform: rotate(80deg); } 45% { transform: rotate(60deg); } }

/* Punta: hands on hips, fast hips, steady upper body */
.dn-s-punta .dn-ua-l { transform: rotate(35deg); }
.dn-s-punta .dn-fa-l { transform: rotate(-75deg); }
.dn-s-punta .dn-ua-r { transform: rotate(-35deg); }
.dn-s-punta .dn-fa-r { transform: rotate(75deg); }
.dn-s-punta .dn-hips { animation: dn-punta 0.5s ease-in-out infinite; }
.dn-s-punta .dn-upper { animation: dn-counter 0.5s ease-in-out infinite; }
.dn-s-punta .dn-leg-l { animation-duration: 0.5s; animation-delay: 0s; }
.dn-s-punta .dn-leg-r { animation-duration: 0.5s; animation-delay: -0.25s; }
@keyframes dn-punta { 0%, 100% { transform: rotate(-7deg) translateX(-1.5px); } 50% { transform: rotate(7deg) translateX(1.5px); } }
@keyframes dn-counter { 0%, 100% { transform: rotate(2deg); } 50% { transform: rotate(-2deg); } }

/* Elder: gentle sway with open arms */
.dn-s-elder .dn-ua-l { transform: rotate(70deg); animation: dn-open-l 1s ease-in-out infinite; }
.dn-s-elder .dn-ua-r { transform: rotate(-70deg); animation: dn-open-r 1s ease-in-out infinite; }
.dn-s-elder .dn-fa-l { transform: rotate(-35deg); }
.dn-s-elder .dn-fa-r { transform: rotate(35deg); }
.dn-s-elder .dn-body { animation: dn-elder 1s ease-in-out infinite; }
.dn-s-elder .dn-hips { animation: dn-hipsway 1s ease-in-out infinite; }
.dn-s-elder .dn-head { animation: dn-tilt 1s ease-in-out infinite; }
@keyframes dn-open-l { 0%, 100% { transform: rotate(60deg); } 50% { transform: rotate(84deg); } }
@keyframes dn-open-r { 0%, 100% { transform: rotate(-84deg); } 50% { transform: rotate(-60deg); } }
@keyframes dn-elder { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg) translateY(-2px); } }

/* Child: skipping with a balloon */
.dn-s-kid .dn-ua-r { transform: rotate(-150deg); }
.dn-s-kid .dn-fa-r { transform: rotate(20deg); }
.dn-s-kid .dn-ua-l { transform: rotate(20deg); animation: dn-kidarm 0.5s ease-in-out infinite; }
.dn-s-kid .dn-fa-l { transform: rotate(-30deg); }
.dn-s-kid .dn-body { animation: dn-hop 0.5s ease-in-out infinite; }
.dn-s-kid .dn-hips { animation: dn-hipsway 0.5s ease-in-out infinite; }
.dn-s-kid .dn-leg-l { animation-duration: 0.5s; animation-delay: 0s; }
.dn-s-kid .dn-leg-r { animation-duration: 0.5s; animation-delay: -0.25s; }
@keyframes dn-kidarm { 0%, 100% { transform: rotate(35deg); } 50% { transform: rotate(5deg); } }

/* Maracas: shaking overhead */
.dn-s-maracas .dn-ua-l { transform: rotate(150deg); animation: dn-mar-l 0.5s ease-in-out infinite; }
.dn-s-maracas .dn-ua-r { transform: rotate(-150deg); animation: dn-mar-r 0.5s ease-in-out -0.25s infinite; }
.dn-s-maracas .dn-fa-l { transform: rotate(-12deg); animation: dn-shake-l 0.25s ease-in-out infinite; }
.dn-s-maracas .dn-fa-r { transform: rotate(12deg); animation: dn-shake-r 0.25s ease-in-out infinite; }
.dn-s-maracas .dn-upper { animation: dn-sway 1s ease-in-out infinite; }
@keyframes dn-mar-l { 0%, 100% { transform: rotate(140deg); } 50% { transform: rotate(160deg); } }
@keyframes dn-mar-r { 0%, 100% { transform: rotate(-140deg); } 50% { transform: rotate(-160deg); } }
@keyframes dn-shake-l { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(-4deg); } }
@keyframes dn-shake-r { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(4deg); } }

/* Braids: arms up, celebrating */
.dn-s-wave .dn-ua-l { transform: rotate(160deg); animation: dn-wave-l 0.5s ease-in-out infinite; }
.dn-s-wave .dn-ua-r { transform: rotate(-160deg); animation: dn-wave-r 0.5s ease-in-out infinite; }
.dn-s-wave .dn-fa-l { transform: rotate(10deg); animation: dn-flick-l 0.5s ease-in-out infinite; }
.dn-s-wave .dn-fa-r { transform: rotate(-10deg); animation: dn-flick-r 0.5s ease-in-out infinite; }
.dn-s-wave .dn-hips { animation: dn-hipsway 0.5s ease-in-out infinite; }
@keyframes dn-wave-l { 0%, 100% { transform: rotate(150deg); } 50% { transform: rotate(172deg); } }
@keyframes dn-wave-r { 0%, 100% { transform: rotate(-172deg); } 50% { transform: rotate(-150deg); } }
@keyframes dn-flick-l { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-8deg); } }
@keyframes dn-flick-r { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-18deg); } }

/* Groove: one arm out, one across, swapping */
.dn-s-groove .dn-ua-l { transform: rotate(40deg); animation: dn-groove-ul 1s ease-in-out infinite; }
.dn-s-groove .dn-fa-l { transform: rotate(-70deg); animation: dn-groove-fl 1s ease-in-out infinite; }
.dn-s-groove .dn-ua-r { transform: rotate(-40deg); animation: dn-groove-ur 1s ease-in-out infinite; }
.dn-s-groove .dn-fa-r { transform: rotate(70deg); animation: dn-groove-fr 1s ease-in-out infinite; }
.dn-s-groove .dn-upper { animation: dn-sway 1s ease-in-out infinite; }
@keyframes dn-groove-ul { 0%, 100% { transform: rotate(30deg); } 50% { transform: rotate(95deg); } }
@keyframes dn-groove-fl { 0%, 100% { transform: rotate(-95deg); } 50% { transform: rotate(-35deg); } }
@keyframes dn-groove-ur { 0%, 100% { transform: rotate(-95deg); } 50% { transform: rotate(-30deg); } }
@keyframes dn-groove-fr { 0%, 100% { transform: rotate(35deg); } 50% { transform: rotate(95deg); } }

/* Handkerchief: waving overhead, other hand on hip */
.dn-s-hanky .dn-ua-l { transform: rotate(35deg); }
.dn-s-hanky .dn-fa-l { transform: rotate(-75deg); }
.dn-s-hanky .dn-ua-r { transform: rotate(-155deg); animation: dn-hanky-u 0.5s ease-in-out infinite; }
.dn-s-hanky .dn-fa-r { transform: rotate(-10deg); animation: dn-hanky-f 0.5s ease-in-out infinite; }
.dn-s-hanky .dn-hips { animation: dn-hipsway 0.5s ease-in-out infinite; }
.dn-s-hanky .dn-head { animation: dn-tilt 1s ease-in-out infinite; }
@keyframes dn-hanky-u { 0%, 100% { transform: rotate(-145deg); } 50% { transform: rotate(-165deg); } }
@keyframes dn-hanky-f { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(15deg); } }

/* ---------- Reduced motion: a still, evenly spaced group ---------- */
@media (prefers-reduced-motion: reduce) {
  .dn-dancer {
    animation: none;
    left: calc((100% - var(--w)) * var(--i) / (var(--n) - 1));
  }
  .dn-fig * { animation: none !important; }
  .dn-parade { --n: 4; }
  .dn-k4 { display: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 640px) {
  .dn-parade { --n: 5; }
  .dn-k4 { display: block; }
  .dn-k5 { display: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 1000px) {
  .dn-parade { --n: 8; }
  .dn-k5, .dn-k6, .dn-k7 { display: block; }
}

/* Self-hosted site additions */
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.rs-done { display: grid; justify-items: center; gap: 10px; padding: 4px 0; text-align: center; }
.rs-title {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 500;
  font-size: clamp(42px, 11vw, 56px);
  line-height: 1.05;
  color: var(--gold-hi);
}
.rs-title:focus { outline: none; }
.rs-line { margin: 0; max-width: 34ch; font-size: 18px; font-weight: 400; color: var(--cream); }
.rs-meta { max-width: 40ch; }
.rs-done .btn { margin-top: 6px; }
noscript p { margin: 40px auto; max-width: 30ch; text-align: center; color: var(--cream); }
.rs-guests { margin: 0; max-width: 36ch; color: var(--muted); }
