Bianca Jagger in red Halston on a horse. Cher in a sequinned bodystocking. Grace Jones in knickers and batwing blouse. Diana Ross in a cloud of marabou. For the throwback-inspo world of Instagram fashion, Studio 54 remains – 41 years after its grand opening in spring 1977 – the gift that keeps on giving. And, as a new documentary, Studio 54, reveals, Ian Schrager and Steve Rubell’s club had a dress code that has defined what you wear after dark for four decades and counting.

Lupita Nyong’o in Studio-inspired dress in 2017. Photograph: FilmMagic

If other erstwhile New York clubs such as CBGBs and Paradise Garage have cult appeal and card-carrying obsessives, Studio’s celebrity clientele means it is unique in its status as a nightclub that has long closed its doors but become a household name, a byword for hedonistic glamour of the first order, with the chunky numbered logo the nightlife version of a Nike swoosh. It had proper fashion pedigree and arguably made regulars such as Halston and Calvin Klein celebrity designers. It has since inspired countless catwalk collections, too – with Tom Ford and Marc Jacobs, both of whom attended, reworking their memories of the club into 70s-inspired looks, while younger designers such as Michael Halpern, Anthony Vaccarello and Brandon Maxwell namecheck the club. It has even become a dress code in itself: this year, at a birthday party with a Studio 54 theme, that dress code meant gold jumpsuits, platform sandals and Farrah Fawcett hair. This theme is by no means unusual – Google “Studio 54” and autocomplete will offer “fancy dress”.

The club’s heyday lasted fewer than three years – it opened with a fanfare in April 1977 and closed with just as much fanfare, as well as a backstory of prison sentences for Schrager and Rubell due to tax evasion, in February 1980. But it casts a shadow like an extended disco remix (Patrick Cowley’s 15 minute version of I Feel Love, say) over what we now wear at night. This is partly good timing – those three years were the apex of disco, with all the louche freedoms that came with an era after the pill was invented and before the Aids crisis hit. The images of beautiful people at play pre-photo face is particularly fascinating to a digital native generation who grew up with selfies.

Halston, Loulou de la Falaise, Potassa, Yves St Laurent, and Nan Kempner at Studio 54 in 1978. Photograph: Sonia Moskowitz/Getty Images

“New York was electric at the time,” says the fashion designer Norma Kamali, who was living with Schrager as Studio 54 took off. “Not because of Studio, but because New York was basically bankrupt and so anyone from anywhere in the US felt safe [arriving] – especially if you were gay, or you were uncomfortable in your hometown, because you could disappear there. You could also afford to live there, because everyone was afraid of it and was leaving. It was testy and it wasn’t safe, but the feminist movement, female freedom, being gay – it all came together and the creative energy was extraordinary.”

Clothes at Studio were sexy in a kind of languid way – to dance in, yes, but also to lounge around on banquettes, and maybe escape up to the infamous balcony. It is no accident that Diane von Fürstenberg – the woman who invented the zipless wrapdress in order for a woman to get dressed without disturbing a sleeping man – was a regular. Kamali also famously dressed many attendees, although – contrary to popular belief – she never attended one of the nights herself. “I would go before the parties were set up to see what he was doing, but I don’t drink and I never did any drugs and that kind of energy was so not my comfort zone. I’d hear about what happened the next day.”

A New Year’s Eve party at Studio 54 attended by Halston, Bianca Jagger, Jack Haley Jr, Liza Minnelli and Andy Warhol. Photograph: Life Images Collection/Getty

The queue outside Studio is almost as famous as those who went straight through the door: Nile Rodgers wrote Chic’s Le Freak after being rejected by door staff in 1977. What you wore was crucial: it was big hair, lots of flesh, metallics and high heels. While there were no specific rules, footage from the documentary testifies that the gatekeepers – founder Rubell and doorman Mark Benecke – had their whims. Rubell reprimands one hopeful for wearing a hat, and splits up couples – letting a girl in while her boyfriend is not permitted. His crime? Wearing a polyester shirt.

Polyester – obviously a popular choice in the synthetic 70s – was banned at Studio, as a symbol of the bridge-and-tunnel Saturday Night Fever end of disco, not the cool, underground, bouji idea that Schrager and Rubell subscribed to. The reasoning for the ban? “It melts under the lights.”

Guy Bergon and Diane von Fürstenberg at Studio 54. Photograph: WireImage

As often is the case with these things, the documentary will have people returning to the source material when it comes to dressing after dark this summer. There is footage here waiting to be devoured by those who were way too young to remember it the first time around. Sure, there are the celebs – Divine in sequins with Elton John, a young Michael Jackson in a pale purple suit, Andy Warhol with Liza Minnelli and Bianca Jagger. But, as in every good nightclub, the vibe came from the mix. Schrager and Rubell were careful to keep celebrities entertained with characters, misfits and outsiders.

Marc Jacobs’ show at 2011 New York fashion week. Photograph: John Aquino/Penske Media/Rex/Shutterstock

“It was Ian who envisioned every event there and put together the most creative group of people for whatever the project was – which is what really sustained the energy and got people to come back – and it was Steve who had the skill to blend all the different groups of people,” says Kamali. “He never weighted it too heavy, or too celebrity, or too gay, or too feminist. He had a great mix.”

If you had a look, you were welcome and as valued on the dance floor as Jackson and friends. Trans women were celebrated and Potassa, a drag queen, was a celebrity, dressed by Stephen Burrows and loved by Salvador Dalí. If, recently, Studio 54 has signalled disco classics such as gold jumpsuits, maybe it’s these regulars who might now become style references. Expect an anything-goes, inclusive, creative attitude to night-time dressing to emerge – a tuxedo worn by a woman, off-the-shoulder lame, a swimsuit repurposed as an outfit. It may be 41 this year, but Studio 54 is a nightclub whose style endures.

•Studio 54 is released on 15 June