/* ==========================================================================
   THE ARTIST PARADOX - Feature.fm Style Smart-Link Landing Hub
   Custom Film-Grain Moody Color Palette & Flat Modern Display.
   ========================================================================== */

:root {
  /* ==================== Backgrounds & Surfaces ==================== */
  /* Deep Shadow (Primary Background): subtle warm undertone from dark grainy shadows */
  --bg-deep-shadow: #161312;
  
  /* Charcoal Denim (Secondary Surface / Cards): derived from acid-wash denim folds */
  --surface-charcoal: #232021;
  
  /* Faded Indigo (Elevated Hover / Borders): inspired by mid-tone distressed denim */
  --border-faded-indigo: #383436;

  /* ==================== Accents & Highlights ==================== */
  /* Dusty Rose (Primary Accent): soft pastel pink t-shirt tone for active states & highlights */
  --accent-dusty-rose: #E5B8C2;
  
  /* Warm Amber / Terracotta (Secondary Accent): warm golden-lit skin tones for progress bars & star */
  --accent-warm-amber: #B87A4B;
  
  /* Muted Cyan / Sage (Tertiary Detail): cool blue-green tones in shirt graphic for badges */
  --detail-muted-cyan: #84A9AC;
  
  /* Crimson Plush (Alert / Deep Accent): red/plum plushie tone */
  --accent-crimson-plush: #7A353D;

  /* ==================== Typography ==================== */
  /* Soft Cream (Primary Text): lightest shirt highlights, prevents eye strain */
  --text-soft-cream: #F0E6E4;
  
  /* Muted Taupe (Secondary Text): desaturated denim/shadow blend for metadata & subtitles */
  --text-muted-taupe: #A39694;

  /* ==================== Platform Brand Colors ==================== */
  --spotify-green: #1db954;
  --apple-red: #fa2d48;

  --radius-subtle: 4px;
}

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

html, body {
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-deep-shadow);
  color: var(--text-soft-cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
  overflow-x: hidden;
}

/* ==================== Ambient Background (Large File) ==================== */
.bg-ambient-layer {
  position: fixed;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background-image: var(--bg-ambient, url('https://cdn.harmony.rip/images/The%20Artist%20Paradox%20Large.png'));
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(28px) brightness(0.48) saturate(1.25);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
}

.bg-overlay-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 40%, rgba(22, 19, 18, 0.25) 0%, rgba(22, 19, 18, 0.75) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ==================== Main Page Layout ==================== */
.landing-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 16px 20px 16px;
}

/* ==================== Center Release Card (Two Matching Squares) ==================== */
.release-card {
  width: 100%;
  max-width: 800px;
  height: 400px;
  display: flex;
  flex-direction: row;
  border-radius: var(--radius-subtle);
  overflow: hidden;
  box-shadow: none; /* Drop shadow removed per design spec */
  border: 1px solid var(--border-faded-indigo);
  background: var(--surface-charcoal);
}

/* ==========================================================================
   LEFT PANE: 3D FLIP ALBUM COVER / TRACK PREVIEWS
   ========================================================================== */
.card-artwork-pane {
  flex: 0 0 400px;
  width: 400px;
  height: 400px;
  perspective: 1200px;
  background: var(--bg-deep-shadow);
  position: relative;
  overflow: hidden;
}

.card-flipper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* Front Face: Entire Album Cover (Base File) */
.flip-front {
  cursor: pointer;
  background: var(--bg-deep-shadow);
  position: relative;
}

.card-artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Hover hint indicating the cover can be flipped */
.flip-hover-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(35, 32, 33, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-soft-cream);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-faded-indigo);
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  pointer-events: none;
}

.flip-hover-tag svg {
  color: var(--accent-dusty-rose);
}

.flip-front:hover .flip-hover-tag {
  opacity: 1;
  background: rgba(35, 32, 33, 0.96);
  border-color: var(--accent-dusty-rose);
  transform: scale(1.02);
}

/* Back Face: Track Previews Submenu */
.flip-back {
  transform: rotateY(180deg);
  background: var(--surface-charcoal);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px 18px;
  border-right: 1px solid var(--border-faded-indigo);
}

.previews-flip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-faded-indigo);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.previews-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-soft-cream);
}

.flip-close-btn {
  background: rgba(56, 52, 54, 0.6);
  border: 1px solid var(--border-faded-indigo);
  border-radius: var(--radius-subtle);
  color: var(--text-soft-cream);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.flip-close-btn:hover {
  background: var(--border-faded-indigo);
  border-color: var(--accent-dusty-rose);
}

/* Scrollable Tracklist */
.tracklist-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-faded-indigo) transparent;
}

.tracklist-container::-webkit-scrollbar {
  width: 4px;
}

.tracklist-container::-webkit-scrollbar-thumb {
  background: var(--border-faded-indigo);
  border-radius: 2px;
}

/* Track Row */
.track-row {
  display: flex;
  flex-direction: column;
  padding: 7px 8px;
  border-radius: var(--radius-subtle);
  background: rgba(56, 52, 54, 0.25);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.track-row:hover {
  background: var(--border-faded-indigo);
}

.track-row.is-playing {
  background: rgba(229, 184, 194, 0.12);
  border-color: rgba(229, 184, 194, 0.38);
}

.track-main-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.track-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.track-play-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-subtle);
  border: none;
  background: var(--border-faded-indigo);
  color: var(--text-soft-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.track-row:hover .track-play-btn {
  background: rgba(229, 184, 194, 0.35);
}

.track-row.is-playing .track-play-btn {
  background: var(--accent-dusty-rose);
  color: var(--bg-deep-shadow);
}

.track-play-btn svg {
  width: 11px;
  height: 11px;
}

.track-number {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted-taupe);
  width: 16px;
  flex-shrink: 0;
}

.track-row.is-playing .track-number {
  color: var(--accent-dusty-rose);
  font-weight: 700;
}

.track-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.track-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.track-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explicit-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 2px;
  background: rgba(132, 169, 172, 0.18);
  color: var(--detail-muted-cyan);
  border: 1px solid rgba(132, 169, 172, 0.35);
  flex-shrink: 0;
}

.track-artist {
  font-size: 10px;
  color: var(--text-muted-taupe);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-progress-wrap {
  width: 100%;
  height: 2px;
  background: rgba(56, 52, 54, 0.6);
  margin-top: 5px;
  border-radius: 1px;
  overflow: hidden;
  display: none;
}

.track-row.is-playing .track-progress-wrap {
  display: block;
}

.track-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-warm-amber);
}

/* ==========================================================================
   RIGHT PANE: CLEAN, COMPACT SQUARE MENU (Matching Feature.fm)
   ========================================================================== */
.card-content-pane {
  flex: 0 0 400px;
  width: 400px;
  height: 400px;
  background: var(--surface-charcoal);
  padding: 24px 28px 16px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header */
.release-header {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.release-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-soft-cream);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.release-tagline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted-taupe);
  display: flex;
  align-items: center;
  gap: 5px;
}

.star-icon {
  color: var(--accent-warm-amber);
}

/* Scrollable Container for Smart-Link Buttons */
.smart-links-scrollable {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-faded-indigo) transparent;
}

.smart-links-scrollable::-webkit-scrollbar {
  width: 4px;
}

.smart-links-scrollable::-webkit-scrollbar-thumb {
  background: var(--border-faded-indigo);
  border-radius: 2px;
}

.smart-links-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 8px;
}

/* Buttons */
.smart-btn {
  height: 44px;
  border-radius: var(--radius-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  border: none;
  transition: opacity 0.15s ease, filter 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.smart-btn:hover {
  filter: brightness(1.06);
}

.btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

.btn-service-name {
  font-size: 13px;
  font-weight: 600;
}

.btn-action-label {
  font-size: 13px;
  font-weight: 700;
}

/* Button Themes */
.smart-btn.btn-spotify {
  background: var(--spotify-green);
  color: #ffffff;
}

.smart-btn.btn-apple {
  background: var(--apple-red);
  color: #ffffff;
}

.smart-btn.btn-bandcamp {
  background: var(--text-soft-cream);
  color: var(--bg-deep-shadow);
}

.smart-btn.btn-bandcamp .btn-icon {
  color: #629aa9;
}

.smart-btn.btn-soundcloud {
  background: var(--text-soft-cream);
  color: var(--bg-deep-shadow);
}

.smart-btn.btn-soundcloud .btn-icon {
  color: #ff5500;
}

.smart-btn.btn-white {
  background: var(--text-soft-cream);
  color: var(--bg-deep-shadow);
}

/* ==================== Dedicated Desktop Portal Button (Below Card) ==================== */
.desktop-portal-container {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.desktop-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: var(--surface-charcoal);
  border: 1px solid var(--border-faded-indigo);
  border-radius: var(--radius-subtle);
  color: var(--text-soft-cream);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-portal-btn:hover {
  background: var(--border-faded-indigo);
  border-color: var(--accent-dusty-rose);
  color: #ffffff;
  transform: translateY(-1px);
}

.desktop-portal-btn .portal-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dusty-rose);
}

.desktop-portal-btn .portal-btn-arrow {
  color: var(--accent-dusty-rose);
  font-weight: 700;
  transition: transform 0.2s ease;
}

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

/* Subtle Scroll Hint */
.scroll-hint {
  text-align: center;
  padding-top: 8px;
  font-size: 10px;
  color: var(--text-muted-taupe);
  letter-spacing: 0.3px;
  user-select: none;
  flex-shrink: 0;
}

/* ==================== Responsive Mobile Styling ==================== */
@media (max-width: 768px) {
  .landing-wrapper {
    padding: 24px 16px 28px 16px;
    justify-content: flex-start;
  }

  .release-card {
    flex-direction: column;
    height: auto;
    width: 100%;
    max-width: min(92vw, 380px);
  }

  .card-artwork-pane {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .card-content-pane {
    flex: none;
    width: 100%;
    height: auto;
    max-height: 380px;
    padding: 20px 20px 14px 20px;
  }

  .smart-btn {
    height: 42px;
  }

  .desktop-portal-container {
    margin-top: 14px;
  }
}
