A daughter’s memory of a vacation in Turkey is at the heart of Charlotte Wells’s astonishing and devastating debut feature.The relationship between a parent and a child is wired for heartbreak — a primal attachment headed for an inevitable double grief. Kids grow up and flee the nest. Parents die. It’s the natural order of things, calamitous even when no untimely tragedies intervene to amplify the pain.Such a tragedy does shadow “Aftersun,” the tender and devastating first feature from the 35-year-old Scottish director Charlotte Wells, but the power of the film comes from its embrace of the basic and universal fact of loss. It’s about a mostly happy experience — a father-daughter vacation in a resort town on the Turkish coast, with snorkeling excursions, hotel buffets and lazy hours by the pool — that ends in tears. Your tears.Eleven-year-old Sophie (Frankie Corio) and her father, Calum (Paul Mescal), are mostly too caught up in the delights and frustrations of the present to express much sorrow or anxiety, but they also seem aware that time is moving quickly. Sophie, on the edge of adolescence, is both hanging onto childhood and rushing toward maturity. Her eyes are always moving, scanning her surroundings for clues and portents.A young man himself — he’s about to turn 31 and is mistaken by a fellow tourist for Sophie’s older brother — Calum carries some weariness in his lithe frame. His boyish features are creased with worry. We don’t learn much about his history — Wells is not the kind of director to spoil delicate scenes with expository dialogue — but we’re aware that he and Sophie’s mother aren’t together. We can also infer some hard knocks and bad decisions in his past.Maybe in his future as well. One thing we do know about Calum — though it’s hard to say exactly how we come by this knowledge — is that he dies sometime after the vacation. From the very first scenes, the presence of camcorders and the absence of smartphones places the trip in the past. A grown-up Sophie (Celia Rowlson-Hall), who at 31 has a partner and a baby, is remembering those sun-dappled mornings and karaoke nights (she sang “Losing My Religion”) of 20 years before.It isn’t quite right to say that “Aftersun” takes place mostly in flashbacks. It also feels wrong to describe the adult Sophie’s harrowing visions of her father dancing in a strobe-lit nightclub — scenes that occasionally interrupt the Turkish idyll — as dreams. Wells is working in a more intuitive and oblique psychological register, the flow of her images attuned to the fluidity of Sophie’s consciousness, her narrative instincts following the logic of emotion rather than the mechanics of plot. The boundaries between memory and experience aren’t so much blurred as rendered moot. And by the end of the movie you understand why: because that’s how mourning works.“Aftersun” is as clear and literal as can be, following Sophie and Calum through ordinary tourist activities without much dramatic embellishment. There are moments that carry a hint of danger or unprocessed bad feeling — a misunderstanding about a lost diving mask, for example. Sophie sometimes tags along with a group of British teenagers, eavesdropping on their naughty banter and observing their horseplay with an eagerness that might make a watchful parent anxious. (She also flirts with a boy her own age, a fellow devotee of motorcycle-racing arcade games.) You might raise an eyebrow when Calum orders a third beer at dinner and wonder if he’s really mature enough to take care of his daughter on his own.Late in the film, Calum’s fecklessness and Sophie’s curiosity open the door to some scary possibilities. But “Aftersun” isn’t a child-in-peril melodrama, or a punitive fable of parental irresponsibility. Its structure emerges through a pattern of perceptions and moods. Sometimes Sophie and Calum quarrel, get on each other’s nerves or fail to connect. Sometimes they’re bored, sometimes silly, and sometimes they relax into an easy, almost wordless intimacy.Capturing the thick, complex reality of their bond — registering its quick, microscopic fluctuations and tracking its slow tectonic shifts — is Wells’s great achievement. And Mescal and Corio’s as well. They are so natural, so light and grave and particular, that they don’t seem to be acting at all.It’s hard to find a critical language to account for the delicacy and intimacy of this movie. This is partly because Wells, with the unaffected precision of a lyric poet, is very nearly reinventing the language of film, unlocking the medium’s often dormant potential to disclose inner worlds of consciousness and feeling. She and the director of photography, Gregory Oke, favor compositions that evoke the jerky anti-symmetry of amateur video. (Wells also incorporates camcorder footage shot from Sophie and Calum’s perspective.) This isn’t to say that there’s anything haphazard about the images, which weave a fabric as fine and coherent as the carpet Calum impulsively buys, even though he most likely can’t afford it.The rug is purchased at one of the rare moments when Sophie and Calum aren’t together, which is to say a moment that falls outside her memory even as it is part of her own story. Or rather, a piece of the story she and her father wrote together, which she has lived to tell.AftersunRated R. Some bad words and tough situations, but nothing a sensitive adolescent couldn’t handle. Running time: 1 hour 36 minutes. In theaters. More