Raised in a tiny New Hampshire village, population approximately 400, Robert Eggers frequently let his imagination stray to the rural area’s occult past — a sensibility that feeds into his Sundance-bound directorial debut, “The Witch,” a remarkably authentic, period horror movie set among a family of superstitious Puritans, circa 1630.

“In the town where I grew up, there were lots of dilapidated old colonial farmhouses and graveyards hidden in the middle of the woods,” recalls Eggers, who liked to make up stories about local ghosts and spooks with his friends as a kid. “The Witch” may as well be one of those creepy alternate histories come to life, fleshed out with rigorous, period-appropriate details: The devout Calvinist characters speak in arcane, half-forgotten expressions; they work on a painstakingly reconstructed early-17th-century farm; and they live — and die — by beliefs true to the time.

“I don’t necessarily think that period accuracy equates with good storytelling,” Eggers explains, “but here, we needed to believe in the witch, and the witch is as real for us as the dirt under their fingernails and the mud-dung walls of their house.”

Ah, the mud-dung walls — just one of the details Eggers was determined to get right. The helmer, an admittedly obsessive fellow who previously made ends meet working as a production designer on other directors’ indie features, has an eye for the little things that give the film both its atmosphere and authenticity. Like using “trunnels” in place of nails when constructing the main house. Or locating special artisans to make the clapboards that sheathe that building.

“They have to be hand-riven with a froe out of white oak or red oak or they just don’t look right. We had to find artisans in Massachusetts and fly them up,” says Eggers, who spent long hours in the Plimouth Plantation library doing research and enlisted British historian Stuart Peachey for added credibility.

Through it all, the director would picture the world like a little dollhouse in his head, complete with little doll clothes, forks and knives and so on — “even though there were no forks in 17th-century European dining,” he says, quickly amending his own analogy. “You would use a spoon, and then you had a knife that you would carry with you at all times, which also served as your dining knife — for this economic class.”

Audiences probably won’t notice such details when they watch “The Witch,” but they serve to lend the film its uniquely unsettling tone. “I wanted the film to feel like a nightmare from the past, like an inherited nightmare that a Puritan might have had,” says Eggers, who has other projects up his sleeve that also trade on such detail-oriented world-building. “I’m not interested in the world that we live in today. It’s nice, but I find it kind of boring. I’m looking at fairy tales and ghost stories and myth and religion.”