San Francisco is well known for its transformations, the most recent one fueled by tech money that has seemingly scrubbed much of the city clean. Evidence of it tends to be easy to mock: the $4 artisanal toast, the shuttle buses carrying workers from the city interior to Silicon Valley, the preponderance of reclaimed wood. But for almost a century, the city has been indelibly linked with an enigmatic genre that might be considered an antidote to all of that: noir.

Like the characters that populate it, noir can be tough to put your finger on: a fog rolling in from the bay and coating city streets; a lonely sort of glamour perched on a bar rail; a sense of menace just over your shoulder. It is a genre that revels in ambiguity.

And so perhaps a search for noir in San Francisco was bound to yield some mysteries. Was an apartment at the edge of the Tenderloin, one lovingly restored in the décor of a bygone era, actually home not just to the writer Dashiell Hammett but his most famous creation, Sam Spade? Who was the enigmatic woman from the 1920s whose name adorns a nearby cocktail bar, lovingly made, speakeasy style, in an actual speakeasy? And what about that doorway at the end of the alley, a pivotal location in Hammett’s best-known book?

Above all: Could this city still be home to noir?

The search — through the Tenderloin, neighboring Union Square and Nob Hill and up into North Beach — led me to a handful of disparate but passionate individuals, dedicated, in one way or another, to celebrating an era when the idea of darkness held a certain romance, when corrupted heroes lost out at the end of the tale. If noir, or at least the appreciation of it, is still alive in San Francisco, it’s largely due to them. And it turns out that, though it may have gone dormant for a time, there’s a broad sense of gratitude in the city for their efforts.