/* sammlung.html — collection of early Arabic poems (1963-1975).
 * Layered on top of styles.css + qisas.css. RTL throughout.
 * Inherits design tokens from styles.css — see design.md for canon. */

.sammlung-body {
  background: var(--c-cream);
  overflow-x: hidden;
}

/* Override .skip for RTL — left:-100vw causes horizontal overflow on RTL pages */
.sammlung-body .skip {
  left: auto;
  right: -100vw;
}
.sammlung-body .skip:focus {
  left: auto;
  right: 0;
}

/* Hero cover — photo fills the figure, slight sepia warming consistent with qisas-hero */
.sammlung-cover-fig {
  aspect-ratio: 3/4;
  max-width: 22rem;
  margin: 0;
}
.sammlung-cover-fig .qisas-cover-img {
  object-fit: cover;
  filter: sepia(.18) contrast(1.04) brightness(.96);
}

/* Hero typography in RTL — match qisas-hero proportions */
.sammlung-body .qisas-hero-eyebrow {
  font-family: var(--serif-ar);
  font-size: clamp(.95rem, .85rem + .4vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--c-clay);
  margin-bottom: 1rem;
}
.sammlung-body .qisas-hero-title {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(2.4rem, 1.6rem + 4vw, 4.2rem);
  line-height: 1.3;
  margin: 0 0 1.2rem;
  color: var(--c-ink);
}
.sammlung-body .qisas-hero-sub {
  font-family: var(--serif-ar);
  font-size: clamp(1rem, .9rem + .5vw, 1.25rem);
  color: var(--c-ink-2);
  margin: 0 0 .5rem;
  line-height: 1.7;
}
.sammlung-body .qisas-hero-meta {
  font-family: var(--sans-ui);
  font-size: .78rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 1.4rem;
}
.sammlung-body .qisas-hero-note {
  font-family: var(--serif-ar);
  font-size: clamp(.95rem, .9rem + .25vw, 1.05rem);
  line-height: 1.9;
  color: var(--c-ink-2);
  max-width: 38rem;
  margin: 0;
}

/* Hero entrance animation cascade (matches book/qisas) */
.sammlung-body .qisas-hero-eyebrow,
.sammlung-body .qisas-hero-title,
.sammlung-body .qisas-hero-sub,
.sammlung-body .qisas-hero-meta,
.sammlung-body .qisas-hero-note,
.sammlung-body .sammlung-cover-fig {
  opacity: 0;
  animation: fadeUp 1s ease-out forwards;
}
.sammlung-body .sammlung-cover-fig    { animation-delay: .1s; }
.sammlung-body .qisas-hero-eyebrow    { animation-delay: .25s; }
.sammlung-body .qisas-hero-title      { animation-delay: .45s; }
.sammlung-body .qisas-hero-sub        { animation-delay: .7s; }
.sammlung-body .qisas-hero-meta       { animation-delay: .9s; }
.sammlung-body .qisas-hero-note       { animation-delay: 1.1s; }

/* Poem card — uses page paper background, generous breathing room */
.poem-card {
  max-width: 44rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--rad);
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 14px 30px -18px rgba(60, 40, 15, .18);
  direction: rtl;
}

.poem-card-head {
  text-align: center;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(139, 90, 43, .15);
}
.poem-num {
  font-family: var(--sans-ui);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 .8rem;
}
.poem-title {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem);
  line-height: 1.4;
  margin: 0;
  color: var(--c-ink);
}
.poem-meta {
  margin-top: .8rem;
  font-family: var(--serif-ar);
  font-size: 1rem;
  color: var(--c-clay);
  font-style: italic;
}

/* ----------------------------------------------------------------
   The flat .poem-card layout above is no longer used; the JS now
   renders each poem as a book.html-style .poem--tinted section.
   The shared .poem rules live in styles.css; here we only adjust
   what is specific to an Arabic-only collection.
   ---------------------------------------------------------------- */

.sammlung-body .poem-body {
  display: block;          /* override the global poem-body grid */
  grid-template-columns: none;
  gap: 0;
}

/* In an AR-only collection the AR column should stand centered like
   it does in [data-mode="ar"] of the bilingual book.  We force the
   single-column layout regardless of the active toggle. */
.sammlung-body .poem-ar {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

/* Poem-section labels and rules used inside verse blocks */
.sammlung-body .poem-ar .poem-section {
  margin: 1.4rem 0 .6rem;
  font-weight: 700;
  color: var(--c-clay);
  font-size: 1.2rem;
  text-align: center;
}
.sammlung-body .poem-ar .poem-rule {
  text-align: center;
  color: var(--c-sand);
  letter-spacing: .35em;
  margin: 1rem 0;
  font-size: 1.1rem;
  opacity: .55;
}

/* Search-highlight (poem body + QN result panel) */
.sammlung-body mark {
  background: rgba(201, 166, 107, .38);
  color: inherit;
  padding: 0 .15em;
  border-radius: 3px;
  font-weight: inherit;
}

/* TOC — make it RTL-aware and richer than default */
.qisas-toc {
  direction: rtl;
}
.toc-list {
  max-width: 56rem;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: .8rem;
  direction: rtl;
}
.sammlung-toc-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--rad);
  text-decoration: none;
  color: var(--c-ink);
  transition: background .18s var(--ease-premium),
              border-color .18s var(--ease-premium),
              transform .18s var(--ease-premium),
              box-shadow .18s var(--ease-premium);
  direction: rtl;
}
.sammlung-toc-link:hover,
.sammlung-toc-link:focus-visible {
  background: #fbf6ec;
  border-color: var(--c-clay);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(60, 40, 15, .25);
}
.sammlung-toc-link .toc-num {
  font-family: var(--sans-ui);
  font-size: .82rem;
  letter-spacing: .14em;
  color: var(--c-clay);
  font-weight: 600;
  min-width: 2.5rem;
}
.sammlung-toc-link .toc-title {
  font-family: var(--serif-ar);
  font-size: 1.1rem;
  line-height: 1.5;
}
.sammlung-toc-link .toc-year {
  font-family: var(--sans-ui);
  font-size: .76rem;
  letter-spacing: .12em;
  color: var(--c-muted);
}

/* Back link & quick-nav: flip for RTL */
.sammlung-body .back-to-library {
  left: auto;
  right: clamp(1rem, 3vw, 2rem);
}
.sammlung-body .back-arrow {
  display: inline-block;
  transform: scaleX(-1);
}
.sammlung-body .qn-trigger {
  right: auto;
  left: clamp(1rem, 3vw, 2rem);
}

/* Quick-nav results — RTL adjustments */
.sammlung-body .qn-result {
  direction: rtl;
  text-align: right;
}
.sammlung-body .qn-result-title {
  font-family: var(--serif-ar);
  font-weight: 700;
}
.sammlung-body .qn-result-snippet {
  font-family: var(--serif-ar);
  font-size: .92rem;
  line-height: 1.7;
  margin-top: .35rem;
}
.sammlung-body .qn-eyebrow {
  font-family: var(--sans-ui);
}
.sammlung-body .qn-input {
  font-family: var(--serif-ar);
  font-size: 1.05rem;
  text-align: right;
  direction: rtl;
}
.sammlung-body .qn-search {
  direction: rtl;
}
.sammlung-body .qn-search-icon {
  left: auto;
  right: 1rem;
}
.sammlung-body .qn-input {
  padding: 1rem 3rem 1rem 1rem;
}

/* Footer adjustments for RTL */
.sammlung-body .foot-share {
  direction: rtl;
}

/* Reduced-motion override — disable hero cascade */
@media (prefers-reduced-motion: reduce) {
  .sammlung-body .qisas-hero-eyebrow,
  .sammlung-body .qisas-hero-title,
  .sammlung-body .qisas-hero-sub,
  .sammlung-body .qisas-hero-meta,
  .sammlung-body .qisas-hero-note,
  .sammlung-body .sammlung-cover-fig {
    opacity: 1;
    animation: none;
  }
}
