/* Dynasty Library — Cinematic Classics Shelf
   Covers-forward, hover lift, take-one flip, progress ring.
   Independent of library.css legacy card grid. */

.cinema-shelf {
  --cover-w: 220px;
  --cover-h: 330px;
  --shelf-gap: 68px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .cinema-shelf {
    --cover-w: 168px;
    --cover-h: 252px;
    --shelf-gap: 60px;
  }
}
@media (max-width: 560px) {
  .cinema-shelf {
    --cover-w: 140px;
    --cover-h: 210px;
    --shelf-gap: 52px;
  }
}

.cinema-shelf .shelf-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--cover-w), 1fr));
  gap: var(--shelf-gap) 24px;
  padding: 40px 0 56px;
  position: relative;
}

/* Wooden shelf backdrop — dark wash + subtle top-down light */
.cinema-shelf {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(212,164,74,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #0b0806 0%, #0a0705 100%);
  border-radius: 4px;
  padding: 8px 12px 24px;
  border: 1px solid rgba(212,164,74,0.08);
}

/* Bottom base line — a single wooden plank across the shelf floor */
.cinema-shelf .shelf-row::after {
  content: "";
  position: absolute;
  bottom: 22px;
  left: -4%;
  right: -4%;
  height: 10px;
  background:
    linear-gradient(180deg, #241810 0%, #1a1108 55%, #0a0705 100%);
  border-top: 1px solid #3a2a1c;
  border-bottom: 1px solid #000;
  box-shadow:
    0 -1px 0 rgba(212,164,74,0.1) inset,
    0 6px 16px rgba(0,0,0,0.5);
  border-radius: 2px;
  z-index: 0;
  pointer-events: none;
}

/* Individual book on the shelf */
.book {
  position: relative;
  width: var(--cover-w);
  height: var(--cover-h);
  justify-self: center;
  perspective: 1400px;
  transition: transform .38s cubic-bezier(.2,.7,.2,1);
  z-index: 1;
  cursor: pointer;
}

.book:hover,
.book:focus-visible {
  transform: translateY(-14px) rotateX(4deg);
  z-index: 3;
}

.book:focus-visible { outline: none; }

/* Take-one gesture: cover pulls forward on active click before nav */
.book.taken {
  transform: translateY(-32px) translateZ(60px) rotateY(-8deg) rotateX(6deg);
  transition: transform .42s cubic-bezier(.2,.7,.2,1);
}

.book-cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 -14px 30px -14px rgba(0,0,0,0.6) inset,
    0 22px 40px -12px rgba(0,0,0,0.7),
    -6px 0 12px -8px rgba(0,0,0,0.6);
  transform-style: preserve-3d;
  background: #0a0a0a;
  transition: box-shadow .3s ease;
}

.book:hover .book-cover-img {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 -14px 30px -14px rgba(0,0,0,0.55) inset,
    0 28px 50px -10px var(--book-shadow, rgba(0,0,0,0.7)),
    -6px 0 12px -8px rgba(0,0,0,0.6);
}

/* Gilded edge on the right (pages) */
.book::before {
  content: "";
  position: absolute;
  top: 4px; bottom: 4px; right: 0;
  width: 5px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(212,164,74,0.14) 40%,
    rgba(0,0,0,0.4) 100%);
  border-radius: 0 3px 3px 0;
  z-index: 2;
  pointer-events: none;
}

/* Live badge — pulses gold when audio is shipped */
.book-live-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 4;
  background: rgba(0,0,0,0.72);
  color: #d4a44a;
  font-family: 'BarlowCondensed';
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid rgba(212,164,74,0.45);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.book-live-badge::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: #d4a44a;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
  box-shadow: 0 0 8px #d4a44a;
  animation: liveDot 1.8s ease-in-out infinite;
}
@keyframes liveDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #d4a44a; }
  50% { opacity: 0.4; box-shadow: 0 0 2px #d4a44a; }
}

/* Progress ring — gold arc around the cover as reader advances */
.book-progress {
  position: absolute;
  top: -3px; left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  z-index: 3;
}
.book-progress .ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}
.book-progress .ring-fg {
  fill: none;
  stroke: var(--book-accent, #d4a44a);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--book-accent, #d4a44a));
  transition: stroke-dashoffset .8s ease;
}

/* Book title / author caption below cover */
.book-caption {
  position: absolute;
  top: calc(100% + 12px);
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
}
.book-caption .caption-title {
  font-family: 'ArchivoBlack';
  font-size: 12px;
  letter-spacing: .04em;
  color: #eee;
  line-height: 1.2;
  margin: 0;
}
.book-caption .caption-author {
  font-family: 'BarlowCondensed';
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #999;
  margin-top: 3px;
}

/* Shelf head */
.shelf-title-block {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
  padding: 0 4px;
}
.shelf-title-block h3 {
  font-family: 'ArchivoBlack';
  font-size: 22px;
  color: #f4f4f4;
  letter-spacing: -.01em;
  margin: 0;
}
.shelf-title-block .shelf-meta {
  font-family: 'BarlowCondensed';
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #888;
}

/* Reduced motion — respect user pref */
@media (prefers-reduced-motion: reduce) {
  .book,
  .book:hover,
  .book.taken,
  .book-cover-img,
  .book-live-badge::before,
  .book-progress .ring-fg {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* =====================================================================
   MONTHLY SPOTLIGHT — editorial "Book of the Month" card
   ===================================================================== */
.spotlight {
  padding: 40px 0 28px;
}
.spotlight-wrap {
  padding: 0 24px;
}
.spotlight-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, rgba(29,22,15,0.85), rgba(20,15,10,0.9));
  border: 1px solid rgba(212, 164, 74, 0.35);
  border-left: 4px solid #d4a44a;
  border-radius: 12px;
  padding: 28px 32px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.spotlight-card:hover {
  border-color: #d4a44a;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 164, 74, 0.18);
}
.spotlight-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
}
.spotlight-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.spotlight-copy {
  min-width: 0;
}
.spotlight-kicker {
  font-family: 'BarlowCondensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #d4a44a;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spot-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4a44a;
  box-shadow: 0 0 8px rgba(212, 164, 74, 0.6);
}
.spotlight-title {
  font-family: 'ArchivoBlack', sans-serif;
  font-size: 34px;
  letter-spacing: -.015em;
  color: #f4f4f4;
  margin: 0 0 4px;
  line-height: 1.05;
}
.spotlight-author {
  font-family: 'BarlowCondensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 14px;
}
.spotlight-pitch {
  font-size: 15px;
  line-height: 1.55;
  color: #ccc;
  margin: 0 0 16px;
  max-width: 720px;
}
.spotlight-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 24px;
}
.spotlight-meta li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm-key {
  font-family: 'BarlowCondensed', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #888;
}
.sm-val {
  font-size: 13px;
  color: #e4e4e4;
  letter-spacing: 0;
}
.spotlight-cta {
  display: inline-block;
  font-family: 'BarlowCondensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d4a44a;
  padding-top: 4px;
  border-top: 1px solid rgba(212, 164, 74, 0.25);
  margin-top: 4px;
}
.spotlight-card:hover .spotlight-cta {
  color: #f0c674;
}

@media (max-width: 720px) {
  .spotlight-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .spotlight-cover {
    max-width: 180px;
    margin: 0 auto;
  }
  .spotlight-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-card,
  .spotlight-card:hover {
    transition: none !important;
    transform: none !important;
  }
}
