I had my own loopy reason for deciding to travel to Croatia. “You will find the god of happiness there, in the town of Trogir,” my friend Ksenija told me.

A woman who tends to talk in riddles, Ksenija is also usually right about things, and knows her native Croatia well. So I trusted her.

Most people, though, visit the country for more rational reasons. Savvy European travelers have come to view Croatia’s Adriatic coast as a balmy, less expensive alternative to crowded Mediterranean retreats; the sun is as steady as anywhere in Italy or Greece and the sense of history just as palpable. And they have been followed recently by the country’s new pop culture fan base: “Game of Thrones” obsessives who want to see where all the high-pitched carnage was filmed.

Neither group, I realized after I landed in the country this fall, was going to be disappointed. The chic style-makers looking for a gold coast of sandy beaches, yachting clubs and al fresco cafes will find those in spades along Croatia’s coast. The long arc from Dubrovnik north to Split and Trogir is essentially one intermittent resort. And the Gamers will understand immediately why this string of seaside cities made for the best location shots. These aren’t just historic towns. Stony, gothic and haunting, they resemble a mythic landscape.

That was obvious as I walked through my first Croatian pit-stop. Dubrovnik is a medieval showstopper; its still intact city walls circle a largely untouched center of cobbled streets and Gothic landmarks.

The word is out. Crammed with enough cruise ship day-trippers to make Venice look like a tourist-free zone, the city has devolved into a selfie-stick war zone. “Game of Thrones” has become pretty much the only game in town. If you’re looking for bars pitching Game of Cocktails drinks and shops hawking Jon Snow fridge magnets, Dubrovnik is your tele­genic ground zero.

Centuries of history

At night, when the cruise ships leave, the city settles back into an authentic dreamscape, but I wanted to find a quieter taste of Croatia. About 140 miles north, Split comes close. While a scrim of brutalist concrete high-rises now fan out from the city’s center, Split’s historic core is a revelation. Built into the ruins of a sprawling Roman palace, the old town is a duet of classical columns and medieval churches that embrace centuries of history.

But I wasn’t ready to stop. Impelled by Ksenija’s cryptic promise, I headed another 18 miles northwest to Trogir, looking, as we all are, for happiness embodied. The town came through, if only because happiness, for a traveler, is finding the perfect place to stop.

Sitting pretty on its own island, framed by the Adriatic Sea, Trogir is all of Croatia’s promise bundled into one compact beauty spot.

Founded in the third century by the Greeks and successively ruled by Romans, Venetians, Austrians and French, Trogir kept getting built up in layers. The result — one of UNESCO’s first World Heritage Sites — is a primer of Gothic, Romanesque and Renaissance architecture. The compilation of period pieces, though, oddly reads like a coherent masterwork. It’s a sustained huddle of stone townhouses, pitched red terra-cotta roofs and green wooden shutters, seamed by polished stone streets that gleam like marble. Wildflowers, tufts of weeds and vines sprout from the old stone, dripping down the sides of buildings. The compact village feels almost organic, whittled down over time. At noon the whole town is burnished by an almost molten glow, as the golden stone soaks up the Dalmatian sun.

Wandering down the winding narrow streets, fringed by sheets hanging from clotheslines, feels like a history lesson, but a few star-turn landmarks lend real gravitas. The town’s Monastery of St. Dominic is impressive enough to have appeared as Qarth, the greatest city ever built, in “Game of Thrones.” St. Lawrence Cathedral, looming over the main square, is a tour de force of ecclesiastical riches, its side altar framed by two gilded angels who seem to levitate when the sun hits all that gold leaf.

A happy place

I was drawn, though, to another landmark.

“Happiness,” Ksenija teased me in her e-mails, “is in the monastery of St. Nicholas.”

The monastery sits just down a side street from the cathedral. Every day I stopped there, but found the door shut.

“Is there some kind of key?” I asked pretty much everybody I met.

“No,” a neighboring shopkeeper finally told me. “The resident nun decides when to open the door, at her own whimsy. Sometimes it stays shut for days.”

I would have lost patience, but Trogir offered distractions while I patiently bided my time. Popping up as Croatia’s newest style center, the town has recently become the site of several boutique hotels — really urban resorts — that add a contemporary, chic shine to all that history.

Most impressive is the Brown Beach House, where I stayed for the week, located a 10-minute walk outside of town. It’s a model of glossy, sleek modernism, from its guest rooms, all nautical, crisp blue and white, to the turquoise- and black-tiled pool that reflects the Adriatic Sea just beyond. A spa offers hot stone massages and facials. A lounge features a wall of photography and interiors books. An al fresco, terraced dining room proffers one more of Trogir’s unexpected treasures. If Croatian food hasn’t yet trended, its time is probably coming.

The area is a culinary treasure trove of fresh seafood and meats, especially lamb, the chefs told me. One noted that Trogir’s name translates as goat island or goat town, referencing, historians think, an early herd of sheep grazing on the surrounding hills.

In the Brown restaurant, Cartina, that local larder buoys the menu. My grilled calamari came tossed with fresh tomatoes. A sea bass sashimi was roused by yogurt and coriander, and fat local shrimp were wreathed with pan-fried spring onions and confit lemon.

The Croatian feast proved just as impressive in Trogir itself, where restaurants like Dan Dino, anchored by a central stone courtyard, were showcasing octopus salad, a swordfish and sea bass carpaccio paired with sliced apples and pistachios, and a meaty lamb shank in wine sauce. The bigger surprise streamed out of the cafes that lined Trogir’s seaside promenade under palm trees. The town’s Venetian past infuses some of the best Italo-Med food this side of, well, Italy, from Adriatic shrimp and truffle risottos to pizzas the size of tractor wheels.

All that was almost enough to turn my wait into a happy one, but my impatience grew as I passed the St. Nicholas Monastery every morning, hoping the door would finally swing open. But it didn’t. Tuesday it remained firmly closed. Then Wednesday. And then Thursday. So I looked to Trogir’s final diversion while I killed time: a surprisingly intriguing network of shops.

Sure, there was the usual tacky souvenir detritus, but there were also gourmet grocers specializing in everything having to do with truffles, from truffle oil to truffle carpaccio, and all-lavender/all-the-time shops stocked with lavender satchels, wands, soaps and oils, and some boutiques featuring linens hand-embroidered with pastel garlands.

Then on Friday, my last day in town, the monastery door was ajar. Just inside, the gatekeeper nun was sitting at a table, beaming, looking as if she’d been waiting for me, finally giving up her tease.

At first I wasn’t sure what I was looking for. The monastery museum appeared to offer only a scrappy collection of bad saints paintings and ecclesiastical vestments that seemed more sad than happy. But then I turned a corner into the central gallery and there, spot-lit like the annunciation, hanging under glass, was a pagan vision that looked totally out of place yet was clearly revered. It was a bas-relief fragment of a beautiful nude boy, racing toward some unseen bliss, his streaming hair unfurling over his forehead, his arms outstretched, his muscles all straining forward, seized by joy, embracing the moment.

“A relief of Kairos, a son of Zeus, and the deity of happy moments, made in the period between the fourth and third century B.C.” the fragment’s label read. “The deity warns people that they need to appreciate that happiness exists before it is too late to enjoy.”

This wasn’t the god of happiness but the key to happiness — the god who knows that happiness is in the passing moment, and that the moment exists only if we recognize and savor it. In other words, he is the god of the fleeting moment of happiness. I wasn’t going to let it flee. Not this time.

Stepping out into a gleaming Trogir just as the noon sun turned everything gold, I stopped, listened to the cathedral bells ring and gave the moment its beatific due, before it had time to slip by unseen.

Raphael Kadushin, senior acquisitions editor at the University of Wisconsin Press, writes for Epicurious.com, Condé Nast Traveler and other media.