/* ==========================================================================
   gathas.css — Yasna content pages for zarathushtra.com
   Loads after base.css. Covers: Gatha/Yasna headings, verse layout,
   footnotes, and prev/next navigation.
   Applies equally to az_ and dji_ yasna pages.
   ========================================================================== */


/* --------------------------------------------------------------------------
   PAGE WRAPPER
   -------------------------------------------------------------------------- */
.gathas-page {
  padding: 0 0 4rem 0;
}


/* --------------------------------------------------------------------------
   YASNA HERO — Gatha name + Yasna number
   -------------------------------------------------------------------------- */
.yasna-hero {
  position: relative;
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
}

/* Gold top rule */
.yasna-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 3rem;
  right: 3rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.6) 20%,
    #C9A84C 50%,
    rgba(201, 168, 76, 0.6) 80%,
    transparent 100%
  );
}

/* Faint radial glow */
.yasna-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% -10%,
    rgba(201, 168, 76, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Faravahar watermark */
.yasna-hero .hero-faravahar {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: auto;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.6s ease;
}
.yasna-hero:hover .hero-faravahar {
  opacity: 0.08;
}

/* Gatha name — smaller label above the Yasna number */
.gatha-name {
  display: block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.55);
  margin-bottom: 0.6rem;
}

/* Yasna number — main heading */
.yasna-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: #C9A84C;
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Translator credit */
.yasna-translator {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(201, 168, 76, 0.45);
  letter-spacing: 0.04em;
}


/* --------------------------------------------------------------------------
   CONTENT BODY
   -------------------------------------------------------------------------- */
.yasna-body {
  padding: 0 3rem;
  max-width: 75ch;       /* comfortable reading line length */
}


/* --------------------------------------------------------------------------
   VERSES
   -------------------------------------------------------------------------- */
.verse {
  margin-bottom: 2rem;
}

.verse-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.6);
  margin-bottom: 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}

.verse-text {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(232, 223, 200, 0.88);
}

/* Indented lines in poetic verses (DJI translation) */
.verse-indent {
  display: inline;
  padding-left: 2.2em;
}

/* Poetic line display — DJI only (.yasna-body--poetic)
   Each <br>-separated line renders as a tight block span.
   No hanging indent — source <br> splits and word-wrap are indistinguishable. */
.yasna-body--poetic .verse-text {
  line-height: 1;
  margin-bottom: 0;
}

.yasna-body--poetic .verse-line {
  display: block;
  line-height: 1.55;
}

.yasna-body--poetic .verse-line.verse-indent {
  padding-left: 2.2em;
}

/* Footnote reference numbers within verse text */
.verse-text sup {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: rgba(201, 168, 76, 0.6);
  vertical-align: super;
  letter-spacing: 0.05em;
}


/* --------------------------------------------------------------------------
   FOOTNOTES
   -------------------------------------------------------------------------- */
.footnotes {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.footnotes-title {
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.4);
  margin-bottom: 1rem;
}

.footnote {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 1.0rem;
  line-height: 1.75;
  color: rgba(232, 223, 200, 0.55);
}

.footnote-num {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: rgba(201, 168, 76, 0.45);
  flex-shrink: 0;
  padding-top: 0.25rem;
  min-width: 1.4rem;
}


/* --------------------------------------------------------------------------
   PREV / NEXT NAVIGATION
   -------------------------------------------------------------------------- */
.yasna-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding: 1.25rem 3rem;
  border-top: 1px solid rgba(201, 168, 76, 0.12);
  gap: 1rem;
}

.yasna-nav-btn {
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.5);
  text-decoration: none;
  border: 0.5px solid rgba(201, 168, 76, 0.2);
  padding: 0.45rem 1.1rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.yasna-nav-btn:hover {
  color: #C9A84C;
  border-color: rgba(201, 168, 76, 0.5);
  background: rgba(201, 168, 76, 0.05);
}

/* Arrow decorations */
.yasna-nav-btn.prev::before { content: '← '; }
.yasna-nav-btn.next::after  { content: ' →'; }

/* Centre: Up to Gathas index */
.yasna-nav-center {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(201, 168, 76, 0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.yasna-nav-center:hover {
  color: rgba(201, 168, 76, 0.65);
}

/* Hide prev/next placeholder when at start/end */
.yasna-nav-btn.disabled {
  opacity: 0;
  pointer-events: none;
}


/* --------------------------------------------------------------------------
   PROSE PAGES — forward, introduction, biography
   -------------------------------------------------------------------------- */

/* Running prose body — shared by all three DJI prose pages */
.prose-body {
  padding: 0 3rem;
  max-width: 72ch;
}

.prose-body p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(232, 223, 200, 0.85);
  margin-bottom: 1.3rem;
}

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

/* Section headings (WHAT ARE THE GATHAS? etc.) */
.prose-section-heading {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.65);
  margin: 2.5rem 0 1rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}

/* Blockquote — quoted Gatha verses and glossary entries */
.prose-body blockquote {
  margin: 1.5rem 0 1.5rem 2rem;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(201, 168, 76, 0.25);
}

.prose-body blockquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(232, 223, 200, 0.72);
  margin-bottom: 0.85rem;
}

.prose-body blockquote p strong em,
.prose-body blockquote p em strong {
  font-style: italic;
  font-weight: 600;
  color: rgba(232, 223, 200, 0.82);
}

.prose-body blockquote p small {
  font-style: normal;
  font-size: 0.82rem;
  color: rgba(201, 168, 76, 0.45);
  letter-spacing: 0.03em;
}

/* Bold terms in glossary blockquotes */
.prose-body blockquote strong {
  font-weight: 600;
  font-style: normal;
  color: rgba(232, 223, 200, 0.9);
}

/* Numbered lists in introduction */
.prose-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.prose-body ol li {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(232, 223, 200, 0.82);
  margin-bottom: 0.5rem;
}

/* Italic book titles */
.prose-body i,
.prose-body em {
  font-style: italic;
  color: rgba(232, 223, 200, 0.88);
}

/* Superscript (dates, footnote refs) */
.prose-body sup {
  font-family: var(--font-head);
  font-size: 0.6rem;
  color: rgba(201, 168, 76, 0.55);
  vertical-align: super;
}

/* Small attribution text */
.prose-body small {
  font-size: 0.9rem;
  color: rgba(232, 223, 200, 0.5);
}

/* Horizontal rule — section divider within introduction */
.prose-divider {
  border: none;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  margin: 2.5rem 0;
}

/* Synopsis / credit block after divider */
.prose-credit {
  font-family: var(--font-body);
  font-size: 1.0rem;
  font-style: italic;
  color: rgba(232, 223, 200, 0.5);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* Underline (used sparingly in forward for haoma) */
.prose-body u {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(201, 168, 76, 0.3);
}

/* Responsive */
@media (max-width: 767px) {
  .prose-body {
    padding: 0 1.25rem;
    max-width: 100%;
  }
  .prose-body p,
  .prose-body ol li {
    font-size: 1.1rem;
  }
  .prose-body blockquote {
    margin-left: 0.75rem;
    padding-left: 1rem;
  }
}


.bio-dates {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(201, 168, 76, 0.5);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  display: block;
}

.bio-body {
  padding: 0 3rem;
}

/* Portrait floated right, text wraps around it */
.bio-portrait {
  float: right;
  margin: 0 0 1.5rem 2.5rem;
  width: 220px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  display: block;
}

.bio-body p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(232, 223, 200, 0.85);
  margin-bottom: 1.2rem;
}

/* Clearfix after floated portrait */
.bio-body::after {
  content: '';
  display: table;
  clear: both;
}


/* --------------------------------------------------------------------------
   RESPONSIVE — Mobile (≤767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

  .yasna-hero {
    padding: 2.5rem 1.25rem 2rem;
  }

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

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

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

  .yasna-body {
    padding: 0 1.25rem;
    max-width: 100%;
  }

  .yasna-nav {
    padding: 1.25rem 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .verse-text {
    font-size: 1.1rem;
  }

  .bio-portrait {
    float: none;
    margin: 0 auto 1.5rem;
    width: 180px;
  }

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

  .bio-body p {
    font-size: 1.1rem;
  }

}
