/* Kate's Books page. Desktop values are Wix pixels at 1440px wide.
   Wix sets the book titles in Futura and the subtitles in Brandon Grotesque (both licensed
   to Wix). Jost is an open-licensed Futura-style face that stands in for both here, with
   tighter letter spacing so the lines break where Wix breaks them. */
/* Jost is loaded by the page front matter (fonts: Jost:wght@400;600). */

:root { --wine: #8b0000; }

/* ---------- Intro ---------- */

.b-intro { background: var(--cream); height: 556px; overflow: hidden; }
.b-intro__inner { display: flex; align-items: flex-start; width: 980px; max-width: 100%; margin: 0 auto; }
.b-intro__photo {
  flex: none;
  width: 400px;
  height: 521px;
  margin: 50px 0 0 28px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.b-intro__text { width: 480px; margin: 44px 0 0 54px; }
.b-intro h1 { max-width: 300px; font-size: 50px; line-height: 73.3px; }
.b-intro__prose { margin-top: 22px; font-size: 18px; line-height: 26.4px; }  /* Wix draws these lines taller than its stated 25.2px */
.b-intro__prose p + p { margin-top: 25.2px; }

/* ---------- Featured books ---------- */

.b-feature { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: start; height: 615px; }
.b-feature::after { content: ""; position: absolute; width: 1px; background: var(--blush); }
.b-feature--making::after { left: calc(50% + 20px); top: 169px; height: 245px; }
.b-feature--creating { height: 618px; }
.b-feature--creating::after { left: calc(50% - 14px); top: 162px; height: 179px; }

.b-feature__img { object-fit: cover; }
.b-feature--making .b-feature__img { justify-self: end; width: 600px; height: 511px; margin: 70px -28px 0 0; }
.b-feature--creating .b-feature__img { justify-self: start; width: 586px; height: 492px; margin: 78px 0 0 4px; }

.b-feature__text { text-align: center; }
.b-feature--making .b-feature__text { justify-self: start; width: 444px; margin: 86px 0 0 30px; }
.b-feature--creating .b-feature__text { justify-self: end; width: 445px; margin: 97px 25px 0 0; }

.b-feature__kicker { font-size: 20px; line-height: 25px; letter-spacing: 0.03em; font-style: italic; }
.b-feature--making .b-feature__kicker { padding-left: 17px; font-size: 26px; line-height: 32.5px; text-decoration: underline; }

.b-feature h2 { font-family: "Jost", var(--font-body); font-weight: 600; color: var(--wine); }
.b-feature--making h2 { margin-top: 68px; font-size: 56px; line-height: 78.4px; letter-spacing: -0.014em; }
.b-feature--creating h2 { margin-top: 39px; font-size: 50px; line-height: 70px; letter-spacing: -0.023em; }

.b-feature__sub { max-width: 400px; margin: 0 auto; font-family: "Jost", var(--font-body); font-size: 33px; line-height: 46.2px; letter-spacing: -0.035em; }

/* Buy links */
.b-links { list-style: none; margin: 0; padding: 0; font-size: 20px; line-height: 25px; letter-spacing: 0.03em; }
.b-links a { text-decoration: underline; }
.b-links a:hover { color: var(--plum); }
.b-feature--making .b-feature__sub { margin-top: 5px; }
.b-feature--creating .b-feature__sub { margin-top: 2px; }
.b-feature--making .b-links { margin-top: 85px; }
.b-feature--making .b-links li + li { margin-top: 22px; }
.b-feature--creating .b-links { margin-top: 72px; padding-right: 13px; }
.b-feature--creating .b-links li:nth-child(2) { margin-top: 28px; }
.b-feature--creating .b-links li:nth-child(3) { margin-top: 24px; }

.b-gap { background: var(--cream); height: 48px; }
.b-gap--2 { height: 49px; }

/* ---------- Fantasy novels ---------- */

.b-shelf { display: grid; grid-template-columns: repeat(4, 1fr); height: 516px; }
.b-book { position: relative; }
.b-book img { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); max-width: none; object-fit: cover; }
.b-book .b-links { position: absolute; left: 0; right: 0; top: var(--lt); text-align: center; transform: translateX(var(--dx)); }
.b-book .b-links li + li { margin-top: 33px; }
.b-book--messenger { --x: 133px; --y: 20px; --w: 226px; --h: 315px; --lt: 368px; --dx: 56.5px; }
.b-book--warrior   { --x: 65px;  --y: 20px; --w: 231px; --h: 321px; --lt: 368px; --dx: 0px; }
.b-book--queen     { --x: 27px;  --y: 9px;  --w: 217px; --h: 345px; --lt: 368px; --dx: -50px; }
.b-book--blue-moon { --x: -8px;  --y: 9px;  --w: 301px; --h: 376px; --lt: 368px; --dx: -58px; }
.b-book--blue-moon .b-links li + li { margin-top: 16px; }

/* ---------- Narrower desktops ---------- */

@media (max-width: 1250px) and (min-width: 761px) {
  .b-intro { height: auto; padding-bottom: 40px; }
  .b-intro__inner { justify-content: center; }
  .b-intro__photo { margin-left: 0; }
  .b-intro__text { width: 440px; margin-left: 40px; }
  .b-feature--making .b-feature__img, .b-feature--creating .b-feature__img { width: calc(100% - 24px); height: auto; margin-inline: 12px; justify-self: center; }
  .b-feature--making .b-feature__text, .b-feature--creating .b-feature__text { width: auto; margin-inline: 24px; justify-self: stretch; }
  .b-feature::after { display: none; }
  .b-shelf { grid-template-columns: repeat(2, 1fr); height: auto; }
  .b-book { height: 516px; }
  .b-book img { left: 50%; transform: translateX(-50%); }
  .b-book .b-links { transform: none; }
}

/* ---------- Phones: rem = Wix mobile pixels (320px frame) ---------- */

@media (max-width: 760px) {
  .b-intro { height: auto; padding: 20rem 20rem 21rem; }
  .b-intro__inner { display: block; width: auto; }
  .b-intro__photo { width: 280rem; height: 365rem; margin: 0; border-radius: 30rem; }
  .b-intro__text { width: auto; margin: 0; }
  .b-intro h1 { max-width: none; margin-top: 17rem; font-size: 27rem; line-height: 37.8rem; }
  .b-intro__prose { margin-top: 31rem; font-size: 17rem; line-height: 24.8rem; }
  .b-intro__prose p + p { margin-top: 23.8rem; }

  .b-feature, .b-feature--creating { display: block; height: auto; padding-bottom: 20rem; }
  .b-feature::after { display: none; }
  .b-feature--making .b-feature__img, .b-feature--creating .b-feature__img { width: 100%; height: 279rem; margin: 20rem 0 0; justify-self: auto; }
  .b-feature--creating .b-feature__img { height: 299rem; margin-top: 25rem; }
  .b-feature--making .b-feature__text, .b-feature--creating .b-feature__text { width: auto; margin: 0; justify-self: auto; }
  .b-feature--making .b-feature__text { padding-top: 36rem; padding-bottom: 59rem; }
  .b-feature--creating .b-feature__text { padding-top: 24rem; }

  .b-feature__kicker { max-width: 190rem; margin: 0 auto; font-size: 18rem; line-height: 28.5rem; }
  .b-feature--making .b-feature__kicker { max-width: 200rem; padding-left: 0; font-size: 21rem; line-height: 32.5rem; }

  .b-feature--making h2 { margin-top: 29rem; font-size: 36rem; line-height: 50.4rem; letter-spacing: -0.013em; }
  .b-feature--creating h2 { margin-top: 22rem; font-size: 30rem; line-height: 42rem; letter-spacing: -0.026em; }
  .b-feature__sub { max-width: 270rem; font-size: 22rem; line-height: 30.8rem; }
  .b-feature--making .b-feature__sub, .b-feature--creating .b-feature__sub { margin-top: 6rem; }

  .b-links { font-size: 19rem; line-height: 24rem; }
  .b-feature--making .b-links { margin-top: 28rem; }
  .b-feature--making .b-links li + li { margin-top: 18rem; }
  .b-feature--creating .b-links { margin-top: 37rem; padding-right: 0; }
  .b-feature--creating .b-links li:nth-child(n+2) { margin-top: 21rem; }

  .b-gap { position: relative; height: 20rem; }
  .b-gap--2 { height: 33rem; }
  .b-gap::after { content: ""; position: absolute; left: 23rem; width: 280rem; top: 7rem; border-top: 1px solid var(--blush); }
  .b-gap--2::after { left: 20rem; top: 16rem; }

  .b-shelf { display: block; height: auto; }
  .b-book { height: var(--mh); }
  .b-book img { left: var(--mx); top: var(--my); width: var(--mw); height: var(--mhh); transform: none; }
  .b-book .b-links { top: var(--mlt); transform: translateX(var(--mdx, 0)); }
  .b-book .b-links li + li { margin-top: 21rem; }
  .b-book--messenger { --mh: 388rem; --mx: 75rem; --my: 20rem; --mw: 170rem; --mhh: 213rem; --mlt: 250rem; }
  .b-book--warrior   { --mh: 401rem; --mx: 70rem; --my: 20rem; --mw: 180rem; --mhh: 226rem; --mlt: 263rem; }
  .b-book--queen     { --mh: 415rem; --mx: 80rem; --my: 20rem; --mw: 160rem; --mhh: 240rem; --mlt: 277rem; }
  .b-book--blue-moon { --mh: 437rem; --mx: 58rem; --my: 22rem; --mw: 210rem; --mhh: 262rem; --mlt: 309rem; --mdx: -6rem; }
  .b-book--blue-moon .b-links li + li { margin-top: 17rem; }
  .b-book--blue-moon .b-links li:nth-child(2) { font-size: 20rem; line-height: 25rem; }
}
