/* ─── Grid ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ─── Card ─── */
.card {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  background: var(--vinyl);
  aspect-ratio: 1 / 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px) rotate(0.4deg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.15) contrast(1.05);
  transition: filter 0.3s ease;
}

.card:hover img {
  filter: sepia(0.05) contrast(1.1);
}

/* Card number badge */
.card-num {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.55);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.08em;
}

/* ─── Lightbox ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 15, 10, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.lightbox.open {
  display: flex;
  animation: lb-in 0.25s ease;
}

@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 680px;
  width: 100%;
  position: relative;
  margin: auto;
  padding: 1rem 0;
}

.lb-photo-wrap {
  width: 100%;
  max-height: 50vh;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.lb-photo-wrap img {
  width: 100%;
  height: 100%;
  max-height: 50vh;
  object-fit: contain;
  display: block;
  background: #111;
}

/* ─── Reveal Button (step 1) ─── */
.reveal-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--label-yellow);
  border: none;
  padding: 0.75rem 2rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reveal-btn:hover {
  background: #f0e070;
  transform: scale(1.02);
}

.reveal-btn:active {
  transform: scale(0.98);
}

.reveal-btn .arrow {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.reveal-btn:hover .arrow {
  transform: translateX(3px);
}

/* ─── Info Panel (step 2, hidden first) ─── */
.lb-info {
  width: 100%;
  background: var(--groove-mid);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1.5rem 1.75rem;
  display: none;
  animation: info-drop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lb-info.visible {
  display: block;
}

@keyframes info-drop {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-band {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--label-yellow);
  line-height: 1.15;
}

.info-album {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--cream-dark);
  margin-top: 0.2rem;
}

.info-year {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
}

.info-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.92rem;
  color: var(--cream-dark);
  line-height: 1.65;
  font-weight: 300;
}

.info-note p + p {
  margin-top: 0.75rem;
}

/* ─── Permalink Button ─── */
.permalink-btn {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px;
  color: var(--ink-faint);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.permalink-btn:hover {
  color: var(--cream);
  border-color: rgba(255,255,255,0.35);
}

/* ─── Mirador Viewer Link ─── */
.btn-mirador {
  display: block;
  width: fit-content;
  margin: 0 auto 1.25rem;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--groove);
  background: var(--label-yellow);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-mirador:hover { opacity: 0.82; }

/* ─── Close Button ─── */
.lb-close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s ease;
  z-index: 10;
}

.lb-close:hover { color: rgba(255,255,255,0.9); }

/* ─── Empty placeholder card ─── */
.card-placeholder {
  background: var(--groove-mid);
  border: 1px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  color: rgba(255,255,255,0.15);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .grid { padding: 1.5rem 1rem; gap: 1.5rem; }
  .lightbox { overflow: hidden; padding: 0; }
  .lb-inner {
    height: 100dvh;
    max-width: 100%;
    overflow: hidden;
    padding: 1rem;
    gap: 1rem;
    margin: 0;
  }
  .lb-photo-wrap { max-height: 35vh; flex-shrink: 0; }
  .lb-info { padding: 1.2rem; flex: 1; overflow-y: auto; min-height: 0; }
}
