@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&family=UnifrakturMaguntia&display=swap');

:root {
  --ink: #321c14;
  --rubric: #7d251c;
  --rule: #90633c;
  --parchment: #e5cea0;
  --text: 'Cormorant Garamond', Georgia, serif;
  --display: 'UnifrakturMaguntia', 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #231824; color: var(--ink); font: 700 clamp(1.1rem, 1.55vw, 1.35rem)/1.12 var(--text); }
a { color: var(--rubric); text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid var(--rubric); outline-offset: 4px; }
.skip { position: absolute; inset: 0 auto auto .75rem; transform: translateY(-160%); z-index: 2; padding: .5rem; background: var(--parchment); }
.skip:focus { transform: none; }
.folio {
  min-height: min(96vh, 52rem);
  max-width: 100rem;
  margin: .5rem auto;
  padding: clamp(.65rem, 1.7vw, 1.7rem);
  border: clamp(2rem, 8.5vw, 8rem) solid transparent;
  border-image: url('art/parchment-frame.jpg') 145 fill stretch;
  background: var(--parchment);
}
.masthead nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ribbon {
  display: inline-block;
  position: relative;
  padding: .34em .95em;
  border: 1px solid #78512f;
  border-radius: .45em .35em .5em .35em;
  background: linear-gradient(98deg, #a87f4e, #e8cf9e 13%, #ead7aa 77%, #aa8150);
  box-shadow: inset 0 0 0 2px #efd9af83, 0 2px 3px #39211755;
  color: var(--ink);
  font-size: .95em;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
}
.ribbon:hover { color: var(--rubric); text-decoration: underline; }
.opening { display: grid; grid-template-columns: 1.18fr .8fr 1fr; align-items: center; gap: clamp(.75rem, 2vw, 2rem); margin: 1rem 0 .85rem; }
h1, h2, p, figure, blockquote { margin: 0; }
h1 { font: 400 clamp(2.5rem, 5.1vw, 5.3rem)/.94 var(--display); letter-spacing: -.025em; }
h1 span, h2, .motto { color: var(--rubric); }
.motto { margin: .45em 0 .3em; font: 400 clamp(1.25rem, 2.4vw, 2.3rem)/1 var(--display); }
.dedication { font-size: 1.04em; }
.miniature { text-align: center; }
.arch {
  --arch: polygon(0 100%, 0 35%, 2% 27%, 7% 19%, 15% 12%, 29% 5%, 50% 0, 71% 5%, 85% 12%, 93% 19%, 98% 27%, 100% 35%, 100% 100%);
  aspect-ratio: 4 / 5;
  padding: .47rem;
  background: linear-gradient(90deg, #79502a, #d6ab62 14%, #4b2b36 42%, #b88845 66%, #e4c47f 88%, #79502a);
  clip-path: var(--arch);
}
.arch img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 49% 50%; clip-path: var(--arch); }
figcaption { font-size: .8em; color: var(--rubric); margin-top: .3rem; }
.scripture { padding-block: .65rem; border-block: 3px double var(--rule); }
blockquote { font-style: italic; }
cite, .scripture-link { display: block; font-size: .8em; margin-top: .45rem; }
.readings { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 3rem); padding-top: .8rem; border-top: 3px double var(--rule); }
.readings section + section { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 3vw, 3rem); }
h2 { font: 400 clamp(1.35rem, 2.35vw, 2.2rem)/1 var(--display); margin-bottom: .45em; }
.readings p + p { margin-top: .42rem; }
.initial { float: left; width: 2.85em; height: 3em; margin: .03em .22em .08em 0; color: transparent; background: center / contain no-repeat; }
.initial-a { background-image: url('art/illuminated-a.png'); }
.initial-b { background-image: url('art/illuminated-b.png'); }
.initial-t { background-image: url('art/illuminated-t.png'); }
footer { clear: both; margin-top: clamp(1rem, 2.5vw, 2rem); text-align: center; }
@media (max-width: 760px) {
  .folio {
    padding: 1.4rem clamp(.8rem, 3vw, 1.6rem);
    border: 1.4rem solid transparent;
    border-image: url('art/parchment-frame.jpg') 145 fill stretch;
    background: var(--parchment);
    margin: .3rem;
  }
  .opening { grid-template-columns: 1fr 1fr; }
  .title-block { grid-column: 1 / -1; text-align: center; }
  .miniature { max-width: 12.5rem; margin: auto; }
}
@media (max-width: 485px) {
  .opening, .readings { grid-template-columns: 1fr; gap: 1rem; }
  .masthead nav { flex-wrap: wrap; justify-content: center; }
  .readings section + section { padding: .8rem 0 0; border-left: 0; border-top: 1px solid var(--rule); }
}
@media (forced-colors: active) { .initial { float: none; margin: 0; color: CanvasText; background: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
