SANTA CLARA, Calif. -- For the first 15 minutes of last week's game against the Philadelphia Eagles, the San Francisco 49ers offense was going the wrong direction.
By the end of a brutal first quarter, the Niners had minus-6 yards, no first downs and zero points. The onus to keep the game close fell on the defense, an occasion to which they've grown accustomed.
That defense did its job again, limiting the Eagles to six first-quarter points. But even if Philadelphia had scored touchdowns instead of a pair of field goals, the overwhelming sense on San Francisco's sideline was that it was a matter of time before an offensive avalanche.
"I've never had this much confidence in the offense," defensive end Nick Bosa, who entered the league in 2019, said. "We know they're going to break through at some point."
That confidence was rewarded with touchdowns on each of the Niners' next six possessions on the way to a convincing 42-19 win to improve their record to 9-3 heading into Sunday's game against the 6-6 Seattle Seahawks (4:05 p.m. ET, Levi's Stadium, Fox). Bosa's unflinching belief in his offensive counterparts is rooted in the fact that now, seven years into the Kyle Shanahan era, the 49ers are as balanced as they've ever been.
That's not to say the Niners haven't had offensive success in the Shanahan era. They have, most notably in their 2019 run to the Super Bowl. But the eye test and numbers suggest that the defense has done more of the heavy lifting during the Niners' run of success since that 2019 season.
This year, the Niners have won their nine games by an average of 20.4 points per contest on the strength of an offense that is every bit as dominant as its defense. Perhaps even more so.
Through 12 weeks, the Niners are second in the NFL in offensive points per game (29.3), third in yards per game (391.9) and first in offensive expected points added (110.34). For context, the Dallas Cowboys are second in offensive EPA at 93.55 and the league average is minus-4.9. The Niners' 352 points are the team's most through 12 games since 1998.
That rise to the top in many offensive categories began simmering last year after the Niners traded for running back Christian McCaffrey and Brock Purdy stepped in at quarterback. San Francisco finished 2022 sixth in scoring and fifth in yards and offensive EPA. It was the first time since 2019 they finished that high in any of those categories and their first top-five finish in EPA.
"I think you guys could see once we got on that roll, the way we went into the playoffs last year, the way we did in the playoffs, too, that things were a little bit different," Shanahan said. "I think we all felt that last year. ... I just feel we've got a special group of guys who continue to work hard and hold each other accountable and everything. I think they've been doing a hell of a job for a little bit now."
As Shanahan points out, there are multiple reasons for the Niners' ascent to the top of the offensive rankings. McCaffrey gave them the type of versatile, three-down star they'd been seeking at running back. Purdy's ability to distribute the ball to his many playmakers while successfully pushing the ball down the field has added a missing element to the passing game.
Above all, the Niners have a valuable commodity that is increasingly hard to find in the NFL: continuity. Foundational players like fullback Kyle Juszczyk, tight end George Kittle, receivers Deebo Samuel and Brandon Aiyuk, left tackle Trent Williams and others have been together in Shanahan's offense for more than three years. McCaffrey and Purdy have proved quick studies who bring immediate comfort in the scheme.
"I think the No. 1 thing for this year is just we have a veteran offense," Kittle said. "We understand what Kyle wants. Kyle knows what our strengths are and he does a really good job of putting his players in the best positions to succeed. I just feel like once you're in this offense for a while, you understand it and ... there's less confusion. Everyone's just kind of on it because they've been in it for a while. And I think that's one of our main reasons for the efficiency that you're seeing."
It doesn't hurt that complementing that continuity is a galaxy of star power that makes opposing defenses pick their poison from snap to snap.
"I feel like when you are out there against all the guys that we have on offense, you have to defend the whole field," Samuel said.
While San Francisco's defense remains near the top of the league in plenty of categories -- they're second in points per game allowed (15.8), fifth in opponent yards allowed (298.4) and defensive EPA (44.18) -- the hope has always been to build a balanced team that can play the complementary football that results in lopsided victories.
The offensive surge has also changed how the Niners and Shanahan approach each week. In past seasons, it wouldn't be unusual to see Shanahan lean heavily into the run game in an effort to avoid turnovers. The 49ers did that because they had a dominant defense that has finished no worse than ninth in points allowed, fifth in yards allowed or eighth in defensive EPA in four of the past five seasons.
That approach was most famously on display in the 2019 NFC Championship Game against the Green Bay Packers when the Niners ran wild with back Raheem Mostert, attempted just six passes and had faith that the defense would lock the Packers down regardless of offensive output.
"I think as the defense sees us be a little bit more explosive and score a little bit more points, it gives them a little bit more confidence that they can have setbacks," Shanahan said. "And they feel they've got another side of the ball that can catch up if they aren't perfect."
For most of the past five seasons, Shanahan has laid out goals for the next day in the final team meeting the night before games. In many cases, Shanahan would tell his offense that if it could get to 30-plus carries, it would almost certainly mean they've won the game.
These Niners still lean heavily on the run, but those specific rush attempt benchmarks are a thing of the past, which is a sign of how far the offense has come.
"We don't ever talk about that now," Juszczyk said. "We really don't because we are such a balanced offense and with Brock now and the way Brandon and Deebo are playing, and Christian and George. We can be so effective in the pass game as well as the run game that we're just more balanced and it feels different than it has in years prior."