/* =========================================================
   Resources page — editorial reading list
   Extends styles.css (inherits :root tokens)
   ========================================================= */

/* ========== Site nav ========== */
.site-nav {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}
.site-nav a {
  font-size: var(--text-sm);
  color: var(--ink-3);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--pal);
}

/* ========== Eyebrow / lede adjustments ========== */
.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pal);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

/* ========== Jump nav ========== */
.jump-nav {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-8);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-color: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(6px);
}
.jump-nav a {
  font-size: var(--text-xs);
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 40px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.jump-nav a:hover {
  background: var(--paper-2);
  border-color: var(--rule-2);
  color: var(--ink);
}

/* ========== Book section ========== */
.book-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: 140px;
}
.section-head {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
.section-head p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--ink-3);
  margin: 0;
  max-width: 680px;
}

/* ========== Book grid ========== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

/* ========== Book card ========== */
.book {
  display: grid;
  grid-template-columns: 160px 1fr;
  background: #fcfaf6;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.book:hover {
  border-color: var(--rule-2);
  box-shadow: 0 6px 20px -8px rgba(28, 25, 23, 0.12);
  transform: translateY(-1px);
}

/* Featured variant — spans full width, richer cover */
.book-featured {
  grid-column: 1 / -1;
  grid-template-columns: 280px 1fr;
}

/* ========== Book cover ========== */
.book-cover {
  --cover: var(--ink-3);
  background: var(--cover);
  color: var(--paper);
  padding: var(--space-5);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  overflow: hidden;
  isolation: isolate;
}
/* Subtle paper grain/vignette */
.book-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22));
  z-index: -1;
}
/* Thin embossed spine on the right edge */
.book-cover::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 6px;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.25),
    rgba(0, 0, 0, 0) 100%
  );
  z-index: -1;
}

.title-cover {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-wrap: balance;
}
.author-cover {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.75);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(245, 241, 234, 0.25);
  font-family: var(--font-body);
  font-weight: 500;
}

/* Featured cover — bigger typography */
.book-featured .book-cover { min-height: 300px; }
.book-featured .title-cover {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  line-height: 1.08;
}
.book-featured .author-cover {
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
}

/* ========== Book body ========== */
.book-body {
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.book-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.book-featured .book-body h3 {
  font-size: var(--text-xl);
}
.book-author {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.book-body p {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-2);
  margin: var(--space-1) 0 0;
}
.book-body p em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}

/* ========== Book pill (featured badge) ========== */
.book-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--pal-bg);
  color: var(--pal);
  border: 1px solid rgba(139, 58, 47, 0.25);
  border-radius: 40px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.book-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pal);
}

/* ========== Book links ========== */
.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--rule);
}
.book-links a {
  font-size: var(--text-xs);
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 3px 0;
  border-bottom: 1px solid var(--rule-2);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.book-links a:hover {
  color: var(--pal);
  border-bottom-color: var(--pal);
}
.book-links a::after {
  content: ' ↗';
  color: var(--ink-4);
  font-size: 0.85em;
}
.book-links a:hover::after { color: var(--pal); }

/* ========== Lists section (source lists) ========== */
.lists-section {
  margin-top: var(--space-12);
  margin-bottom: var(--space-16);
  padding: var(--space-8);
  background: #fcfaf6;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}
.lists-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
.lists-section > p {
  font-size: var(--text-base);
  color: var(--ink-2);
  margin: 0 0 var(--space-5);
  max-width: 680px;
}
.source-lists {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: grid;
  gap: var(--space-3);
}
.source-lists li {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: var(--space-5);
  position: relative;
}
.source-lists li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 1px;
  background: var(--ink-4);
}
.source-lists li a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-2);
  font-weight: 500;
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.source-lists li a:hover { border-bottom-color: var(--ink); }

.lists-section .note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0;
  padding-top: var(--space-5);
  border-top: 1px dashed var(--rule);
  max-width: 720px;
}
.lists-section .note a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 3px;
  font-style: normal;
}
.lists-section .note a:hover {
  color: var(--pal);
  text-decoration-color: var(--pal);
}

/* ========== Footer links for resources ========== */
.site-foot .foot-sources a {
  color: var(--ink);
  font-weight: 500;
}

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-featured { grid-template-columns: 160px 1fr; }
  .jump-nav { top: 64px; }
}
@media (max-width: 640px) {
  .book { grid-template-columns: 1fr; }
  .book-featured { grid-template-columns: 1fr; }
  .book-cover,
  .book-featured .book-cover {
    min-height: 160px;
    padding: var(--space-4);
  }
  .book-body { padding: var(--space-4); }
  .jump-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .jump-nav::-webkit-scrollbar { display: none; }
  .lists-section { padding: var(--space-5); }
  .site-nav { gap: var(--space-3); }
  .site-nav a { font-size: var(--text-xs); }
}
