.recordings-page {
  padding-bottom: 4rem;
}

.recordings-heading {
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

/* Grid */
.recordings-grid {
  display: grid;
  gap: 1.75rem 1.25rem;
  margin-top: 1.5rem;
}

/* Card */
.recording-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
}

/* Square cover */
.recording-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f1ea;
  border: 1px solid var(--border, rgba(20, 24, 36, 0.12));
}

.recording-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2-cover cross-fade: 8s cycle, 4s per cover */
.recording-card-cover--rotator-2 img {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: rotate-cover-2 8s infinite ease-in-out;
}
.recording-card-cover--rotator-2 img:nth-child(1) { animation-delay: 0s; }
.recording-card-cover--rotator-2 img:nth-child(2) { animation-delay: -4s; }

@keyframes rotate-cover-2 {
  0%   { opacity: 1; }
  42%  { opacity: 1; }
  50%  { opacity: 0; }
  92%  { opacity: 0; }
  100% { opacity: 1; }
}

/* 3-cover cross-fade: 10.5s cycle, 3.5s per cover */
.recording-card-cover--rotator-3 img {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: rotate-cover-3 10.5s infinite ease-in-out;
}
.recording-card-cover--rotator-3 img:nth-child(1) { animation-delay: 0s; }
.recording-card-cover--rotator-3 img:nth-child(2) { animation-delay: -7s; }
.recording-card-cover--rotator-3 img:nth-child(3) { animation-delay: -3.5s; }

@keyframes rotate-cover-3 {
  0%   { opacity: 1; }
  28%  { opacity: 1; }
  33%  { opacity: 0; }
  95%  { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .recording-card-cover--rotator-2 img,
  .recording-card-cover--rotator-3 img {
    animation: none;
    opacity: 0;
  }
  .recording-card-cover--rotator-2 img:first-child,
  .recording-card-cover--rotator-3 img:first-child {
    opacity: 1;
  }
}

.recording-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #efece2 0%, #d8d5cc 100%);
  color: rgba(0,0,0,0.4);
  text-align: center;
  padding: 1rem;
}

.recording-card-cover-placeholder span {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

/* Body */
.recording-card-body {
  padding: 0.6rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.recording-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.recording-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: inherit;
}

.recording-card-year {
  font-size: 0.78rem;
  opacity: 0.5;
  white-space: nowrap;
  flex-shrink: 0;
}

.recording-card-credits {
  font-size: 0.78rem;
  opacity: 0.65;
  margin: 0.05rem 0 0;
  line-height: 1.4;
}

/* Custom audio player in cards — inherits .mirror-audio-block styles */
.recording-card-audio-block {
  margin-top: 0.6rem;
  max-width: none;
}

/* Actions row */
.recording-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.recording-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Platform icon */
.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(0,0,0,0.55);
  transition: color 0.15s ease;
}

.platform-icon:hover,
.platform-icon:focus-visible {
  color: rgba(0,0,0,0.95);
}

.platform-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  display: block;
}

.recording-card-detail-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.recording-card-detail-link:hover {
  opacity: 1;
}

/* Embedded on repertoire page */
.recordings-page--embedded {
  padding-top: 2.5rem;
  margin-top: 1rem;
}

.recordings-grid--5col {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
  .recordings-grid--5col {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .recordings-grid--5col {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .recordings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem 0.85rem;
  }
}

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