/* A page of the past's archive: banknote paper in a double engraved frame,
   the ribbon of links at the top, the title engraved like the name. */

@font-face {
  font-family: "Caudex";
  src: url("./fonts/Caudex-Bold.woff2?v=1") format("woff2");
  font-weight: 700;
  font-display: block;
}

@font-face {
  font-family: "Caudex";
  src: url("./fonts/Caudex-Regular.woff2?v=1") format("woff2");
  font-weight: 400;
  font-display: block;
}

:root {
  --paper: #fcf5e6;
  --ruby: #c0002a;
  --deep: #970c2b;
}

html {
  background: var(--paper);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 14px;
  color: var(--deep);
  font-family: Caudex, Georgia, serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.p-sheet {
  position: relative;
  min-height: calc(100vh - 28px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1.5px solid var(--deep);
  outline: 0.75px solid var(--deep);
  outline-offset: -6px;
  opacity: 0;
  transition: opacity 0.4s;
}

.ready .p-sheet {
  opacity: 1;
}

.p-ribbon {
  position: relative;
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.p-ribbon canvas {
  display: block;
}

.p-links {
  position: absolute;
  left: 50%;
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.p-links a {
  display: block;
  padding: 8px 16px;
  color: var(--deep);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-shadow: 0 1px 0 var(--paper), 1px 2px 3px rgba(80, 10, 30, 0.35);
}

.p-links li + li {
  margin-left: 12px;
}

.p-links a:hover,
.p-links a:focus-visible,
.p-links a[aria-current="page"] {
  color: var(--ruby);
  text-decoration: underline 1px;
  text-underline-offset: 6px;
  outline: none;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 20px 48px;
  text-align: center;
}

.p-title {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.p-rule {
  width: min(420px, 70vw);
  height: 9px;
  border-top: 1.5px solid var(--deep);
  border-bottom: 0.75px solid var(--deep);
}

main p {
  max-width: 34em;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.p-back {
  display: grid;
  place-items: center;
  width: 58px;
  height: 30px;
  margin-top: 10px;
  box-sizing: border-box;
  border: 1.5px solid var(--deep);
  background: var(--paper);
  color: var(--deep);
  transition: background-color 0.2s, color 0.2s;
}

.p-back:hover,
.p-back:focus-visible {
  background: var(--deep);
  color: var(--paper);
  outline: none;
}

.p-back svg {
  width: 22px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transform: scaleX(-1);
}

@media (max-width: 560px) {
  .p-links a {
    padding: 8px 6px;
    font-size: 12px;
    letter-spacing: 0.06em;
  }

  .p-links li + li {
    margin-left: 4px;
  }

  main p {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p-sheet {
    transition: none;
  }
}
