Gradient subhead product hero
Black hero with a centered title, a gradient-filled subhead, a gray availability line and two pill buttons above a lit laptop drawn in CSS.
snippet.html128 lines
<section class="gsh">
<div class="gsh__copy">
<h1 class="gsh__title">Kestrel Pro</h1>
<p class="gsh__sub">Aurora Wide Panel</p>
<p class="gsh__note">Ships from March 4</p>
<div class="gsh__actions">
<a class="gsh__btn gsh__btn--solid" href="#">Learn more</a>
<a class="gsh__btn" href="#">Reserve</a>
</div>
</div>
<div class="gsh__stage" aria-hidden="true">
<div class="gsh__lid">
<div class="gsh__screen"></div>
</div>
<div class="gsh__base"><span class="gsh__keys"></span></div>
</div>
</section>
<style>
.gsh {
--gsh-bg: #000000;
--gsh-ink: #f5f5f7;
--gsh-mute: #86868b;
--gsh-blue: #0071e3;
--gsh-blue-soft: #2997ff;
min-height: 100vh;
box-sizing: border-box;
padding: clamp(2.5rem, 6vw, 4.25rem) 1.25rem 0;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
background: var(--gsh-bg);
color: var(--gsh-ink);
font-family: ui-sans-serif, -apple-system, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
text-align: center;
}
.gsh *, .gsh *::before, .gsh *::after { box-sizing: border-box; }
.gsh__title { margin: 0; font-size: clamp(2.5rem, 5.6vw, 3.5rem); line-height: 1.07; font-weight: 600; letter-spacing: -0.015em; }
.gsh__sub {
margin: 0.4rem 0 0; font-size: clamp(1.4rem, 2.8vw, 1.75rem); line-height: 1.15; letter-spacing: 0.004em;
background: linear-gradient(90deg, #f5d36b 0%, #e3b55c 35%, #7aa6d8 70%, #4a90e2 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.gsh__note { margin: 0.75rem 0 0; font-size: 1.3125rem; line-height: 1.2; color: var(--gsh-mute); }
.gsh__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.gsh__btn {
display: inline-block;
padding: 0.6875rem 1.3125rem;
border: 1px solid var(--gsh-blue-soft);
border-radius: 980px;
font-size: 1.0625rem;
line-height: 1.2;
color: var(--gsh-blue-soft);
text-decoration: none;
transition: background 0.2s, color 0.2s;
}
.gsh__btn--solid { background: var(--gsh-blue); border-color: var(--gsh-blue); color: #fff; }
.gsh__btn--solid:hover { background: #0077ed; }
.gsh__btn:not(.gsh__btn--solid):hover { background: var(--gsh-blue-soft); color: #000; }
.gsh__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gsh__stage {
position: relative;
width: min(56vw, 800px);
min-width: 300px;
margin-top: clamp(2rem, 5vw, 3.5rem);
perspective: 1400px;
flex: none;
}
.gsh__stage::before {
content: "";
position: absolute;
inset: -10% -6% 30%;
background: radial-gradient(60% 70% at 50% 60%, rgba(120, 150, 210, 0.22), transparent 70%);
filter: blur(20px);
}
.gsh__lid {
position: relative;
aspect-ratio: 16 / 10;
padding: 1.2%;
border-radius: 18px 18px 4px 4px;
background: linear-gradient(#18181a, #0b0b0c);
box-shadow: inset 0 0 0 2px #2a2a2d;
transform: rotateX(-6deg);
transform-origin: bottom;
}
.gsh__screen {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 10px 10px 2px 2px;
background:
repeating-linear-gradient(90deg, rgba(255,255,255,0.0) 0 5px, rgba(0,0,0,0.55) 5px 6px),
linear-gradient(90deg, #0a1020 0%, #5b7ca8 12%, #e8f0ff 22%, #46628f 30%, #0b1426 38%, #7e9bc8 48%, #f4f8ff 56%, #4a6690 66%, #0b1426 74%, #8aa6d0 84%, #e6eeff 92%, #1a2745 100%);
animation: gsh-drift 9s ease-in-out infinite alternate;
background-size: auto, 140% 100%;
}
.gsh__screen::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 28%, transparent 70%, rgba(0,0,0,0.5) 100%);
}
.gsh__base {
position: relative;
height: clamp(2.5rem, 6vw, 5rem);
margin: 0 -3%;
border-radius: 0 0 22px 22px / 0 0 30px 30px;
background: linear-gradient(#3a3a3f, #1d1d20 40%, #121214);
box-shadow: 0 -1px 0 #55555a inset;
display: flex;
justify-content: center;
padding-top: 18%;
}
.gsh__keys {
width: 66%;
height: 38%;
border-radius: 6px;
background: repeating-linear-gradient(90deg, #26262a 0 7.2%, #0e0e10 7.2% 8%);
}
@keyframes gsh-drift { to { background-position: 0 0, 100% 0; } }
@media (prefers-reduced-motion: reduce) { .gsh__screen { animation: none; } }
</style>