/* ============================================================
   NEW MUSIC ROUNDUP — Shared Design Tokens & Components
   Wireframe stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #FAF8F4;
  --bg-card:     #FFFFFF;
  --ink:         #1A1A1A;
  --ink-muted:   #5A5A5A;
  --ink-faint:   #9A9A9A;
  --accent:      #C0392B;
  --score-gold:  #B8860B;
  --rule:        #D4CFC8;
  --admin-bg:    #F0EDE8;

  /* Genre chips */
  --chip-jazz:        #1A3A5C;
  --chip-metal:       #2C2C2C;
  --chip-prog:        #4A235A;
  --chip-country:     #5D4037;
  --chip-electronic:  #1A4A3A;
  --chip-hiphop:      #3A2A1A;
  --chip-folk:        #4A3A1A;
  --chip-classical:   #3A2A3A;
  --chip-pop:         #8C2A4A;
  --chip-ambient:     #1A3A4A;
  --chip-default:     #3A3A3A;

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  --radius-card: 6px;
  --radius-chip: 3px;
  --max-width:   1200px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Layout Helpers ─────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  border-bottom: 3px double var(--rule);
  padding: 20px 0 16px;
  text-align: center;
}

.masthead__wordmark {
  display: inline-block;
}

.masthead__wordmark img {
  max-height: clamp(64px, 10vw, 100px);
  width: auto;
  display: block;
  margin: 0 auto;
}

.masthead__tagline {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}

.masthead__edition {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

/* ── Nav Bar ────────────────────────────────────────────────── */
.navbar {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.navbar__links {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  list-style: none;
}

.navbar__links li a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.navbar__links li a:hover,
.navbar__links li a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.navbar__search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 4px 12px 4px 10px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  cursor: text;
  min-width: 180px;
}

.navbar__search svg { opacity: 0.5; flex-shrink: 0; }

/* ── Genre Filter Strip ─────────────────────────────────────── */
.genre-strip {
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.genre-strip::-webkit-scrollbar { display: none; }

.genre-strip__inner {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  white-space: nowrap;
}

.genre-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  color: var(--ink-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.genre-btn:hover,
.genre-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ── Genre Chips (on cards) ─────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-chip);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}
.chip--jazz        { background: var(--chip-jazz); }
.chip--metal       { background: var(--chip-metal); }
.chip--prog        { background: var(--chip-prog); }
.chip--country     { background: var(--chip-country); }
.chip--electronic  { background: var(--chip-electronic); }
.chip--hiphop      { background: var(--chip-hiphop); }
.chip--folk        { background: var(--chip-folk); }
.chip--classical   { background: var(--chip-classical); }
.chip--pop         { background: var(--chip-pop); }
.chip--ambient     { background: var(--chip-ambient); }
.chip--default     { background: var(--chip-default); }

/* ── Score Badge ─────────────────────────────────────────────── */
.score-badge {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--score-gold);
  line-height: 1;
}
.score-badge--lg { font-size: 2.8rem; }
.score-badge--md { font-size: 1.4rem; }
.score-badge--sm { font-size: 1.1rem; }
.score-badge sup { font-size: 0.45em; }

/* ── Section Rule ────────────────────────────────────────────── */
.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
}

.section-rule__label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
}

.section-rule::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  flex-shrink: 0;
}

.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── Album Card ──────────────────────────────────────────────── */
.album-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.album-card__art {
  position: relative;
  background: #E8E4DE;
  aspect-ratio: 1;
  overflow: hidden;
}

.album-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card__art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E8E4DE 0%, #D4CFC8 100%);
}

.album-card__score-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 4px 8px;
  line-height: 1;
}

.album-card__body {
  padding: 12px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-card__artist {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card__title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.album-card__sources {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Album Grid ──────────────────────────────────────────────── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

@media (min-width: 768px) {
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ── Sort Bar ────────────────────────────────────────────────── */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sort-bar__label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.sort-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  color: var(--ink-muted);
}

.sort-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  border-top: 3px double var(--rule);
  padding: 24px 0 32px;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.site-footer__wordmark img {
  height: 32px;
  width: auto;
  opacity: 0.7;
}

.site-footer__attribution {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.site-footer__links {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  list-style: none;
}
.site-footer__links a:hover { color: var(--ink); }

/* ── Wireframe Annotation Banner ─────────────────────────────── */
.wf-banner {
  background: #FFF3CD;
  border: 1px solid #FFC107;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.78rem;
  color: #856404;
  text-align: center;
  margin-bottom: 0;
}

/* ── Cover Art Placeholder SVG ───────────────────────────────── */
.art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #DDD9D2 0%, #C8C4BC 100%);
}
.art-placeholder svg {
  width: 40%;
  height: 40%;
  opacity: 0.3;
}
