.v4-hero {
  background: radial-gradient(ellipse at 77% 33%, #915d95 0, transparent 52%), var(--plum);
}

.v4-hero .v4-hero-actions { column-gap: clamp(16px, 2vw, 28px); row-gap: 12px; }
.v4-hero .v4-hero-actions a { min-height: 46px; }
.v4-hero .v4-hero-actions .text-link { display: inline-flex; align-items: center; gap: 9px; }

.v4-hero-object { isolation: isolate; }
.v4-hero-object::before {
  inset: 8% 8% 14% 19%;
  height: auto;
  background: linear-gradient(144deg, #e9e4d2, #b9c87c 66%, #96ab60);
  box-shadow: 0 26px 58px #3116374a;
  transform: translate3d(calc(var(--v7-hero, 0) * -26px), calc(var(--v7-hero, 0) * 39px), 0)
    rotate(calc(12deg + var(--v7-hero, 0) * 8deg));
  transform-origin: 56% 73%;
  z-index: -2;
}
.v4-hero-object::after {
  inset: 11% 4% 9% 23%;
  width: auto;
  height: auto;
  background: transparent;
  border: 1px solid #f7f2ea8a;
  box-shadow: 0 0 0 8px #f7f2ea13;
  transform: translate3d(calc(var(--v7-hero, 0) * 38px), calc(var(--v7-hero, 0) * 60px), 0)
    rotate(calc(-9deg + var(--v7-hero, 0) * -7deg));
  transform-origin: 60% 78%;
  z-index: -3;
}
.v4-hero-object .v4-hero-book {
  width: min(92%, 500px);
  transform: translate3d(calc(var(--v7-hero, 0) * -19px), calc(var(--v7-hero, 0) * -63px), 0)
    rotate(calc(-5deg + var(--v7-hero, 0) * 10deg));
  transform-origin: 50% 82%;
  filter: drop-shadow(12px 21px 12px #22132665);
  transition: none;
}
.v4-hero-object figcaption { z-index: 3; }
.v4-hero-object--featured::before,
.v4-hero-object--featured::after { display: none; }
.v4-hero-object--featured .v4-hero-book {
  width: min(88%, 440px);
  filter: none;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, #000 92%, transparent);
  mask-composite: intersect;
}
.v4-hero-object--featured figcaption {
  left: 0;
  justify-content: center;
  text-align: center;
}
.v4-hero-carousel-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--paper);
  font: 500 13px/1 var(--sans);
}
.v4-hero-carousel-controls[hidden],
.v4-hero-carousel-controls button[hidden] { display: none; }
.v4-hero-carousel-controls button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid #f7f2ea70;
  color: inherit;
  cursor: pointer;
  font: 500 18px/1 var(--sans);
}
.v4-hero-carousel-controls button:hover { background: #f7f2ea24; }
.v4-hero-carousel-controls button:focus-visible { outline: 2px solid #f7f2ea; outline-offset: 2px; }
.v4-hero-carousel-controls [data-book-position] { margin-inline: 3px; min-width: 34px; text-align: center; }
.v4-edition-strip { position: relative; }
.v4-edition-strip::before {
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: var(--green);
  content: '';
  transform: scaleX(calc(.08 + var(--v7-hero, 0) * .92));
  transform-origin: left;
}

.v4-invite .wrap { position: relative; }
.v4-invite .wrap::after {
  position: absolute;
  inset: auto 0 -16px auto;
  width: min(28%, 290px);
  height: 2px;
  background: #74457980;
  content: '';
  transform: scaleX(calc(.24 + var(--v7-invite, 0) * .76));
  transform-origin: right;
}
.v4-reading .v4-reading-page {
  transform: translate3d(0, calc((1 - var(--v7-reading, 1)) * 35px), 0)
    rotate(calc(1.4deg + (1 - var(--v7-reading, 1)) * 5deg));
  transform-origin: center 83%;
}
.v4-reading .v4-reading-layers span {
  transform: translateY(calc((1 - var(--v7-reading, 1)) * var(--v7-travel, 0px)));
}
.v4-reading .v4-reading-layers span:nth-child(2) { --v7-travel: 8px; }
.v4-reading .v4-reading-layers span:nth-child(3) { --v7-travel: 16px; }

.v4-shelf .v4-shelf-art {
  position: relative;
  isolation: isolate;
  border-bottom: 0;
  background: linear-gradient(180deg, transparent 14%, #ede5d88f 100%);
}
.v4-shelf .v4-shelf-art::after {
  position: absolute;
  inset: auto 0 4px;
  height: 6px;
  content: '';
  background: #744579;
  box-shadow: 0 8px 9px #38203926;
  z-index: -1;
}
.v4-shelf .v4-shelf-art img {
  translate: 0 calc((1 - var(--v7-shelf, 1)) * var(--v7-rise, 35px));
  rotate: calc((1 - var(--v7-shelf, 1)) * var(--v7-lean, -6deg));
  transform-origin: center bottom;
}
.v4-shelf-book:nth-child(even) { --v7-rise: 53px; --v7-lean: 5deg; }
.v4-shelf-book:nth-child(3) { --v7-rise: 66px; --v7-lean: -4deg; }
.v4-shelf-book:focus-visible .v4-shelf-art img { transform: translateY(-7px); }

.bk .v7-pdf {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0;
  padding: 3px 8px;
  border: 1px solid #41631e55;
  border-radius: 3px;
  color: #2f4b15;
  background: #eaf0db;
  font: 650 11px/1.4 var(--sans);
  letter-spacing: .04em;
}
.v7-pdf::before { content: '↓'; font-size: 13px; }

@media (max-width: 660px) {
  .site-header .header-tools .header-search {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid var(--border);
    color: var(--plum);
  }
  .header-tools .header-search svg { width: 16px; height: 16px; }
  .v4-hero-object::before {
    inset: 10% 12% 17% 20%;
    transform: translate3d(0, calc(var(--v7-hero, 0) * 16px), 0) rotate(10deg);
  }
  .v4-hero-object::after {
    inset: 8% 11% 17% 16%;
    transform: translate3d(calc(var(--v7-hero, 0) * 9px), calc(var(--v7-hero, 0) * 23px), 0) rotate(-7deg);
  }
  .v4-hero-object .v4-hero-book {
    transform: translate3d(0, calc(var(--v7-hero, 0) * -24px), 0) rotate(-4deg);
  }
  .v4-shelf-book { --v7-rise: 20px; --v7-lean: -3deg; }
  .v4-shelf-book:nth-child(even), .v4-shelf-book:nth-child(3) { --v7-rise: 28px; --v7-lean: 3deg; }
}

@media (max-width: 360px) {
  .site-header > .wrap { width: calc(100% - 20px); gap: 3px; }
  .site-header .header-tools { gap: 1px; }
}

html[data-motion='reduced'] .v4-hero,
html[data-motion='reduced'] .v4-invite,
html[data-motion='reduced'] .v4-reading,
html[data-motion='reduced'] .v4-shelf {
  --v7-hero: 0 !important;
  --v7-invite: 1 !important;
  --v7-reading: 1 !important;
  --v7-shelf: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  .v4-hero, .v4-invite, .v4-reading, .v4-shelf {
    --v7-hero: 0 !important;
    --v7-invite: 1 !important;
    --v7-reading: 1 !important;
    --v7-shelf: 1 !important;
  }
}
