As the sun comes up, the crack pipes come out. A woman shields her face behind the frame of a store’s roll-down security shutter and a moment later a cloud of thick, pale smoke puffs into the morning air. The short, scorched glass pipe is visible as she takes a hit from a packet in her palm.

Five paces further on, the scene is repeated by someone else.

A dozen men are slumped on the next block, awash in trash and scraps of pizza crust.

And around the corner a woman is sitting on a strip of cardboard. She looks less wrecked than the others – clean hair, a trace of eye-liner, pearly white teeth, a black cotton dress – but, she said: “I’m smoking – right now. Crack.”

Where does she buy it?

“Everywhere!”

She had had a shower the day before in a friend’s apartment, she told the Guardian. It turns out she’s selling her body to buy crack and the “friend” is a client. She gives her name as Anne Ross and her age as “50 … um … something, I’ve actually forgotten”.

In the alley behind, flies are breakfasting on a patch of distinctly human-looking, half-dried feces.

It’s 7.15am in downtown San Francisco.

Five blocks away, Twitter’s elegant headquarters sits on the main drag, Market Street, next to a new glass tower where monthly rent for a one-bedroom apartment starts at $4,600.

It’s a short walk from there to the waterfront where ferries are arriving from Oakland and, the day before, San Francisco’s mayor, Ed Lee, went on television saying homeless people, visible on camera sitting beneath palm trees behind him, must vacate that area before the Super Bowl comes to town in February 2016.

“You’re going to have to leave,” Lee said of the down-and-out.

The Super Bowl game itself, the 50th anniversary of the National Football League event, will be held at the 49ers’ stadium in Santa Clara 40 miles away, but thousands will stay in San Francisco and a week of huge public festivities is planned on the waterfront and beyond.

“We’ll give you an alternative,” Lee said, continuing his remarks to the homeless via TV.

The city plans to increase the 3,000 units of supportive housing, with social services attached, that it has created in the last decade by 500 units this year. And teams will strive to find space in shelters or direct more people to the city’s new transition center where they stay while housing, rehab or a job is found for them.

But if helping people off the streets were that simple, San Francisco would not have one of the most intractable homelessness problems in America, with a highly visible crisis on its streets juxtaposed with booming downtown technology companies.

The number counted as living rough in the city in 2015 is 6,686, up 3% on the last count in 2013.

At the same time, the median house price in San Francisco has risen 103% since 2012 to $1.35m in July 2015, affordable for only the top 10% of households in the city, according to the latest figures from the California Association of Realtors.

And household income for the 95th percentile is the highest in the US at $423,000, although the city’s income inequality is the second worst after Atlanta, says a Brookings Institution report.

The Mission district, long famous for its street murals, currently sports street art decrying dramatic gentrification.

“The most affluent city in the most affluent country in the world, where the shelters are full and the housing waiting list is thousands long,” said Jennifer Friedenbach, director of San Francisco’s Coalition on Homelessness community group.

“Those extra 500 units will be filled long before Super Bowl comes around. Do they think if the police get their nightsticks out people will disappear into thin air? They’ve been trying that for 20 years.”

Lee acknowledges that many on the streets are mentally ill or have severe drug addictions. The authorities also warn that the strong El Niño weather pattern is going to bring a cold, wet winter to San Francisco.

Lee reminds the public that they can’t live on the streets “not just because it’s illegal but because it’s dangerous”.

Anne Ross scoffed.

“Bad winter! They always say that. Clear the streets for the Super Bowl? That’s never going to happen. If they move them from one area they’ll just come to another one, like here,” she said.

She’s been sleeping rough for six weeks.

‘Do they think if the police get their nightsticks out people will disappear into thin air?’ Photograph: Justin Sullivan/Getty Images

“I was staying in a sleazy hotel, $60 a day, but the crazy man who was running it kicked my door open and made me leave. I owed him $80,” she said.

She last had a job seven years ago and has made failed attempts to get off drugs and get somewhere to live.

She’s seen city outreach people “once or twice” in the six weeks.

“But they just say ‘how are you doing?’ To get services you really have to go to them, and for me that’s hard. Waiting around inside buildings, and so much paperwork, all the lines, all the people.

“I guess the SROs [single room occupancy lodging, also known as flophouses] are pretty good, but you’re a prisoner, they keep track of who comes and goes and there’s a lot of fighting,” she said.

She’s twitching slightly from the drugs, and, fearful of being robbed, covers up a mobile phone that’s peeping out from under her blanket.

“I’ve been punched. Someone stole the single dollar I had in my pocket. At least I have cute boyfriends who pay me, although one trick hit me over the head with a gun,” she said.

When asked how her life fell apart in the first place, she replied: “That’s a long story.”

It only takes a short walk around town to witness distress – young and old high on street drugs, or deranged, people in makeshift tents under the freeway or simply sleeping on the sidewalk – and there are many “long stories”.

Lesley Solorza, 46, sits on the grass near the heart of where the main Super Bowl parties are planned.

“If the mayor doesn’t want us down here, I see his point. But you can’t clean things up just like that – there are so many people on the street.”

His journey to destitution three years ago involved violence, divorce, illness and eviction in Concord, a nearby town.

“You slip off the rails and you screw your whole life up,” he said.

He’s just served two months in jail for fighting.

“I don’t have any income. I go to a shelter to eat. Sometimes you can get a bed, or sit in a chair for the night. You feel very alone,” he said.

A burgeoning excrement problem

In a nearby grassy plaza kids are tearing around a playground and some office workers kick a soccer ball about near several unkempt men and women who are sleeping or visibly high.

Two suited men stand on the corner and consult their phones.

Stephen Heyliger, 36, and Sergio Faura, 35, are in town from Miami for an IT conference and they’re booking an Uber car to go see the Golden Gate bridge.

Faura said homelessness was “not nice to see”, but no one had bothered him.

“I love the city, it’s my first time here and I want to come back on vacation,” he said.

Just steps away, two half-brothers in their mid-forties with grubby faces and missing teeth are sitting on a camouflage tarpaulin, sharing some weed. They’ve puttered south from Sacramento with their dog, Playboy. One, Alvin Sellers, said he used to drive a truck and is here seeking hernia surgery. The other, Terry Mills, said he’s a retired nurse and needs cancer treatment.

They’d prefer staying on the lawn to a place where they “paid $75 for a closet for one night, they told us to pee in the sink and there was no TV, and roaches everywhere”. The shelters won’t let them in with Playboy.

Sellers chatted about wanting a job, then made a startling segue, claiming that he’s the late actor Peter Sellers’ nephew and has royal blood.

Mills pointed to a public toilet kiosk on the lawn, where the men relieve themselves.

This is a hot topic in San Francisco, particularly around the nearby neighborhoods of Tenderloin and SoMa, or South of Market, where dotcom workers and bustling bars and eateries are cheek by jowl with the destitute and there are more homeless people than available bathrooms.

The San Francisco Chronicle has published a series of outraged columns about the “summer of muck” and anti-social behavior by the homeless.

Notices on buildings warn people to “go” elsewhere. Paint that repels urine back at the issuer has been tried on some walls.

“It’s part of the experience of being in SF!” laughed a young tech worker enjoying a cigarette outside a restaurant, who gave his name as JT Katavich, 26.

“The mayor isn’t giving tourists the right trip if you’re not harassed by a homeless person. And human poop on the street? Oh, yeah, you get used to it, and the rank smell of pee every day,” he said.

A woman sitting on the street 10ft away yelled angrily but incoherently. A man in torn clothes rolled by in a wheelchair.

As night fell, a San Francisco police department cruiser drove slowly down the next block, past a count of 19 adults ensconced on the sidewalk, some in a heap, others fishing through trash cans.

A voice barked over the patrol car’s loudspeaker.

“Any drug dealers around here?” The loudspeaker cut out on a muffled giggle, and the cruiser glided on.

A fire department paramedic parked in his ambulance declined to give his name, but agreed with a recent New York Times article saying some stations now get more calls to attend to the homeless than fires.

“People pooping in the street? That’s nothing new, I’m San Francisco born and bred, I live here and I’ve been stepping over that stuff since I was a kid,” he said.

That morning Anne Ross, the woman sitting on her strip of cardboard, had explained that many on the street often have nowhere to “go”. She went into some detail about how addicts, especially, get caught short.

Had she pooped in an alley?

“Oh yeah, sometimes you have to. I try to do it on a piece of paper, though.”

Five minutes’ walk away, a fresh-faced Twitter interface designer strode towards the office, all executive backpack, neat stubble and designer glasses.

He gave his first name, Joe, and age, 24, and said he’d moved to San Francisco two years ago from Florida for a salary that’s just into the six-figure range.

Had he witnessed human poop al fresco?

“Yep, saw some this morning,” he breezed. “I’d rather not. But it’s indicative of a larger problem. They’ve had some pop-up portable potties around here but that doesn’t attack the underlying issues, the culture clash – evictions and homelessness and tech money.”

He said a friend of his is facing eviction in the Castro district, where the landlord is trying to sell the rent-controlled property for the vast profits now easily graspable all over the city, “and the people who want to buy are coming around bullying the tenants” instead of negotiating.

“To the degree to which I work at the company, I’m part of it. You have to be conscious of the role you play in the economy here, but I volunteer when I can, at a youth literacy program, and I’m donating to my friend’s fund to fight the eviction,” he said.

Jennifer Friedenbach said some downtown tech companies have addressed some aspects of the homelessness around them, but what’s most needed from all directions is more money and real estate for basic housing.

“There’s no app for that,” she said.