/* ============================================================
   HARK MADLEY — site.css
   Single unified stylesheet (merged from main_4.css + player.css)
   ============================================================ */

/* ── Universal box sizing ── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Title colour animation ── */
@keyframes pulser {
  0%   { color: white; }
  25%  { color: #4cffb6; }
  50%  { color: #4c94ff; }
  75%  { color: #b64cff; }
  100% { color: #ff4c94; }
}

/* ── Full-page background ── */
html {
  background: url(img/tfitq1.jpg) top left / cover no-repeat fixed;
  min-height: 100vh;
  overflow-y: scroll;
  overflow-x: clip;
}

/* iOS: fixed background doesn't work, use ::after pseudo-element instead */
@media only screen and (orientation: portrait) and (max-device-aspect-ratio: 1/1) {
  html {
    background-attachment: scroll;
    background-position: top left;
    background-size: cover;
  }
  html::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -9;
    background: url(img/tfitq1.jpg) top left / cover no-repeat;
  }
}

/* ── Body ── */
body {
  display: block;
  font-family: neue-haas-grotesk-display, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 120px;
}

/* ── Site title ── */
h1 {
  font-family: neue-haas-grotesk-display, sans-serif;
  font-weight: 300;
  font-size: 2em;
  letter-spacing: 0;
  width: 80%;
  margin: -5px 0 -0.4em 10px;
  padding-top: 3px;
  animation: pulser 60s infinite alternate;
  position: relative;
  z-index: 3;
}

/* ── Links ── */
a, a:visited {
  text-decoration: none;
  color: white;
}
a:hover, nav {
  color: #33f5ff;
}

/* ── Navigation ── */
#nav {
  font-weight: 300;
  font-size: 1em;
  margin-top: 5px;
  margin-bottom: 0;
  position: relative;
  z-index: 3;
}

ul {
  list-style: none;
  padding: 0 0 2px 2px;
  display: inline-flex;
  margin: 10px;
}

li {
  padding-right: 25px;
}

/* ── Footer social icons ── */
#footer {
  position: fixed;
  top: 11px;
  right: 10px;
  height: 50px;
  z-index: 1000;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
}

.social {
  height: 1.5em;
  width: 1.5em;
  opacity: 0.8;
  background-repeat: no-repeat;
  background-size: contain;
  display: block;
  flex-shrink: 0;
}
.social:hover { opacity: 1; }

#instagram { background-image: url(img/icons/instaiconWHITE.png); }
#spotify   { background-image: url(img/icons/spotifyiconWHITE.png); }
#apple     { background-image: url(img/icons/appleiconWHITE.png); }
#youtube   { background-image: url(img/icons/youtubeWHITE.png); }

/* ── CSS variables ── */
:root {
  --track-hover: rgba(255, 255, 255, 0.06);
  --track-active: rgba(255, 255, 255, 0.1);
}

/* ── Track list ── */
.track-list {
  padding: 1rem 0 2rem;
  position: relative;
  z-index: 3;
  -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.9)), to(rgba(0,0,0,0.15)));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.15));
}

.track-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  padding: 0.1rem 10px 0.1rem 7px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  font-size: 1em;
}

.track-row:hover { background: var(--track-hover); }
.track-row:hover .track-title { color: #33f5ff; }

.track-row.active {
  background: var(--track-active);
  border-left: 3px solid #33f5ff;
}
.track-row.active .track-title { color: #33f5ff; }
.track-row.active .track-date  { color: rgba(51,245,255,0.6); }

.track-date {
  font-size: 1em;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.9);
  font-family: neue-haas-grotesk-display, sans-serif;
}

.track-title {
  letter-spacing: 0.02em;
  font-size: 1em;
  color: white;
  font-family: neue-haas-grotesk-display, sans-serif;
  position: relative;
  padding-left: 12px;
}

.track-row.active .track-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #33f5ff;
}

/* ── Visualizer canvas ── */
#hm-viz {
  display: block !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* ── Sticky player bar ── */
.cassette-player {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(7px);
  border-top: 0.5px solid rgba(255,255,255,0.15);
}

.player-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
}

/* ── Transport buttons ── */
.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: neue-haas-grotesk-display, sans-serif;
  font-size: 11px;
}
.ctrl-btn:hover { color: white; }

.ctrl-btn.play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0.5px solid rgba(255,255,255,0.5);
  color: white;
  font-size: 10px;
}
.ctrl-btn.play-btn:hover { border-color: rgba(255,255,255,0.6); }
.ctrl-btn.shuffle-btn.on { color: #33f5ff; }

/* ── Now playing info ── */
.tape-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex-shrink: 0;
  width: 200px;
}

.tape-track-title {
  font-size: 1em;
  color: white;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: neue-haas-grotesk-display, sans-serif;
  line-height: 1.3;
}

.tape-track-title.idle {
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tape-track-date {
  font-size: .9em;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.01em;
  margin-top: 1px;
  font-family: neue-haas-grotesk-display, sans-serif;
}

/* ── Progress bar ── */
.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  width: 0%;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  left: 0%;
  pointer-events: none;
  opacity: 1;
  transition: width 0.15s, height 0.15s;
}

.progress-track:hover .progress-fill  { background: white; }
.progress-track:hover .progress-thumb { width: 12px; height: 12px; }

/* ── Time display ── */
.time-display {
  font-size: .81em;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  font-family: neue-haas-grotesk-display, sans-serif;
  min-width: 72px;
  text-align: right;
}

/* ── Volume ── */
.vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vol-label {
  font-size: 0.75em;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: neue-haas-grotesk-display, sans-serif;
}

.vol-track {
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.vol-fill {
  height: 100%;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
  width: 80%;
  position: relative;
}

.vol-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  pointer-events: none;
}

.vol-track:hover .vol-fill::after { width: 12px; height: 12px; right: -6px; }
.vol-track:hover .vol-fill         { background: rgba(255,255,255,0.85); }

/* ── Mobile ── */
@media (max-width: 600px) {
  body {
    padding-bottom: 130px;
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  .track-row {
    grid-template-columns: 80px 1fr;
    padding: 0.1rem 10px 0.1rem 7px;
  }

  .player-inner {
    gap: 8px;
    height: 56px;
    padding: 0 10px;
  }

  .tape-info { width: auto; max-width: 160px; flex-shrink: 1; margin-right: 8px; }
  .tape-track-title { font-size: .8em; }
  .tape-track-date  { font-size: .7em; }
  .time-display { display: block; font-size: 0.7em; min-width: 60px; }
  .vol-wrap         { display: none; }

  .ctrl-btn          { font-size: 10px; padding: 2px; }
  .ctrl-btn.play-btn { width: 24px; height: 24px; font-size: 9px; }

  .progress-thumb { width: 14px; height: 14px; }
}
