Stick's suggestions are excellent. A 2x construction will be very heavy if you are going to have to lift it out of the way, so 1x construction in a decent hard wood is probably a much better choice. What you are describing is more of a stair way than a ladder. Using lighter, higher quality, kiln-dried material will make it easier to fold the ladder up into the ceiling, a desirable quality for a space you may want to reach only occasionally.
You can buy commercially made folding, retractable ladders built just for this purpose. You cut out the ceiling between stringers to create the space, screw or bold the ladder assembly into the sides of the stringers and you're done. Unless you are carrying 100 lb items up and into the crawl space, one of these should do the trick. Or, at least study one and duplicate it.
Notice the metal plates connecting the 3 sections of the ladder. Each allows the next section down to fold up onto the higher section. This gives you a stak of three sections that fit into the recess. The run from about $350 to about $450 at Lowes. They are made of better quality wood and include trim to make it look nice.
Part of the price is for the liability involved with any ladder. If someone climbs a Werner ladder, for example, Werner faces the lawsuit. Who will face the music if someone slips on your ladder, or it separates and collapses on someone? With ladders, liability is a consideration. For example, what about if you have a person come in to replace the attic fan, or add or repair wiring, or handle a gas or water pipe leak, or movers coming in to clear out the stuff up there?
At least go and check out the commercial models.
The more I do, the less I accomplish.