:root {
  --velvet: #D9B4BA;
  --paper: #FBF3F2;
  --white: #FFFFFF;
  --plum: #3A1430;
  --plum-2: #64304F;
  --fuchsia: #AD1460;
  --fuchsia-press: #8C0E4D;
  --rose: #F2B5C8;
  --rose-wash: #F7E1E6;
  --silver: #BDB7C3;
  --silver-line: #DCD5DD;
  --display: "Bagel Fat One", ui-rounded, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --shadow-print: 0 2px 4px rgb(58 20 48 / .08), 0 22px 44px -18px rgb(58 20 48 / .38);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--rose) var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--plum);
  font: 400 1.125rem/1.55 var(--body); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--fuchsia); color: var(--white); }
img, svg { display: block; max-width: 100%; }
a { color: var(--fuchsia); text-underline-offset: .18em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid var(--fuchsia); outline-offset: 3px; border-radius: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* The injected sprite ships a rainbow mane and a gold horn; retint it to the dress: rose, satin and silver. */
#u-butter stop:first-child { stop-color: #FCE7EC; } #u-butter stop:last-child { stop-color: #F2B8C9; }
#u-mint stop:first-child { stop-color: #FFFFFF; } #u-mint stop:last-child { stop-color: #D6D0DB; }
#u-blue stop:first-child { stop-color: #F4F1F6; } #u-blue stop:last-child { stop-color: #BDB5C6; }
#u-lilac stop:first-child { stop-color: #F9D6E3; } #u-lilac stop:last-child { stop-color: #E28CB1; }
#u-head stop:last-child { stop-color: #F2E4EA; }
#u-horn stop:nth-child(1) { stop-color: #FFFFFF; } #u-horn stop:nth-child(2) { stop-color: #E2DCE6; } #u-horn stop:nth-child(3) { stop-color: #A79EB2; }
[stroke="#FFF7DE"] { stroke: #FFFFFF; }
[stroke="#C98A1E"] { stroke: #7F7590; }
#u-soft feDropShadow { flood-color: #64304F; }

.mute {
  position: fixed; z-index: 50; top: max(10px, env(safe-area-inset-top)); right: 10px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--silver-line); border-radius: 10px; background: rgb(255 255 255 / .94); color: var(--plum);
  font: 700 .875rem/1 var(--body); cursor: pointer;
  box-shadow: 0 1px 2px rgb(58 20 48 / .12), 0 6px 14px -8px rgb(58 20 48 / .3);
}
.mute svg { width: 20px; height: 20px; }
.mute .mute__off, .mute.is-muted .mute__on { display: none; }
.mute.is-muted .mute__off { display: block; }

.caption {
  position: fixed; z-index: 49; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); width: max-content; max-width: min(92vw, 560px);
  margin: 0; padding: 10px 16px; border-radius: 12px;
  background: rgb(58 20 48 / .92); color: var(--white); text-align: center;
  font: 600 1.0625rem/1.4 var(--body);
  box-shadow: 0 12px 28px -14px rgb(58 20 48 / .7);
  pointer-events: none;
}
.caption[hidden] { display: none; }

.direction-tag {
  position: fixed; z-index: 50; top: max(10px, env(safe-area-inset-top)); left: 10px;
  margin: 0; padding: 5px 9px; border-radius: 7px;
  background: rgb(255 255 255 / .92); color: var(--plum);
  font: 600 .75rem/1.2 var(--body); letter-spacing: .01em;
  box-shadow: 0 1px 2px rgb(58 20 48 / .12), 0 6px 14px -8px rgb(58 20 48 / .3);
}

/* The hero backdrop is the same dusty-rose velvet as the studio backdrop in her portrait. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  background-color: var(--velvet);
  background-image:
    radial-gradient(80% 55% at 50% 34%, rgb(255 246 248 / .55), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.009' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .3  0 0 0 0 .38  0 0 0 .7 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, cover;
  background-repeat: no-repeat;
  padding: calc(52px + env(safe-area-inset-top)) 16px 28px;
  display: grid; justify-items: center; align-content: center; text-align: center;
}
.hero__greet { margin: 0; font-weight: 600; font-size: 1.375rem; line-height: 1.25; color: var(--plum); }

.stage {
  position: relative; width: min(100%, 860px);
  aspect-ratio: 358 / 380; max-height: 52svh;
  margin: 6px auto 0;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.slot { position: absolute; pointer-events: none; }
.slot-name { left: 2%; right: 2%; top: 4%; height: 30%; }
.slot-five { left: 32%; right: 32%; top: 38%; height: 44%; }
.slot-knot { left: 50%; top: 94%; width: 1px; height: 1px; }

.name-fallback {
  position: absolute; inset: 0; margin: 0; z-index: 1;
  display: grid; place-content: center; justify-items: center; gap: 0;
  font-family: var(--display); font-weight: 400; line-height: .9; letter-spacing: -.01em;
}
.name-fallback__name {
  font-size: clamp(4.25rem, 22vw, 9rem); color: #A24B62;
  -webkit-text-stroke: .045em #FFF4F6; paint-order: stroke fill;
  text-shadow: 0 .06em .12em rgb(58 20 48 / .28);
}
.name-fallback__five {
  font-size: clamp(6.5rem, 34vw, 12rem); color: var(--fuchsia); margin-top: .02em;
  -webkit-text-stroke: .04em #FFF4F6; paint-order: stroke fill;
  text-shadow: 0 .05em .12em rgb(58 20 48 / .3);
}
.hero.gl-on .name-fallback { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.stage__tap {
  position: absolute; inset: 0; z-index: 3; display: none;
  border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer;
  border-radius: 24px; -webkit-tap-highlight-color: transparent;
}
.hero.gl-on .stage__tap { display: block; }
.stage__tap:focus-visible { outline: 3px solid var(--plum); outline-offset: -3px; }

.stage__hint {
  position: absolute; z-index: 2; left: 0; right: 0; top: 14%;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
  font-weight: 700; font-size: 1.125rem; color: var(--plum); pointer-events: none;
  opacity: 0; transition: opacity .4s ease;
}
.stage__hint svg { width: 26px; height: 26px; flex: none; }
.hero.gl-on[data-state="ready"] .stage__hint { opacity: 1; }

.uni {
  position: absolute; z-index: 2; left: 0; bottom: 0; width: 24%; max-width: 120px;
  transform-origin: 50% 100%; pointer-events: none;
  transition: transform .7s cubic-bezier(.2, 1.6, .4, 1);
}
.uni.is-awake { transform: translateY(-6%) rotate(-4deg); }
.uni.is-tickled { animation: tickle .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tickle { 30% { transform: translateY(-14%) rotate(6deg); } 60% { transform: translateY(-4%) rotate(-8deg); } }

.hero__who { display: none; }
.hero.gl-on[data-state="ready"] .hero__who { display: inline; }
.hero__turning { margin: 10px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 6.4vw, 2.25rem); line-height: 1.1; color: var(--plum); }

.when {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; gap: 4px; font-size: 1.125rem; line-height: 1.35;
}
.when li { display: flex; align-items: center; justify-content: center; gap: 8px; }
.when svg { width: 20px; height: 20px; flex: none; color: var(--fuchsia); }
.when strong { font-weight: 700; }
.when .when__place { color: var(--plum-2); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 16px;
  font: 700 1.0625rem/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s ease, transform .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--fuchsia); color: var(--white); box-shadow: 0 10px 22px -12px rgb(140 14 77 / .8); }
.btn--primary:hover { background: var(--fuchsia-press); }
.btn--primary:active { transform: translateY(1px); }
.btn--quiet { background: var(--white); color: var(--plum); border-color: var(--silver-line); }
.btn--quiet:hover { border-color: var(--plum-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.hero__cta { margin-top: 18px; }

.section { padding: 72px 18px; }
.wrap { width: min(100%, 1040px); margin: 0 auto; }
.h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 8vw, 3rem); line-height: 1.02; letter-spacing: -.01em; color: var(--plum); text-wrap: balance; }
.lede { margin: 0; max-width: 34ch; color: var(--plum-2); }

.portrait { display: grid; gap: 34px; align-items: center; }
.print { position: relative; margin: 26px auto 0; width: min(88%, 420px); transform: rotate(-1.6deg); }
.print__mat { background: var(--white); padding: 14px; border: 1px solid var(--silver-line); border-radius: 3px; box-shadow: var(--shadow-print); }
.print img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.print__bow { position: absolute; left: 50%; top: -30px; width: 96px; transform: translateX(-50%) rotate(3deg); filter: drop-shadow(0 4px 4px rgb(58 20 48 / .22)); }
.print figcaption { padding: 12px 2px 2px; font-size: 1rem; color: var(--plum-2); }

.card {
  position: relative; width: min(100%, 560px); margin: 0 auto;
  background: var(--white); border-radius: 22px; padding: 30px 24px 26px;
  border: 1px solid var(--silver-line);
  box-shadow: 0 1px 2px rgb(58 20 48 / .06), 0 28px 50px -30px rgb(58 20 48 / .45);
}
.card::after { content: ""; position: absolute; inset: 8px; border: 1px solid var(--rose); border-radius: 15px; pointer-events: none; }
.card__horn { width: 22px; height: 48px; margin: 0 auto 6px; }
.card__title { margin: 0; text-align: center; font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 8vw, 2.5rem); line-height: 1.02; }
.card__sub { margin: 6px 0 20px; text-align: center; color: var(--plum-2); font-weight: 600; }
.facts { margin: 0; display: grid; gap: 0; }
.fact { display: grid; grid-template-columns: 28px 1fr; gap: 2px 14px; padding: 14px 4px; border-top: 1px solid var(--silver-line); }
.fact svg { grid-row: span 2; width: 24px; height: 24px; color: var(--fuchsia); margin-top: 2px; }
.fact dt { font-size: .9375rem; font-weight: 600; color: var(--plum-2); }
.fact dd { margin: 0; font-weight: 700; line-height: 1.4; }
.fact dd span { display: block; font-weight: 400; color: var(--plum-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

.rsvp { background: var(--rose-wash); }
.rsvp .wrap { width: min(100%, 600px); }
.form { display: grid; gap: 22px; margin-top: 26px; }
.field { display: grid; gap: 8px; }
.label { font-weight: 700; font-size: 1.0625rem; }
.hint { font-size: .9375rem; color: var(--plum-2); }
.input, .textarea {
  width: 100%; font: 400 1.125rem/1.4 var(--body); color: var(--plum);
  background: var(--white); border: 2px solid var(--silver-line); border-radius: 14px; padding: 13px 14px;
  caret-color: var(--fuchsia);
}
.textarea { min-height: 104px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #7A5A6E; }
.input:focus, .textarea:focus { outline: none; border-color: var(--fuchsia); box-shadow: 0 0 0 3px rgb(173 20 96 / .18); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 14px;
  background: var(--white); border: 2px solid var(--silver-line); border-radius: 14px;
  font-weight: 700; line-height: 1.25;
}
.choice span::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--silver); background: var(--white); }
.choice input:checked + span { border-color: var(--fuchsia); background: #FFF6F9; }
.choice input:checked + span::before { border: 7px solid var(--fuchsia); }
.choice input:focus-visible + span { outline: 3px solid var(--fuchsia); outline-offset: 3px; }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counts[hidden] { display: none; }
.stepper { display: grid; gap: 8px; }
.stepper__row { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; background: var(--white); border: 2px solid var(--silver-line); border-radius: 14px; overflow: hidden; }
.stepper button { height: 52px; border: 0; background: transparent; color: var(--plum); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--rose-wash); }
.stepper button svg { width: 20px; height: 20px; }
.stepper output { text-align: center; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.error { margin: 0; color: #9B1048; font-weight: 700; font-size: 1rem; }
.error[hidden] { display: none; }
.form .btn--primary { width: 100%; }

.thanks { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 0 8px; }
.thanks[hidden] { display: none; }
.thanks svg { width: 150px; height: auto; }
.thanks h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.05; }
.thanks p { margin: 0; max-width: 34ch; }

.foot { padding: 40px 18px 56px; text-align: center; color: var(--plum-2); font-size: 1rem; }
.foot p { margin: 0; }

@media (max-width: 759px) and (max-height: 760px) {
  .hero { padding-top: calc(44px + env(safe-area-inset-top)); padding-bottom: 84px; }
  .stage { max-height: 44svh; }
}

@media (min-width: 760px) {
  .hero { padding: 64px 40px 40px; }
  .hero__greet { font-size: 1.625rem; }
  .hero { padding-top: 48px; }
  .stage { aspect-ratio: 860 / 500; max-height: 60svh; }
  .slot-name { left: 6%; right: 6%; top: 2%; height: 44%; }
  .slot-five { left: 38%; right: 38%; top: 47%; height: 44%; }
  .uni { width: 14%; left: 20%; }
  .when { grid-auto-flow: column; gap: 28px; justify-content: center; margin-top: 18px; }
  .when li { justify-content: flex-start; }
  .section { padding: 112px 40px; }
  .portrait { grid-template-columns: 5fr 6fr; gap: 72px; }
  .print { margin: 30px 0 0; width: 100%; }
  .card { padding: 40px 44px 34px; }
  .lede { font-size: 1.25rem; }
}

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