/* Page-specific layout helpers */

.hero {
  padding: 1rem 0 0.5rem;
  animation: rise 520ms ease both;
}

.hero-pitch {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.authors {
  font-size: 0.98rem;
  line-height: 1.7;
}

.affil-legend {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.affil-legend ol {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.affil-legend li {
  margin: 0.1rem 0;
}

.affil-legend .equal-note {
  margin: 0.45rem 0 0;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 720px) {
  .sample-grid {
    grid-template-columns: 1fr;
  }
}

.sample-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.sample-card:hover {
  transform: translateY(-2px);
}

.sample-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.sample-card-head h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.sample-card-head .chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sample-card audio {
  width: 100%;
  margin-top: 0.35rem;
}

.sample-card .mix-block,
.sample-card .stem-list {
  margin-top: 0.85rem;
}

.sample-card .stem-list h4 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stem-row,
.mix-block {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.stem-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sample-card.empty {
  opacity: 0.75;
}

.band-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 720px) {
  .band-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.band-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.band-photo {
  aspect-ratio: 1;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--gold-soft), var(--vermilion-soft));
  display: flex;
  align-items: center;
  justify-content: center;
}

.band-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.band-initials {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  opacity: 0.85;
}

.band-meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.15rem 1.25rem 1.35rem;
}

.band-meta h3 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}

.band-meta .instrument {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.band-bio {
  flex: 1 1 auto;
  margin: 0.85rem 0 0;
}

.band-bio p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: none;
}

.band-bio-empty {
  min-height: 0;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.protocol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.protocol-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.protocol-card p {
  max-width: none;
}

.corpus-plots-intro {
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.corpus-plots {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.corpus-figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 1rem;
  box-shadow: var(--shadow);
}

.corpus-figure-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
}

/* About catalog plots: uniform card width; canvases fill the card */
.corpus-plots .corpus-figure {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.corpus-chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  margin: 0 0 0.35rem;
}

.corpus-chart-wrap--doughnut {
  height: 280px;
  max-width: 360px;
  margin-inline: auto;
}

.corpus-chart-wrap--compact {
  height: 220px;
}

.corpus-chart-wrap--tall {
  height: 420px;
}

.corpus-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  background: transparent;
}

.corpus-plots .corpus-figure-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* Wide paper overview banner (home): full content width, no max-height crop */
.overview-figure {
  padding: 0.65rem 0.75rem 0.9rem;
}

.overview-figure-open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: calc(var(--radius) - 2px);
}

.overview-figure-open:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

.overview-figure .corpus-figure-img {
  width: 100%;
  background: var(--bg-card);
}

.overview-figure figcaption {
  text-align: left;
}

.overview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(28, 19, 21, 0.88);
  backdrop-filter: blur(6px);
}

.overview-modal[hidden] {
  display: none;
}

.overview-modal-img {
  display: block;
  max-width: min(100%, 96vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.overview-modal-close {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 81;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(250, 248, 245, 0.35);
  border-radius: var(--radius);
  background: rgba(28, 19, 21, 0.55);
  color: var(--bg-main);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.overview-modal-close:hover,
.overview-modal-close:focus-visible {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  outline: none;
}

body.overview-modal-open {
  overflow: hidden;
}

.corpus-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

.corpus-figure figcaption strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cite-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  background: var(--text-primary);
  color: var(--bg-main);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: pre-wrap;
}

.story-quote {
  margin: 0.35rem 0 0;
  padding: 1.15rem 1.35rem 1.25rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.story-quote p {
  margin: 0 0 0.95rem;
  color: var(--text-primary);
  max-width: none;
}

.story-quote p:last-of-type {
  margin-bottom: 1.1rem;
}

.story-attrib {
  margin: 0;
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contrib-list {
  padding-left: 1.2rem;
}

.contrib-list li {
  margin-bottom: 0.45rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
