/* Standalone "terms of love" page between the final answer and the letter. */

.scene--terms {
  color: #56322f;
  background: #bf8f73;
}

.terms__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 76% 21%, rgba(255, 245, 203, 0.88), transparent 24rem),
    linear-gradient(137deg, #f3dfc2 0%, #e7bd99 39%, #c98872 72%, #9c625e 100%);
}

.terms__atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    radial-gradient(circle, rgba(100, 55, 48, 0.18) 0 1px, transparent 1.4px),
    repeating-linear-gradient(116deg, transparent 0 48px, rgba(255, 248, 228, 0.18) 49px, transparent 50px 97px);
  background-size: 21px 21px, auto;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.terms__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 244, 225, 0.4), transparent 47%),
    radial-gradient(circle at 50% 70%, rgba(129, 65, 59, 0.12), transparent 25rem);
}

.scene--terms .scene__top {
  padding: 7px 10px;
  background: rgba(255, 248, 232, 0.3);
  backdrop-filter: blur(7px);
}

.scene--terms .scene__top b {
  color: #8b4249;
}

.terms__layout {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: min(900px, calc(100vw - 40px));
  height: 100%;
  padding: 78px 0 67px;
  margin: 0 auto;
}

.terms__card {
  position: relative;
  width: min(720px, 84vw);
  padding: clamp(40px, 5vw, 68px);
  background:
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(131, 84, 62, 0.07) 35px, transparent 36px),
    rgba(255, 251, 239, 0.94);
  border: 1px solid rgba(104, 56, 49, 0.24);
  box-shadow:
    0 36px 82px rgba(94, 49, 43, 0.25),
    10px 11px 0 rgba(255, 246, 224, 0.24);
  text-align: center;
  transform: rotate(-0.4deg);
}

.terms__card::before {
  content: "";
  position: absolute;
  inset: 15px;
  pointer-events: none;
  border: 1px solid rgba(104, 56, 49, 0.12);
}

.terms__kicker {
  margin: 0 0 16px;
  color: #9b6253;
  font-family: var(--story-hand);
  font-size: clamp(13px, 1.5vw, 17px);
  letter-spacing: 0.08em;
}

.terms__card h2 {
  margin: 0;
  color: #7e3944;
  font-family: var(--story-display);
  font-size: clamp(46px, 6.7vw, 82px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.terms__statement {
  margin: clamp(25px, 4vh, 42px) 0 0;
  color: #5b3733;
  font-family: var(--story-hand);
  font-size: clamp(21px, 2.6vw, 31px);
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.terms__actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 40px);
}

.next-button--terms {
  margin-top: 0;
  color: #fff9ee;
  background: #8e4652;
  border-color: #a55c67;
}

.back-button--terms {
  color: #77444a;
  background: rgba(255, 248, 232, 0.48);
  border-color: rgba(126, 57, 68, 0.3);
}

.back-button--terms:hover {
  color: #603039;
  background: rgba(255, 252, 241, 0.82);
  border-color: rgba(126, 57, 68, 0.54);
}

.next-button--terms:hover {
  color: #fff9ee;
  background: #6e3440;
  border-color: #6e3440;
}

.terms__stamp {
  position: absolute;
  right: 6%;
  bottom: 17%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: rgba(143, 56, 58, 0.55);
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--story-hand);
  font-size: 15px;
  letter-spacing: 0.08em;
  transform: rotate(12deg);
}

.scene--terms.is-active .terms__card {
  animation: terms-card-in 1100ms cubic-bezier(0.16, 0.72, 0.22, 1) both;
}

.scene--terms.is-active .terms__stamp {
  animation: terms-stamp-in 760ms cubic-bezier(0.16, 0.72, 0.22, 1) 720ms both;
}

.scene--terms .stage__footer {
  color: rgba(90, 49, 45, 0.62);
}

.scene--terms .scene-number b {
  color: #8d4248;
}

.scene--terms .scene-number i {
  background: rgba(90, 49, 45, 0.22);
}

@keyframes terms-card-in {
  from {
    opacity: 0;
    translate: 0 34px;
    scale: 0.95;
    filter: blur(9px);
  }

  58% {
    opacity: 1;
    filter: blur(1.2px);
  }

  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
  }
}

@keyframes terms-stamp-in {
  from {
    opacity: 0;
    scale: 2;
    rotate: 28deg;
  }

  to {
    opacity: 1;
    scale: 1;
    rotate: 12deg;
  }
}

@media (max-width: 680px) {
  .terms__layout {
    width: calc(100vw - 32px);
    padding: 62px 0 52px;
  }

  .terms__card {
    width: calc(100vw - 44px);
    padding: 36px 24px 32px;
  }

  .terms__card h2 {
    font-size: clamp(43px, 13vw, 58px);
  }

  .terms__statement {
    font-size: clamp(19px, 5.6vw, 24px);
  }

  .terms__actions {
    gap: 10px;
    margin-top: 24px;
  }

  .terms__stamp {
    right: 5%;
    bottom: 30%;
    width: 68px;
    height: 68px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .terms__actions {
    flex-direction: column;
  }

  .terms__stamp {
    bottom: 38%;
  }

  .terms__actions .back-button,
  .terms__actions .next-button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene--terms.is-active .terms__card,
  .scene--terms.is-active .terms__stamp {
    animation: none;
  }
}
