/* Geometric interlocking puzzle grid — content clipped inside masked surface */

.puzzle-grid > .puzzle-piece.artist-card,
.puzzle-grid > .puzzle-piece.release-card,
.puzzle-grid > .puzzle-piece.brand-card,
.artist-grid.puzzle-grid > .puzzle-piece,
.release-grid.puzzle-grid > .puzzle-piece,
.brands-grid.puzzle-grid > .puzzle-piece {
  clip-path: none !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}

.puzzle-grid {
  --puzzle-min: 480px;
  --puzzle-gap: 0px;
  --puzzle-overlap: 20%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--puzzle-min)), 1fr));
  gap: var(--puzzle-gap);
  align-items: stretch;
  width: 100%;
  padding: 0;
}

.puzzle-grid--placed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 899px) {
  .puzzle-grid--placed {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--puzzle-min)), 1fr));
  }

  .puzzle-grid--placed .puzzle-piece[data-puzzle-colspan],
  .puzzle-grid--placed .puzzle-piece[data-puzzle-rowspan] {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

.puzzle-piece {
  position: relative;
  min-width: 0;
  width: calc(100% + var(--puzzle-overlap));
  height: auto;
  display: block;
  margin: calc(var(--puzzle-overlap) * -0.5);
  transition: transform 0.2s ease;
}

.puzzle-piece__surface {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 100%;
  box-sizing: border-box;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), transparent 46%),
    linear-gradient(180deg, var(--geo-tint, rgba(255, 98, 56, 0.1)), transparent 72%),
    var(--bg-elevated);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.puzzle-piece[data-puzzle-variant="0"] .puzzle-piece__surface { --geo-tint: rgba(255, 98, 56, 0.14); }
.puzzle-piece[data-puzzle-variant="1"] .puzzle-piece__surface { --geo-tint: rgba(42, 176, 176, 0.16); }
.puzzle-piece[data-puzzle-variant="2"] .puzzle-piece__surface { --geo-tint: rgba(255, 58, 117, 0.14); }
.puzzle-piece[data-puzzle-variant="3"] .puzzle-piece__surface { --geo-tint: rgba(230, 196, 72, 0.14); }
.puzzle-piece[data-puzzle-variant="4"] .puzzle-piece__surface { --geo-tint: rgba(72, 98, 196, 0.16); }
.puzzle-piece[data-puzzle-variant="5"] .puzzle-piece__surface { --geo-tint: rgba(168, 92, 196, 0.14); }

.puzzle-piece:hover,
.puzzle-piece:focus-within {
  z-index: 50 !important;
  transform: translateY(-2px);
}

.puzzle-piece:hover .puzzle-piece__surface,
.puzzle-piece:focus-within .puzzle-piece__surface {
  box-shadow:
    inset 0 0 0 2px rgba(255, 58, 117, 0.35),
    0 12px 28px rgba(255, 58, 117, 0.12);
}

.puzzle-piece__content {
  box-sizing: border-box;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding:
    max(var(--inset-t, 14%), 28px)
    max(var(--inset-r, 14%), 28px)
    max(var(--inset-b, 14%), 28px)
    max(var(--inset-l, 14%), 28px);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  color: var(--text);
}

.puzzle-piece__content > * {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.puzzle-piece--welcome .puzzle-piece__content {
  justify-content: center;
}

.puzzle-piece__content img {
  display: block;
  max-width: min(100%, 360px);
  width: auto;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.puzzle-piece.home-placeholder h3,
.puzzle-piece.home-placeholder p,
.company-puzzle-copy,
.company-puzzle-copy p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Home intro — fixed row heights so interlock edges align */
.home-intro-section {
  margin-bottom: 0;
}

.home-intro-grid {
  --puzzle-min: 100%;
  --puzzle-overlap: 24%;
  width: 100%;
}

@media (min-width: 900px) {
  .home-intro-grid.puzzle-grid--placed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 780px;
  }
}

.home-intro-grid .puzzle-piece {
  display: flex;
  flex-direction: column;
  min-height: 780px;
}

.home-intro-grid .puzzle-piece__surface {
  flex: 1;
  min-height: 780px;
}

.home-intro-grid .puzzle-piece--welcome {
  min-height: 1560px;
}

.home-intro-grid .puzzle-piece--welcome .puzzle-piece__surface {
  min-height: 1560px;
}

.home-intro-grid .puzzle-piece.home-placeholder {
  min-height: 780px;
}

.puzzle-piece--welcome .welcome-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  width: 100%;
  max-width: 100%;
}

.puzzle-piece--welcome .welcome-panel > div {
  width: 100%;
  max-width: 100%;
}

.puzzle-piece--welcome .welcome-panel h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  margin: 0 0 16px;
}

.puzzle-piece--welcome .welcome-panel p {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  line-height: 1.65;
  margin-left: auto;
  margin-right: auto;
}

.puzzle-piece--welcome .welcome-panel .btn {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 520px) {
  .puzzle-piece--welcome .welcome-panel {
    gap: 22px;
  }
}

.welcome-artist-portrait {
  display: block;
  width: min(100%, 340px);
  max-width: 100%;
  margin: 0 auto;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.welcome-artist-portrait img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

/* Artist / release cards */
.puzzle-piece.artist-card .puzzle-piece__content,
.puzzle-piece.release-card .puzzle-piece__content {
  text-align: center;
}

.puzzle-piece.artist-card a,
.puzzle-piece.release-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  width: 100%;
}

.puzzle-piece.artist-card img,
.puzzle-piece.release-card img {
  width: min(100%, 300px);
  max-width: 85%;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 auto 14px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.puzzle-piece.artist-card h3,
.puzzle-piece.release-card h3 {
  margin: 0;
  width: 100%;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  line-height: 1.35;
}

.puzzle-piece.artist-card .roster-followers,
.puzzle-piece.release-card span {
  color: var(--muted);
  font-size: 0.88rem;
  width: 100%;
}

.puzzle-piece.brand-card .brand-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.puzzle-piece.brand-card .brand-logo {
  width: 100%;
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
  margin: 0 auto 12px;
}

/* Featured home tiles */
.home-feature-grid {
  --puzzle-min: 100%;
  --puzzle-overlap: 24%;
  margin-bottom: 0;
  width: 100%;
}

@media (min-width: 700px) {
  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 920px;
  }
}

.home-feature-grid .puzzle-piece {
  display: flex;
  flex-direction: column;
  min-height: 920px;
}

.home-feature-grid .puzzle-piece__surface {
  flex: 1;
  min-height: 920px;
}

.home-feature-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.home-feature-media {
  width: min(100%, 380px);
  max-width: 88%;
  margin: 0 auto 18px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.home-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-feature-copy {
  text-align: center;
  min-width: 0;
}

.home-feature-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.home-feature-copy h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  line-height: 1.35;
}

.home-feature-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.puzzle-piece.home-placeholder h3 {
  margin: 0 auto 12px;
  max-width: 88%;
  font-size: clamp(1.2rem, 2.8vw, 1.4rem);
  font-weight: 700;
}

.puzzle-piece.home-placeholder p {
  margin: 0 auto;
  max-width: 88%;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.15rem);
  line-height: 1.55;
}

/* Company page */
.company-page {
  width: 100%;
}

.company-page-intro {
  margin-bottom: 8px;
  text-align: center;
}

.company-page-intro .lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

@media (max-width: 900px) {
  .company-page-intro .page-logo {
    display: none;
  }
}

.company-puzzle-grid {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 860px);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 clamp(20px, 5vw, 48px);
  --puzzle-overlap: 0%;
  --puzzle-gap: 56px;
}

.company-puzzle-grid .puzzle-piece {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.company-puzzle-grid .puzzle-piece__surface {
  flex: 1;
  min-height: 420px;
}

.company-puzzle-copy p {
  margin: 0 auto 1.35em;
  color: var(--muted);
  font-size: clamp(1.12rem, 2.6vw, 1.3rem);
  line-height: 1.75;
  max-width: 100%;
  text-align: center;
}

.prose-page .company-puzzle-copy p {
  max-width: 100%;
}

.company-puzzle-copy p:last-child {
  margin-bottom: 0;
}

.puzzle-page-head {
  margin-bottom: 8px;
}

/* Home intro brick promos */
.intro-brick-logo {
  display: block;
  width: min(100%, 260px);
  margin: 0 auto 18px;
  line-height: 0;
}

.intro-brick-logo img {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  display: block;
}

.intro-brick-kicker {
  margin: 0 auto 10px;
  max-width: 88%;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-brick-headline {
  margin: 0 auto 10px;
  max-width: 88%;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.intro-brick-artist-name {
  margin: 14px auto 0;
  max-width: 88%;
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.intro-brick-media {
  display: block;
  width: min(100%, 300px);
  max-width: 88%;
  margin: 0 auto 14px;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.intro-brick-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.intro-brick-media--artist img {
  border-radius: 10px;
}

.home-intro-brick p {
  max-width: 88%;
}

/* Playlists page */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 24px;
  width: 100%;
}

.playlist-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
}

.playlist-card__cover {
  display: block;
  line-height: 0;
}

.playlist-card__cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.playlist-card__body {
  padding: 18px 18px 22px;
}

.playlist-card__body h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  text-align: center;
}

.playlist-card__body h3 a {
  color: inherit;
  text-decoration: none;
}

.playlist-card__body h3 a:hover {
  color: var(--accent);
}

.playlist-embed {
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
  display: block;
}
