:root {
  color-scheme: light;
  color: #342825;
  background: #f7efe6;
  font-family: Georgia, "Times New Roman", serif;
}

body {
  min-height: 100vh;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  background: radial-gradient(ellipse at 50% 15%, #fffcf7, transparent 65%);
}

.invitation {
  box-sizing: border-box;
  width: min(100%, 44rem);
  padding: clamp(2.5rem, 9vw, 7rem) clamp(1rem, 5vw, 3rem);
  text-align: center;
  background: #fffcf7;
  border: 1px solid #d1b7a7;
  outline: 1px solid #eadbd0;
  outline-offset: -0.45rem;
}

.names {
  margin: 0 0 2rem;
  color: #8a493e;
  font-size: clamp(2rem, 6vw, 4rem);
}

.names span {
  font-style: italic;
  font-weight: normal;
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 3rem);
  font-weight: normal;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.message {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.5;
}

.invitation {
  padding: 0;
}

.cover {
  padding: clamp(3rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3rem);
}

.names {
  margin-bottom: clamp(2rem, 6vw, 4rem);
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.details {
  padding: 2rem 1.5rem 2.75rem;
  border-top: 1px solid #eadbd0;
}

.details h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: normal;
}

.details p {
  max-width: 24rem;
  margin: 0 auto;
  line-height: 1.5;
}

body.waiting {
  overflow: hidden;
}

.waiting .invitation {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
}

.entry {
  border: 0;
  padding: 8px;
  background: transparent;
}

.entry::backdrop {
  background: rgb(52 40 37 / 18%);
}

.play {
  display: grid;
  place-items: center;
  width: 5.5rem;
  aspect-ratio: 1;
  border: 1px solid #fffaf3;
  border-radius: 50%;
  color: #fffaf3;
  background: #8a493e;
  box-shadow: 0 0.6rem 2rem rgb(52 40 37 / 25%);
  cursor: pointer;
}

.play::before {
  content: "";
  margin-left: 0.25rem;
  border-block: 0.7rem solid transparent;
  border-left: 1rem solid currentColor;
}

.play:focus-visible {
  outline: 2px solid #342825;
  outline-offset: 4px;
}

.music {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 1;
}

.music:not([hidden]) {
  animation: music-arrive 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.music-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid #cfa99b;
  border-radius: 50%;
  color: #fffaf3;
  background: #8a493e;
  box-shadow: 0 0.35rem 1rem rgb(52 40 37 / 22%);
  font: 1rem / 1 system-ui, sans-serif;
  cursor: pointer;
}

.music-button:focus-visible {
  outline: 2px solid #342825;
  outline-offset: 3px;
}

.music iframe {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  pointer-events: none;
}

@keyframes music-arrive {
  from {
    transform: translate(calc(-50vw + 2.5rem), calc(50dvh - 2.5rem)) scale(1.7);
  }
  to {
    transform: translate(0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .music:not([hidden]) {
    animation: none;
  }
}
