#work {
  padding: 72px 56px;
  background: var(--black);
}

.work-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-h2 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.view-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--s400);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s;
}

.view-all:hover { color: var(--white); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--s200);
}

.a-card {
  background: var(--s900);
  padding: 28px;
  transition: background 0.25s;
  display: flex;
  flex-direction: column;
}

.a-card:hover { background: var(--s50); }

.a-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.a-genre {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(107,122,141,0.13);
  padding: 4px 10px;
}

.a-dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--s400);
}

.a-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.a-artist {
  font-size: 13px;
  color: var(--s400);
  margin-bottom: 20px;
}

.a-story {
  font-size: 14px;
  line-height: 1.72;
  color: var(--s400);
  margin-bottom: 28px;
  min-height: 72px;
}

/* Before/After toggle */
.ver-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  background: var(--s200);
  border-radius: 2px;
  padding: 3px;
  margin-top: auto; /* Pushes everything from here down to the bottom */
  margin-bottom: 24px;
  position: relative;
  /* Add top border separator here instead of on player */
  border-top: 1px solid var(--s200);
  width: 100%;
  overflow: hidden;
}

.ver-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 1px;
  background: var(--s400);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), width 0.32s cubic-bezier(0.4,0,0.2,1), background 0.32s ease;
  pointer-events: none;
  z-index: 0;
}

.a-card.is-final .ver-pill {
  background: var(--red);
  transform: translateX(100%);
}

.ver-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--s400);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: color 0.24s ease;
}

.ver-btn.active {
  color: var(--white);
}

.a-player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 0;
  width: 100%;
}

.waveform {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0;
  height: 36px;
  width: auto;
  min-width: 0;
}

.wb {
  flex: 0 0 4px;
  background: var(--s300);
  border-radius: 1px;
  transform-origin: bottom center;
  transition: height 0.55s cubic-bezier(0.4,0,0.2,1), background 0.35s ease;
}

.a-card.is-demo .wb { background: var(--s300); }
.a-card.is-final .wb { background: rgba(140,58,43,0.55); }

.a-card.playing.is-final .wb {
  background: var(--red);
  animation: wave var(--d, 0.45s) ease-in-out infinite alternate;
}
.a-card.playing.is-demo .wb {
  background: var(--s400);
  animation: wave var(--d, 0.45s) ease-in-out infinite alternate;
}

@keyframes wave {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}
