:root {
  --paper: #171106;
  --ink: #e7dfc9;
  --ink-bright: #f0e8d3;
  --ink-dim: #b5ab92;
  --ink-faint: #877d64;
  --gold: #c0913d;
  --gold-bright: #d5a54d;
  --dead: #6d6552;
  --dead-faint: #55503f;
  --line: rgba(231, 223, 201, .2);
  --line-soft: rgba(231, 223, 201, .11);
  --line-frame: rgba(231, 223, 201, .34);
  --banner: url("../img/DL_ch3_banner.gif");
  --banner-still: url("../img/DL_ch3_banner_still.jpg");
  --pad: clamp(1.1rem, 4.5vw, 3.6rem);
  --serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-text: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
  background: #0a0705;
  color: var(--ink-dim);
  font-family: var(--serif-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: clamp(.6rem, 1.8vw, 1.4rem);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: var(--paper); }

a { color: inherit; text-decoration: none; }

a:focus-visible, .button:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.frame {
  max-width: 72rem;
  margin: 0 auto;
  border: 1px solid var(--line-frame);
  padding: 5px;
  background: var(--paper);
}

.sheet {
  border: 1px solid var(--line-soft);
  padding: 0 var(--pad) 4rem;
}

.masthead {
  position: relative;
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(23, 17, 6, .4), rgba(23, 17, 6, .4)),
    radial-gradient(circle, rgba(23, 17, 6, .55) 1.6px, transparent 1.9px),
    radial-gradient(circle, rgba(23, 17, 6, .55) 1.6px, transparent 1.9px),
    var(--banner-still);
  background-size: auto, 6px 6px, 6px 6px, cover;
  background-position: 0 0, 0 0, 3px 3px, 50% calc(38% - 40px);
  background-repeat: no-repeat, repeat, repeat, no-repeat;
  background-blend-mode: normal, normal, normal, luminosity;
}

.masthead > * { position: relative; z-index: 1; }

@media (hover: hover) {
  .masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--paper);
    background-image: linear-gradient(rgba(23, 17, 6, .5), rgba(23, 17, 6, .5)), var(--banner);
    background-size: auto, cover;
    background-position: 0 0, 50% calc(38% - 40px);
    background-repeat: no-repeat, no-repeat;
    opacity: 0;
    transition: opacity .22s ease;
  }

  .masthead:hover::before { opacity: 1; }
}

.masthead h1 {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(3.4rem, 11.5vw, 7.4rem);
  line-height: 1;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink-bright);
  text-shadow: 3px 3px 0 rgba(192, 145, 61, .26), 0 2px 0 rgba(0, 0, 0, .35);
  padding: 3.4rem 0 2.9rem;
}

.masthead .folio { color: #a89e85; }

.scotch { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); height: 8px; }
.scotch-end { border-top: 1px solid var(--ink); border-bottom: 4px solid var(--ink); }

.folio {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0 .8rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lead {
  text-align: center;
  margin-top: 4.2rem;
}

.headline { color: var(--ink-bright); }

.hl-top {
  display: block;
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.8vw, 3.2rem);
  line-height: 1.16;
  max-width: 24ch;
  margin: 0 auto;
}

.hl-orn { display: block; font-size: .8rem; color: var(--gold); margin: 1.1rem 0 .9rem; }

.hl-low {
  display: block;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.7vw, 2.4rem);
  line-height: 1.2;
}

.deck {
  font-style: italic;
  font-size: 1.06rem;
  color: var(--ink-dim);
  max-width: 60ch;
  margin: 1.6rem auto 0;
}

.cta { margin-top: 2.5rem; }

.button {
  display: inline-block;
  padding: .9rem 2.6rem;
  border: 1px solid var(--gold);
  outline: 1px solid rgba(192, 145, 61, .35);
  outline-offset: 4px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-bright);
  transition: background-color .2s ease, color .2s ease;
}

.button:hover { background-color: var(--gold); color: var(--paper); }

.edition {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 38rem;
  margin: 4.4rem auto 3.8rem;
}

.edition::before,
.edition::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.ed-text {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.ed-orn { font-size: .55rem; color: var(--gold); vertical-align: 2px; }
.ed-text .ed-orn:first-child { margin-right: .9rem; }
.ed-text .ed-orn:last-child { margin-left: .6rem; }
.ed-chapter { color: var(--gold-bright); }

.sections { display: grid; grid-auto-rows: 1fr; }

.row { display: grid; grid-template-columns: repeat(3, 1fr); }

.row .entry { padding: 0 1.9rem; }
.row .entry:first-child { padding-left: 0; }
.row .entry:last-child { padding-right: 0; }
.row .entry + .entry { border-left: 1px solid var(--line-soft); }

.row a.entry {
  display: block;
  position: relative;
  border-top: 3px solid var(--ink);
  padding-top: 1.2rem;
  transition: background-color .2s ease;
}

.row a.entry:hover { background-color: rgba(231, 223, 201, .06); }

.row a.entry::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
}

.kicker {
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.entry h3 {
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--ink-bright);
  margin: .55rem 0 .6rem;
}

.desc {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink-dim);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.turn {
  margin-top: .9rem;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.row a.entry h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 6px;
  transition: text-decoration-color .2s ease;
}

.row a.entry:hover h3 { text-decoration-color: var(--gold); }

.row a.entry:hover .turn { color: var(--gold-bright); }

.row div.entry { border-top: 1px solid var(--line-soft); padding-top: 1.2rem; }
.row div.entry .kicker { color: var(--dead-faint); }
.row div.entry h3 { font-size: 1.2rem; color: var(--dead); }
.row div.entry .desc { font-size: .88rem; color: var(--dead); }

.colophon { text-align: center; }

.foot-fine {
  margin-top: 1.4rem;
  font-size: .78rem;
  color: var(--ink-faint);
}

@media (max-width: 56rem) {
  .sections { grid-auto-rows: auto; }
  .row { grid-template-columns: 1fr; }
  .row .entry { padding: 1.6rem 0; text-align: center; }
  .row .entry:last-child { padding-bottom: 0; }
  .row .entry + .entry { border-left: 0; }
  .row a.entry { border-top: 3px solid var(--ink); padding-top: 1.35rem; }
  .desc { max-width: 40ch; margin: 0 auto; }
}

@media (max-width: 35rem) {
  .masthead h1 { padding: 1.7rem 0 1.4rem; }
  .folio { flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
  .lead { margin-top: 3.2rem; }
  .edition { gap: 1rem; margin: 3.4rem auto 3rem; }
  .ed-text { letter-spacing: .18em; }
  .scotch { border-top-width: 3px; }
  .scotch-end { border-bottom-width: 3px; }
}
