@import url('style.css');

/* books.css inherits ALL base styles from style.css:
   :root variables, reset, header/nav, footer, branding, and .fade-in.
   Only books-page-specific rules live below. */

body {
  line-height: 1.4;
}

/* ---------------- BOOKS PAGE ---------------- */
.books-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 60px;
  text-align: center;
  background: linear-gradient(180deg, #fff8f7, #fefaf5);
}
.books-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.books-hero h1 {
  font-size: 2.4rem;
  color: var(--accent1);
  margin-bottom: 18px;
}
.books-hero p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

/* SERIES INFO */
.series-framework {
  padding: 70px 20px;
  background: #fff;
}
.series-inner {
  max-width: 850px;
  margin: 0 auto;
}
.series-framework h2 {
  text-align: center;
  color: var(--accent2);
  margin-bottom: 25px;
}
.series-framework ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.series-framework li {
  background: #fff8e1;
  border-left: 6px solid var(--accent2);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* GALLERY */
.books-gallery {
  background: linear-gradient(180deg, #fefaf5, #fff);
  padding: 80px 20px;
  text-align: center;
}
.books-gallery h2 {
  color: var(--accent3);
  margin-bottom: 40px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}
.book-tile {
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.book-tile img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.book-tile:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}
.book-tile h3 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

/* Alternating gallery tile tones */
.book-tile:nth-child(odd)  { background: #fffefb; }
.book-tile:nth-child(even) { background: #fff8f8; }

/* QUOTE */
.books-quote {
  padding: 80px 20px;
  text-align: center;
  background: var(--accent3);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.books-quote blockquote {
  font-size: 1.3rem;
  font-weight: 500;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-style: italic;
}
.books-quote::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.2), transparent 70%);
  animation: shimmer 6s infinite linear;
}
@keyframes shimmer {
  0%   { transform: translate(-30%, -30%) rotate(0deg); }
  100% { transform: translate(30%, 30%) rotate(360deg); }
}

/* ---------------- BOOKS-PAGE ENHANCEMENTS ---------------- */
/* Uses the shared `fadeIn` keyframes defined in style.css */
.books-hero,
.series-framework,
.books-gallery,
.books-quote {
  animation: fadeIn 1.2s ease-out forwards;
  opacity: 0;
  transform: translateY(25px);
}
.books-hero      { animation-delay: 0.1s; }
.series-framework { animation-delay: 0.3s; }
.books-gallery   { animation-delay: 0.5s; }
.books-quote     { animation-delay: 0.7s; }

/* Gradient border around hero */
.books-hero-inner {
  border: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent1), var(--accent3)) 1;
  border-radius: 20px;
  padding: 40px 30px;
  background: #ffffffd9;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  transition: transform 0.4s ease;
}
.books-hero-inner:hover {
  transform: translateY(-5px);
}

/* Section separators */
.series-framework::before,
.books-gallery::before {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin: 0 auto 35px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
}

/* Nav shine (kept as a books-page touch) */
.nav-item { overflow: hidden; }
.nav-item::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.25);
  transition: left 0.3s ease;
}
.nav-item:hover::after { left: 100%; }

/* Optional scroll-reveal helper */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}