Back to CSS Hero Sections Split with Mockup Pure CSS
Share
HTML
<section class="hs-spm" aria-label="Hero">
  <div class="hs-spm-copy">
    <span class="hs-spm-eye">EST. 2024</span>
    <h2>Inventory that <em>actually adds up.</em></h2>
    <p>Stock, batches, suppliers — one ledger, no spreadsheets, no Sundays at the laptop.</p>
    <a class="hs-spm-cta" href="#start">Get started →</a>
  </div>
  <div class="hs-spm-mock" aria-hidden="true">
    <div class="hs-spm-window">
      <header><span></span><span></span><span></span></header>
      <div class="hs-spm-bars">
        <span style="height: 32%"></span>
        <span style="height: 64%"></span>
        <span style="height: 48%"></span>
        <span style="height: 88%"></span>
        <span style="height: 56%"></span>
        <span style="height: 72%"></span>
      </div>
      <div class="hs-spm-line">
        <svg viewBox="0 0 200 60" preserveAspectRatio="none">
          <path
            d="M0,40 Q40,20 80,30 T160,15 T200,20"
            stroke="#d97742"
            stroke-width="2.5"
            fill="none"
          />
        </svg>
      </div>
    </div>
  </div>
</section>
CSS
.hs-spm {
  display: grid; grid-template-columns: 1.05fr 1fr;
  width: 100%; min-height: 480px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 56px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  background: #2c1f15;
  font-family: 'Inter', system-ui, sans-serif;
  color: #f5e6d3;
  box-sizing: border-box;
}
.hs-spm-eye {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; color: #d97742;
  padding: 4px 10px; border: 1px solid #d97742;
  margin-bottom: 18px;
}
.hs-spm h2 {
  margin: 0 0 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
  color: #fff8ed;
}
.hs-spm h2 em { color: #d97742; font-style: italic; font-weight: 700; }
.hs-spm p {
  margin: 0 0 26px; font-size: 15.5px; line-height: 1.6;
  color: #c9b5a0; max-width: 460px;
}
.hs-spm-cta {
  display: inline-block; padding: 12px 22px;
  background: #d97742; color: #2c1f15;
  text-decoration: none; font-weight: 700; font-size: 14px;
  border: 0; border-radius: 0;
  box-shadow: 4px 4px 0 #8a4520;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hs-spm-cta:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 #8a4520; }
.hs-spm-mock {
  background: #1a120a;
  border: 2px solid #6b4427;
  border-radius: 4px;
  padding: 12px;
  box-shadow: 8px 8px 0 #d97742;
}
.hs-spm-window header { display: flex; gap: 6px; padding-bottom: 12px; border-bottom: 1px dashed #6b4427; }
.hs-spm-window header span { width: 10px; height: 10px; border-radius: 50%; background: #6b4427; }
.hs-spm-window header span:nth-child(1) { background: #d97742; }
.hs-spm-window header span:nth-child(2) { background: #b8943f; }
.hs-spm-bars {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  height: 120px; align-items: end;
  margin: 14px 0;
}
.hs-spm-bars span {
  background: linear-gradient(180deg, #d97742, #b85a2c);
  border-radius: 2px 2px 0 0;
}
.hs-spm-bars span:nth-child(2n) { background: linear-gradient(180deg, #b8943f, #8a6c1f); }
.hs-spm-line { height: 60px; }
.hs-spm-line svg { width: 100%; height: 100%; }
@media (max-width: 720px) {
  .hs-spm { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hs-spm-cta { transition: none; } }