@font-face {
  font-family: "Sana Caslon";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-caslon-text-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Sana Caslon";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-caslon-text-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Sana Sans";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --surround: #141311;
  --paper-light: #f4ecdd;
  --paper: #eee2ce;
  --paper-deep: #e9dcc6;
  --ink: #25201b;
  --wine: #6c2523;
  --rule: #9d8868;
  --muted: #6c604f;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surround);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, #24211d 0, transparent 48%),
    var(--surround);
  color: var(--ink);
  font-family: "Sana Caslon", Georgia, serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.creed-page {
  display: grid;
  min-height: 100svh;
  place-items: start center;
  padding: clamp(1rem, 4vw, 3.625rem);
}

.creed {
  position: relative;
  width: min(100%, 70rem);
  min-height: calc(100svh - clamp(2rem, 8vw, 7.25rem));
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgb(255 255 255 / 0.38), transparent 25%),
    radial-gradient(circle at 82% 92%, rgb(132 94 55 / 0.06), transparent 29%),
    repeating-linear-gradient(7deg, rgb(85 68 47 / 0.018) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, var(--paper-light), var(--paper) 52%, var(--paper-deep));
  border: 1px solid rgb(157 136 104 / 0.38);
  border-radius: 2px;
  box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 0.38);
  isolation: isolate;
}

.creed::before,
.creed::after {
  position: absolute;
  z-index: -1;
  border: 1px solid var(--rule);
  content: "";
  inset: 1rem;
  opacity: 0.72;
  pointer-events: none;
}

.creed::after {
  border-width: 0.5px;
  inset: 1.5rem;
  opacity: 0.5;
}

.creed__content {
  width: min(100%, 54rem);
  margin: 0 auto;
  padding: clamp(3.25rem, 7vw, 5.5rem) clamp(2.5rem, 7vw, 6rem)
    clamp(3.5rem, 7vw, 5rem);
  text-align: center;
}

.creed__header {
  display: grid;
  justify-items: center;
}

.wordmark,
.creed__label,
.motto {
  margin: 0;
  font-family: "Sana Sans", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.wordmark {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.56rem;
  text-indent: 0.56rem;
}

.ornament {
  display: grid;
  width: 13.75rem;
  margin: 0.9rem 0 1.55rem;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.75rem;
}

.ornament span {
  height: 1px;
  background: var(--wine);
  opacity: 0.74;
}

.ornament i {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--wine);
  border-radius: 50%;
}

h1 {
  margin: 0;
  color: var(--wine);
  font-family: "Sana Caslon", Georgia, serif;
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.16;
}

.creed__label {
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 500;
  letter-spacing: 0.24rem;
}

.creed__text {
  margin-top: clamp(2.25rem, 5vw, 3.4rem);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.52;
}

.creed__text p {
  margin: 0;
}

.creed__text p + p {
  margin-top: 1.2em;
}

.creed__footer {
  display: grid;
  margin-top: clamp(2.7rem, 5vw, 4rem);
  justify-items: center;
}

.closing-rule {
  width: 8.4rem;
  height: 1px;
  background: var(--rule);
  opacity: 0.72;
}

.acceptance {
  margin: 1.75rem 0 0;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.4;
}

.invocation {
  margin: 1.7rem 0 0;
  color: var(--wine);
  font-size: clamp(1.32rem, 2vw, 1.65rem);
  font-style: italic;
}

.latin-cross {
  width: 1.65rem;
  height: 2.65rem;
  margin-top: 1.7rem;
  fill: none;
  stroke: var(--wine);
  stroke-linecap: square;
  stroke-width: 1.2;
  opacity: 0.7;
}

.motto {
  margin-top: 2.1rem;
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
}

@media (max-width: 40rem) {
  .creed-page {
    padding: 0.75rem;
  }

  .creed {
    min-height: calc(100svh - 1.5rem);
    border-radius: 1.75rem;
  }

  .creed::before {
    border-radius: 1.15rem;
    inset: 0.75rem;
  }

  .creed::after {
    display: none;
  }

  .creed__content {
    padding: 2.75rem 1.6rem 3.2rem;
  }

  .wordmark {
    font-size: 0.72rem;
    letter-spacing: 0.45rem;
    text-indent: 0.45rem;
  }

  .ornament {
    width: 7.2rem;
    margin: 0.75rem 0 1.35rem;
    gap: 0.85rem;
  }

  .ornament i {
    width: 0.35rem;
    height: 0.35rem;
  }

  h1 {
    max-width: 18rem;
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .creed__label {
    margin-top: 1rem;
    font-size: 0.56rem;
    letter-spacing: 0.2rem;
  }

  .creed__text {
    margin-top: 2.05rem;
    font-size: 1rem;
    line-height: 1.48;
  }

  .creed__text p + p {
    margin-top: 1.1em;
  }

  .creed__footer {
    margin-top: 2.8rem;
  }

  .acceptance {
    max-width: 17rem;
    margin-top: 1.6rem;
    font-size: 1.08rem;
  }

  .invocation {
    margin-top: 1.55rem;
    font-size: 1.27rem;
  }

  .latin-cross {
    margin-top: 1.45rem;
  }

  .motto {
    max-width: 15rem;
    margin-top: 1.8rem;
    font-size: 0.56rem;
    letter-spacing: 0.13rem;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body,
  .creed-page {
    background: #fff;
  }

  .creed-page {
    padding: 0;
  }

  .creed {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
