/* ==========================================
   WAHE.WORLD BOOK — Digital Reader CSS
   Requires /shared/css/tokens.css to be loaded first
   (linked before this file in each chapter page).
   ========================================== */

/* === Reset & Base Styles === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 50% 0%, hsla(38, 100%, 53%, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 0% 100%, hsla(262, 60%, 7%, 0.45) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, hsla(340, 50%, 5%, 0.3) 0%, var(--bg-deep) 100%),
    /* Subtle sacred geometry lattice overlay */
    radial-gradient(circle, hsla(38, 100%, 53%, 0.015) 1px, transparent 1px),
    radial-gradient(circle, hsla(262, 100%, 65%, 0.01) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 96px 96px;
  background-position: 0 0, 0 0, 0 0, 0 0, 24px 24px;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* Reading container */
.book-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Reader Top Header */
.book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 18px;
  margin-bottom: 60px;
}

.btn-toc {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.btn-toc:hover {
  color: var(--gold-bright);
  border-color: hsla(42, 100%, 53%, 0.25);
  transform: translateX(-3px);
  box-shadow: 0 0 15px var(--gold-glow);
}

.brand-logo-small {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-primary);
  letter-spacing: 2px;
  text-decoration: none;
}

/* Reader Typography */
.chapter-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.chapter-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 30px;
}

.chapter-deck {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 45px;
  border-left: 2px solid var(--gold-primary);
  padding-left: 20px;
  font-style: italic;
}

/* Modern drop-cap for book chapter starts */
.drop-cap {
  float: left;
  font-family: var(--font-heading);
  font-size: 3.8rem;
  line-height: 0.85;
  padding-top: 6px;
  padding-right: 12px;
  color: var(--gold-bright);
  text-shadow: 0 0 15px var(--gold-glow);
}

.chapter-body p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 28px;
  text-align: justify;
}

.chapter-body h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--gold-bright);
  margin: 50px 0 20px;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.chapter-body h3 {
  font-size: 1.12rem;
  color: var(--text-primary);
  margin: 30px 0 16px;
  font-weight: 600;
}

.chapter-body blockquote {
  border-left: 3px solid var(--gold-primary);
  background: hsla(42, 100%, 53%, 0.03);
  padding: 24px 30px;
  margin: 40px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: inset 5px 0 15px rgba(0,0,0,0.2);
}

.chapter-body blockquote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0;
  text-align: left;
}

.chapter-body blockquote cite {
  display: block;
  font-size: 0.85rem;
  color: var(--gold-primary);
  margin-top: 10px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Bullet list and details */
.chapter-body ul, .chapter-body ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.chapter-body li {
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.chapter-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Linear Chapter Pagination */
.book-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 30px;
  margin-top: 60px;
}

.pag-btn {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo-primary);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pag-btn:hover {
  color: var(--gold-bright);
}

.pag-btn-disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.4;
}

/* Footer Section */
.book-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 40px;
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-initials {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-deep);
  font-size: 1.1rem;
  box-shadow: 0 0 15px var(--gold-glow);
}

.author-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}
