@font-face {
  font-family: Caveat;
  src: url("./caveat-latin-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

.letter-stage {
  --letter-paper: #fffdf7;
  --letter-serif: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(ellipse at 50% 0, #24457b 0, transparent 44rem),
    linear-gradient(#10295f 0 21rem, #eef2f8 21rem);
  padding: clamp(24px, 5.5vw, 72px) clamp(12px, 4vw, 48px) clamp(38px, 7vw, 96px);
}

.story-letter {
  position: relative;
  width: min(100%, 960px);
  margin-inline: auto;
  padding: clamp(30px, 6vw, 75px) clamp(25px, 8.2vw, 116px) clamp(34px, 6vw, 70px);
  background:
    radial-gradient(ellipse at 90% 0, #fbf2df 0, transparent 43%),
    var(--letter-paper);
  border: 1px solid #e5dcc9;
  box-shadow: 0 30px 60px -28px #0a20425c, 0 9px 22px -14px #0a204275;
}

.story-letter::before,
.story-letter::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.story-letter::before {
  inset-block: clamp(22px, 4vw, 52px);
  inset-inline-start: clamp(11px, 3.45vw, 42px);
  border-inline-start: 1px solid #ab57684d;
}

.story-letter::after {
  inset-block-start: -1px;
  inset-inline-end: -1px;
  width: clamp(24px, 5vw, 56px);
  aspect-ratio: 1;
  background: linear-gradient(45deg, #e9ddc4 0 46%, #d4c6a9 49% 50%, #1c3664 51%);
}

.letter-header {
  padding-block-end: clamp(24px, 4vw, 43px);
  border-block-end: 1px solid #d7cebc;
}

.letter-kicker {
  color: #7e3146;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-block-end: clamp(12px, 2.1vw, 23px);
}

.letter-header h1 {
  font-family: var(--letter-serif);
  font-size: clamp(2.9rem, 8.7vw, 7.1rem);
  line-height: .94;
  letter-spacing: -.065em;
}

.letter-header h1 em {
  display: block;
  color: #294879;
  font-weight: 400;
}

.letter-deck {
  max-width: 43ch;
  margin-block-start: clamp(15px, 2.7vw, 29px);
  color: #31415a;
  font-family: var(--letter-serif);
  font-size: clamp(1.09rem, 2.25vw, 1.45rem);
  line-height: 1.45;
}

.letter-body {
  max-width: 64ch;
  margin-block-start: clamp(20px, 4vw, 41px);
  font-family: var(--letter-serif);
  font-size: clamp(1.06rem, 1.9vw, 1.25rem);
  line-height: 1.7;
}

.letter-body p + p {
  margin-block-start: 1em;
}

.letter-body section {
  margin-block-start: clamp(26px, 4vw, 43px);
}

.letter-body h2 {
  margin-block-end: .55em;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  letter-spacing: -.035em;
  line-height: 1.15;
}

.letter-opening,
.letter-closing {
  display: block;
  color: #234779;
  font-family: Caveat, "Segoe Print", "Bradley Hand", var(--letter-serif);
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 600;
  line-height: 1.1;
}

.letter-opening {
  margin-block-end: .24em;
}

.letter-closing {
  margin-block-start: .36em;
  font-size: clamp(1.9rem, 4vw, 3.05rem);
}

.letter-links {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 14px;
  margin-block-start: clamp(27px, 4vw, 44px);
  padding-block-start: clamp(20px, 3.5vw, 30px);
  border-block-start: 1px solid #d7cebc;
}

.letter-links .text-link {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .letter-stage {
    background: linear-gradient(#10295f 0 13rem, #eef2f8 13rem);
  }

  .letter-links .button {
    width: 100%;
  }
}
