<section class="split-feature" aria-labelledby="feature-title">
<div class="split-feature__copy">
<p class="split-feature__label">Built to stay legible</p>
<h1 id="feature-title">A layout with a clear reading order.</h1>
<p>The words come first in the document. The supporting facts sit beside them only when the available width makes that useful.</p>
<a href="#details">Read the project notes</a>
</div>
<dl class="feature-facts" id="details">
<div>
<dt>Structure</dt>
<dd>Semantic HTML</dd>
</div>
<div>
<dt>Layout</dt>
<dd>Two-column Grid</dd>
</div>
<div>
<dt>Narrow view</dt>
<dd>One natural column</dd>
</div>
</dl>
</section>
* {
box-sizing: border-box;
}
body {
display: grid;
min-height: 100vh;
margin: 0;
padding: clamp(1rem, 5vw, 3rem);
place-items: center;
background: #b0436a;
color: #2b151d;
font-family: system-ui, sans-serif;
}
.split-feature {
display: grid;
width: min(100%, 64rem);
grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
border: 4px solid #2b151d;
background: #f7efe6;
}
.split-feature__copy {
padding: clamp(1.5rem, 6vw, 4rem);
}
.split-feature__label {
margin: 0 0 0.75rem;
color: #8e2f50;
font-size: 0.78rem;
font-weight: 900;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.split-feature h1 {
max-width: 12ch;
margin: 0 0 1.25rem;
font-size: clamp(2.3rem, 7vw, 5rem);
line-height: 0.98;
}
.split-feature__copy > p:not(.split-feature__label) {
max-width: 40rem;
margin: 0 0 1.5rem;
color: #4a2c35;
line-height: 1.65;
}
.split-feature__copy a {
color: #8e2f50;
font-weight: 850;
text-underline-offset: 0.2em;
}
.split-feature__copy a:focus-visible {
outline: 4px solid #2b151d;
outline-offset: 3px;
}
.feature-facts {
display: grid;
margin: 0;
border-left: 4px solid #2b151d;
background: #d94f9d;
}
.feature-facts div {
display: grid;
padding: 1.5rem;
align-content: center;
border-bottom: 2px solid #2b151d;
}
.feature-facts div:last-child {
border-bottom: 0;
}
.feature-facts dt {
margin-bottom: 0.35rem;
font-size: 0.78rem;
font-weight: 900;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.feature-facts dd {
margin: 0;
font-size: 1.15rem;
font-weight: 750;
}
@media (max-width: 44rem) {
.split-feature {
grid-template-columns: 1fr;
}
.feature-facts {
border-top: 4px solid #2b151d;
border-left: 0;
}
}