When Ali Roohi told his friends that he planned to quit his high-paying job as a software engineer in Sunnyvale to start a church, they told him, “People in Silicon Valley don’t want God.”

They weren’t wrong.

A standard measure of faith is church attendance. By that yardstick, much of the Bay Area is among the least religious places in the country. In a Northern California region that includes the Bay Area and some adjacent counties, 60 percent of people reported not attending church in the last six months, compared to a 43 percent national average, according to market research firm Barna Group.

Roohi, who grew up in Cupertino and went to high school six minutes from Apple headquarters, decided several years ago that church had a branding problem. Like a startup trying to find a product to fit market demand, church would pivot. Pray different.

Founded in 2017, CenterSet Church says it is “a church for people who don’t like church.” Roohi bills it as an “inter-denominational” Christian church, open to anyone.

At a recent Sunday service, Roohi led worship in ripped skinny jeans and a temple fade haircut, flanked on stage by a rock band that played him in. A few dozen attendees, mostly in their 20s and 30s, sat entranced in the purple glow of San Jose’s Hotel Valencia ballroom, which CenterSet rents for service every Sunday.

“Who’s excited to be in church? Let me hear you,” Roohi said, prompting a chorus of whoops. “C’mon, this is Silicon Valley. More people love the gym than church.”

The son of Iranian immigrants, Roohi said his parents gave him no choice but to be a doctor, lawyer or engineer when he grew up. He earned a computer science degree from Cal Poly San Luis Obispo, and got a job writing software for pacemakers at a medical device company in Los Angeles.

At 23, Roohi said God appeared to him in a dream and said, “Follow me.”

After converting from Islam a year later, Roohi plunged into his faith: taking mission trips to the Middle East, becoming an ordained pastor by the Iranian Christian Church in Sunnyvale in 2011 and leading English services there for years. Roohi studied for a degree in theology from the now defunct Shiloh Bible College in Oakland, but dropped out to focus on other responsibilities, he said.

Roohi continued to work as an engineer, saving enough money to buy a house and a new car before he turned 27.

Still, he felt like there was more to do. “I was like, is this all there is? Bigger, newer versions of the stuff I already have?”

After reading a blog post about the importance of “planting,” or starting, new churches, Roohi said he realized that the “best return on investment” he could make was not revitalizing churches or leading campus ministries, but creating new ones.

So he pulled out the startup playbook. To disrupt church, Roohi needed data. He gathered a small group of supporters and rented a booth at the Santa Clara Art and Wine Festival, an annual affair that attracts nearly 60,000 attendees, in 2016. Roohi put up a whiteboard that read, “I would go to church if ...”

Passersby wrote that they would go “if the service wasn’t so boring.” They wanted hip music and a friend to sit next to them. They asked for inclusivity and “fewer angry messages.”

“That led us to believe that Silicon Valley is very spiritual,” Roohi said. “The vast majority of people want what we have. They just don’t want the packaging.”

Since its first once-a-month service in a packed hotel ballroom in July 2017, CenterSet has grown to weekly services attended by 125 people on average.

Each hour-long service is evenly spent on music and a sermon, when Roohi reads a passage from the Bible and interprets its message.

A recent sermon about growing closer to God through tests included a lesson about sexual purity. Roohi framed the story of Joseph resisting temptation as one involving a “cougar’s” invitation to “Netflix and chill.”

Humor helps him reach people, Roohi said. Most Sundays, CenterSet can count on any newcomers to arrive 15 minutes late. They avoid talking to people and sit in the back.

“When they uncross their arms, I know I’m reaching them,” Roohi said.

Churches like CenterSet are attracting a growing set of Americans who are less likely to identify with an organized religion. In 2000, half of Americans surveyed in a Gallup poll said they belonged to a specific Protestant group such as United Methodist Church or Southern Baptist Convention; by 2016, that share fell to 30 percent.

The trend reflects an uptick in nondenominational churches in the U.S., according to Gallup, and “may also reflect a tendency for church leaders to downplay their denominational affiliation in their own local branding.”

Jonathan Sanchez, a creative project manager at marketing firm HH Global, and wife Sebrina, a probation officer for Santa Clara County, have attended services at CenterSet since the beginning. He said he appreciates that CenterSet welcomes not only people of different faiths, but also people who might not be accepted at other churches. Sanchez’s brother is gay. Sanchez said his brother, should he ever attend CenterSet, would be received warmly.

“It’s not our job to create barriers but to open them,” Sanchez said.

Mari Sanchez, a surgery coordinator at Stanford Children’s Health who was raised Catholic, started attending CenterSet last September because she wanted her daughter, Mila, to have a space to explore her faith. “I had this idea in my head that I wanted her to experience church and for her to make a decision for herself, whether she wanted to believe in God or not,” said Sanchez.

Sanchez (no relation to Jonathan or Sebrina) said she felt less connected to her religion over the years. “I would go to church and I would feel like the people that were there were just very judgmental,” Sanchez said. She heard about “a pastor who wears ripped jeans” from her cousin and took Mila to her first service on Santana Row. “I felt like the hour I was here wasn’t long enough,” Sanchez said. “I found God just took over my heart.”

CenterSet attracts a fairly liberal flock, but some funding comes from the Southern Baptist Convention, the country’s largest Protestant body with about 15 million members, the majority of whom are politically conservative. The last year was painful for evangelicals after the firing of a high-profile Baptist leader amid the #MeToo movement’s heightened attention to treatment of women. Roohi said he has not seen any backlash from his board for taking on more progressive views.

At the end of each service, attendees pass around plastic buckets for donations to cover the costs of renting the ballroom and paying staff. Roohi and his wife, Yasmin, who manages the church’s staff, operations and social media, rely on salaries from CenterSet as income.

Even the church’s board of directors fits Roohi’s definition of inter-denominational. Senior pastors from three other churches in the Bay Area — representing a non-denominational church, the Southern Baptist Convention and Assemblies of God — hold board seats. They, along with churches in five other states, provide most of the funding for CenterSet.

“I’m NASCAR,” Roohi said. “Some guys only wear one sticker. I wear multiple.”

Melia Russell is a San Francisco Chronicle staff writer. Email: melia.russell@sfchronicle.com Twitter: @meliarobin