Rio de Janeiro: home to Christ the Redeemer and Ronnie Biggs, the girl from Ipanema and snakes that bite. All humanity is here, boiling with the spirit of carnival. So why the big tourist makeover? What's wrong with thongs and Carmen
Watch this guy making a caipirinha beside your table. It's the classic Rio drink, and every one, they say, is different. He cuts three limes into quarters, puts them in a glass, shovels on a couple of tablespoons of sugar and grinds the green fruit and white granules mercilessly with a pestle. When everything's swimming with juice, pith and skin, he whoomfs in a quadruple slug of cachaca, a sugar-cane spirit with the proof level and subtlety of moonshine whisky. He stirs it, adds crushed ice and more sugar, studies it critically and finally dishes it up, with the air of one conducting a holy sacrament. As it scorches the back of your throat (since it's the first, but not by a long way the last, you've had today) you reflect that the combination of earthiness and sophistication you've just seen is frightfully Rio.

But what else would you expect from a city with a jungle in the middle of it? And it's a real tropical jungle, even though it's called the Parque Nacional. A dozen species of deadly snake lie in the undergrowth waiting for edible frogs or open-toed tourists to happen by. The Cascatinha Falls crash down a hundred feet. Special excursions of monkey-spotters patrol the jacaranda woods. Huge trees with umbrella-spoke foliage disappear into cloud a mile above you. And whatever the weather along the Copacabana strip, it's always raining in this sweaty rain forest.

Visitors sometimes get lost here, among the iguanas. But just 20 minutes' drive away, you can be dining in the trendy Garcia & Rodrigues restaurant in Leblon. Rio is awesomely diffuse. Downtown is all wide parks and boulevards, shopping centres and eating houses. Driving around you feel thoroughly urbanised, passing the concrete Sambadrome, the bulky Maracana stadium and the Lapa aqueduct, where everyone gathers on Friday evenings to watch the brazenly androgynous hookers touting for custom in principal-boy microskirts, arms-akimbo.

But in front of you are the crashing waves of the Atlantic, while mountains behind you stand crushed together like grey giants in a celestial bus shelter. Below them, the off-white 1940s-vintage high-rise buildings crowd in a second-hand-Lego scramble that reminds you of Monte Carlo. In fact much of the Monagesque principality's seedy, off-the boil glamour has found its way to Rio. Both were places where the moneyed, the heartless and sybaritic classes in the Twenties and the post-war years imagined themselves heading for - motoring to Monte; flying down to Rio.

A flavour of that old spirit still resides in the hotel where I was staying, the Copacabana Palace, a casino in the Twenties and a magnet for international jetsetters. But the image of Barry Manilow tackiness, combined with the other Rio cliches - Carmen Miranda, bare-breasted carnival dancers, Ronnie Biggs, police corruption, drug-gang shootouts - has significantly damaged tourism in recent years. Now a new mayor has arrived and the city is in the throes of a marketing boost as a place that's "incomparable" and "miraculous". Yeah, yeah. As you soon realise, Rio doesn't need a tourist makeover. The best thing it can do is let visitors find out for themselves how gorgeous it is.

You can't avoid doing some touristy things, like taking the cable-car ride up Sugar Loaf, the mountain that rears out of the bay like a vast coffee bean, to admire the view of the Atlantic to the north east or the distant figure of Christ the Redeemer standing 98ft high on top of the Hunchback Mountain.

But you're even better off looking at the people. Rio dwellers are known as cariocas - it comes from an Indian word meaning, "the oddballs who live in houses" - and it's a term that embraces all sorts. Downtown you expect to see mostly Hispanic faces. Instead, you find whites, blacks, hispanics, Jamaicans, Trinidadians, mitteleuropeans, pale Netherlanders, spindly French girls, German tour guides, St Lucian bus drivers and English anthropologists, all born here and all chatting together without any audible whinnies of class or racial hierarchy.

And they're a touchy-feely bunch. Cariocas shake hands with strangers and clutch their arms and elbows as warmly as presidential candidates. There's a lot of mutual appreciation and civic pride among the locals, and a relaxed, lotus-eating quality in the bars and restaurants where they watch each other go by. (That's what "The Girl from Ipanema" was all about). This may not extend to the inhabitants of the favelas, or shanty towns, that dot the hillsides with makeshift shacks, but that's another story.

Rio is basically a long, long beach, 90kms from Santa Cruz in the south to Nueva Iguacu; but its widest point, from sea to national park, is only 7kms. Apart from the downtown region, it's divided into districts named by the beaches. The long, graceful, eerily white Copacabana strand turns a corner to become Ipanema, then Leblon, then Conrado, then Barra di Tijuca, 11 miles of unpolluted whiteness.

Of the infrastructure of eating and drinking establishments that service this sandy thoroughfare, Copacabana is now as declasse as Blackpool, while Ipanema is the Greenwich Village of Rio, full of cool rich kids, beach joggers, a "hippie market". And every day, no matter what the season, hundreds of local workers, footballing schoolkids and surfers process along its swirly, mosaic- ed Portuguese pathways (designed in the 1970s by Roberto Burle Marx) like pilgrims. At night, the hotel receptionists counsel guests against setting foot on the beach, for fear of them finding a knife in their ribs.

Rio cuisine tends to be extremely carnivorous. Its most modern incarnation is the running buffet of the Porcao chain - and I mean literally running: diners are assaulted by spring-heeled young men with long skewers of roasted meat, slicing them delicately onto your plate - rare beef, well-done beef, chicken thighs, elongated bodies of roast lamb with a light snow of cheese.

More typical is the feijoada dish, on which the entire city traditionally gorges at Saturday lunchtime - a dish based on a cauldron of stewed black beans, to which you add a noisome array of pork cuts, from cheek to loin to salted ribs, smoked tongue, pig's ear and pig's tail, complemented by dishes of manioc (a tasteless potato- like thing, ubiquitous and inescapable on Rio menus), cassava and cabbage and slices of orange.

Feijoada is by the way the most visually off-putting dish I've ever encountered: it is not a happy experience, spearing what you thought was a sausage and wondering exactly what is steaming on the end of your fork.

I had a better time in a typical north-eastern restaurant, the Bar do Arnaudo in the tough-Boho district of Santa Teresa, around the corner from Ronnie Biggs' home. A dish called lombinho turned out to be a terracotta plate piled high with roast pork slices on a bed of sweet potato, onions and mint, and outlying dishes of rice and green beans cooked in cumin. It was awesome.

I sat under the old-style ceiling fans, inside the cantina-style swing doors and ate until exhaustion set in. It was there, in Santa Teresa, that I felt most attuned to the real Rio - an edgy, arty place, with rich and poor living cheek by jowl, where too many people are awkwardly squeezed into too-small houses by the sandwiching pressure of mountains and ocean.

Having discovered there the authentic wonder of northeastern culture, I went to sample some more in the Nordestino Market, which brings together 2,000 city-dwellers of north-east Brazilian provenance under rude canvas tarpaulins.

This is no ordinary market. You wander past gigantic carcasses of cured and sun-dried beef and pork, past epic displays of vegetables (the bean- shuckers go on shucking, with sore and reddened thumbs, all night long) to the impromptu bars.

Each has its resident band. The cool ones play 25-minute samba riffs, and if you dance western-style, an irritated nordestino, wearied by your Travolta posturing, will try and show you how it's done.

The best bars feature the forro dancing of the Brazilian countryside in which everything moves faster; you change step on each beat, which means you're virtually running on the spot, wiggling your bottom from side to side - impossible for the Western visitor, but irresistible.

Whole books on Latin passion could be written about the couples who take part in these complicated revels, the men stripped to the waist, their women partners moving through these displays of macho urgency with closed eyes and rapt expressions.

It's hard to tear yourself away. But then it was hard to leave Rio. I had arrived in bleak morning sunlight and I would leave in torrential, smouldery evening rain, carrying with me images of surf and mountains and the face of Crista Redentor, wiped and re-wiped with apocalyptic clouds 700ft above me. To me the city had felt like an old dream venue reawakened: a miraculous, dirty, omni-racial, multitudinous urban landscape where people from all the corners of the earth collided - and stood there, gawping with amazement, on its crashing, pristine and dangerous shore.