@font-face {
  font-family: Compendium;
  src: url('assets/UnifrakturMaguntia-Book.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #e7ddbd;
  --ink: #3e3325;
  --rule: #9b845e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  padding: 5vh 5vw;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at center, #504833, #1b201b 90%);
  font:
    18px/1.6 Georgia,
    serif;
}

.binding {
  width: min(1180px, 100%);
  position: relative;
  border: 4px double var(--rule);
  outline: 1px solid #9b845e;
  outline-offset: 8px;
  background: var(--paper);
  background-image: radial-gradient(ellipse at center, #faf1d755, #b99c4c18);
  box-shadow: 0 30px 60px #0007;
  padding: 30px 44px 26px;
}

.binding::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 12px;
  border: 1px solid #9b845e66;
}

.corner {
  position: absolute;
  font-size: 32px;
  width: 36px;
  height: 36px;
  line-height: 1;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
}

.top-left {
  top: -20px;
  left: -20px;
}

.top-right {
  top: -20px;
  right: -20px;
}

.bottom-left {
  bottom: -20px;
  left: -20px;
}

.bottom-right {
  bottom: -20px;
  right: -20px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-variant: small-caps;
  font-size: 12px;
  letter-spacing: 1px;
  border-bottom: 1px solid #9b845e70;
  padding-bottom: 14px;
}

header p {
  margin: 0;
}

.opening {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 40px 0 44px;
}

.title-leaf {
  text-align: center;
  padding: 0 24px;
}

.inscription {
  font-style: italic;
  font-size: 14px;
  margin: 0 0 28px;
}

h1 {
  font:
    400 clamp(76px, 8vw, 116px)/1.1 Compendium,
    Georgia,
    serif;
  margin: 0 0 28px;
}

.subtitle {
  font:
    italic 29px/1.45 Georgia,
    serif;
  margin: 0;
}

.rule {
  font-size: 30px;
  color: #84613d;
  margin: 15px 0;
}

.status {
  display: inline-block;
  font-size: 17px;
  font-variant: small-caps;
  letter-spacing: 1px;
  border-block: 1px solid var(--rule);
  padding: 8px 0;
  margin: 0;
  color: #733c2d;
}

.invitation {
  font-size: 16px;
  margin: 18px 0 0;
}

.seal-leaf {
  border-left: 1px solid #9b845e55;
  padding: 0 0 0 28px;
  text-align: center;
}

.seal-leaf img {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  opacity: 0.8;
}

.seal-leaf span {
  display: block;
  font-size: 12px;
  font-style: italic;
  margin-top: 12px;
}

footer {
  border-top: 1px solid #9b845e70;
  padding-top: 18px;
  text-align: center;
}

footer p {
  margin: 0 auto;
  max-width: 70ch;
  font-size: 12px;
}

footer > span {
  display: block;
  font-size: 11px;
  font-style: italic;
  margin-top: 6px;
}

@media (width <= 700px) {
  body {
    padding: 30px 22px;
  }

  .binding {
    padding: 24px;
  }

  header {
    font-size: 10px;
    letter-spacing: 0;
  }

  .opening {
    grid-template-columns: 1fr;
    padding: 32px 0 24px;
  }

  .title-leaf {
    padding: 0;
  }

  h1 {
    font-size: 82px;
  }

  .subtitle {
    font-size: 25px;
  }

  .seal-leaf {
    border-left: 0;
    border-top: 1px solid #9b845e55;
    margin-top: 28px;
    padding: 22px 0 0;
  }

  .seal-leaf img {
    max-width: 240px;
    margin: auto;
  }

  .inscription {
    font-size: 12px;
  }
}
