:root {
  color-scheme: light;
  font-family: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #f4d9df;
}

.proposal {
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
  background:
    linear-gradient(125deg, rgba(255, 248, 250, 0.78), rgba(252, 206, 218, 0.3)),
    url("cherry-blossom.jpg") center / cover no-repeat;
}

.proposal::before,
.proposal::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.proposal::before {
  background: radial-gradient(circle at center, transparent 15%, rgba(71, 27, 45, 0.18) 120%);
}

.proposal::after {
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, transparent, black 35%, transparent);
}

.question,
.answer-message {
  width: min(860px, 100%);
  text-align: center;
}

.question {
  animation: appear 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #8c3858;
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-size: clamp(2.3rem, 7vw, 4.8rem);
  line-height: 0.9;
}

h1 {
  max-width: 820px;
  margin: 0 auto;
  color: #3c1324;
  font-size: clamp(2.3rem, 5.8vw, 5rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 0.98;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.65);
}

.button-area {
  position: relative;
  width: min(510px, 100%);
  height: 150px;
  margin: clamp(2rem, 6vh, 4rem) auto 0;
}

.answer {
  position: absolute;
  top: 50%;
  min-width: 132px;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 2.3rem;
  cursor: pointer;
  font: 600 clamp(1.55rem, 3.2vw, 2rem) / 1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms ease, left 360ms cubic-bezier(0.34, 1.56, 0.64, 1), top 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.answer:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.yes {
  left: 27%;
  z-index: 2;
  color: #fff;
  background: linear-gradient(135deg, #a52f57, #db6989);
  box-shadow: 0 15px 28px rgba(112, 22, 55, 0.32);
  transform: translate(-50%, -50%) scale(var(--yes-scale, 1));
}

.yes:hover {
  transform: translate(-50%, calc(-50% - 4px)) scale(var(--yes-scale, 1));
  box-shadow: 0 19px 34px rgba(112, 22, 55, 0.42);
}

.no {
  left: 73%;
  color: #70233d;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(98, 30, 55, 0.16);
  transform: translate(-50%, -50%);
}

.no:hover {
  transform: translate(-50%, calc(-50% - 4px));
}

.answer-message {
  display: none;
  color: #000;
  font-size: clamp(2rem, 4.7vw, 4rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.92);
}

.answer-message p {
  margin: 0;
}

.proposal.accepted .question {
  display: none;
}

.proposal.accepted .answer-message {
  display: block;
  animation: promise 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.petal {
  position: absolute;
  z-index: -1;
  width: 18px;
  aspect-ratio: 1.45;
  border-radius: 80% 20% 80% 20%;
  background: #ffc8d8;
  box-shadow: inset -2px -2px 5px rgba(162, 38, 82, 0.17);
  opacity: 0.84;
  animation: float 12s linear infinite;
}

.petal-one {
  top: -8%;
  left: 12%;
}

.petal-two {
  top: -12%;
  left: 74%;
  width: 25px;
  animation-delay: -4.5s;
}

.petal-three {
  top: -15%;
  left: 47%;
  width: 13px;
  animation-delay: -8s;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes promise {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  from {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  to {
    transform: translate3d(26vw, 116vh, 0) rotate(530deg);
  }
}

@media (max-width: 520px) {
  .proposal {
    padding: 1.35rem;
  }

  .button-area {
    height: 175px;
  }

  .answer {
    min-width: 112px;
    padding-inline: 1.65rem;
  }
}
