@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
}

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

:root {
  --bg: #080808;
  --surface: #111111;
  --border: rgba(255,255,255,0.07);
  --text: #f0f0f0;
  --muted: #666;
  --radius: 16px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.12);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, backdrop-filter 0.18s ease, -webkit-backdrop-filter 0.18s ease;
  z-index: 180;
}

body.page-transitioning::after {
  opacity: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: linear-gradient(to bottom, rgba(8,8,8,0.95) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}
.nav-back:hover { color: var(--text); }
.nav-back svg { width: 16px; height: 16px; }

/* ── ARTIST PROFILE HERO ── */
.artist-profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.artist-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  display: block;
}

/* ── HERO (index) ── */
.hero {
  padding: 50px 32px 0;
  max-width: 900px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 0;
  background: linear-gradient(135deg, #fff 30%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── GRID ── */
.grid-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 32px 80px;
}

.grid-heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* ── SONG CARD ── */
.song-card {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}

.song-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255,255,255,0.14);
}

.song-card-activating {
  transform: scale(0.985);
  opacity: 0.88;
}

.card-art {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
}

.card-art picture,
.song-album-art picture,
.song-bg-blur picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.song-card:hover .card-art img {
  transform: scale(1.06);
}

.card-art .placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-play-icon {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
}

.song-card:hover .card-play-icon {
  opacity: 1;
  transform: translateY(0);
}

.card-play-icon svg {
  width: 16px; height: 16px;
  fill: #fff;
  margin-left: 2px;
}

.card-info {
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

/* ── SONG PAGE ── */
.song-page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 32px;
  position: relative;
  overflow: hidden;
}

.song-bg-blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.song-bg-blur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(80px) saturate(1.5);
  opacity: 0.12;
  transform: scale(1.1);
}

.song-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.song-content.is-loading .song-album-art,
.song-content.is-loading .song-title,
.song-content.is-loading .song-subtitle,
.song-content.is-loading .stream-buttons {
  opacity: 1;
}

.song-album-art {
  width: min(240px, 38vh, 75vw);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  margin-bottom: 24px;
  position: relative;
  flex-shrink: 0;
}

.song-album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.song-album-art .placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: #1a1a1a;
}

.song-art-skeleton,
.song-line-skeleton,
.song-subtitle-skeleton,
.stream-btn-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

.song-art-skeleton {
  width: 100%;
  height: 100%;
}

.song-line-skeleton {
  width: min(280px, 72vw);
  height: 1.1em;
  border-radius: 999px;
}

.song-subtitle-skeleton {
  width: min(140px, 42vw);
  height: 0.95em;
  border-radius: 999px;
}

.stream-btn-skeleton {
  min-height: 56px;
  border-color: rgba(255,255,255,0.06);
  background-color: rgba(255,255,255,0.04);
}

.song-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  min-height: 1.1em;
}

.song-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  text-transform: uppercase;
  min-height: 1em;
}

/* ── STREAM BUTTONS ── */
.stream-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.stream-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 100px;
  overflow: hidden;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.stream-btn:active {
  transform: scale(0.97);
}

.stream-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.stream-btn svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

.btn-spotify {
  background: #1DB954;
  color: #000;
}

.btn-apple {
  background: linear-gradient(135deg, #fc5c7d, #6a3093);
  color: #fff;
}

.btn-youtube {
  background: #FF0000;
  color: #fff;
}

.btn-spotify:hover { box-shadow: 0 12px 32px rgba(29,185,84,0.4); }
.btn-apple:hover   { box-shadow: 0 12px 32px rgba(106,48,147,0.4); }
.btn-youtube:hover { box-shadow: 0 12px 32px rgba(255,0,0,0.4); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 32px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ghostShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.ghost-shimmer {
  background-size: 200% 100%;
  animation: ghostShimmer 1.2s linear infinite;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.15s; }
.fade-up-3 { animation-delay: 0.25s; }
.fade-up-4 { animation-delay: 0.35s; }
.fade-up-5 { animation-delay: 0.45s; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  nav { padding: 16px 20px; }
  .hero { padding: 60px 20px 48px; }
  .grid-section { padding: 0 20px 60px; }
  .songs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .song-page { padding: 90px 20px 48px; }
}

@media (hover: none) {
  .card-play-icon { opacity: 1; transform: none; }
}
