How do you beat rightwing populists? With pink socks, viral videos, condoms – and an iron determination not to let them decide what matters.

That’s how Operation Libero are doing it anyway.

As advancing nationalist parties prepare to meet in Milan on Monday to forge an alliance in the run-up to May’s European elections, anti-populist activists in Switzerland may have some lessons on halting – even reversing – the seemingly unstoppable rise of rightwing populists.

“It’s about the political space, who’s defining and shaping it, who’s communicating strategically within it, who, basically, is holding it,” says Flavia Kleiner, 28, the group’s self-assured co-president, over tea in a Zurich bookshop and coffee house.

Facebook Twitter Pinterest Kleiner, centre, and other activists after a successful campaign Photograph: Simon Iannelli/Operation Libero

“At the moment, in lots of places, it’s populists. Everywhere, the conversation’s about identity: who we are, where we’re from, the past. But that’s their turf. We have to go on the offensive – clear the fog, refocus attention, reframe the debate.”

As the ground zero of postwar European populism, Switzerland is home to arguably Europe’s most consistently successful rightwing populist party, the Swiss People’s party (SVP). For 25 years, the SVP had been steadily building its electoral success through a series of increasingly nation-first, anti-immigration popular referendums.

In February 2016, months after the SVP had scored its highest ever share of the vote, 29.4%, in national elections, with the political mainstream seemingly helpless to halt its advance, Switzerland went to the polls again, this time for an SPP-sponsored referendum demanding the automatic deportation of immigrants found guilty of even minor offences.

Had the proposal passed, any of the country’s two million non-Swiss residents – a quarter of the population – caught, for example, speeding twice in any 10-year period, could have been automatically returned to their homeland, with judges barred from considering personal circumstances.

It didn’t pass.

Voters rejected it overwhelmingly by 59% to 41%, on a higher turnout – at nearly 64% – than for any popular referendum in years. “One moment we were talking about immigration and doing just fine,” the SVP’s leader said at the time. “The next, everyone was talking about rule of law. I don’t know what happened.”

Facebook Twitter Pinterest An Operation Libero poster used in the referendum on legal precedence. The wording says “No to the self-determination initiative”. Photograph: Operation Libero

What happened was Operation Libero. The movement had just chalked up the first in an unbroken series of victories over popular referendums pushed by the SVP. The latest, on giving Swiss law precedence over international law, was defeated in November last year by 66% to 34%.

In cantonal elections in Zurich last month, which are seen as a reliable indicator for October’s national elections, the biggest losers, by far, were the SVP, whose share of the vote plunged lower than at any time since 1995.

“The populists don’t know what’s hit them, and they really don’t know how to deal with it,” says Constantin Seibt, one of the country’s most respected journalists and editor-in-chief of Republik, a record-breaking, crowdfunded news startup.

“All they can manage is to bleat ‘It’s not fair. They’ve got all these young people, and somehow they keep turning everything we say against us’. Well, those young people have changed the dynamics of the country. The populists seem to be running out of steam. It’s pretty cool.”

Operation Libero was formed by a handful of mainly student friends soon after the “political earthquake” of 2014, when the SVP narrowly won a potentially crippling referendum to curb EU immigration. “We had to fight because we did not want to live in a country like this,” says Kleiner.

Also there at the beginning was communications director Silvan Gisler, 31, a former journalist. “It was just, ‘Fuck, this really has just happened,’” he says in the group’s offices, which are based in a slightly scruffy office block around the corner from Zurich’s red light district. “And had everyone done enough to stop it? No.”

Operation Libero was a working title but it “kind of stuck”, Gisler said. “You know, in football there used to be a player called the ‘libero’ – the last defender, but also the one who gives the first pass to the attack. And ‘operation’ conveyed urgency. We are a movement, not a party. But above all, we’re about values and action.”

From the outset, the group adopted a radically different approach. Its first, modest campaign was in late 2014, against another popular referendum, Ecopop, which envisaged “limiting the population to a level compatible with the preservation of the country’s natural resources” – notably, of course, by restricting immigration.

Helped by small-scale crowdfunding, the group launched a tongue-in-cheek campaign. An army of young volunteers handed amused nightclubbers condoms in bright pink packaging, commanding them to “prevent disaster: have sex against Ecopop”.

Soon after, it launched a campaign for same-sex marriage, which it is still pursuing (“It’s vital that we’re not just reactive. That we say what we’re really for, not just what we’re against,” says Gisler) with viral social media videos featuring cute same-sex couples on ski-lifts in wedding gear telling passersby they are “unhappily unmarried”.

Facebook Twitter Pinterest Campaigners (from left) Aliénor Burghartz, Franziska Barmettler, Flavia Kleiner and Laura Zimmermann Photograph: Simon Iannelli/Operation Libero

The breakthrough, though, came that day in February 2016. “It was clear that if we talked about criminal foreigners, we’d become the defenders of criminal foreigners,” says Kleiner. “We’d have lost before we started.

“Instead, we set the terms of the debate by portraying the SVP’s proposal as an attack against fundamental Swiss values. Against the constitution as a pillar of our liberal democracy; the rule of law; equal justice for all. We were the patriots here, because this was an attack on things that every Swiss citizen holds dear.”

She first thought they might win, Kleiner says, the day she heard two women talking about the upcoming referendum in a shop: “One said, ‘Can you imagine? It would mean a family man, a father, being deported, just like that, for driving a bit too fast.’ And the other said: ‘I wouldn’t want that happening to me. It’s not right.”

Success brought money and the means to do more. Operation Libero has about 1,500 members paying a CHF50-100 (£38-£76) annual subscription; 10,000 donors, mostly giving sums less than CHF250; 5,000 volunteers on call and four regional sections. It employs seven part-time staff and is organised to a degree that is positively, well, Swiss.

The office is all charts and whiteboards, with six campaigns – some, still secret – mapped across weekly timelines. Post-it notes and to-do lists cover walls and desks. At clockwork-smooth morning meetings plans are discussed, projects refined, ideas floated, timings decided, messages polished, responsibilities allocated.

Quick guide What is the Upside? Show Hide Ever wondered why you feel so gloomy about the world - even at a time when humanity has never been this healthy and prosperous? Could it be because news is almost always grim, focusing on confrontation, disaster, antagonism and blame? This series is an antidote, an attempt to show that there is plenty of hope, as our journalists scour the planet looking for pioneers, trailblazers, best practice, unsung heroes, ideas that work, ideas that might and innovations whose time might have come. Readers can recommend other projects, people and progress that we should report on by contacting us at theupside@theguardian.com

Sign up here for a weekly roundup from this series emailed to your inbox every Friday

Of necessity, and because it works, much of the group’s work is online. Besides the viral videos, it enlists “online warriors”, more than 100 at any one time for major campaigns, to engage on social media platforms. These are not trolls, Kleiner insists. They use their own names, offer arguments rather than invective and are under orders to stay polite and never escalate.

Fuschia pink, Operation Libero’s brand colour, vibrates everywhere. Merchandising, in the form of startlingly pink socks, sits in piles under desks. “Trump sucks, Wilders sucks, Le Pen sucks, Petry sucks,” says one video, from two years ago. “Populism sucks. Make 2017 great again. Buy Libero socks.”

“You have to have fun,” says Gisler. But the group’s youthful enthusiasm – most Operation Libero staff are in their 20s or early 30s – is married to a campaign-hardened professionalism. The slogans, images and posters they devise themselves are as hard-hitting and attention-grabbing as those of their opponents, dreamt up by an expensive political advertising agency.

“We spend so much time getting them right,” says Gisler. “It’s so important to have the right content, smart content. To frame the debate right. Content has to have substance, depth, rigour. But it’s also how to say it – the visuals and the message. It has to be short enough, catchy enough, popular enough, to really break through.”

Kleiner wants eventually to see a new alliance of progressive, liberal democratic movements and parties across Europe, of which Operation Libero could be a part. “The SVP say they’re defending ordinary Swiss people against the state and a global elite but they’re actually weakening the structures and institutions that secure those very individuals’ freedoms,” she says. “It’s the populists who are on the attack!”

Facebook Twitter Pinterest Oeration Libero activists winning a campaign Photograph: Simon Iannelli/Operation Libero

Politics now, Kleiner believes, has moved far beyond the left-right divide, or even the progressive-conservative divide. “It’s increasingly, actually, about constructive versus destructive,” she says. “That’s really where we are.”

Her top tips for combating rightwing populism? Reframe the debate, obviously. But beyond that, “You have to be accurate, honest, understandable. You have to be serious about what you’re doing, responsible – but at the same time keep it fun, light. That’s not always easy. It’s really hard sometimes, actually. And you have to be positive.”

Underpinning everything, says Kleiner, is an ambition just to “change the mood. The thing that’s there but no one sees. To move away from the fear and pessimism the SVP have instilled in the Swiss mentality, change that narrative. We don’t want some defensive, inward-looking museum of a country. We’re looking forward, with hope, to a Switzerland we want to live in in 2050.”

This article is part of a series on possible solutions to some of the world’s most stubborn problems. What else should we cover? Email us at theupside@theguardian.com