:root {
  color-scheme: dark;
  --bg: #10151b;
  --panel: #151d25;
  --ink: #f3efe5;
  --muted: #bdc5c6;
  --gold: #ecc88c;
  --line: #394048;
  --serif: Georgia,"Times New Roman",serif;
  font-family: system-ui,sans-serif;
  color: var(--ink);
  background: var(--bg);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: .25em;
}

a:focus-visible,summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

.wrap {
  width: min(1180px,90%);
  margin: auto;
}

.skip {
  position: absolute;
  top: -5em;
  z-index: 4;
  background: var(--ink);
  color: var(--bg);
  padding: 1em;
}

.skip:focus {
  top: 0;
}

header {
  border-bottom: 1px solid var(--line);
}

header .wrap,footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding-block: 1.25rem;
}

nav,.actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a,.brand {
  text-decoration: none;
}

nav a:hover,.brand:hover {
  text-decoration: underline;
}

.brand {
  font: 1.6rem var(--serif);
}

nav {
  font-size: .9rem;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #15202a;
}

.hero:before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -1rem;
  background: linear-gradient(90deg,#10151bf5 18%,#121d26e6 52%,#10151b91),url('assets/diabolical-blessings.jpg') center 48%/cover;
  filter: blur(8px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 4rem;
  align-items: center;
  min-height: 36rem;
  padding-block: 4rem;
}

.label {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .9rem;
}

h1,h2,h3,p {
  margin-top: 0;
}

h1,h2,h3 {
  font-family: var(--serif);
  font-weight: normal;
}

h1 {
  font-size: clamp(3.5rem,7vw,6.5rem);
  line-height: .95;
  letter-spacing: -.055em;
  margin-bottom: 1.3rem;
}

.hero p:not(.label) {
  max-width: 33em;
  color: #dadedd;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-art {
  justify-self: center;
  height: auto;
  max-height: 27rem;
  max-width: 82%;
  width: min(285px,82%);
  transform: rotate(3deg);
  box-shadow: 0 1.4rem 3rem #0009;
}

.actions {
  gap: 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #14191e;
  text-decoration: none;
  padding: .85rem 1.1rem;
  font-weight: 700;
  border-radius: 3px;
}

.button:hover {
  background: #ffdfac;
}

.section {
  padding-block: 4.4rem;
}

.section+.section {
  border-top: 1px solid var(--line);
}

h2 {
  font-size: clamp(2.4rem,4vw,3.65rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  margin-bottom: .7rem;
}

.intro,.author p {
  color: var(--muted);
  max-width: 47rem;
  line-height: 1.7;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: clamp(.9rem,2.3vw,2rem);
  margin-top: 2.1rem;
}

.shelf.novels {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.book {
  min-width: 0;
}

.jacket {
  display: grid;
  place-items: center;
  aspect-ratio: 2/3;
  background: var(--panel);
  border: 1px solid #ffffff14;
}

.jacket img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}

.novels .jacket {
  aspect-ratio: 1.15;
  padding: 1rem;
}

.book .label {
  margin: 1rem 0 .45rem;
  font-size: .66rem;
}

.book h3 {
  font-size: clamp(1.4rem,2vw,2rem);
  margin: 0 0 .65rem;
  line-height: 1.12;
}

.book p:not(.label) {
  color: var(--muted);
  line-height: 1.6;
}

.book a {
  display: inline-block;
  padding-block: .5rem;
  color: var(--gold);
  font-size: .9rem;
}

.book a+a {
  margin-left: .7rem;
}

.author {
  display: grid;
  grid-template-columns: minmax(100px,165px) 1fr;
  align-items: center;
  gap: 2.5rem;
}

.author img {
  width: 100%;
  height: auto;
  display: block;
}

.author p {
  max-width: 39rem;
}

.author p:last-child {
  margin-bottom: 0;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

footer a {
  color: var(--gold);
}

@media(max-width:850px) {
  .shelf {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .hero .wrap {
    gap: 1.5rem;
    min-height: 29rem;
  }

  .hero-art {
    max-height: 22rem;
  }

  .section {
    padding-block: 3.5rem;
  }

}

@media(max-width:620px) {
  header .wrap {
    flex-wrap: wrap;
    padding-block: 1rem;
  }

  nav {
    gap: 1rem;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding-block: 2.5rem;
  }

  .hero-art {
    order: -1;
    max-height: 14rem;
    width: min(145px,55vw);
  }

  .hero h1 {
    font-size: 3.55rem;
  }

  .shelf,.shelf.novels {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .novels .jacket {
    aspect-ratio: 2/3;
    padding: .3rem;
  }

  .author {
    grid-template-columns: 85px 1fr;
    gap: 1.15rem;
    align-items: start;
  }

  .author h2 {
    font-size: 2rem;
  }

  footer .wrap {
    align-items: start;
    flex-wrap: wrap;
  }

  .section {
    padding-block: 2.6rem;
  }

}

@media(prefers-reduced-motion:reduce) {
  :root {
    scroll-behavior: auto;
  }

  .hero-art {
    transform: none;
  }

}

.shelf .book {
  display: flex;
  flex-direction: column;
}

.book>div:last-child {
  margin-top: auto;
}

