:root {
  --bg: #7e0a34;
  --wine: #7e0a34;
  --wine-deep: #5c0725;
  --ink: #3a0418;
  --muted: #74475a;
  --cream: #f3e6ea;
  --paper: #fdf9f4;
  --paper-edge: #efe4dc;
  --blush: #f6dfe6;
  --rule: rgb(126 10 52 / 0.28);
  --gold: #c9a24a;
  --error: #a3161f;
  --column: 480px;
  --script: "Hurricane", "Brush Script MT", cursive;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--cream);
  font: 400 16px/1.55 var(--serif);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

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

.column {
  position: relative;
  width: 100%;
  max-width: var(--column);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

.rsvp {
  position: relative;
  padding: 0 0 calc(120px + env(safe-area-inset-bottom));
}

.masthead {
  position: relative;
  padding: calc(62px + env(safe-area-inset-top)) 16px 26px 22px;
  min-height: 190px;
}

.masthead__home {
  position: relative;
  z-index: 2;
  display: inline-block;
  font: 400 68px/0.9 var(--script);
  color: var(--cream);
  text-decoration: none;
  -webkit-text-stroke: 0.6px currentColor;
}

.masthead__home span {
  font-size: 0.7em;
  padding: 0 0.04em;
}

.masthead__when {
  position: relative;
  z-index: 2;
  margin: 10px 0 0;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: rgb(243 230 234 / 0.82);
}

.masthead__bouquet {
  position: absolute;
  z-index: 1;
  top: -18px;
  right: -46px;
  width: 190px;
  height: auto;
  transform: rotate(-14deg);
  pointer-events: none;
}

.sheet {
  position: relative;
  margin: 0 22px 34px 16px;
}

.sheet:nth-of-type(even) {
  margin: 0 14px 34px 24px;
}

.paper {
  position: relative;
  z-index: 2;
  padding: 26px 22px 28px;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.32 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  box-shadow: 0 1px 0 var(--paper-edge), 0 18px 34px -12px rgb(30 0 10 / 0.55), 0 3px 8px rgb(30 0 10 / 0.25);
  transform: rotate(-0.6deg);
}

.sheet:nth-of-type(even) .paper {
  transform: rotate(0.5deg);
}

.paper + .paper {
  margin-top: 26px;
}

.sheet__under {
  position: absolute;
  z-index: 1;
  top: -46px;
  right: -40px;
  width: 168px;
  height: auto;
  transform: rotate(9deg);
  pointer-events: none;
}

.sheet__under--right {
  top: auto;
  bottom: -58px;
  right: -52px;
  width: 178px;
  transform: rotate(-6deg);
}

.sheet__sprig {
  position: absolute;
  z-index: 1;
  bottom: -70px;
  left: -40px;
  width: 140px;
  height: auto;
  transform: rotate(-10deg);
  pointer-events: none;
}

.sheet__rings {
  position: absolute;
  z-index: 3;
  top: -30px;
  right: 6px;
  width: 104px;
  height: auto;
  transform: rotate(-8deg);
  pointer-events: none;
}

.paper__heart {
  position: absolute;
  top: -48px;
  right: -30px;
  width: 92px;
  height: auto;
  transform: rotate(12deg);
  pointer-events: none;
}

.script {
  margin: 0;
  padding-bottom: 0.14em;
  max-width: 11ch;
  font: 400 60px/0.95 var(--script);
  color: var(--wine);
  -webkit-text-stroke: 0.5px currentColor;
}

.script--sm {
  font-size: 50px;
}

.script:focus {
  outline: none;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  margin: 10px 0 18px;
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
}

.paper p {
  margin: 0 0 14px;
}

.fine {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.paper .fine {
  margin: 8px 0 0;
}

.status {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

.label {
  display: block;
  margin: 18px 0 6px;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

.label span {
  font-size: 13px;
}

.field {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}

.field:focus {
  outline: 2px solid var(--wine);
  outline-offset: 0;
  border-color: var(--wine);
}

.field[aria-invalid="true"] {
  border-color: var(--error);
}

.dots span {
  animation: blink 1.4s infinite both;
}

.dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.15;
  }
  40% {
    opacity: 1;
  }
}

.gate__check {
  min-height: 0;
  margin-top: 8px;
}

.gate__check:not(:empty) {
  min-height: 70px;
}

.notice {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--wine);
  background: var(--blush);
}

.notice p {
  margin: 0 0 10px;
}

.notice .btn {
  margin-top: 12px;
}

.combo {
  position: relative;
}

.combo__list {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 340px;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
  background: #fffdfb;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 32px -10px rgb(30 0 10 / 0.45);
  animation: drop 0.22s var(--ease);
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.combo__option {
  display: block;
  padding: 11px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.combo__option + .combo__option {
  border-top: 1px solid rgb(126 10 52 / 0.1);
}

.combo__option[aria-selected="true"] {
  background: var(--blush);
  border-left-color: var(--wine);
}

.combo__name {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.combo__with {
  display: block;
  margin-top: 1px;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}

.combo__more {
  padding: 10px 16px 6px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted);
}

@media (hover: hover) {
  .combo__option:hover {
    background: var(--blush);
  }
}

.choices {
  margin: 0;
  padding: 0;
  list-style: none;
}

.choices li + li {
  margin-top: 10px;
}

.answers__people {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.people {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.person {
  padding: 16px 0 18px;
  border-top: 1px solid var(--rule);
}

.person:last-child {
  border-bottom: 1px solid var(--rule);
}

.person__name {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

.person__name small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}

.person__under3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
}

.person__under3 input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--wine);
  border-radius: 4px;
  background: #fffdfb;
  cursor: pointer;
}

.person__under3 input::before {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fffdfb;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
}

.person__under3 input:checked {
  background: var(--wine);
}

.person__under3 input:checked::before {
  transform: rotate(45deg) scale(1);
}

.person__under3 input:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--wine);
  border-radius: 999px;
  background: #fffdfb;
  overflow: hidden;
  isolation: isolate;
}

.toggle__thumb {
  position: absolute;
  z-index: -1;
  inset: 0 50% 0 0;
  border-radius: 999px;
  background: var(--wine);
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.2s, background-color 0.25s;
}

.toggle[data-value="attending"] .toggle__thumb {
  opacity: 1;
  transform: translateX(0);
}

.toggle[data-value="declined"] .toggle__thumb {
  opacity: 1;
  transform: translateX(100%);
  background: var(--muted);
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 8px 6px;
  font-size: 14.5px;
  line-height: 1.2;
  text-align: center;
  color: var(--wine);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.25s, transform 0.12s;
}

.toggle label svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: currentColor;
}

.toggle input:checked + label {
  color: var(--cream);
}

.toggle[data-value="declined"] label:first-of-type,
.toggle[data-value="attending"] label:last-of-type {
  color: var(--muted);
}

.toggle input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
  border-radius: 999px;
}

.toggle label:active {
  transform: scale(0.96);
}

.answers__email {
  margin-top: 6px;
}

.error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--error);
  background: #fff4f4;
  color: var(--error);
  font-size: 15px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1.2 var(--serif);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.2s, color 0.2s, opacity 0.2s;
}

.btn--wide {
  display: flex;
  width: 100%;
  margin-top: 22px;
  font-size: 17px;
}

.btn--wine {
  background: var(--wine);
  color: var(--cream);
  box-shadow: 0 6px 14px -8px rgb(60 0 20 / 0.8);
}

.btn--ink {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--wine);
}

.btn--cream {
  background: var(--cream);
  color: var(--wine);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn[aria-busy="true"] {
  cursor: wait;
  opacity: 0.75;
}

.btn:focus-visible,
.link:focus-visible,
.masthead__home:focus-visible,
.combo__option:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.savebar .btn:focus-visible,
.masthead__home:focus-visible {
  outline-color: var(--cream);
}

@media (hover: hover) {
  .btn:not(:disabled):hover {
    transform: translateY(-2px);
  }
  .btn--wine:not(:disabled):hover {
    background: var(--wine-deep);
    box-shadow: 0 12px 20px -10px rgb(60 0 20 / 0.85);
  }
  .btn--ink:not(:disabled):hover,
  .btn--quiet:not(:disabled):hover {
    background: rgb(126 10 52 / 0.07);
  }
  .link:hover {
    color: var(--wine-deep);
  }
}

.btn:not(:disabled):active,
.btn.is-pressed:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  box-shadow: none;
  transition-duration: 0.08s;
}

.link {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link--back {
  margin-top: 18px;
}

.lock {
  margin: 4px 0 6px;
  padding: 16px;
  background: var(--blush);
  border-left: 3px solid var(--wine);
}

.lock p {
  margin: 0 0 12px;
}

.lock__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field--code {
  font-size: 22px;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}

.gift__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.later,
.give {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.later p {
  margin: 0 0 4px;
  font-style: italic;
  color: var(--muted);
}

.later .btn {
  margin-top: 16px;
}

.sent {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: var(--blush);
  font-style: italic;
}

.give__title {
  margin: 0;
  font: 400 44px/1 var(--script);
  color: var(--wine);
}

.money {
  position: relative;
}

.money span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 17px;
}

.money .field {
  padding-left: 30px;
  font-variant-numeric: lining-nums tabular-nums;
}

.give__element {
  min-height: 120px;
  margin: 22px 0 0;
}

.paper--thanks {
  text-align: left;
}

.paper--thanks .script {
  font-size: 76px;
}

.sign {
  margin-top: 18px;
  font-style: italic;
  color: var(--muted);
}

.savebar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(min(100vw, var(--column)) - 28px);
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: var(--wine-deep);
  color: var(--cream);
  box-shadow: 0 16px 34px -10px rgb(10 0 4 / 0.7), 0 0 0 1px rgb(243 230 234 / 0.18);
  transform: translate(-50%, 160%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.3s;
}

.savebar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-style: italic;
}

.savebar .btn {
  flex: none;
  padding: 12px 20px;
  white-space: nowrap;
}

.savebar.is-shown {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.fireworks {
  position: fixed;
  z-index: 60;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (min-width: 720px) {
  .column {
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 30px 80px rgb(40 0 14 / 0.45);
  }
  .masthead__bouquet {
    right: -30px;
    width: 210px;
  }
}

/* A little keepsake for guests staying after the celebration. */
.paper--stay { position: relative; border-top: 2px solid var(--gold); }
.stay__flower { float: right; width: 64px; height: auto; margin: 0 -8px 8px 12px; }
.stay__eyebrow { max-width: 240px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.stay__rate { margin-bottom: 0; color: var(--wine); font-size: 38px; line-height: 1.2; }
.stay__rate span { display: block; margin-top: 6px; font-size: 14px; font-style: italic; }
.paper--stay .btn { margin-top: 8px; }
