/* Sam's article — A Real Home Gym in a Garage Corner (Under $600)
 * Format: Sam editorial — Crumbs, Hero, Lede, WhatYouNeed, Steps, Affiliate, HotTakes, Signoff.
 * Buildout piece, NOT a shopping list. Affiliate: /go/sam-garage-gym, rel=sponsored nofollow,
 * disclosure directly below. Exactly one affiliate anchor, in the Affiliate card only.
 * Shape variation: steps 03 and 04 run full-width (no figure) to break the two-column rhythm.
 */

const SamSays = ({ children }) => (
  <div className="sa-step-says">
    <span className="who">- Sam</span>
    <p>{children}</p>
  </div>
);

const heroImage = "cover.jpg";
const imgRack = "sam-fig-rack.jpg";
const imgFloor = "sam-fig-floor.jpg";

const Crumbs = () => (
  <nav className="sa-crumbs" aria-label="Breadcrumb">
    <div className="l">
      <a href="/">Home</a>
      <span>/</span>
      <a href="/en/contributors/sam/">Sam</a>
      <span>/</span>
      <span>Build</span>
      <span>/</span>
      <span style={{ color: "#EFE5CF" }}>Garage corner gym</span>
    </div>
    <div className="r">
      <span>Issue 08 | Summer '26</span>
      <span className="by">written by Sam</span>
    </div>
  </nav>
);

const STATS = [
  { stat: "~$600", note: "a third floor, a third rack, the rest bar and plates" },
  { stat: "5", note: "measurements to take before you fall in love with a corner" },
  { stat: "6 ft", note: "how much of the slab you actually have to level" }
];

const Hero = () => (
  <section className="sa-hero">
    <div className="img" style={{ backgroundImage: `url('${heroImage}')` }} />
    <div className="sa-hero-wrap">
      <div>
        <div className="sa-hero-kicker">
          <span>Sam</span>
          <span className="dot">*</span>
          <span>Garage + Buildout</span>
          <span className="dot">*</span>
          <span className="sig">written by Sam</span>
        </div>
        <h1>
          Everyone buys the rack first. <em>The floor is what ruins it.</em>
        </h1>
        <p className="standfirst">
          a real gym fits in one corner of a garage for about six hundred dollars, and almost none of that money goes where you think it does.
        </p>
      </div>
      <div className="sa-hero-side">
        {STATS.map((s) => (
          <div className="row" key={s.stat} style={{ gap: 18, alignItems: "baseline" }}>
            <span style={{ textTransform: "none", letterSpacing: "0.03em", lineHeight: 1.45, maxWidth: "26ch" }}>{s.note}</span>
            <span className="v" style={{ flexShrink: 0, whiteSpace: "nowrap" }}>{s.stat}</span>
          </div>
        ))}
        <div className="row">
          <span>Updated</span>
          <span className="v">Aug '26</span>
        </div>
      </div>
    </div>
    <div className="sa-hero-scribble" style={{ top: "18%", bottom: "auto", right: "5%" }}>
      measure to the <u>opener rail.</u> not the ceiling.
      <svg viewBox="0 0 60 30" fill="none">
        <path d="M2 22 C 12 8, 28 4, 56 12" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
        <path d="M48 6 L 56 12 L 50 20" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none" />
      </svg>
    </div>
  </section>
);

const Lede = () => (
  <section className="sa-lede">
    <div className="sa-lede-wrap">
      <aside className="sa-lede-side">
        <div className="marker">In this one</div>
        <ul>
          <li>Measure five things</li>
          <li>Pick the corner by the ceiling</li>
          <li>The floor is the build</li>
          <li>Where the rack goes</li>
          <li>Heat, damp, the door</li>
          <li>Worth it / not worth it</li>
        </ul>
      </aside>

      <div className="sa-lede-body">
        <p className="dropcap">
          my first garage setup lasted eleven days. not because i quit — because the bar kept rolling. i had a rack, a bar, a pile of plates and a slab of concrete that ran quietly downhill toward the door, which is what garage slabs do on purpose so that water leaves the building. i had never thought of it as a floor. i had thought of it as the place the equipment goes.
        </p>
        <div className="sa-pullquote">
          <p>
            a garage gym is not a shopping list. it's a small construction project that happens to end with a barbell on it.
          </p>
        </div>
        <p>
          the good news is that the construction half is the cheap half — mats, plywood, a bag of shims, one bad afternoon — and the equipment half is the part where you're allowed to be patient, buy used, and wait for the rack you actually want. build the corner first. let the gear arrive at whatever speed your bank account allows.
        </p>
        <p>
          six hundred dollars, roughly, splits about a third into the floor, a third into the rack, and the rest into a bar and enough plates to be annoying. prices move constantly, so treat that as proportions rather than a receipt. what matters is the order: people who buy bar, plates, rack, floor run out of money at the floor — and the floor is the part that decides whether they're still doing this in march.
        </p>
      </div>

      <aside className="sa-margin">
        <span className="lab">Sam's note</span>
        <h4>Eleven days</h4>
        <p>
          the first attempt lasted eleven days. the second one is three years old and still there. the difference was the floor.
        </p>
      </aside>
    </div>
  </section>
);

const WhatYouNeed = () => (
  <section className="sa-need">
    <div className="sa-need-wrap">
      <div>
        <div className="sa-need-head">00 / Before you fall in love with a corner</div>
        <h2>
          Measure <em>five things</em>
        </h2>
        <p className="body">
          not a tools list. a measurements list. every one of these has ended somebody's garage gym after the equipment had already arrived, which is the expensive order to find out.
        </p>
        <p className="body">
          do all five in one pass with a tape, a level and a stick of chalk. it takes twenty minutes and it is the entire difference between a corner that works and a corner that gets rearranged in a hurry.
        </p>

        <div className="sa-need-dont">
          <span className="lab">Do not buy</span>
          <ul>
            <li>
              A rack taller than your lowest ceiling obstruction
              <span className="why">the discount does not raise your roof. measure to the opener rail, not the ceiling.</span>
            </li>
          </ul>
        </div>
      </div>

      <ul className="sa-need-list">
        <li>
          <span className="item">
            the ceiling at its lowest obstruction
            <span className="why">not the ceiling. the lowest thing over your head, usually the opener rail or the door track.</span>
          </span>
          <span className="qty">M1</span>
        </li>
        <li>
          <span className="item">
            where the door panels travel
            <span className="why">open it and watch the arc. that space belongs to the door, and the door does not check first.</span>
          </span>
          <span className="qty">M2</span>
        </li>
        <li>
          <span className="item">
            the car's real footprint
            <span className="why">chalk it while the car is parked, driver's door open. a gym that needs the car moved is a gym you use twice.</span>
          </span>
          <span className="qty">M3</span>
        </li>
        <li>
          <span className="item">
            which way the slab falls
            <span className="why">level it in two directions. it runs toward the door. that's not a defect, that's drainage.</span>
          </span>
          <span className="qty">M4</span>
        </li>
        <li>
          <span className="item">
            what's behind the drywall
            <span className="why">stud spacing — and whether that wall is shared with somebody's bedroom.</span>
          </span>
          <span className="qty">M5</span>
        </li>
      </ul>
    </div>
  </section>
);

const STEPS = [
  {
    n: "01",
    phase: "Layout | pick by the ceiling",
    title: "Pick the corner by what's above it, not what's on the floor.",
    flip: false,
    body: (
      <>
        <p>
          the floor plan isn't the constraint. the ceiling is. you need clear air overhead for two things — pressing something above your head, and hanging from a bar — and a garage ceiling is the most cluttered ceiling in the house. the opener rail runs straight down the middle of the bay. the door track curves in along both sides and then flattens out overhead. the light fixture hangs wherever the last owner felt like putting it.
        </p>
        <p>
          so measure to the lowest thing above you. that number is your real height, and it's routinely eight to twelve inches shorter than the tape says when you point it at the ceiling. in most garages the honest air is in the back corners, past where the door panels come to rest.
        </p>
        <p>
          then open the door and watch it move. the panels travel through an arc on the way up and live overhead on the way open. that volume is not negotiable, and it moves whether or not your bench is under it.
        </p>
      </>
    ),
    tip: { lab: "the rail is the enemy", text: "the opener rail runs down the middle of the bay. the back corners are where the ceiling tells the truth." },
    fig: { img: imgRack, tag: "Fig 01 | Clearance", cap: "the gap between the top of the rack and the door track is the measurement that decides the rest." },
    says: "measure to the opener rail. not the ceiling."
  },
  {
    n: "02",
    phase: "Floor | three honest stacks",
    title: "The floor is the build. Everything else is shopping.",
    flip: true,
    body: (
      <>
        <p>
          <strong>rubber stall mats.</strong> three-quarter inch, dense, sold for barns, and the standard answer for a reason. genuinely heavy — get a second person, this is not a solo carry — and you cut them with a fresh utility knife blade and a metal straightedge over several passes. per square foot nothing else comes close, and they will outlive the house.
        </p>
        <p>
          <strong>interlocking foam or thin rubber tiles.</strong> light, fast, no cutting drama, completely fine under dumbbells and bodyweight work. under a loaded barbell they migrate — the seams walk open and you end up standing over a gap. good for the stretching end of the corner. not for under the rack.
        </p>
        <p>
          <strong>plywood and rubber — a platform.</strong> two layers of three-quarter-inch ply with rubber on the outer thirds and bare ply down the middle. this is the piece that earns its money, because it does three jobs at once: takes the impact of a dropped bar, gives you a flat surface on a sloped slab, and physically defines the six feet you lift in.
        </p>
        <p>
          which brings up the slope. you are not leveling a garage. that slab was poured to fall toward the door, and correcting the whole thing is a concrete job with a concrete bill. you level the six feet under the bar — shims under one edge of the platform until a level sits still — and you leave the rest of the slab doing the job it was poured to do.
        </p>
      </>
    ),
    warn: { lab: "Before you cover anything", text: "tape a square of plastic sheeting to the slab, all four edges, for two days. condensation on the underside means moisture is coming up through the concrete. seal it first — rubber laid over a damp slab traps it, and in six months the smell explains the situation before you do." },
    fig: { img: imgFloor, tag: "Fig 02 | The seam", cap: "one lifted corner tells you everything about the slab underneath it." },
    says: "you're not leveling a garage. you're leveling six feet of it."
  },
  {
    n: "03",
    phase: "Rack | placement + anchoring",
    title: "Set the rack where the wall helps, and know what you're bolting into.",
    wide: true,
    body: (
      <>
        <p>
          a free-standing rack wants its footprint plus a walk-out. push it against the back wall and you get floor space back, but you may lose the room the bar needs behind it — most people discover this mid-bench-press, which is a bad time to discover anything.
        </p>
        <p>
          leave clearance in front too. enough to step out of a rep that isn't happening. if the honest answer is "i'd have to shuffle sideways," move the rack.
        </p>
        <p>
          anchoring, deadpan: a tall rack you intend to hang off is more stable bolted into the slab, and yes, that is a permanent hole in your concrete. it's the right call if you own the place. what is <em>not</em> a substitute is bolting a free-standing floor rack to drywall. wall-mounted folding racks anchor into studs because they are a different product, engineered around that load path. a floor rack isn't. if you rent, buy the heavier free-standing rack with the wider base, load the base with plates, and skip the drilling entirely.
        </p>
        <p>
          and if the wall you picked backs onto a bedroom — pick another wall. i'm not explaining that one at six in the morning.
        </p>
      </>
    ),
    tip: { lab: "clearance isn't a nice-to-have", text: "enough room behind for the bar's full path. enough room in front to walk out of a rep that isn't happening." }
  },
  {
    n: "04",
    phase: "Air | heat, damp, the door",
    title: "A garage is outdoors with a roof on it.",
    wide: true,
    body: (
      <>
        <p>
          in august it is hotter than outdoors, because the door faces the sun all afternoon and the slab holds the heat after the sun leaves. two cheap things fix most of that: a fan pointed at the person rather than at the room, and opening the door for twenty minutes before you start so the trapped air has somewhere to go.
        </p>
        <p>
          in a humid climate a small dehumidifier protects your equipment better than any cover does. bare steel rusts in a garage — not dramatically, just steadily — and the fix is drier air plus running a nylon brush over the knurling every so often. store plates off the concrete, on a rack or even a scrap of plywood.
        </p>
        <p>
          winter is the opposite problem and mostly a warm-up problem: cold steel, cold joints, a longer warm-up, and don't leave rubber-coated plates sitting on freezing concrete if you're attached to the coating.
        </p>
      </>
    ),
    warn: { lab: "Flatly", text: "never run a fuel-burning heater in a closed garage. if the heater burns something, the door is open or the heater is off. a garage gym is not worth a carbon monoxide story." }
  }
];

const Step = ({ data }) => (
  <article
    className={`sa-step ${data.flip ? "flip" : ""}`}
    style={data.wide ? { gridTemplateColumns: "1fr", maxWidth: 880 } : undefined}
  >
    <div className="sa-step-text">
      <div className="sa-step-meta">
        <span className="sa-step-num">{data.n}</span>
        <span className="sa-step-phase">{data.phase}</span>
      </div>
      <h3>{data.title}</h3>
      <div className="sa-step-body">{data.body}</div>
      {data.tip && (
        <div className="sa-step-tip">
          <span className="lab">{data.tip.lab}</span>
          <p>{data.tip.text}</p>
        </div>
      )}
      {data.warn && (
        <div className="sa-step-warn">
          <span className="lab">{data.warn.lab}</span>
          <p>{data.warn.text}</p>
        </div>
      )}
    </div>
    {data.fig && (
      <figure className="sa-step-fig">
        <div className="frame">
          <span className="tag">{data.fig.tag}</span>
          <img src={data.fig.img} alt="" loading="lazy" />
        </div>
        <figcaption>{data.fig.cap}</figcaption>
        {data.says && <SamSays>{data.says}</SamSays>}
      </figure>
    )}
  </article>
);

const Steps = () => (
  <section className="sa-steps">
    <div className="sa-steps-wrap">
      <header className="sa-steps-head">
        <h2>
          Build the corner. <em>Then buy the rack.</em>
        </h2>
        <span className="count">04 MOVES | CEILING, FLOOR, RACK, AIR</span>
      </header>
      {STEPS.map((s) => (
        <Step key={s.n} data={s} />
      ))}
    </div>
  </section>
);

const Affiliate = () => (
  <section
    style={{
      background: "var(--sa-bg-soft)",
      borderTop: "1px solid var(--sa-rule)",
      borderBottom: "1px solid var(--sa-rule)",
      padding: "56px 24px"
    }}
  >
    <div
      style={{
        maxWidth: 780,
        margin: "0 auto",
        background: "var(--sa-bg-card)",
        border: "1px solid var(--sa-rule)",
        borderLeft: "3px solid var(--sa-marker)",
        borderRadius: 4,
        padding: "32px 34px"
      }}
    >
      <span
        style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 10,
          letterSpacing: "0.3em",
          textTransform: "uppercase",
          color: "var(--sa-marker)"
        }}
      >
        Where the money actually goes
      </span>
      <p
        style={{
          fontFamily: "'Playfair Display', serif",
          fontSize: 23,
          lineHeight: 1.35,
          color: "var(--sa-cream)",
          margin: "14px 0 18px"
        }}
      >
        the floor is worth sourcing locally — stall mats are heavy and shipping them is most of their cost. the rack, the bar and the plates are the two thirds worth shopping around for, and the rack in particular decides what you can add to this corner for the next five years.
</p>
      <a
        href="/go/sam-garage-gym"
        rel="sponsored nofollow"
        style={{
          display: "inline-block",
          background: "var(--sa-marker)",
          color: "#100E0B",
          fontFamily: "'DM Sans', sans-serif",
          fontWeight: 700,
          fontSize: 14,
          letterSpacing: "0.02em",
          textDecoration: "none",
          padding: "12px 26px",
          borderRadius: 999
        }}
      >
        home gym equipment sets →
      </a>
      <p
        style={{
          fontFamily: "'DM Sans', sans-serif",
          fontSize: 12,
          lineHeight: 1.5,
          color: "var(--sa-mute)",
          margin: "18px 0 0"
        }}
      >
        some links on this page are affiliate links — if you buy through one, we earn a commission at no extra cost to you.
      </p>
    </div>
  </section>
);

const HotTakes = () => (
  <section className="sa-hottakes">
    <div className="sa-hottakes-wrap">
      <header className="sa-hottakes-head">
        <span className="lab">Sam's verdicts</span>
        <h2>
          Worth it, <em>and not.</em>
        </h2>
      </header>
      <div className="sa-hottakes-list">
        <div className="sa-take">
          <div className="num">i.</div>
          <h3>Worth it: the platform</h3>
          <p>
            plywood and a couple of mats. it solves the flat floor, the dropped bar and the sloped slab in one object, and it tells you where you lift.
          </p>
        </div>
        <div className="sa-take">
          <div className="num">ii.</div>
          <h3>Worth it: stall mats</h3>
          <p>
            the cheapest durable square footage in this entire hobby. heavy, ugly, permanent. get a second person for the carry.
          </p>
        </div>
        <div className="sa-take">
          <div className="num">iii.</div>
          <h3>Not worth it: interlocking foam under a barbell</h3>
          <p>
            it migrates. the seams walk open and you end up standing over a gap. put it where you stretch.
          </p>
        </div>
        <div className="sa-take">
          <div className="num">iv.</div>
          <h3>Not worth it: a rack taller than your ceiling clearance</h3>
          <p>
            it was discounted. the discount does not raise your roof.
          </p>
        </div>
        <div className="sa-take">
          <div className="num">v.</div>
          <h3>Worth it, quietly: a fan</h3>
          <p>
            the reason people abandon a garage gym in july is rarely motivation.
          </p>
        </div>
      </div>
    </div>
  </section>
);

const Signoff = () => (
  <section className="sa-signoff">
    <div className="sa-signoff-wrap">
      <div>
        <h2>
          The corner is the project. <em>The rack is the reward.</em>
        </h2>
        <p>
          eleven days, for the record, was the first attempt. the second one is three years old and still there.
        </p>
        <div className="sig">— sam</div>
        <div className="ctas" style={{ marginTop: 28 }}>
          <a href="/en/contributors/sam/" className="btn primary">
            More from Sam
          </a>
          <a href="/contact/" className="btn ghost">
            Ask Sam a question
          </a>
        </div>
      </div>
      <div className="sa-readnext">
        <span className="lab">Read next</span>
        <a href="/en/contributors/sam/august-ac-prep/">
          <span>August AC prep: filters, coils, and the $8 fix</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/the-first-hour-of-water-damage/">
          <span>The first hour of water damage</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/security-camera-placement/">
          <span>Security camera placement: the 5 spots that matter</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/">
          <span>All of Sam's guides</span>
          <span className="m">PROFILE</span>
        </a>
      </div>
    </div>
  </section>
);

const Article = () => (
  <div className="sa">
    <Crumbs />
    <Hero />
    <Lede />
    <WhatYouNeed />
    <Steps />
    <Affiliate />
    <HotTakes />
    <Signoff />
  </div>
);

ReactDOM.createRoot(document.getElementById("root")).render(<Article />);
