/* EMCEE4D — www.mc4d.com | Generic album-page styles.
   Loaded after site.css on data-driven album pages (scripts/generate-album-page.js).
   Scoped classes: .ap-*. The player rules mirror the established No Handouts
   look so every album page feels like part of the same site.
   No inline styles: the site CSP (style-src 'self') forbids them. */

/* Clear the fixed header on this page's first section. */
.ap-hero { padding-top: 120px; }
.ap-crumb {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ap-crumb:hover { color: var(--accent-soft); }
.ap-intro { color: var(--muted); max-width: 520px; margin: 0 0 26px; }

/* Release facts */
.ap-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ap-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ap-facts div:last-child { border-bottom: 0; }
.ap-facts dt { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ap-facts dd { margin: 0; color: var(--text); text-align: right; }
@media (min-width: 720px) {
  .ap-facts { grid-template-columns: repeat(2, 1fr); }
  .ap-facts div:nth-child(odd) { border-right: 1px solid var(--line); }
  .ap-facts div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* Local-preview-only notice (never emitted on a publishable page) */
.ap-preview-notice {
  border: 1px dashed var(--accent);
  background: var(--surface);
  color: var(--text);
  padding: 14px 16px;
  font-size: 0.88rem;
}
.ap-preview-notice strong { color: var(--accent-soft); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }



/* ============ Album player ============ */
#album-player { scroll-margin-top: 90px; }
.ap-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ap-player {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
}
.ap-now {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}
.ap-now-art {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  background: #0a0a0c;
  border: 1px solid var(--line);
  overflow: hidden;
}
.ap-now-art img { width: 100%; height: 100%; object-fit: contain; }
.ap-now-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-now-label {
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ap-now-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ap-now-artist {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ap-controls { display: flex; gap: 12px; margin: 10px 0 4px; }
.ap-nav-btn { flex: 1 1 0; min-height: 44px; padding: 10px 16px; }
.ap-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.ap-now-info audio { width: 100%; display: block; margin-top: 4px; }
.ap-status { min-height: 1.4em; color: var(--accent-soft); font-size: 0.85rem; }

.ap-tracks {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.ap-tracks li { scroll-margin-top: 90px; }
.ap-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 6px 12px 6px 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--body);
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.ap-track:hover { color: var(--text); border-color: var(--line); }
.ap-track.is-active { color: var(--text); border-color: var(--line); background: var(--bg-alt); }
.ap-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.ap-track-no {
  font-family: var(--display);
  color: var(--accent-soft);
  font-size: 1rem;
  letter-spacing: 0.06em;
  min-width: 24px;
}
.ap-track-title { min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 720px) {
  .ap-player { padding: 24px; }
  .ap-now { grid-template-columns: 300px 1fr; gap: 32px; }
  .ap-tracks { grid-template-columns: repeat(2, 1fr); }
}


/* ============ Long-form album story (catalogue about.story) ============
   Reuses .album-story--page (68ch reading column), .album-story-text and
   .album-story-closing from site.css; these add the section hierarchy. */
.ap-story-section { margin: 0; }
/* Sub-headings keep the story's original section titles inside a chapter */
.ap-story-subheading {
  margin: 56px 0 20px;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.25;
  color: var(--accent-soft);
}
.ap-story-lede { font-size: 1.2rem; line-height: 1.6; margin-bottom: 1.8em; }
.ap-story-lede strong { color: var(--accent-soft); font-weight: 600; letter-spacing: 0.01em; }
.ap-story .album-story-text strong { font-weight: 600; }
.ap-story .album-story-text em { font-style: italic; }
.ap-story .album-story-closing strong { font-weight: inherit; }
.ap-story-rule { max-width: 68ch; margin: 72px 0 44px; border: 0; border-top: 1px solid var(--accent); }
.ap-story-summary .album-story-text:first-child { font-size: 1.1rem; }
.ap-story > .ap-preview-notice, .wrap > .ap-preview-notice { margin: 16px 0 24px; max-width: 68ch; }

/* ============ Image-backed chapters (catalogue about.story.chapters) ============
   One major chapter = one image. The image sits directly under the chapter heading,
   a little wider than the 68ch reading column, unboxed. It opens the shared viewer
   (.vg-open / assets/site/gallery.js), so there is no separate gallery. */
.ap-story-intro { margin: 0 0 8px; }
.ap-chapter { margin: 0; }
.ap-story-intro + .ap-chapter,
.ap-chapter + .ap-chapter { margin-top: 112px; }
.ap-chapter-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.ap-chapter-no {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
}
.ap-chapter-heading {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--text);
}
.ap-chapter-figure { margin: 0 0 44px; }
.ap-chapter-open { aspect-ratio: auto; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9); }
/* Landscape or square: the img width/height attributes carry the source aspect ratio, so space is reserved and nothing is cropped. */
.ap-chapter-open img { height: auto; object-fit: contain; }
.ap-chapter-caption { margin-top: 12px; max-width: 68ch; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
@media (min-width: 960px) {
  .ap-chapter-figure { width: min(780px, calc(100vw - 64px)); }
  .ap-chapter-head { margin-bottom: 36px; }
}

/* Hero headline (optional: about.story.heroHeadline) and chapters whose visual is not made yet (preview only) */
.ap-headline {
  margin: 0 0 14px;
  max-width: 28ch;
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.4vw, 1.8rem);
  letter-spacing: 0.05em;
  line-height: 1.25;
  color: var(--accent-soft);
}
.ap-chapter-figure--pending { max-width: 68ch; }
.ap-chapter-figure--pending .ap-preview-notice { margin: 0; }

/* Epilogue: a closing section styled like a chapter (heading + image + text) but labelled, never numbered */
.ap-epilogue { margin: 0; }
.ap-epilogue-label { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.95rem; }
.ap-epilogue .ap-story-summary { margin: 0; }
