"the use of particular materials, precision engineering, and slim custom components"
All of the above require R&D. Techniques for unibody construction for example required a lot of R&D in machining parts, precision opening of ports, and so on.
Interesting video about how the only reason you even need a fan in the mac book pro is because how hot the shell of a laptop is allowed to get is legislated so you don't burn yourself on it.
Some is a huge R&D spend, the bill of materials, and assembly techniques.