One night about two years ago, Panos Panay couldn't sleep. This happens a lot: he wakes up in the middle of the night, loud thoughts rattling around in his head. Panay popped off the pillow, reached for his new Surface Pen and his old Surface Mini, and wrote himself an email. (He loves the Mini, a small tablet his team built but never shipped. "It was like a Moleskine," he says. "It was awesome.")

These delirious bursts of late-night energy tend to be when Panay's most creative, and this particular witching hour, he had portable computers on the brain. The day before, he had led a review for a top-secret, still nascent project within Microsoft—to create "the ultimate laptop." The team responsible for the product, which was called Surface Book, showed up and said, okay, we've done it. It's going to be thin, light, cool, and fast. It's going to be an awesome laptop.

"No, no, no," Panay had thought during their presentation—a variant of notebook computer. Now, awake in bed, he wrote himself an impassioned email about the legacy of Surface, and how they couldn't just build a laptop. "That’s not evolving the category; that’s not showing people where it could go."

Panay, an athletically built 43-year-old sporting a gold chain and flecks of gray in his thick hair, is Corporate Vice President in charge of all of Microsoft's devices. That means webcams, headsets, Xbox, and the millions and millions and millions of mice and keyboards the company sells every year. (There's more, actually, but do you want to hear about display adapters?) The project he's been having the most late-night revelations about lately, though, is Surface.

Surface is Microsoft's attempt to take back what the PC market ceded to the MacBook. But it's more than that: According to Panay, Surface is about reinventing categories. "How could we possibly feel proud of making the best laptop? That wasn't reinventing anything." Microsoft is a company the world left behind; Panay is instrumental in its bid to catch up, and part of the reason why is because he knows that building better laptops is exactly how you don't blow peoples' minds.

So Panay's team set a different goal: to reinvent the laptop. They spent two years designing, prototyping, and fine-tuning—all to get to the Surface Book that goes on sale today. It's the product of everything Microsoft has learned from making the first Surface machines, and from watching Apple eat its lunch. It's a story right out of Cupertino, really: A small group of creatives sits in a room together, passionately slaving over every tiny detail of a product until it's perfect. To go after Apple, Microsoft learned from Apple—and then found a few places to take right turns toward the future it imagines. It cost Panay much more than one night's sleep.

A Late Arrival

For most of its history, Microsoft didn't make computers. There was no need; its software was on most of the world's machines anyway. But over the last decade, users began to demand a more integrated experience. They wanted computers designed specifically for their software, and software meant to make their devices better. Apple controlled both hardware and software, and that allowed an experience Microsoft couldn't match.

There was one question everyone kept asking Panay: 'When are you going to build a laptop?'

When it was released in 2012, Windows 8 promised a new breed of devices, and Microsoft was going to build the best one. Panay and his team used to walk into stores and ask the salespeople what they should buy for, say, going back to school. They always got the same question back: What do you want to do with it? For some things, a tablet was perfect; for others, you really needed a laptop. But why? Panay figured replacing two devices with one could be a cash machine.

The first Surface hybrids were poorly received, didn't sell well, and forced Microsoft to take a $900 million writedown. But Panay kept pushing. When Surface Pro 3 launched in 2014, the marketing message changed. The tagline became "the tablet that replaces your laptop," and Microsoft specifically pitted the device against the MacBook Air rather than the iPad. Sales, satisfaction scores, and profits all rose.

Ian Bates for WIRED

Even as they drove on the tablet front, the Surface team started to look around again. "I'm thinking continuously about premium devices," Panay says, "straight-up looking at Apple as my competitor." He knew how to take on the MacBook Air, but what about the MacBook Pro? The team talked to lots of people about why they loved their computers, taking notes and formulating ideas for the next Surface device.

He noticed something, too: everyone kept asking him, "When are you going to build a laptop?"

Eventually they decided, fine: They'd build a laptop. They just had to figure out how to make one that was both instantly usable and radically new.

The Design

Building 87 is a low-slung gray building a five-minute drive from the center of the Microsoft campus in Redmond, Washington. The exterior doesn't seem to have changed much since Microsoft bought it from insurance company Safeco in 2006. It's dark and has few windows, which suits the Surface team perfectly.

Panay opens a door and we walk into to a clean, loud space full of CNC mills, waterjet machines, and many other whirring boxes. The room is basically a scale model of the Surface Book's real production facilities in China. "Take this," Panay says, sweeping his hands around the room like Mufasa on Pride Rock, "and multiply it by 100." They built this lab so they could iterate constantly.

They really have no choice but to move fast. "It's not like we're ahead right now," Panay says. "Now we have momentum, and we have some category creation...but it's not like if we slow down it's going to be OK." Every day matters, he says.

When the team started talking about what they could do with a laptop, the initial plan came together quickly. This thing had to be the best-looking, most powerful, most impressive laptop you've ever seen. "That's the baseline," Panay says. "I want everyone to look at this product, and say, 'This is it, man. This is the laptop I want.'" That, he says, would have been easy.

After we leave the model-making room, Panay stands at a long black table in the design studio. Around him, designers and model-makers work quietly at blonde wood desks, shielded by glass walls from the loud prototyping machines a room away. He places one of the very first Surface Book prototypes in front of him. It's just two pieces of black illustration board that unfold like the covers of a hardback book, with a piece of yellow tape around them that says "Surface."

I want everyone to look at this product, and say, 'This is it, man. This is the laptop I want.' Microsoft Surface VP Panos Panay

"Ralf [Groene, the lead Surface designer] came into my office and said, 'Let's just make a laptop.' This was the first thing Ralf brought in. He was like, 'It's like a book!' I was like, 'It's awful.'" Yet it became the founding metaphor of the project: a book. One of the two Groene made is still in Panay's office.

"I think that was such a cool symbol for us to refer back to," says Surface industrial designer Kait Schoeck, "that you're just making the best possible laptop."

Schoeck and Groene have prototypes, not just sketches, for almost everything they've ever thought of. There's one from very early on with a surprising shape for a laptop—Schoeck calls it "a folio teardrop shape." It folds over, keeping the two parts slightly separated, like a notebook or a rolled-up magazine. They'd started thinking about it when a colleague brought folio folders back from Japan. Groene loved the metaphor: "You put your digital stuff in there," he says. "It kind of feels familiar." But they eventually shelved the idea as just one of many, and moved on to other prototypes. They were moving quickly, building the best laptop they could imagine.

"And then pause." Panay literally pauses for effect as he tells the story. "What's the one thing?" This is something the Surface crew doesn't talk about often, but it's core to their ethos. They want to check every box, nail every category...and then shock you with something you never saw coming. Something distinct to Microsoft, distinct to Surface. It couldn't just be a great laptop—it needed one more thing.

"The one thing became simple," Panay says. "And then..." He pauses again. "Detach."

Split Personality

Imagine a device that is like the Surface Pro in reverse: It's mostly laptop, maybe exclusively so for some people, but there are tablet-like features when you want them. That was the that image formed in Panay's head early on. It wouldn't be a tablet, though—that part was important. Panay took to calling it a "clipboard" instead, something you grab when you need it for a specific purpose. Maybe you're an architect, showing blueprints to a client. Maybe you're a doctor carrying charts. Maybe you're showing off new logo designs. Maybe you just want to read in bed. It would do those things, and well, but not at the expense of being a laptop.

The team that dreamed up "the ultimate laptop" was quite literally forced back to the drawing board. They needed to make a notebook that had great looks, pen and touch support, monster specs, and a tablet mode? Even generous math made it sound impossible. "If you put a tablet that weighs a pound on the top," Groene says, "you need a base that weighs a pound plus something." A powerful tablet needed a heavy base, which meant a heavy laptop no one will like—unless you could do something crazy, like make the base bigger as you opened the hinge. But that would never work, because—wait a second.

The Surface team fell in love with what's known as muscle wire, an alloy that can change shape in response to force or electricity.

The team's once-shelved folio teardrop was the solution to their problem. As the rounded hinge unrolled, it could extend the base of the laptop; that sturdier foundation would keep it from tipping over backward. "It's more stable," Groene says. And light, too, shaving "hundreds of grams" off of the machine. He picks up old prototypes now, he says, and they feel like bricks.

Once they figured out how to get the laptop to stand up on its own, they began to work on how to take it apart. "It's easy to think about the attach and detach as being emotional," Panay says, "or confidence-building. You don't ever want the moment to happen where the person who loves your device tries to use it and gets embarrassed." Even more important: The Surface Book could never, ever detach unless you wanted it to.

There are a hundred different levers, switches, and sliders that release one thing from another. The Surface team developed a term for these: clickety-clack, and they wanted nothing to do with that stuff. Anything clickety-clack "is a gimmick," Panay says. He twists his Surface Book wildly in demonstration, making noises all the time: click click chunk click thunk click click. Then he looks at me. "It's not a transformer."

The Surface team fell in love with what's known as muscle wire, an alloy that can change shape in response to force or electricity. Schoeck shows a clunky magnesium prototype, that doesn't really do anything except detach and re-attach. She presses a button in a cut-out portion of the Book's cracked screen, and the rows of muscle wire exposed down below contract. This is the core of the release mechanism, and it's incredibly elegant. Even now, Schoeck and Panay both light up watching it happen. "It was kind of a magical moment when we saw this work," Schoeck says.

A couple of times, Panay says nearly verbatim that twee-est of maxims that Apple has adopted for itself: "There are a thousand no's for every yes." Sometimes the no's are easy—in fact, there's a building full of prototypes in the no bin. But sometimes no's are hard.

When they began thinking how you'd detach the top from the bottom, someone presented an idea. What if you swiped your finger along the finger scoop—the divot where you grab the lid to open the laptop—to release the top? And what if, while you were doing it, a small strip of LEDs would glow green to let you know it was ready to detach? It felt space age-y, and they could all imagine how cool it would look: the green lights lighting up, and click-click, the screen pops off. Everyone loved it.

Getting a strip of LEDs to come through a magnesium body was hard, but they did it. Getting magnesium to sense your finger reliably—also hard. But they did it. "We actually solved it," Panay says, but it was the wrong solution. You'd have to do it just right, and maybe try it a few times, and your palm might accidentally do it for you. "It's so gimmicky," Panay says. "It was almost clickety-clack. We fell into our own trap. It was great for the commercial, but stupid for the product."

Instead, they landed on a single key, at the top right of the keyboard. You have to hold it for a second, because the team doesn't want you to hit it by accident. But it's as simple as possible. Hold it down and the screen lifts off. A five year-old can do it. Panay knows, because they had some five-year-olds try it.

A Laptop First, But More Than Just a Laptop

The Surface Book has been in process for two and a half years. It's been on the table with the engineering team for two years, and prototypes have been filling the lab for 18 months. Until nine months ago, though, no one outside the Surface team had seen it. That was when, on an executive retreat, Panay was asked to show Microsoft's most senior employees what he'd been working on.

No one outside of Microsoft employees and the occasional privileged family member saw that the Book's screen could detach until about a month before launch.

Panay pitched the Surface Book as the ultimate laptop. He showed them the hinge, the keyboard, the beautiful screen. "They were like, 'Whoa!'" he says. And then, detach. Everyone in the room—Satya Nadella and the rest of the company's leadership—freaked out. "It felt like a magic trick," Panay says.

That reveal became both a game and a test. Panay decided that they would only talk to people about it as a laptop. "And then when people look at it and say, it is worth every penny as a laptop...we give you so much more." Even when Panay and his team began showing the Surface Book to partners and retailers, they never, ever detached it. "No matter what demo I do," Panay told his team, "no matter what retail meeting I'm in, no one gets to see it with the top off." They disabled the function, and even took the key off the keyboard. No one outside of Microsoft employees and the occasional privileged family member saw that the Book's screen could detach until about a month before launch.

The Surface Book, Panay likes to say, isn't a first-gen anything. It's the result of everything he, his team, and Microsoft have learned in the last five years. About how to make touchscreens, pens, keyboards, and trackpads. About what failure looks like, and how to set a vision long enough that a $900 million writedown doesn't break you. It's to think hard about how to make people's lives better, and then give a shit about getting it right.

"You ended up in a place with that passionate plea of, 'No, no, I love what I'm making and I want you to hold it and I want you to feel that love.' And that is the full circle of a product."

The Surface Book is on sale today. Pre-orders have been huge—Panay says they're selling laptops faster than they can make them. He's crystal-clear on the importance of this device to Microsoft's business, especially on the heels of the Surface Pro 3 and 4, which gave the Surface line its first real momentum. But as soon as we start talking about it, he gets distracted by a CNC machine that's milling a Surface Book's bottom bucket. Panay just watches it for a moment, carving over and over to form the antenna gap. A few machines away, another machine works on a prototype of a new phone. And there are rooms everywhere in Building 87—top-secret ones—filled with new devices. Panay has to go check on them, too.

But before he leaves, he has one more thing he wants to talk about: the tiny rectangular holes in the perimeter vent around the edges of the Surface Book's screen. You can look at them, he says, "and you will find every single gap identical. If a build came back, and the third gap here was slightly off..." he trails off, and Schoeck starts laughing. This is not a hypothetical situation. There were fights about this—followed by lots of work to fix a tiny thing maybe no one would ever notice. Panay and his team are, to borrow a phrase, committed to painting the back of the fence. When I ask why, he thinks for a moment. Then he shrugs. "It's supposed to be like that!"