Ava DuVernay’s “A Wrinkle in Time” achieved landmark status even before reaching the theaters. That’s good, because it won’t manage that based solely on its cinematic merits. DuVernay aims high but doesn’t always hit the target.

The adaptation of Madeleine L’Engle’s eerie, mystical, young-adult sci-fi novel from 1962 was budgeted at over $100 million, the largest budget a woman of color has been handed for a film. DuVernay is only the fourth female director to receive that kind of budget for a project, and in tackling what many in Hollywood considered an unfilmable book, she has taken an enormous swing. That alone is worthy of recognition.

DuVernay (“Selma”) marshaled an array of star power to inhabit L’Engle’s tale, with Oprah Winfrey, Reese Witherspoon and Mindy Kaling stepping into the roles of the Misses; supernatural, deity-like beings who guide the young Meg (Storm Reid) on her journey through space and time. It’s almost laughably appropriate casting for Winfrey, who embodies the wise, godlike presence Mrs. Which.

Underneath the sci-fi and fantasy elements of both the book and the film, the story is quite basic: a young girl sets out to find her missing father (Chris Pine). She may travel through fantastical worlds while being guided by mystical forces, but ultimately, this is a story about reuniting a family.

Screenwriters Jennifer Lee (“Frozen”) and Jeff Stockwell (“Bridge to Terabithia”) have kept the story simple and earnest, the necessary foundation for the fantastical set pieces that DuVernay crafts. Meg, her precocious younger brother Charles Wallace (Deric McCabe) and their friend Calvin (Levi Miller) travel through space and time, from verdant and vibrant planets to the dark, reality-bending space of Camazotz, where her father is believed to be stranded.

DuVernay shoots for the stars with a highly stylized look and energy to the film that’s both visionary and referential. It’s very much akin a children’s fantasy adventure film from the ’80s or ’90s. The quirky Misses, especially Witherspoon’s Mrs. Whatsit, are clearly indebted to Zelda Rubinstein’s performances from “Teen Witch” and “Poltergeist.” In certain moments, it feels a lot like “The NeverEnding Story,” in others, it’s closer to the Robin Williams vehicle “Toys.”

When “Wrinkle” is firing on all cylinders, it’s a transporting adventure that brings you back to the imaginative adventure of childhood, when the stakes were clear, and always high. The goals are straightforward, and the film wears its heart plainly on its sleeve. It’s not often that we see purely straightforward films that are simply about vanquishing darkness with the light from within us. That’s exactly what “Wrinkle” is about, and it never hides or nuances that message.

But there are times when the film doesn’t flow. The tone and style are often herky-jerky and affected, especially with the Misses. The edit isn’t smooth; it skitters and yanks, often to alert us to shifts in the film’s reality, but it’s jarring and uncomfortable.

Some of the more action-packed moments devolve into a jumble of grayish CGI, losing all of the carefully honed world-building. Even worse, the relationship between Calvin and Meg is uncomfortably romantic and distracting.

DuVernay has set out to make an ambitious fantasy epic, and in many ways, she succeeds. Pine is wonderful as the reckless but inspirational dad, and McCabe is a breakout star, stealing the film from his co-stars. Many moments are beautiful and surreal — but others are just plain weird (and not always in a good way).

If it doesn’t always work — and it doesn’t — at least DuVernay went for it, and her version of “A Wrinkle in Time” is just as gorgeous and strange as can be expected.