The problem the republicans ran into was twofold:
Exit polls indicate people didn't like Paul Ryan's economic plan and Romney tied his cart to a plan that promotes things like converting medicare to block grants to the states and cutting pell grants for college students. No surprise there. The math on his plan doesn't even work according to the CBO and other independent accounting agencies, so one would hope that people wouldn't be duped by it.
The demographics of the US have changed. The GOP basically has a two-fold strategy that they've been operating on for decades now: get middle class and rich whites and poor religious whites to vote for them. When Reagan was running, that strategy worked pretty well because the country was >80% white. That strategy doesn't work as well now, because the country is becoming more urban, less religious, and less white.
The one smart bit of strategy the republians did have in recent history was blow-out spending on state congressional races after the census so they could control the gerrymandering of congressional districts and keep a republican house.