/* Chapters Brand – ChaptersBook.com */

/* Display / Serif font stack */
.font-display {
  font-family: Georgia, 'Book Antiqua', Palatino, 'Palatino Linotype', serif;
}
.font-serif {
  font-family: Georgia, 'Book Antiqua', Palatino, 'Palatino Linotype', serif;
}

/* Subtle paper texture */
.paper-texture {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(15, 27, 45, 0.025) 31px,
      rgba(15, 27, 45, 0.025) 32px
    ),
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 71, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 38, 53, 0.03) 0%, transparent 50%);
}

/* Elegant book shadow */
.book-shadow {
  box-shadow:
    0 20px 60px rgba(15, 27, 45, 0.14),
    0 8px 25px rgba(15, 27, 45, 0.09),
    0 2px 6px rgba(15, 27, 45, 0.06);
}

/* Float animation for hero image */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-10px) rotate(0.3deg); }
  66%       { transform: translateY(-6px) rotate(-0.2deg); }
}
.animate-float-slow {
  animation: float-slow 7s ease-in-out infinite;
}

/* Fade up entrance */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fade-up 0.65s ease-out both;
}

/* Book-page turn pulse for loading state */
@keyframes page-turn {
  0%, 100% { transform: rotateY(0deg);   opacity: 1;   }
  25%       { transform: rotateY(-30deg); opacity: 0.6; }
  50%       { transform: rotateY(0deg);   opacity: 1;   }
  75%       { transform: rotateY(20deg);  opacity: 0.7; }
}
.animate-page-turn {
  animation: page-turn 2.4s ease-in-out infinite;
  display: inline-block;
}

/* Ensure sticky elements in the modal don't bleed */
.max-h-modal {
  max-height: calc(100vh - 3rem);
}

/* Custom scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 27, 45, 0.18); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 27, 45, 0.35); }

/* Drop-cap first letter */
.drop-cap::first-letter {
  font-family: Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.75;
  margin-right: 6px;
  margin-top: 4px;
  color: #8B2635;
}

/* Line clamp utilities */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
