Remain failed by going on the defensive following Leave around vs actively showing to a majority of the population why staying would not only be better for the county as a whole but better for each individual at a macro level.
Sure some people who voted leave are outright racist. Others might not be outright, but it could appear to be that way due to economic tensions.
I still think this poster said it best...
Uzzy said:
See, there's a slight problem with telling people in perpetual economic insecurity that they'll face perpetual economic insecurity by voting for Brexit.
To many people in the remain camp failed to move the needle for many in the middle on a personal micro level with all of their macro global talk.
Instead people were left saying ok yeah but what's in it for ME if we stay? No sufficient answer came so they said fuck it #Leave