/* ============================================================================
   THE LIVING DEAD — Canonical Font System
   Allura = Authorial Identity | Poppins = Clarity & Readability
   ============================================================================ */

/* NON-NEGOTIABLE: Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Allura&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================================================
   GLOBAL BODY FONT — STRUCTURAL
   ============================================================================ */

body {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 400;
  line-height: 1.7;
}

/* ============================================================================
   MEMOIR & CHAPTER HEADINGS — IDENTITY LOCK
   These are authorial statements, not UI elements.
   ============================================================================ */

h1, h2 {
  font-family: 'Allura', cursive !important;
  font-weight: 400 !important;
  letter-spacing: 0.5px !important;
  text-transform: none !important;
}

/* ============================================================================
   SUBHEADINGS — CONTROLLED TRANSITION
   Prevent overuse of Allura. Preserve hierarchy and restraint.
   ============================================================================ */

h3, h4 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
  text-transform: none !important;
}

h5, h6 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 500 !important;
  text-transform: none !important;
}

/* ============================================================================
   NAVIGATION & UI — ABSOLUTE RULE
   Allura must NEVER appear in navigation.
   ============================================================================ */

nav, .navbar, .menu, footer,
.navbar-brand, .nav-link, .dropdown-item,
.nav-footer, footer.footer {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 500 !important;
}

/* ============================================================================
   BODY TEXT — SUSTAINED READING
   ============================================================================ */

p, li, td, th, span, div,
blockquote, .chapter-content, .about-content,
.contact-section, .contact-intro {
  font-family: 'Poppins', sans-serif !important;
}

blockquote {
  font-weight: 300 !important;
}

/* ============================================================================
   SPECIAL MEMOIR ELEMENTS — TONE-SETTING (Allura, used sparingly)
   ============================================================================ */

.memoir-intro,
.memoir-footer {
  font-family: 'Allura', cursive !important;
  font-size: 1.4rem !important;
  opacity: 0.9;
}

.memoir-intro p,
.memoir-footer p {
  font-family: 'Allura', cursive !important;
  font-size: 1.4rem !important;
}

/* ============================================================================
   CALLOUT & PROGRESS — UI ELEMENTS (Poppins)
   ============================================================================ */

.callout-note, .callout-note p, .callout-note .callout-body,
.chapter-progress-nav, .chapter-progress-nav a {
  font-family: 'Poppins', sans-serif !important;
}

/* ============================================================================
   CHAPTER PAGE HEADER — Label is Poppins, Title is Allura
   ============================================================================ */

.chapter-label {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 400 !important;
}

.chapter-title {
  font-family: 'Allura', cursive !important;
  font-weight: 400 !important;
  text-transform: none !important;
}

/* Chapter body text — Poppins for sustained reading */
.chapter-body p,
.chapter-body li {
  font-family: 'Poppins', sans-serif !important;
}

/* Progress row — Poppins for clarity */
.chapter-progress-row,
.progress-node,
nav.chapter-nav,
.node-label {
  font-family: 'Poppins', sans-serif !important;
}

/* Chapter invocation — Poppins for subtitle */
.chapter-invocation {
  font-family: 'Poppins', sans-serif !important;
}

/* Download link, enter links — Poppins */
.download-link,
.enter-memoir-link,
.enter-chapter-link,
.chapter-tagline {
  font-family: 'Poppins', sans-serif !important;
}

/* Memoir overview title — Poppins uppercase, not Allura */
h1.memoir-overview-title {
  font-family: 'Poppins', sans-serif !important;
  text-transform: uppercase !important;
  font-weight: 300 !important;
  letter-spacing: 0.28em !important;
}

.memoir-overview-sub {
  font-family: 'Poppins', sans-serif !important;
}

/* Chapter progress nav labels */
nav.chapter-progress-nav .nav-item .label,
nav.chapter-progress-nav .nav-item .title {
  font-family: 'Poppins', sans-serif !important;
}

/* Memoir title page — Poppins for structured clarity, overrides h1 Allura rule */
h1.memoir-title-main {
  font-family: 'Poppins', sans-serif !important;
  text-transform: uppercase !important;
  font-weight: 300 !important;
  letter-spacing: 0.28em !important;
}

.memoir-title-sub {
  font-family: 'Poppins', sans-serif !important;
}

/* ============================================================================
   MEMOIR TREE — CHAPTER BRANCH TITLES USE ALLURA
   ============================================================================ */

.memoir-tree h3,
.memoir-branch h3 {
  font-family: 'Allura', cursive !important;
  font-weight: 400 !important;
  letter-spacing: 0.5px !important;
  text-transform: none !important;
  font-size: 2rem !important;
}

.memoir-tree p,
.memoir-branch p {
  font-family: 'Poppins', sans-serif !important;
}

.memoir-tree a,
.memoir-branch a {
  font-family: 'Poppins', sans-serif !important;
}

.root-text {
  font-family: 'Allura', cursive !important;
}

/* ============================================================================
   WRITING CARDS — Poppins for all card content
   ============================================================================ */

.writing-card-category,
.writing-card-title,
.writing-card-excerpt,
.writing-card-date {
  font-family: 'Poppins', sans-serif !important;
}

/* ============================================================================
   PAGE HEADERS — h1 already covered by Allura rule
   Subtitle uses Poppins for contrast
   ============================================================================ */

.page-header p {
  font-family: 'Poppins', sans-serif !important;
}

/* ============================================================================
   SEARCH ICON — Quiet, PyStatR+-style. Available, not announced.
   ============================================================================ */

.navbar .quarto-search-toggle {
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.navbar .quarto-search-toggle:hover {
  opacity: 1;
}

.quarto-search-toggle {
  background: none;
  border: none;
}

/* ============================================================================
   SITE FOOTER — Poppins. Override Allura from .memoir-footer homepage rule.
   ============================================================================ */

.nav-footer-center footer.memoir-footer,
.nav-footer-center footer.memoir-footer p {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
}
