/* ==========================================================================
   homage.css — Homage unto Ahura Mazda section
   zarathushtra.com
   Loads after base.css + index.css on the index page.
   Loads after base.css only on the 223 chapter pages + dhalla.html.
   index.css provides: section-hero, section-divider, index-body,
   section-intro, bio-link, part-header, accordion, toc-list.
   This file covers only what is unique to homage chapter pages.
   ========================================================================== */

/* ==========================================================================
   CHAPTER PAGES — Hero block
   ========================================================================== */

.chapter-hero {
  position: relative;
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--gold-dim);
  overflow: hidden;
}

.chapter-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% -5%,
    rgba(201, 168, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.chapter-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 3rem;
  right: 3rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.5) 20%,
    var(--gold) 50%,
    rgba(201, 168, 76, 0.5) 80%,
    transparent 100%
  );
}

.chapter-part-label {
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.5);
  margin-bottom: 0.9rem;
}

.chapter-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.15;
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chapter-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(201, 168, 76, 0.6);
  margin: 0;
  line-height: 1.4;
  letter-spacing: 0.04em;
}


/* ==========================================================================
   CHAPTER PAGES — Prose body
   ========================================================================== */

.chapter-body {
  max-width: 70ch;
  padding: 0 3rem 2rem;
}

.chapter-body p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.chapter-body p:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   CHAPTER PAGES — Editorial note (Shahriar's commentary)
   Appears after chapter body, before prev/next nav.
   ========================================================================== */

.editorial-note {
  max-width: 70ch;
  margin: 0.5rem 3rem 2rem;
  padding: 1.1rem 1.4rem;
  border-left: 2px solid rgba(201, 168, 76, 0.25);
  background: rgba(201, 168, 76, 0.03);
  border-radius: 0 2px 2px 0;
}

.editorial-note p {
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(201, 168, 76, 0.55);
  margin: 0;
}


/* ==========================================================================
   CHAPTER PAGES — Prev / Next navigation
   ========================================================================== */

.ch-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 3rem;
  margin-top: 1rem;
  border-top: 1px solid var(--gold-dim);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.ch-nav-prev,
.ch-nav-next {
  flex: 1;
  max-width: 38%;
}

.ch-nav-prev { text-align: left; }
.ch-nav-next { text-align: right; }

.ch-nav-index {
  flex-shrink: 0;
  text-align: center;
}

.ch-nav a {
  color: rgba(201, 168, 76, 0.6);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s ease;
  display: inline-block;
}

.ch-nav a:hover {
  color: var(--gold2);
}

.ch-nav-index a {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.45);
}

.ch-nav-index a:hover {
  color: var(--gold);
}


/* ==========================================================================
   RESPONSIVE — Mobile (≤767px)
   ========================================================================== */

@media (max-width: 767px) {

  /* Index page */
  .section-hero {
    padding: 2.5rem 1.25rem 2rem;
  }

  .section-hero::after {
    left: 1.25rem;
    right: 1.25rem;
  }

  .section-hero .hero-faravahar {
    display: none;
  }

  .section-hero .hero-title {
    font-size: clamp(1.1rem, 6vw, 1.5rem);
  }

  .index-body {
    padding: 0 1.25rem;
  }

  .section-divider {
    margin: 0 1.25rem 2rem;
  }

  .acc-header {
    padding: 0.85rem 1rem;
  }

  .toc-list a {
    padding: 0.55rem 1rem 0.55rem 1.25rem;
    font-size: 0.92rem;
  }

  .toc-list a:hover {
    padding-left: 1.6rem;
  }

  /* Chapter pages */
  .chapter-hero {
    padding: 2.5rem 1.25rem 2rem;
  }

  .chapter-hero::after {
    left: 1.25rem;
    right: 1.25rem;
  }

  .chapter-body {
    padding: 0 1.25rem 1.5rem;
  }

  .chapter-body p {
    font-size: 1.05rem;
  }

  .editorial-note {
    margin: 0.5rem 1.25rem 1.5rem;
  }

  .ch-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 0.75rem;
    text-align: center;
  }

  .ch-nav-prev,
  .ch-nav-next {
    max-width: 100%;
    text-align: center;
  }

  .ch-nav-index {
    order: -1;
  }
}
