SAN FRANCISCO — The Giants have lost to this version of Clayton Kershaw before and there’s no shame in that. Kershaw had as many swinging strikes Friday night as he did balls, and he struck out 13 in eight innings. You tip your cap, get your treatment, grab a late dinner and come back to fight the next day. 

Except on this night, the 3-2 loss was a bit different. Johnny Cueto matched Kershaw out for out, and while there weren’t many cracks, Kershaw and dominant closer Kenley Jansen left just enough room for the Giants to get a solid win. They could never quite get there.

“I don’t think we played poorly,” said third baseman Matt Duffy, who homered off Kershaw.

There were a handful of coin-flip moments that hurt the Giants, but ultimately they were done in by a Justin Turner solo homer off closer Santiago Casilla. On a night when Cueto and Kershaw threw so many perfect pitches — they combined for 21 strikeouts and no walks — Casilla threw Turner a center-cut slider that shot out to left field in the top of the ninth.

Casilla wasn’t available while the clubhouse was open. His catcher, Buster Posey, said the pitch didn’t “quite have the finish on it that one of his good ones does.” 

This came two days after Casilla threw Jackie Bradley Jr. a nasty two-strike slider in the ninth that catcher Trevor Brown said was the best he’s thrown all year. That inconsistency has plagued Casilla, and it’s enough to ask: Is it time for a change at the back of the bullpen?

“He’s our closer,” manager Bruce Bochy said firmly, noting that Casilla had limited right-handers to a .170 average before that at-bat. 

“He made a mistake,” Bochy said. “He gave up a homer.”

[RECAP: Instant Replay: Casilla crumbles, derails Kershaw-Cueto battle]

The first homer by a right-hander facing Casilla was one of few blunders the Giants made on a night when they could have handed Kershaw a loss for just the eighth time in 33 meetings. One opportunity went by the wayside when Brandon Crawford’s blast to center was caught at the wall, 391 feet away. The Giants had another chance to come back in the ninth, but Posey’s long fly to right off Jansen was caught 388 feet from the plate.

“I can’t hit it much better than that, that way,” Posey said. “I thought it was at least off the wall. I watched the replay and it’s like the ball is going straight down by the time the outfielder is catching it.”

Instead of having a runner on second for Brandon Belt’s ensuing double, the Giants had the bases empty and two outs. They wouldn’t score. 

“That’s a tough one to lose,” Bochy said.

It was made tougher by the fact that one of two first-inning Dodgers runs came across when Bill Welke called a balk on Cueto’s trademark shimmying delivery. Cueto said he had never been called for a balk on that move, where he rocks back and forth a couple of times as he comes to the plate.

“The ruling, when you pitch from the windup, is you have to deliver the ball without interruption or alteration,” Welke told a pool reporter. “When he rolled back he came to a complete stop and then he shook forward and back, forward and back with his shoulders, and his foot was moving. That’s interrupted and he altered his motion, that is a balk.

“He stopped, and then he rocked. The stopping … if he stops to change direction and continues, he’s ok. He came to a complete stop, he paused. One. Second thing is then he does this (rocking motion with shoulders). That’s not acceptable with a runner on base.”

[WATCH: Bochy confused by Cueto's balk: 'Gotta get some clarity on this']

The Giants were flummoxed because Cueto has been throwing that delivery in a couple times a game for years. It’s not hard to picture a team, possibly the Dodgers, alerting the league office to the fact that it should be watched, but Cueto said he doesn’t think the move is a balk. Bochy said he would seek clarification.

“He’s been throwing like that for a while,” Bochy said. “We’ve got to get some clarity on this … I’ll be honest, I’m not quite sure myself even after having it explained there.”

Ultimately the Giants marked that down as just one more moment that burned in the aftermath. On a night they faced the best in the game, a win was there for the taking. It slipped away on a slider in the ninth.

“It just didn’t go our way,” Posey said. “It could have easily gone our way, but it didn’t.”