Proportional to the statewide vote but they are only bound to that for the first ballot at the convention. Democrats have a more convoluted proportional system You know Democrats.
The Democrat system is designed so that the super delegates can override the electorate in the primaries.
Which lead to Watergate.