/* ============================================================
   books.css — books index grid and individual book detail page
   ============================================================ */


/* --- books index page --- */

.books-heading {
  margin-bottom: var(--space-l);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
}

@media (max-width: 540px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-s);
  }
}

.book-card {
  display:         block;
  text-decoration: none;
  color:           var(--ink);
  cursor:          pointer;
}

/* cover placeholder — warm parchment, replaced with actual art in production */
.book-cover {
  width:         100%;
  aspect-ratio:  3 / 4;
  border:        1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 0.48rem;
  overflow:      hidden;
  transition:    opacity 0.2s;
}

.book-card:hover .book-cover { opacity: 0.82; }

/* real cover image */
.book-cover-img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

/* warm parchment placeholder. shown when no cover image is set */
.book-cover-placeholder {
  width:       100%;
  height:      100%;
  background:  #EDE5D8;
  display:     flex;
  align-items: flex-end;
  padding:     0.72rem;
}

.book-cover-label {
  font-size:   0.64rem;
  font-style:  italic;
  color:       var(--muted);
  line-height: 1.3;
}

.book-card-title {
  font-size:     0.88rem;
  font-style:    italic;
  margin-bottom: 0.12rem;
}

.book-card-meta {
  font-size:     0.65rem;
  color:         var(--faint);
  margin-bottom: 0.2rem;
}

.book-card-download {
  font-size:      0.62rem;
  color:          var(--teal);
  letter-spacing: 0.04em;
}

/* --- books intro --- */
.books-intro {
  margin-bottom: var(--space-l);
}

.books-intro p {
  font-size:     0.94rem;
  line-height:   2.05;
  color:         var(--ink);
  margin-bottom: 1.4em;
}

.books-intro a {
  color:           var(--ink);
  border-bottom:   1px solid var(--border);
  text-decoration: none;
  transition:      border-color 0.2s;
}

.books-intro a:hover { border-color: var(--ink); }

.books-intro em { font-style: italic; }

/* thin rule between voice and shelf */
.books-divider {
  height:        1px;
  background:    var(--border);
  margin-bottom: var(--space-l);
}

/* --- book detail page --- */

.book-detail {}

.book-title {
  font-size:     1.28rem;
  font-weight:   normal;
  font-style:    italic;
  line-height:   1.25;
  margin-bottom: 0.28rem;
}

.book-meta {
  margin-bottom: var(--space-s);
}

/* download link — only rendered for books Otokini wrote */
.book-download {
  display:         inline-block;
  font-size:       0.7rem;
  color:           var(--teal);
  text-decoration: none;
  border-bottom:   1px solid var(--border);
  padding-bottom:  1px;
  margin-bottom:   var(--space-l);
  transition:      color 0.2s, border-color 0.2s;
}

.book-download:hover {
  color:        var(--ink);
  border-color: var(--ink);
}

.book-body p {
  font-size:     0.95rem;
  line-height:   2.05;
  margin-bottom: 1.6em;
}

