/* HornsApp best albums — accent = HornsApp brand red (same as landing) */

.albums-page {
  /* Brand red — same as HornsApp landing (#dc2626). Avoid coral/orange tints. */
  --horns-red: #dc2626;
  --horns-red-bright: #dc2626;
  --horns-red-rgb: 220, 38, 38;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(var(--horns-red-rgb), 0.2), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(var(--horns-red-rgb), 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-start), var(--bg-end));
  color: var(--text);
}

/* Toolbar — follow site light/dark like homepage */
.albums-page .nav {
  min-height: 72px;
  box-sizing: border-box;
}

.albums-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Hero: each line centered on the page */
.albums-hero {
  display: flex;
  justify-content: center;
  margin: 0 0 2rem;
  padding: 1.25rem 0 0;
}

.albums-hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 40rem;
}

.albums-hero-stack h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  line-height: 1.05;
  text-align: center;
}

.albums-hero-stack .albums-lead,
.albums-hero-stack .albums-stats,
.section-note {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
  text-align: center;
  font-size: 1.02rem;
  width: 100%;
}

.albums-hero-stack .albums-lead {
  margin-bottom: 0.75rem;
}

.albums-hero-stack .albums-stats {
  font-size: 0.9rem;
  color: var(--text-subtle);
}

.albums-wrap > .crumb {
  display: inline-block;
  margin-bottom: 1rem;
}

.albums-page .crumb {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.15s ease;
}

.albums-page .crumb:hover {
  color: var(--text);
}

.year-rail {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem 0 1.25rem;
  margin-bottom: 0.5rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.year-rail a {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.year-rail a:hover {
  color: var(--text);
  background: var(--btn-muted-bg);
}

.year-rail a.is-active {
  color: var(--text);
  border-color: rgba(var(--horns-red-rgb), 0.45);
  background: rgba(var(--horns-red-rgb), 0.12);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.year-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.9rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.year-card:hover {
  background: var(--card-hover);
  border-color: rgba(var(--horns-red-rgb), 0.35);
}

.year-card-year {
    font-size: 1.6rem;
  font-weight: 700;
}

.year-card-meta {
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.35;
}

.album-section {
  margin: 1.75rem 0 2rem;
}

.album-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.album-section .section-note {
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  max-width: 36rem;
}

/* Featured #1 */
.year-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(7.5rem, 38%);
  align-items: stretch;
  margin: 0 0 2rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--horns-red-rgb), 0.35);
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(var(--horns-red-rgb), 0.22), transparent 55%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(var(--horns-red-rgb), 0.08), transparent 50%),
    var(--card-bg);
  overflow: hidden;
  animation: albums-rise 0.7s ease both;
  min-height: 10.5rem;
}

.year-featured-copy {
  padding: 1.5rem 1.1rem 1.6rem 1.35rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.year-featured-label {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--horns-red);
}

.year-featured-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--strong);
}

.year-featured-artist {
  margin: 0.4rem 0 0;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.year-featured-meta {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--text-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
}

.year-featured-cover {
  position: relative;
  min-height: 100%;
  background: var(--btn-muted-bg);
}

.year-featured-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.year-featured-cover.has-cover img {
  opacity: 1;
}

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

.album-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.album-item {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem 0.65rem 0.65rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  animation: albums-rise 0.55s ease both;
  overflow: hidden;
}

.album-list-top .album-item:nth-child(1) { animation-delay: 0.04s; }
.album-list-top .album-item:nth-child(2) { animation-delay: 0.08s; }
.album-list-top .album-item:nth-child(3) { animation-delay: 0.12s; }
.album-list-top .album-item:nth-child(4) { animation-delay: 0.16s; }
.album-list-top .album-item:nth-child(5) { animation-delay: 0.2s; }
.album-list-top .album-item:nth-child(6) { animation-delay: 0.24s; }

.album-item:hover {
  background: var(--card-hover);
  border-color: rgba(var(--horns-red-rgb), 0.28);
}

.album-list-top .album-item:first-child {
  border-color: rgba(var(--horns-red-rgb), 0.4);
  background:
    linear-gradient(135deg, rgba(var(--horns-red-rgb), 0.1), transparent 55%),
    var(--card-bg);
}

.album-rank {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--horns-red);
  line-height: 1.2;
  padding-top: 0.1rem;
}

.album-list-top .album-item:first-child .album-rank {
  font-size: 1.7rem;
}

.album-rank-bonus {
  color: var(--text-subtle);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.75;
  padding-top: 0.2rem;
}

.album-body {
  min-width: 0;
}

.album-cover {
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--btn-muted-bg);
}

.album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.album-cover.has-cover img {
  opacity: 1;
}

.album-cover.is-fallback img,
.year-featured-cover.is-fallback img {
  object-fit: cover;
  padding: 0;
  filter: grayscale(1) opacity(0.45);
  background: var(--btn-muted-bg);
}

.album-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--strong);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.album-artist {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
}

.album-meta {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--text-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
}

.album-genre {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--btn-muted-bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.album-pick {
  color: var(--text-subtle);
}

.album-pick-link {
  font-style: italic;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.album-pick-link:hover {
  color: #1db954;
  text-decoration-color: currentColor;
}

.year-featured-meta em {
  font-style: italic;
  color: var(--text-muted);
}

.album-listen {
  margin: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.album-listen a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: -0.35rem 0;
  color: var(--text-subtle);
  text-decoration: none;
  border-radius: 0.45rem;
}

/* `.album-listen a { display: inline-flex }` would otherwise override [hidden]. */
.album-listen a[hidden],
.album-listen a:not([href]),
.album-listen a[href=""] {
  display: none;
}

.album-listen a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .album-listen a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.album-listen-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.album-listen-spotify:hover {
  color: #1db954;
}

.album-listen-apple:hover {
  color: #fc3c44;
}

.album-cover {
  text-decoration: none;
  color: inherit;
  cursor: default;
}

.album-cover[href] {
  cursor: pointer;
}

.album-cover[href]:hover img {
  filter: brightness(1.06);
}

.year-featured-cover.album-cover {
  width: auto;
  height: auto;
  border-radius: 0;
}

.album-section-bonus .album-item {
  opacity: 0.92;
}

[data-theme="light"] .year-featured-label,
[data-theme="light"] .album-rank {
  color: var(--horns-red);
}

.year-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
}

.year-pager > :first-child,
.year-pager > :last-child {
  min-width: 0;
}

.year-pager .btn {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .albums-page .nav {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 560px) {
  .album-item {
    grid-template-columns: 2.1rem minmax(0, 1fr) 5.75rem;
    align-items: start;
    padding: 0.7rem 0.65rem 0.7rem 0.8rem;
    gap: 0.7rem;
  }

  .album-rank,
  .album-rank-bonus {
    padding-top: 0.05rem;
  }

  .album-cover {
    width: 5.75rem;
    height: 5.75rem;
    border-radius: 8px;
  }

  .album-meta,
  .year-featured-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .album-listen {
    gap: 0.1rem;
  }

  .album-title {
    font-size: 1.02rem;
  }

  /* Keep featured side-by-side like desktop — cover stays on the right. */
  .year-featured {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 42%);
    min-height: 10rem;
  }

  .year-featured-cover {
    order: 0;
    min-height: 100%;
    aspect-ratio: auto;
    width: auto;
  }

  .year-featured-cover img {
    aspect-ratio: auto;
  }

  .year-featured-copy {
    padding: 1.1rem 0.75rem 1.15rem 1rem;
  }

  .year-featured-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  .year-featured .album-listen {
    flex-direction: row;
  }
}
