Over the past two weeks, both major American political parties held their nominating conventions – and that's pretty much where the similarities end. After interminable speeches, cloying videos and occasional moments of rhetorical eloquence, the philosophical and tonal divide between them has never felt broader. Quite simply, Democrats and Republicans operate in two completely distinct realms, one that is defined by an attachment to reality and one that is increasingly detached from it.

If their three-day convention in Tampa is any indication, Republicans reside in a fantasy world where government plays no role but that of malevolence, where the free market is the salvation to all that ails this nation and where the country is locked in a Manichaean struggle between the forces of freedom and a failed, socialist interloper named Barack Obama.

It was a point driven home to me in Tampa when I overheard a Republican delegate declare in a sweet voice, reflecting more pity than anger: "There's a communist living in the White House."

For four decades, Republicans have relied on an undercurrent of white resentment toward social and economic change to maintain their pre-eminence in national politics. But with an African-American president and the country moving closer to "minority-majority" status, that dominance is slipping away and it feeds the sense of anger and desperation they tried to keep hidden in Tampa, but that all too often crept to the surface. Indeed, the entire Republican "you didn't build that" attack against Obama (a line taken brazenly and dishonestly out of context) is reminiscent of decades of Republican talking points that sought to cast their party as the defender of hard-working Americans and the Democrats as the defender of dependency, particularly for poor minorities.

There was in Tampa a genuine sense of frustration about the direction in which the country is heading, which led to an often harsh message, perhaps best exemplified by New Jersey governor Chris Christie, who declared: "Our leaders of today have decided it's more important to be popular, to say and do what's easy and say yes rather than to say no, when no is what is required." The dominant political attribute of the last four years is the increasing ideological inflexibility and lack of social empathy from the Republican party, and the convention only confirmed it. On the flipside, the Democrats in Charlotte were practically unrecognisable in their self-confidence and the discipline of their political message. Michelle Obama's well-crafted speech sought to cast Democrats as the true defenders of the middle class, while Bill Clinton's rambling brilliance on Wednesday offered a sweeping defence of Obama's record and an indictment of Republican intransigence.

Moreover, a party once derided for playing interest-group politics showed no hesitancy about going down that road in Charlotte. The convention was full of obvious appeals to women, gays, blacks, Hispanics, young people and, in the constant references to the successful bailout of the US car industry, organised labour. These are the groups that form the backbone of the Democratic coalition and are essential to the party's long-term success. Democrats far better than Republicans appreciate the destiny of demographics and they have done a far more effective job of cultivating these voters. Indeed, the contrast between the hues in Charlotte and Tampa was remarkable. The Democratic party is a party that looks like the palette of the American experience, not just in skin colour, but in class level. The Republican party (the one in the Tampa convention hall) is one that looks like Sunday brunch at a country club.

Even on national security, an issue on which Democrats have long suffered in comparison with Republicans, the party that killed Osama bin Laden and brought US troops home from Iraq didn't just flex its military muscles, it openly derided Republicans. When Obama joked: "My opponent and his running mate are new to foreign policy," it felt like a transformational moment in the politics of national security.

On economic issues, Democrats have a tougher hand to play as the blame for the country's mediocre recovery is pretty much the only thing standing between Obama and re-election. Nonetheless, Democrats sounded the note of economic populism, as they attacked Mitt Romney for his wealth and support for tax cuts for the richest Americans. There was a time when Democrats recoiled from such obvious appeals to class warfare; now they seem to revel in them, secure in the knowledge they face off against an opponent and a political party (because of its unstinting opposition to upper-income tax increases) that can be so easily confronted on this issue.

In her populist speech in Charlotte, Massachusetts Senate candidate Elizabeth Warren declared: "Our middle class has been chipped, squeezed and hammered… people feel like the system is rigged against them. And here's the painful part: they're right." According to Warren: "The Republican vision is clear: 'I've got mine, the rest of you are on your own'." Warren wasn't blowing smoke. Consider the words of Republican vice-presidential candidate Paul Ryan: "I never thought of myself as stuck in some station in life. I was on my own path, my own journey, an American journey, where I could think for myself, decide for myself… that is what we do in this country. That is the American dream. That's freedom and I will take it any day over the supervision and sanctimony of the central planners."

Compare this with how President Obama defined freedom in his speech: "We, the people, recognise that we have responsibilities as well as rights; that our destinies are bound together; that a freedom which asks only what's in it for me, a freedom without a commitment to others, a freedom without love or charity or duty or patriotism, is unworthy of our founding ideals and those who died in their defence."

The choices offered by Ryan and Obama are essential issues in this campaign. One party wants to use the powers of government to ameliorate social inequalities; the other seeks to reduce it into oblivion. The irony is that Americans are generally predisposed to take Ryan's side of this argument, but the uncompromising manner in which the Republicans speak of economic freedom has left them vulnerable to the Democrats' more inclusive, hopeful and optimistic message.

With a decided advantage in the electoral college and a stubborn but narrow lead in the polls, Obama has the political wind at his back. The conventions, while preaching mainly to the converted, have likely given him a near-term boost. While hardly impossible, it's difficult to see what Romney can do to shift the trajectory of the race. But even more difficult is seeing how Republicans, if they lose, can find a long-term message that competes with the Democrats' vision. If the national conventions showed us anything, it is that the winds of political fortune are not blowing in a Republican direction.