@font-face {
  font-family: Rye;
  src: url("/assets/fonts/rye.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Libre Caslon Text";
  src: url("/assets/fonts/libre-caslon-text.woff2") format("woff2");
  font-display: swap;
}

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

@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f3e6cc;
  --ink: #231c17;
  --oxblood: #872b35;
  --faded: #665044;
  --rule: #8b7162;
  --surround: #e9dbbf;
  --reading: "Libre Caslon Text", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #201916;
    --ink: #f3e6cc;
    --oxblood: #d97f81;
    --faded: #c1a99a;
    --rule: #9a786c;
    --surround: #181210;
  }

  .desk img {
    filter: url("#dark-print");
  }
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  padding: clamp(0.75rem, 4vw, 3rem);
  background: var(--surround);
  color: var(--ink);
  font: 400 1rem / 1.64 var(--reading);
}

body::before {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: url("/assets/grain.png") repeat;
  pointer-events: none;
  content: "";
}

.sheet {
  position: relative;
  width: min(100%, 58rem);
  margin-inline: auto;
  padding: clamp(1rem, 5vw, 3.5rem);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -5px;
  background: var(--paper);
}

.plate-filter {
  position: absolute;
}

.masthead {
  padding: 0.35rem 0 1.35rem;
  border-block: 3px double var(--ink);
  text-align: center;
}

.masthead p,
.masthead h1 {
  margin: 0;
}

.masthead .overline {
  margin: 0.6rem 0 0.8rem;
  font: 400 clamp(0.66rem, 2.5vw, 0.9rem) / 1.5 Rye, Georgia, serif;
  letter-spacing: 0.085em;
}

.masthead h1 {
  font: 400 clamp(1.66rem, 6.3vw, 3.8rem) / 1.06 Rye, Georgia, serif;
  letter-spacing: -0.026em;
}

.masthead h1 span {
  display: block;
}

.masthead .motto {
  margin-top: 0.85rem;
  color: var(--oxblood);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-style: italic;
}

.masthead .founding {
  margin-top: 0.55rem;
  font: 400 clamp(0.72rem, 2vw, 0.82rem) / 1.55 Rye, Georgia, serif;
}

.notice {
  max-width: 36em;
  margin: 1.75rem auto 0;
}

.stamp {
  display: inline-block;
  margin: 0;
  padding: 0.5em 0.8em 0.42em;
  border: 2px solid;
  outline: 1px dashed var(--oxblood);
  outline-offset: -5px;
  color: var(--oxblood);
  font: 400 clamp(0.75rem, 3.1vw, 0.94rem) / 1.2 var(--mono);
  letter-spacing: 0.075em;
  transform: rotate(-3deg);
}

.lead {
  margin: 1.2rem 0 1rem;
  font-size: clamp(1.14rem, 3.4vw, 1.42rem);
  line-height: 1.38;
}

.desk {
  margin: 0 0 1.35rem;
  padding: 3px;
  border: 1px solid var(--rule);
}

.desk img {
  display: block;
  width: 100%;
  height: auto;
}

.letter p {
  margin: 0 0 0.9em;
}

.letter .signoff {
  margin-top: 1.35rem;
  margin-bottom: 0;
  font-size: 0.94rem;
}

.signoff em {
  font-size: 1.35rem;
}

.epigraph {
  margin: 1.8rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  color: var(--faded);
  font-size: 0.9rem;
  font-style: italic;
}

footer {
  margin-top: 0.85rem;
  color: var(--faded);
  font: 400 0.89rem / 1.42 var(--mono);
}

footer p {
  margin: 0 0 0.25rem;
}

footer a {
  color: var(--oxblood);
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

footer a:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

@media (min-width: 52rem) {
  .notice {
    display: grid;
    grid-template-areas: "opening plate" "letter plate";
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0 clamp(1.5rem, 3vw, 2.5rem);
    max-width: none;
    margin-top: 2.1rem;
  }

  .notice-opening {
    grid-area: opening;
  }

  .desk {
    grid-area: plate;
    align-self: start;
    margin: 0.2rem 0 0;
  }

  .letter {
    grid-area: letter;
  }
}
