/* Odes to Joy — listen-site styles. Sketchbook background, warm cream surface,
   sticky bottom player. Roughly serif headings, lowercase nav. */

:root {
  --paper: #fbf7ee;
  --ink: #2a2530;
  --ink-soft: #5a4f5e;
  --accent: #b94a5c;
  --accent-soft: #e9b6c0;
  --rule: rgba(42, 37, 48, 0.12);
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  background: transparent;
  line-height: 1.55;
  min-height: 100%;
}

/* Background image */
.bg-wrap {
  position: fixed;
  inset: 0;
  background: var(--paper) url("/static/listen/bg.png") center / cover no-repeat;
  z-index: -2;
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251,247,238,0.45) 0%, rgba(251,247,238,0.75) 100%);
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand-mark { color: var(--accent); margin-right: 0.25rem; }
nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
nav a:hover { color: var(--accent); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 8rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0.5rem auto 0;
}
.kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin: 0;
}

/* Album grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.album-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease;
}
.album-card:hover { transform: translateY(-3px); }
.album-cover {
  aspect-ratio: 1 / 1;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.album-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 300;
  background: linear-gradient(135deg, var(--accent-soft), #c9d5e3);
  color: white;
}
.album-cover-placeholder.large { font-size: 6rem; border-radius: 6px; }
.album-info h2 {
  font-size: 1.15rem;
  margin: 0.75rem 0 0.25rem;
}
.album-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

/* Album header (detail page) */
.album-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: end;
  padding: 2rem;
  background: rgba(251, 247, 238, 0.78);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.album-header-cover {
  width: 200px; height: 200px;
  background: white; border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow);
}
.album-header-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.album-header-info h1 { margin: 0.5rem 0; font-size: 2.5rem; line-height: 1.1; }

/* Track list */
.track-list {
  list-style: none;
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0 0;
  background: rgba(251, 247, 238, 0.78);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.track-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.track-row:last-child { border-bottom: none; }
.track-row.no-audio { opacity: 0.55; }
.track-num {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.track-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.track-title { font-size: 1.05rem; }
.track-meta { color: var(--ink-soft); font-size: 0.85rem; }
.play-btn {
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1rem;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.play-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.play-btn.primary {
  width: auto;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  background: var(--accent);
  color: white;
  border: none;
}

/* Track detail */
.crumbs { margin: 0 0 1rem; }
.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
}
.crumbs a:hover { color: var(--accent); }
.track-header {
  padding: 2rem;
  background: rgba(251, 247, 238, 0.78);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.track-header h1 { font-size: 2.5rem; margin: 0.4rem 0 0.5rem; line-height: 1.05; }

/* Two-column body: lyrics left, art column right */
.track-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}
.art-column {
  padding: 1.5rem;
  background: rgba(251, 247, 238, 0.78);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.art-column h2 {
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-soft); margin: 0;
}
.art-column .art-tile {
  margin: 0;
  background: white;
  padding: 0.35rem;
  border-radius: 4px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.art-column .art-tile img {
  width: 100%; display: block;
  aspect-ratio: 1/1; object-fit: cover;
  border-radius: 2px;
}
@media (max-width: 820px) {
  .track-body { grid-template-columns: 1fr; }
}

/* Legacy art-strip styles — now replaced by .art-column in the track body */
.album-header-cover img.lightbox-trigger,
.album-cover img.lightbox-trigger { cursor: zoom-in; }

/* Lightbox overlay */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(12, 10, 14, 0.92);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: transparent; border: none;
  color: #faf6ec; font-size: 2.5rem; line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent-soft); }

/* Player controls (prev/audio/next row) */
.player-controls {
  display: flex; align-items: center; gap: 0.5rem;
}
.player-btn {
  background: transparent; border: none;
  color: #faf6ec; font-size: 1.4rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.player-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.player-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.lyrics {
  margin-top: 1.5rem;
  padding: 2rem;
  background: rgba(251, 247, 238, 0.85);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lyrics h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-soft); margin: 0 0 1rem; }
.lyrics pre {
  font-family: inherit;
  white-space: pre-wrap;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-soft);
}

.empty { color: var(--ink-soft); font-style: italic; }

/* Sticky player */
.player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(42, 37, 48, 0.95);
  color: #faf6ec;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 1.5rem;
  align-items: center;
  padding: 0.75rem 2rem;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.player-track { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.player-art {
  width: 44px; height: 44px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.player-meta { min-width: 0; }
.player-title {
  font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-album {
  font-size: 0.78rem;
  color: rgba(250,246,236,0.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#audio { width: 100%; height: 36px; }

@media (max-width: 720px) {
  .album-header { grid-template-columns: 1fr; text-align: center; }
  .album-header-cover { margin: 0 auto; }
  .player { grid-template-columns: 1fr; gap: 0.5rem; }
}
