Fisherman: It is really easy. My position is that in a democracy the people should determine what is legal
Let's consider in theory that Spain is a democracy, then the people of Spain should determine what is legal in Spain. Based on your premise then, since the people of Catalonia are only part of all the people of Spain, their vote for independence is not enough to change the law. Also, if Spain is not a democracy, then your premise is meaningless.
(A unitary state ( Spain) is a state governed as a single power in which the central government (Spain) is ultimately supreme and any administrative divisions (Catalonia) (sub-national units) exercise only the powers that the central government chooses to delegate.)
https://en.m.wikipedia.org/wiki/Unitary_state
I don't really think it is worth debating this anymore.
Up to you.