/* --------------------------------------------------------------------------
   THE BINDERY — Wayne's children's books as 3D volumes on a starlit shelf
   -------------------------------------------------------------------------- */
.author-hero {
  padding-top: var(--hero-pad-top);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.author-title {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  margin-top: 1.1rem;
  max-width: 18ch;
}

.author-lede {
  max-width: 64ch;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--star-2);
}
.author-lede strong { color: var(--star-1); font-weight: 500; }

/* -- The shelf grid -------------------------------------------------------- */
.bookshelf {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(2.2rem, 4vw, 3.5rem) clamp(1.6rem, 3vw, 2.6rem);
  max-width: 1080px;
  margin: 0 auto;
}

.book-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* -- The volume itself: cover, spine, page-block --------------------------- */
.book {
  position: relative;
  display: block;
  width: min(230px, 78vw);
  perspective: 900px;
  /* the shelf light pooled beneath */
  margin-bottom: 1.6rem;
}

.book-inner {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transform: rotateY(-24deg);
  transition: transform 0.55s var(--ease-spring);
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 582 / 900;
  object-fit: cover;
  border-radius: 3px 8px 8px 3px;
  box-shadow:
    inset 4px 0 6px -4px rgba(0, 0, 0, 0.6),
    0 24px 50px -18px rgba(0, 0, 0, 0.85);
  backface-visibility: hidden;
}

/* Spine: a strip folded back along the left edge */
.book-spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 100%;
  background: linear-gradient(90deg, #241a3d, #171033 55%, #241a3d);
  border-radius: 3px 0 0 3px;
  transform: rotateY(-78deg);
  transform-origin: left center;
  box-shadow: inset -3px 0 5px rgba(0, 0, 0, 0.5);
}

/* Page block: creamy paper along the right edge */
.book-pages {
  position: absolute;
  top: 1.5%;
  right: 0;
  width: 22px;
  height: 97%;
  background:
    repeating-linear-gradient(180deg,
      #efe7d6 0px, #efe7d6 2px,
      #ddd2bc 2px, #ddd2bc 3px);
  transform: rotateY(82deg);
  transform-origin: right center;
  border-radius: 0 2px 2px 0;
}

/* Warm light pooled on the shelf beneath each volume */
.book-glow {
  position: absolute;
  left: 50%;
  bottom: -1.3rem;
  width: 82%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 0%, rgba(242, 193, 78, 0.28), transparent 75%);
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.4s, width 0.4s;
  opacity: 0.7;
}

/* Hover/focus: the book turns toward the reader and lifts */
a.book:hover .book-inner,
a.book:focus-visible .book-inner {
  transform: rotateY(-7deg) translateY(-10px);
}
a.book:hover .book-glow,
a.book:focus-visible .book-glow { opacity: 1; width: 95%; }
a.book:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 8px;
  border-radius: var(--radius-s);
}

/* -- Nameplates ------------------------------------------------------------ */
.book-plate { max-width: 260px; }

.book-series {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.book-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 560;
  line-height: 1.25;
  color: var(--star-1);
}

.book-blurb {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--star-3);
}

.book-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--star-3);
  transition: color 0.25s;
}
.book-cta:hover, .book-cta:focus-visible { color: var(--gold-hot); }
.book-cta span { transition: transform 0.3s var(--ease-spring); }
.book-cta:hover span { transform: translateX(4px); }

/* -- Coming soon: dimmed, dreaming ----------------------------------------- */
.book-slot--soon .book-cover { filter: saturate(0.55) brightness(0.72); }
.book-slot--soon .book-glow {
  background: radial-gradient(50% 100% at 50% 0%, rgba(240, 119, 74, 0.22), transparent 75%);
}
.book-slot--soon .book-inner { transform: rotateY(-24deg); }

.book-soon-chip {
  margin-top: 0.65rem;
  color: var(--ember-hot);
  border-color: rgba(240, 119, 74, 0.35);
  background: var(--ember-dim);
}
.book-soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}
@media (prefers-reduced-motion: no-preference) {
  .book-soon-dot { animation: book-soon-pulse 2.6s ease-in-out infinite; }
}
@keyframes book-soon-pulse {
  50% { opacity: 0.35; }
}

/* -- Closing CTA ------------------------------------------------------------ */
.author-cta { padding-top: 2rem; }
.author-cta-inner {
  text-align: center;
  max-width: 640px;
}
.author-cta-inner h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 0.9rem; }
.author-cta-inner p { margin-top: 1rem; color: var(--star-3); }
.author-cta-btns {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -- Small screens ----------------------------------------------------------- */
@media (max-width: 600px) {
  .bookshelf { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .book { width: min(180px, 72vw); }
  .book-name { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  .book-inner,
  a.book:hover .book-inner,
  a.book:focus-visible .book-inner { transform: rotateY(-12deg); transition: none; }
}
