@font-face {
  font-family: "FZ Manstein";
  src: url("../static/fonts/FZManstein.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Great Vibes";
  src: url("../static/fonts/GreatVibes.ttf") format("truetype");
  font-display: swap;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f6f1eb;
  overflow-x: hidden;
}

.hearts {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}

.heart {
  position: absolute;
  top: -24px;
  color: #c45b68;
  line-height: 1;
  animation-name: heart-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes heart-fall {
  to {
    transform: translateY(108vh) rotate(18deg);
    opacity: 0.15;
  }
}

.music-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(138, 39, 51, 0.28);
  border-radius: 50%;
  background: #fffdf8;
  color: #8a2733;
  box-shadow: 0 8px 20px rgba(59, 20, 24, 0.18);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.music-toggle svg {
  width: 22px;
  height: 22px;
}

.music-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  padding: 8px 12px;
  border-radius: 8px;
  background: #1c1917;
  color: #fff;
  font-family: Literata, Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.music-toggle.is-playing .music-tip {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 28px 64px;
  background: rgba(9, 18, 31, 0.9);
}

.lightbox[hidden],
.qr-modal-backdrop[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: min(92vw, 920px);
  max-height: 84vh;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fffdf8;
  color: #3b1418;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.guest-side {
  position: relative;
  width: calc(330 * var(--u));
  max-width: 100%;
  margin: calc(12 * var(--u)) auto 0;
}

.guest-side select {
  width: 100%;
  height: calc(46 * var(--u));
  margin: 0;
  padding: 0 calc(36 * var(--u)) 0 calc(14 * var(--u));
  border: calc(1 * var(--u)) solid rgba(var(--wedding-primary-rgb), 0.28);
  border-radius: calc(8 * var(--u));
  color: var(--copy);
  background: rgba(var(--wedding-white-rgb), 0.78);
  font-family: inherit;
  font-size: max(13px, calc(14 * var(--u)));
  line-height: 1.2;
  text-align: left;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.guest-side::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(16 * var(--u));
  width: calc(7 * var(--u));
  height: calc(7 * var(--u));
  border-right: max(1.5px, calc(1.5 * var(--u))) solid currentColor;
  border-bottom: max(1.5px, calc(1.5 * var(--u))) solid currentColor;
  color: var(--copy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.rsvp-actions button {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rsvp-actions button:hover {
  color: #fff;
  background: #8a2733;
  border-color: #8a2733;
}

.rsvp-done {
  margin: calc(16 * var(--u)) auto 0;
  color: var(--copy-strong);
  font-size: max(12px, calc(13 * var(--u)));
  font-style: italic;
  line-height: 1.45;
}

.opening-names-fit {
  --name-shrink: 0.7;
  transform: translateY(calc((1 - var(--fit-scale, 1)) * 166 * var(--u) + 34 * var(--u)));
}

.opening-name {
  font-size: calc(78 * var(--u) * var(--fit-scale, 1) * var(--name-shrink, 1));
}

.opening-name-second {
  top: calc(1.1282em + 14 * var(--u));
  text-align: right;
}

.opening-name-second:before {
  content: none;
}

.opening-ampersand {
  position: static;
  top: auto;
  left: auto;
  display: inline;
  margin-right: 0.22em;
  font-size: 0.7436em;
  vertical-align: baseline;
}

.opening-date {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.family-polaroid-reveal-right {
  top: calc((305 + 24 * var(--hdb-message-extra-lines, 0)) * var(--u));
}

.family-polaroid-reveal-left {
  top: calc((372 + 24 * var(--hdb-message-extra-lines, 0)) * var(--u));
}

.family-columns {
  top: calc((684 + 24 * var(--hdb-message-extra-lines, 0)) * var(--u));
}

.family-section {
  height: calc((832 + 24 * var(--hdb-message-extra-lines, 0)) * var(--u));
}

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