/* keyska Navigation Styles for Faircamp Pages */
/* This is injected via Faircamp's site_assets + site_metadata */

/* Google Fonts are loaded in catalog.eno site_metadata */

/* ===== Global Overrides for keyska Theme Match ===== */
html, body, .layout {
  background-color: #0A0A0A !important;
  color: #F5F5F5 !important;
}

/* Remove max width restriction from the main layout so CTA can span full width */
.layout {
  max-width: none !important;
  padding: 0 !important;
}

/* But keep the content area constrained */
.layout > main > * {
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Let the social CTA break out of max-width to span full width */
.layout > main > .fc-social-cta {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ===== Navigation Bar ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(236, 0, 140, 0.2);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'Merriweather Sans', system-ui, sans-serif;
}

.nav-logo {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: #EC008C !important;
  text-decoration: none !important;
  transition: transform 200ms ease;
}

.nav-logo:hover {
  transform: scale(1.02);
  color: #EC008C !important;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.nav-links a {
  position: relative;
  color: #F5F5F5 !important;
  text-decoration: none !important;
  text-transform: lowercase !important;
  transition: color 200ms ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #EC008C;
  transition: width 200ms ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: #EC008C !important;
}

.nav-social {
  display: flex;
  gap: 16px;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: lowercase !important;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  color: #F5F5F5 !important;
  text-decoration: none !important;
}

.nav-social a:hover {
  color: #EC008C !important;
  transform: translateY(-2px);
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: #EC008C;
  color: #FFFFFF;
  padding: 8px 16px;
  z-index: 1100;
  text-decoration: none;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 0;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #F5F5F5;
  transition: all 200ms ease;
}

/* ===== Hide Faircamp's own header/footer + abstract ===== */
/* Faircamp wraps its content in .layout > header/footer */
.layout > header,
.layout > footer {
  display: none !important;
}

/* Hide the catalog title + copy link area */
.abstract {
  display: none !important;
}

/* Hide release titles below cover art on catalog page */
.release > a:last-of-type {
  display: none !important;
}

/* Push Faircamp's main content down to account for our sticky nav */
.layout > main {
  margin-top: 0;
}

/* ===== Back Button (injected on release pages) ===== */
.fc-back-wrapper {
  width: 100%;
}

.fc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  margin-top: 1rem;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #F5F5F5;
  text-decoration: none;
  border: 1px solid rgba(236, 0, 140, 0.4);
  border-radius: 4px;
  background: rgba(10, 10, 10, 0.6);
  transition: all 200ms ease;
}

.fc-back-btn:hover {
  border-color: #EC008C;
  background: #EC008C;
  color: #FFFFFF;
  transform: translateX(-2px);
}

.fc-back-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ===== Social CTA (matches home page section style) ===== */
.fc-social-cta {
  text-align: center;
  padding: 3rem 1rem;
  background: #1A1A1A;
  width: 100%;
}

.fc-social-cta h3 {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1.8rem;
  color: #EC008C;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.fc-social-cta p {
  font-family: 'Merriweather Sans', system-ui, sans-serif;
  font-size: 1rem;
  color: #A0A0A0;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.fc-social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-social-links a {
  display: inline-block;
  padding: 12px 22px;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: #FFFFFF !important;
  text-decoration: none !important;
  background: #EC008C;
  border: 2px solid #EC008C;
  border-radius: 4px;
  transition: all 200ms ease;
}

.fc-social-links a:hover {
  background: transparent;
  color: #EC008C !important;
  transform: scale(1.02);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding: 16px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-social {
    display: none;
  }

  .nav-social.active {
    display: flex;
  }

  .site-nav {
    padding: 16px;
  }
}

/* ===== Music Table View (Index Page with Waveforms) ===== */
.page_center > .tracks {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

.page_center > .tracks .track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(236, 0, 140, 0.1);
  transition: all 200ms ease;
}

.page_center > .tracks .track:hover {
  background: rgba(236, 0, 140, 0.03);
  border-bottom-color: rgba(236, 0, 140, 0.3);
}

/* Album cover thumbnail */
.page_center > .tracks .track_playback {
  position: relative;
  width: 80px;
  height: 80px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  transition: all 200ms ease;
}

.page_center > .tracks .track_playback:hover {
  transform: scale(1.05);
}

.page_center > .tracks .track_playback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1 !important; /* Override site.css opacity: 0.5 */
  position: relative;
  z-index: 1; /* Behind play icon */
}

.page_center > .tracks .track_playback .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(236, 0, 140, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8; /* Always visible with transparency */
  transition: all 200ms ease;
  z-index: 2; /* Above cover image */
}

.page_center > .tracks .track_playback:hover .icon,
.page_center > .tracks .track.playing .track_playback .icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1); /* Slight scale on hover */
}

.page_center > .tracks .track_playback .icon svg {
  width: 16px;
  height: 16px;
  fill: #0A0A0A;
  margin-left: 2px; /* Optical centering for play icon */
}

/* Track info and waveform */
.page_center > .tracks .track > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 300px; /* Ensure measurable width for ResizeObserver */
  width: 100%; /* Fill available space in grid */
}

/* Track title row */
.page_center > .tracks .track > div:nth-child(2) > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.page_center > .tracks .number {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #A0A0A0;
  min-width: 2rem;
}

.page_center > .tracks .title {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1.2rem;
  color: #F5F5F5 !important;
  text-decoration: none !important;
  transition: color 200ms ease;
}

.page_center > .tracks .title:hover {
  color: #EC008C !important;
}

/* Waveform in table view */
.page_center > .tracks .waveform {
  width: 100%;
  max-width: 100%;
  min-height: 3em; /* Ensure vertical space for waveform */
  position: relative;
}

.page_center > .tracks .waveform svg {
  width: 100%;
  height: 3em;
  display: block; /* Remove inline spacing */
}

/* Duration */
.page_center > .tracks .track > div:last-child {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.95rem;
  color: #A0A0A0;
  text-align: right;
  min-width: 4rem;
}

/* Hide audio element (controlled via JS) */
.page_center > .tracks audio {
  display: none;
}

/* Mobile responsive for table view */
@media (max-width: 768px) {
  .page_center > .tracks .track {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding: 1rem 0.5rem;
  }

  .page_center > .tracks .track_playback {
    width: 60px;
    height: 60px;
  }

  .page_center > .tracks .track_playback .icon {
    width: 24px;
    height: 24px;
  }

  .page_center > .tracks .track_playback .icon svg {
    width: 12px;
    height: 12px;
  }

  .page_center > .tracks .number {
    display: none; /* Hide track numbers on mobile to save space */
  }

  .page_center > .tracks .title {
    font-size: 1rem;
  }

  /* Move duration below waveform on mobile */
  .page_center > .tracks .track > div:last-child {
    grid-column: 2;
    text-align: left;
    margin-top: 0.5rem;
  }
}
