/* =========================================================
   MOTE — 100 Buku Pilihan
   Visual grid layout, mobile-first, non-blog
   ========================================================= */

.page-books {
  background: var(--cream);
}

/* Hero */
.books-hero {
  background: linear-gradient(135deg, #000000 0%, #525456 100%);
  color: #fff;
  padding: clamp(40px, 10vw, 96px) 0;
}

.books-hero__inner {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.books-hero__badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0.85;
  margin-bottom: 20px;
}

.books-hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  text-align: left;
}

.books-hero__lead {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.9;
  line-height: 1.5;
  margin: 0 0 24px;
}

.books-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Section */
.books-section {
  padding: clamp(40px, 8vw, 72px) 0;
}

/* Grid — mobile 2 cols, tablet 3–4, desktop 5–6 */
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 24px);
}

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

@media (min-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1280px) {
  .books-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Book card */
.book-card {
  --cover-ratio: 1.5; /* 2:3 book ratio */
}

.book-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.book-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.book-card__cover {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(145deg, #e8e6e1 0%, #f5f3ef 100%);
}

.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.book-card__info {
  padding: 12px 14px 16px;
}

.book-card__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card__author {
  font-size: 11px;
  color: var(--ink);
  opacity: 0.65;
  margin: 0;
}

/* Card CTA (Notion) */
.book-card--cta .book-card__link {
  background: linear-gradient(145deg, var(--lime) 0%, #a8e03a 100%);
  border: 2px dashed rgba(17, 59, 42, 0.3);
}

.book-card--cta .book-card__link:hover {
  border-color: var(--ink);
}

.book-card__cover--cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: transparent;
}

.book-card__cta-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.book-card__cta-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.9;
}

.book-card--cta .book-card__title {
  color: var(--ink);
}

.book-card--cta .book-card__author {
  opacity: 0.8;
}

/* Footer */
.books-footer {
  margin-top: 48px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.books-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.books-footer a:hover {
  opacity: 0.8;
}

/* Reveal animation (uses script.js) */
.book-card[data-reveal].is-revealed {
  animation: bookReveal 0.5s ease forwards;
}

@keyframes bookReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
