TOWUK these are Less variables.
@media @phone is a media-query that uses a variable as the second argument (@media is not a variable, @phone is).
Most of them are defined in https://github.com/flarum/core/blob/master/less/common/variables.less
Others (primary and secondary colors) are set with the values you configure in the admin panel.
You can see some of the variables change value depending on light or dark mode. That's an easy way for extensions to create styles that will work with both themes without having to ship two different files for light and dark.