/* Adam font family (Light / Medium / Bold) */
@font-face{
  font-family:"Adam";
  src:url("assets/fonts/Adam-Light.woff") format("woff");
  font-weight:300;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"Adam";
  src:url("assets/fonts/Adam-Medium.woff") format("woff");
  font-weight:500;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"Adam";
  src:url("assets/fonts/Adam-Bold.woff") format("woff");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

/* WH0MST — Same Old Ghosts
   Palette: NIGHTSHAPE brand accents over near-black, tuned to the album cover.
   - Cyan   #33CCCC  primary / live signal
   - Indigo #6666FF  secondary
   - Purple #9933FF  tertiary
*/
:root{
  --bg:      #0C0C0E;
  --surface: #101014;
  --raised:  #15151b;
  --text:    #EEEEFF;
  --dim:     rgba(238,238,255,.62);
  --faint:   rgba(238,238,255,.34);

  --cyan:   #33CCCC;
  --indigo: #6666FF;
  --purple: #9933FF;

  --line:        rgba(102,102,255,.20);
  --line-strong: rgba(102,102,255,.46);
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family:"Adam", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* Ambient light, echoing the cover's lit-room glow */
.glow{
  position:fixed;
  border-radius:50%;
  filter: blur(120px);
  pointer-events:none;
  z-index:0;
}
/* Primary source: a cold blue wash behind the panel, as if lighting the room */
.glow-a{
  top:-26vh; left:50%;
  transform: translateX(-50%);
  width:110vw; height:88vh;
  background: radial-gradient(ellipse at center, rgba(102,102,255,.34), rgba(80,80,220,.12) 42%, transparent 70%);
}
/* Cold spill pooling at the floor, mirroring the light under the ghosts */
.glow-b{
  bottom:-30vh; left:50%;
  transform: translateX(-50%);
  width:80vw; height:60vh;
  background: radial-gradient(ellipse at center, rgba(51,204,204,.16), rgba(153,51,255,.10) 46%, transparent 72%);
}

/* Film grain — the cover is heavily grained; this keeps the page in the same stock */
.grain{
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  opacity:.05;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size:160px 160px;
}

/* Panel */
.panel{
  position:relative;
  z-index:1;
  width:min(1100px, 94vw);
  margin: clamp(20px, 5vh, 56px) auto;
  display:flex;
  gap:0;
  border-radius:26px;
  background: linear-gradient(180deg, rgba(21,21,27,.86), rgba(12,12,14,.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 90px rgba(0,0,0,.60);
  border: 1px solid var(--line);
  overflow:hidden;
}

/* Left cover */
.left{
  flex: 0 0 44%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px;
}
.cover{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 46px rgba(102,102,255,.16);
}

/* Right column */
.right{
  flex:1;
  padding: 30px 30px 24px 30px;
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0;
}

/* Header */
.meta .artist{
  font-size:12px;
  font-weight:700;
  letter-spacing:.34em;
  color: var(--cyan);
}
.meta .album{
  margin:8px 0 0 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.05;
  color: var(--text);
  /* Lit from behind, like the ghosts on the cover */
  text-shadow:
    0 0 18px rgba(102,102,255,.55),
    0 0 46px rgba(102,102,255,.30);
}
.meta .release{
  margin-top:9px;
  font-size:12.5px;
  letter-spacing:.05em;
  color: var(--dim);
}

/* Pre-save */
.presaveBtn{
  display:block;
  text-align:center;
  padding:15px 20px;
  border-radius:999px;
  font-size:13.5px;
  font-weight:700;
  letter-spacing:.16em;
  text-decoration:none;
  color:#07070A;
  background: var(--indigo);
  box-shadow: 0 8px 30px rgba(102,102,255,.34);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.presaveBtn:hover{
  filter: brightness(1.09);
  box-shadow: 0 10px 38px rgba(102,102,255,.50);
}
.presaveBtn:active{ transform: translateY(1px); }
.presaveBtn:focus-visible{ outline:2px solid var(--cyan); outline-offset:3px; }

/* Visualizer */
.vizWrap{
  height:80px;
  border-radius:14px;
  background: rgba(255,255,255,.025);
  border:1px solid var(--line);
  overflow:hidden;
}
.viz{ width:100%; height:100%; display:block; }

/* Track list */
.tracks{
  border-radius:16px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  padding:12px 12px 10px 12px;
}
.tracksHead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  padding: 0 4px 9px 4px;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color: var(--faint);
}
.tracksNote{ color: var(--cyan); opacity:.85; }

.trackList{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.track{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:9px 10px;
  border-radius:11px;
  cursor:pointer;
  border:1px solid transparent;
  overflow:hidden;
  transition: background .12s ease, border-color .12s ease;
}
.track:hover{ background: rgba(102,102,255,.09); }
.track.isActive{
  background: rgba(102,102,255,.13);
  border-color: var(--line-strong);
}
/* progress wash under the active row */
.trackProg{
  position:absolute;
  left:0; top:0; bottom:0;
  width:0%;
  background: rgba(102,102,255,.20);
  pointer-events:none;
  transition: width .1s linear;
}
.trackBtn{
  position:relative;
  flex:0 0 auto;
  width:32px; height:32px;
  border-radius:50%;
  border:1px solid var(--line-strong);
  background: rgba(102,102,255,.14);
  color: var(--cyan);
  font-size:10px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
}
.track.isActive .trackBtn{
  background: var(--cyan);
  border-color: var(--cyan);
  color:#07070A;
  box-shadow: 0 0 18px rgba(51,204,204,.45);
}
.trackBtn:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }

.trackNum{
  position:relative;
  flex:0 0 auto;
  width:20px;
  font-size:11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.trackName{
  position:relative;
  flex:1;
  min-width:0;
  font-size:13.5px;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.track.isActive .trackName{ color: var(--text); }
.trackTime{
  position:relative;
  flex:0 0 auto;
  font-size:11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* B-side row */
.track.isBside{
  margin-top:9px;
  padding-top:14px;
  border-top:1px solid var(--line);
  border-radius:11px;
}
.track.isBside .trackName{
  flex:0 1 auto;
  line-height:1.45;
}
.bsideTag{
  position:relative;
  flex:0 0 auto;
  display:inline-block;
  margin-left:2px;
  padding:2px 7px;
  white-space:nowrap;
  border-radius:999px;
  font-size:9px;
  letter-spacing:.14em;
  vertical-align:middle;
  color: var(--cyan);
  background: rgba(51,204,204,.12);
  border:1px solid rgba(51,204,204,.34);
}
/* Download link — only exists once unlocked */
.dlBtn{
  position:relative;
  flex:0 0 auto;
  padding:5px 10px;
  border-radius:999px;
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.14em;
  text-decoration:none;
  white-space:nowrap;
  color: var(--cyan);
  background: rgba(51,204,204,.12);
  border:1px solid rgba(51,204,204,.40);
  transition: background .12s ease, color .12s ease;
}
.dlBtn:hover{
  background: var(--cyan);
  color:#07070A;
}
.dlBtn:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }
.track.isLocked .dlBtn{ display:none; }

.track.isLocked{ cursor:pointer; }
.track.isLocked .trackName,
.track.isLocked .trackNum{ color: var(--faint); }
.track.isLocked .trackBtn{
  background: rgba(238,238,255,.05);
  border-color: rgba(238,238,255,.16);
  color: var(--faint);
  font-size:12px;
  box-shadow:none;
}
.track.isLocked .trackTime{
  font-size:9.5px;
  letter-spacing:.16em;
  color: var(--faint);
}
.track.isLocked:hover{ background: rgba(51,204,204,.10); }
.track.isLocked:hover .trackBtn{
  border-color: rgba(51,204,204,.50);
  color: var(--cyan);
}
/* brief confirmation flash on unlock */
.track.justUnlocked{
  animation: unlockPulse 2.2s ease-out 1;
}
@keyframes unlockPulse{
  0%   { box-shadow: 0 0 0 0 rgba(51,204,204,.55); }
  100% { box-shadow: 0 0 0 16px rgba(51,204,204,0); }
}

.status{
  display:none;
  margin:8px 4px 2px 4px;
  font-size:11.5px;
  letter-spacing:.04em;
  color: var(--dim);
}
.status.isError{ color:#FF6B8A; }

/* Services */
.services{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
.svc{
  display:flex;
  align-items:center;
  justify-content:center;
  height:56px;
  border-radius:12px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line);
  text-decoration:none;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.svc img{
  height:38px;
  width:auto;
  /* Source logos are solid black on transparent — invert so they read on near-black. */
  filter: invert(1);
  opacity:.92;
  transition: opacity .12s ease;
}
.svc:hover{
  background: rgba(102,102,255,.12);
  border-color: var(--line-strong);
  box-shadow: 0 0 22px rgba(102,102,255,.20);
}
.svc:hover img{ opacity:1; }
.svc:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }

/* Footer */
.moreLine{
  font-size:11.5px;
  letter-spacing:.05em;
  text-align:center;
  color: var(--faint);
}
.moreLine a{
  color: var(--cyan);
  text-decoration:none;
  border-bottom:1px solid rgba(51,204,204,.45);
  font-weight:700;
}
.moreLine a:hover{ color:#7FE3E3; }

/* Responsive */
@media (max-width: 860px){
  .panel{ flex-direction:column; width:min(560px, 94vw); }
  .left{ flex:0 0 auto; padding:20px 20px 0 20px; }
  .right{ padding:20px; }
  .services{ grid-template-columns: repeat(3, minmax(0,1fr)); gap:8px; }
  .svc{ height:52px; }
  .svc img{ height:30px; }
  .vizWrap{ height:64px; }
}
@media (max-width: 520px){
  /* stack the card header so neither half wraps against the other */
  .tracksHead{
    flex-direction:column;
    align-items:flex-start;
    gap:3px;
  }
  .tracksNote{ white-space:nowrap; }

  /* b-side row has one element too many for a phone. Wrap it to two tidy lines:
       line 1  ▶  ★  DOWN DOPAMINE            3:53
       line 2  Not on the album            ↓ MP3   */
  .track.isBside{ flex-wrap:wrap; row-gap:9px; }
  .track.isBside .trackName{ flex:1 1 auto; }
  .track.isBside .trackTime{ order:4; }
  .track.isBside .bsideTag{ order:5; margin-left:0; }
  .track.isBside .dlBtn{ order:6; margin-left:auto; }
}
@media (max-width: 420px){
  .services{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trackName{ font-size:12.5px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}
