Todd Haynes’ new film, “Far From Heaven,” is a clever, beautiful experiment with style. And like most film experiments, it doesn’t really succeed as a work of drama.

The director’s gimmick is to film his subject — social and domestic turmoil in 1950s suburbia — not through a modern lens, but in the style of a Hollywood movie released during the era in which it is set; specifically, in the style of “Magnificent Obsession,” “Imitation of Life” and the other Douglas Sirk melodramas which became huge hits in the 1950s and are cult classics today.

Shooting a film in the style of a previous era isn’t exactly a new concept — countless contemporary films have referenced earlier periods in cinema through visual motifs. But few filmmakers have gone this far. Not only are the sets, costumes and cinematography impossibly bright and Technicolor-influenced, but the dialogue, narrative conventions, and even the values seem to come out of that time.

As in a Sirk film, the story revolves around a beautiful but troubled female character — a doting Connecticut housewife and mother (Julianne Moore) whose idle world is shaken after she discovers her captain-of-industry-husband (Dennis Quaid) living a secret homosexual life.

Later, as her marriage deteriorates, she takes hesitant steps toward an affair with the family’s black gardener (Dennis Haysbert), whose success in business has allowed him to raise his daughter in a suburban environment a world away from the poor, black neighborhoods of his childhood. This relationship leads to the ostracization of both characters in the conservative community to which they belong.

Moore has been good or great in a lot of films, but as the spurned housewife-turned-public-pariah in “Far From Heaven,” her charisma deserves comparison with Lana Turner, the unofficial doyenne of 1950s melodrama. Haysbert is also interesting, and Quaid gives a tough, nuanced performance in what is perhaps the riskiest role a matinee idol can play. Each looks like a shoo-in for an Academy Award nomination.

The film’s problems arise from the director’s obsession with recreating a bygone Hollywood style. Every visual and sonic detail has been scrutinized: The screen is flooded with pastel color, the dialogue is ratcheted up several emotional notches and the music on the soundtrack swells and thumps along to further underline the emotional tenor.

For film buffs familiar with Sirk’s oeuvre, it’s fascinating to watch Haynes pull off this bit of mimicry. However, since the conventions of 1950s melodrama — as well as the banal “social messages” that have earned such films a dubious measure of respect upon revision — were awkward and intrusive in Sirk’s heyday, they prove all the more distracting in a modern film.

Even as I sat enraptured by “Far From Heaven” and its elaborate technical accomplishments, I couldn’t quite take the characters seriously, and I can’t help but wonder if Haynes does either. His attention is elsewhere — on movies, perhaps, but not on the wife, the husband and the gardener, and the film is unsuccessful as a result.