/* ════════════════════════════════════════════════════════════════════════
   BOOK SHOWCASE — added 2026-04-27
   Pattern: LinkedIn dark-mode aesthetic. Saturated cover thumbnails on dark bg.
   Follows §HOW TO SELL rubric in book stack memory.
   ════════════════════════════════════════════════════════════════════════ */

/* Three-column main layout — left sidebar (5fr) / center (7fr) / right rail (3fr) */
.layout-3col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) minmax(0, 3fr);
  gap: 24px;
  padding-top: 24px;
}

@media (max-width: 1200px) {
  .layout-3col { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .layout-3col .right-rail { display: none; }
}

@media (max-width: 768px) {
  .layout-3col { grid-template-columns: 1fr; }
  .layout-3col .left-sidebar { order: -1; }
}

/* Right rail */
.right-rail { display: flex; flex-direction: column; gap: 8px; }

.rail-card {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 16px;
}

.rail-card-header {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

.rail-card-subhead {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}

/* Book mini-card row — used in right-rail carousel */
.book-mini {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease;
}

.book-mini:last-child { border-bottom: none; }
.book-mini:hover { background: rgba(255, 255, 255, 0.03); }

.book-mini-cover {
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #0a0a0a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.book-mini-info { flex: 1; min-width: 0; }

.book-mini-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-mini-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}

.rail-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
}

.rail-card-footer a {
  font-size: 13px;
  font-weight: 600;
  color: #70b5f9;
  text-decoration: none;
}
.rail-card-footer a:hover { text-decoration: underline; }

/* Left-sidebar mini-profile */
.sidebar-mini-profile {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-mini-banner {
  height: 56px;
  background: linear-gradient(135deg, #0a1525 0%, #0d1a2d 40%, #0f1d35 100%);
}

.sidebar-mini-body { padding: 0 16px 16px; text-align: center; }

.sidebar-mini-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #1d2226;
  margin-top: -36px;
  margin-bottom: 8px;
  object-fit: cover;
  background: #1b1f23;
}

.sidebar-mini-name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

.sidebar-mini-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* /books pages — landing + series + per-book */

/* Books-site nav bar */
.books-nav {
  background: #1d2226;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding: 12px 0;
  margin-bottom: 24px;
}

.books-nav-inner {
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.books-nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.books-nav-links { display: flex; gap: 24px; flex-wrap: wrap; }

.books-nav-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
}

.books-nav-links a:hover { color: #70b5f9; }

/* Books landing hero */
.books-hero {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 768px) {
  .books-hero { grid-template-columns: 1fr; text-align: center; }
}

.books-hero-cover {
  width: 240px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.books-hero-eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #70b5f9;
  font-weight: 600;
  margin-bottom: 8px;
}

.books-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.15;
  margin-bottom: 8px;
}

.books-hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 16px;
}

.books-hero-pitch {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin-bottom: 16px;
}

.books-hero-cta {
  display: inline-block;
  padding: 10px 22px;
  background: #70b5f9;
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.books-hero-cta:hover { background: #9bcdfb; }

/* Section heading on books pages */
.books-section-head {
  font-size: 22px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 32px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.books-section-head a {
  font-size: 13px;
  font-weight: 600;
  color: #70b5f9;
  text-decoration: none;
}

/* Cover grid — 4 col desktop / 3 tablet / 2 mobile */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1000px) { .cover-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .cover-grid { grid-template-columns: repeat(2, 1fr); } }

.cover-card { text-decoration: none; color: inherit; display: block; }

.cover-card-image {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cover-card:hover .cover-card-image {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
}

.cover-card-title {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover-card-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.3;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover-card-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #70b5f9;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Per-book page hero */
.book-detail-hero {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .book-detail-hero { grid-template-columns: 1fr; padding: 24px; }
}

.book-detail-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.book-detail-meta { display: flex; flex-direction: column; justify-content: center; }

.book-detail-eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #70b5f9;
  font-weight: 600;
  margin-bottom: 12px;
}

.book-detail-title {
  font-size: 36px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.1;
  margin-bottom: 12px;
}

.book-detail-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 20px;
}

.book-detail-author {
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.book-detail-status {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(112, 181, 249, 0.15);
  border: 1px solid rgba(112, 181, 249, 0.4);
  border-radius: 12px;
  font-size: 12px;
  color: #70b5f9;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.book-detail-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.book-cta {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.book-cta-primary { background: #70b5f9; color: #0a0a0a; }
.book-cta-primary:hover { background: #9bcdfb; }

.book-cta-secondary { background: transparent; color: #70b5f9; border-color: #70b5f9; }
.book-cta-secondary:hover { background: rgba(112, 181, 249, 0.1); }

/* Per-book synopsis section */
.book-section {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 16px;
}

.book-section-head {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #70b5f9;
  font-weight: 600;
  margin-bottom: 16px;
}

.book-section-body {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.book-section-body p { margin-bottom: 12px; }
.book-section-body p:last-child { margin-bottom: 0; }

/* Comp titles list */
.comp-list { list-style: none; margin: 0; padding: 0; }

.comp-list li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-list li:last-child { border-bottom: none; }
.comp-list li em { color: rgba(255, 255, 255, 0.92); font-style: italic; }

/* About-the-author bottom card */
.about-author-card {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .about-author-card { grid-template-columns: 1fr; text-align: center; }
}

.about-author-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.10);
}

.about-author-name {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

.about-author-bio {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════════════
   Inquire / Pre-order modal — opens from book-cta-primary on per-book pages.
   Posts to /api/contact (handled by imran-subdomain server.mjs with email
   + agent_bulletins redundancy).
   ════════════════════════════════════════════════════════════════════════ */

.inquire-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.inquire-modal-backdrop.open { display: flex; }

.inquire-modal {
  background: #1d2226;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.inquire-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.inquire-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.inquire-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 12px;
  line-height: 1;
}

.inquire-modal-close:hover { color: rgba(255, 255, 255, 0.92); }

.inquire-modal-eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  color: #70b5f9;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.inquire-form-row { margin-bottom: 14px; }

.inquire-form-row label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.inquire-form-row input,
.inquire-form-row select,
.inquire-form-row textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.inquire-form-row input:focus,
.inquire-form-row select:focus,
.inquire-form-row textarea:focus {
  border-color: #70b5f9;
  background: rgba(255, 255, 255, 0.08);
}

.inquire-form-row textarea { resize: vertical; min-height: 120px; }

.inquire-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.inquire-feedback {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 4px;
  margin-top: 12px;
}

.inquire-feedback.ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.inquire-feedback.err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
