/* ============================================================================
   B2R Music — design system
   Tokens, typography, spacing, buttons, cards, header and footer are taken
   verbatim from b2r.it.com so the two sites read as one family. Anything
   below the "MUSIC COMPONENTS" divider is new to this site.
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #06b6d4;
  --text-main: #0f172a;
  --text-muted: #475569;
  --bg-main: #ffffff;
  --bg-soft: #f8fafc;
  --bg-alt: #f1f5f9;
  --border-soft: #e5e7eb;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 30px 80px rgba(2, 6, 23, 0.08);
  --shadow-card: 0 18px 45px rgba(2, 6, 23, 0.07);
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: auto; padding: 0 20px; }

/* ================= HEADER ================= */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 100;
}

.nav {
  max-width: var(--maxw);
  margin: auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; white-space: nowrap; }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text-main); background: var(--bg-alt); }
.nav-links a.active { color: var(--primary-dark); background: #eef2ff; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-soft);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text-main);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.btn-outline { border-color: var(--border-soft); background: #fff; color: var(--text-main); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ================= HERO ================= */
.hero {
  padding: 96px 20px 80px;
  text-align: center;
  background: radial-gradient(ellipse at center, #f1f5f9 0%, #ffffff 70%);
}

.pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 24px;
  font-size: 14px;
}

.hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; margin-bottom: 20px; letter-spacing: -1px; }
.hero p { max-width: 760px; margin: auto; font-size: 18px; color: var(--text-muted); }
.hero-actions { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Compact hero used by inner pages */
.page-head { padding: 64px 20px 40px; text-align: center; background: radial-gradient(ellipse at center, #f1f5f9 0%, #ffffff 70%); }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.5px; margin-bottom: 14px; }
.page-head p { max-width: 700px; margin: auto; color: var(--text-muted); font-size: 17px; }

/* ================= SECTIONS ================= */
section { padding: 84px 20px; }
section.soft { background: var(--bg-soft); }

.section-head { max-width: var(--maxw); margin: 0 auto 44px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 900; letter-spacing: -0.5px; }
.section-head p { color: var(--text-muted); margin-top: 8px; max-width: 620px; }
.section-head a { font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ================= FOOTER ================= */
footer { padding: 48px 20px 40px; border-top: 1px solid var(--border-soft); background: #fff; }
.footer-inner { max-width: var(--maxw); margin: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--text-muted); }
.footer-links a { margin-left: 14px; }
.footer-links a:hover { color: var(--text-main); }
.footer-note { max-width: var(--maxw); margin: 24px auto 0; font-size: 13px; color: #94a3b8; }

/* ==========================================================================
   MUSIC COMPONENTS
   ========================================================================== */

/* ----- Song grid + card ----- */
.song-grid {
  max-width: var(--maxw);
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.song-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.song-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.cover {
  aspect-ratio: 1 / 1;
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

/* Fallback artwork: the song's initial over the brand gradient, so a release
   with no cover file still looks deliberate rather than broken. */
.cover .initial { color: #fff; font-size: 64px; font-weight: 900; opacity: .9; letter-spacing: -2px; }
.cover .badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15, 23, 42, .72); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}

.song-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.song-card-body h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.song-meta { font-size: 13px; color: var(--text-muted); }
/* The separator is attached to the item that follows it, so a wrapped line
   never ends on a dangling dot. */
.song-meta span + span::before { content: "\00b7"; margin: 0 7px; color: #cbd5e1; }
.song-card .btn { margin-top: auto; }

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

/* ----- Category cards ----- */
.category-grid { max-width: var(--maxw); margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.category-card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 26px; display: flex; flex-direction: column; gap: 10px; transition: border-color .18s ease, box-shadow .18s ease; }
.category-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-card); }
.category-card h3 { font-size: 20px; font-weight: 800; }
.category-card p { color: var(--text-muted); font-size: 15px; flex: 1; }
.category-card .count { font-size: 13px; font-weight: 700; color: var(--primary); }

/* ----- Platform buttons ----- */
.platform-row { max-width: var(--maxw); margin: auto; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-soft);
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.platform-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: #cbd5e1; }
.platform-chip svg { width: 20px; height: 20px; flex-shrink: 0; }

.platform-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

.platform-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.platform-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.platform-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.platform-btn .arrow { margin-left: auto; color: #cbd5e1; }

/* ----- Song detail ----- */
.song-detail { max-width: var(--maxw); margin: auto; display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.song-detail .cover { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.song-detail h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -1px; margin-bottom: 14px; }
.song-detail .lead { font-size: 17px; color: var(--text-muted); margin-bottom: 28px; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; padding: 24px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); margin-bottom: 32px; }
.fact dt { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; font-weight: 700; margin-bottom: 4px; }
.fact dd { font-weight: 600; font-size: 15px; }

.block { margin-bottom: 36px; }
.block h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

.credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.credit { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.credit dt { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; font-weight: 700; }
.credit dd { font-weight: 600; }

.lyrics { background: var(--bg-soft); border-radius: var(--radius-md); padding: 26px 28px; white-space: pre-wrap; line-height: 1.9; font-size: 16px; }

.breadcrumb { max-width: var(--maxw); margin: 0 auto 28px; font-size: 14px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; color: #cbd5e1; }

/* ----- Filters ----- */
.filters { max-width: var(--maxw); margin: 0 auto 36px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text-main);
  outline: none;
}
.filters input:focus, .filters select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.filters input { flex: 1; min-width: 220px; }
.result-count { max-width: var(--maxw); margin: 0 auto 24px; font-size: 14px; color: var(--text-muted); }

.empty { max-width: 560px; margin: 40px auto; text-align: center; color: var(--text-muted); background: var(--bg-soft); border-radius: var(--radius-md); padding: 44px 30px; }
.empty h3 { color: var(--text-main); font-size: 20px; margin-bottom: 8px; }

/* ----- Prose (About / Contact) ----- */
.prose { max-width: 760px; margin: auto; }
.prose p { font-size: 17px; color: var(--text-muted); margin-bottom: 20px; }
.prose h2 { font-size: 24px; font-weight: 800; margin: 36px 0 14px; color: var(--text-main); }
.prose a { color: var(--primary); font-weight: 600; }

.info-card { background: var(--bg-soft); border-radius: var(--radius-md); padding: 26px 28px; margin-bottom: 16px; }
.info-card dt { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; font-weight: 700; margin-bottom: 4px; }
.info-card dd { font-size: 17px; font-weight: 600; }
.info-card dd a { color: var(--primary); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .song-detail { grid-template-columns: 1fr; gap: 32px; }
  .song-detail .cover { max-width: 340px; }
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    margin-top: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  section { padding: 60px 20px; }
  .hero { padding: 64px 20px 56px; }
  .song-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
}

@media (max-width: 460px) {
  .song-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}
