/* ============================================================
   BOOK.CSS — styles for individual book pages.
   Loaded in addition to style.css and pages.css.
   You never need to edit this file when creating a new book page.
   ============================================================ */

/* === BOOK INTRO: cover + description === */
.book-intro { background: var(--color-white); }

.book-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.book-cover-col {
  max-width: 340px;
  margin-inline: auto;
  width: 100%;
}

.book-cover-wrap {
  position: relative;
}

.book-cover-wrap img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.book-single-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--color-accent-light), var(--color-soft));
  box-shadow: var(--shadow-lg);
}

/* Publication details table */
.book-meta-list {
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.book-meta-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.book-meta-row dt {
  color: var(--color-text-muted);
  font-weight: 400;
}

.book-meta-row dd {
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
}

/* Description column */
.book-description-col h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.book-description-col p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  max-width: 60ch;
  line-height: 1.8;
}

.book-back-link {
  margin-top: var(--space-sm);
  display: inline-block;
}

/* === KEY THEMES === */
.book-themes { background: var(--color-bg); }

.themes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.theme-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  transition: box-shadow var(--transition), transform var(--transition);
}

.theme-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.theme-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--color-primary-dark);
  flex-shrink: 0;
}

.theme-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.theme-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 42ch;
  margin: 0;
}

/* === AUTHOR NOTE === */
.author-note { background: var(--color-white); }

.author-note-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.author-note-photo {
  position: relative;
  max-width: 300px;
  margin-inline: auto;
}

.author-note-photo img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  display: block;
}

.author-note-frame {
  position: absolute;
  inset: -10px -10px 10px 10px;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-lg);
  z-index: -1;
  pointer-events: none;
}

.author-note-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.author-note-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  max-width: 60ch;
  line-height: 1.8;
}

.author-note-sig {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--color-text) !important;
  margin-top: var(--space-md);
}

/* === OTHER BOOKS === */
.other-books { background: var(--color-bg-alt); }

.other-books-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.other-book-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.other-book-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.other-book-cover { flex-shrink: 0; }

.other-book-cover img {
  width: 80px;
  height: 114px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.other-book-placeholder {
  width: 80px;
  height: 114px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--color-accent-light), var(--color-soft));
}

.other-book-placeholder--2 {
  background: linear-gradient(160deg, #c5e8f0, #9ecdd6);
}

.other-book-placeholder--3 {
  background: linear-gradient(160deg, #d4eef5, var(--color-accent-light));
}

.other-book-info { flex: 1; }

.other-book-info .book-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--color-mist);
  color: var(--color-primary-dark);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.other-book-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.other-book-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 45ch;
  margin: 0;
}

/* === RESPONSIVE === */
@media (min-width: 640px) {
  .themes-grid { grid-template-columns: 1fr 1fr; }
  .other-books-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .book-intro-grid {
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
  }

  .book-cover-col { max-width: none; margin: 0; }

  .author-note-grid {
    grid-template-columns: 240px 1fr;
    gap: var(--space-xl);
  }

  .author-note-photo { max-width: none; margin: 0; }
}

@media (min-width: 1024px) {
  .themes-grid { grid-template-columns: repeat(3, 1fr); }
  .other-books-grid { grid-template-columns: repeat(3, 1fr); }

  .book-intro-grid { grid-template-columns: 300px 1fr; }
}
