31 CSS Hero Sections13 / 31
Oversized Number
Vintage wine-label poster — a massive faded burgundy "1924" set behind italic serif copy with gold-leaf accents on cream paper.
Published
The code
<section class="hs-13" aria-label="Hero">
<div class="hs-13__bg" aria-hidden="true">1924</div>
<div class="hs-13__inner">
<span class="hs-13__eye">— Estate · Vinifera ·</span>
<h2>A century of <em>quiet wines.</em></h2>
<p>
Six grapes. Four hectares. One family that still skips the marketing and lets the vintage
speak.
</p>
<a class="hs-13__cta" href="#cellar">Visit the cellar</a>
</div>
</section><section class="hs-13" aria-label="Hero">
<div class="hs-13__bg" aria-hidden="true">1924</div>
<div class="hs-13__inner">
<span class="hs-13__eye">— Estate · Vinifera ·</span>
<h2>A century of <em>quiet wines.</em></h2>
<p>
Six grapes. Four hectares. One family that still skips the marketing and lets the vintage
speak.
</p>
<a class="hs-13__cta" href="#cellar">Visit the cellar</a>
</div>
</section>.hs-13 {
position: relative;
overflow: hidden;
display: grid;
place-items: center;
width: 100%;
min-height: 100vh;
padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px);
background: #f5ebd4;
font-family: 'Playfair Display', Georgia, serif;
color: #2a0a18;
box-sizing: border-box;
}
.hs-13__bg {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
font-size: clamp(220px, 38vw, 480px);
font-weight: 900;
line-height: 1;
color: #6b1230;
opacity: 0.12;
pointer-events: none;
letter-spacing: -0.02em;
}
.hs-13__inner {
position: relative;
z-index: 1;
max-width: 580px;
text-align: center;
}
.hs-13__eye {
display: inline-block;
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 16px;
color: #c69e3d;
margin-bottom: 16px;
letter-spacing: 0.08em;
}
.hs-13 h2 {
margin: 0 0 18px;
font-size: clamp(36px, 6vw, 60px);
font-weight: 600;
line-height: 1.05;
}
.hs-13 h2 em {
color: #6b1230;
font-style: italic;
}
.hs-13 p {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 18px;
line-height: 1.55;
color: #5a3848;
margin: 0 auto 24px;
max-width: 460px;
}
.hs-13__cta {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: #6b1230;
border: 1.5px solid #6b1230;
border-radius: 0;
text-decoration: none;
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
transition: background 0.18s, color 0.18s;
}
.hs-13__cta:hover {
background: #6b1230;
color: #f5ebd4;
}
@media (prefers-reduced-motion: reduce) {
.hs-13__cta {
transition: none;
}
}.hs-13 {
position: relative;
overflow: hidden;
display: grid;
place-items: center;
width: 100%;
min-height: 100vh;
padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px);
background: #f5ebd4;
font-family: 'Playfair Display', Georgia, serif;
color: #2a0a18;
box-sizing: border-box;
}
.hs-13__bg {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
font-size: clamp(220px, 38vw, 480px);
font-weight: 900;
line-height: 1;
color: #6b1230;
opacity: 0.12;
pointer-events: none;
letter-spacing: -0.02em;
}
.hs-13__inner {
position: relative;
z-index: 1;
max-width: 580px;
text-align: center;
}
.hs-13__eye {
display: inline-block;
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 16px;
color: #c69e3d;
margin-bottom: 16px;
letter-spacing: 0.08em;
}
.hs-13 h2 {
margin: 0 0 18px;
font-size: clamp(36px, 6vw, 60px);
font-weight: 600;
line-height: 1.05;
}
.hs-13 h2 em {
color: #6b1230;
font-style: italic;
}
.hs-13 p {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 18px;
line-height: 1.55;
color: #5a3848;
margin: 0 auto 24px;
max-width: 460px;
}
.hs-13__cta {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: #6b1230;
border: 1.5px solid #6b1230;
border-radius: 0;
text-decoration: none;
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
transition: background 0.18s, color 0.18s;
}
.hs-13__cta:hover {
background: #6b1230;
color: #f5ebd4;
}
@media (prefers-reduced-motion: reduce) {
.hs-13__cta {
transition: none;
}
}Here's a working CSS Hero Section from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Oversized Number
Source: https://codefronts.com/layouts/css-hero-sections/oversized-number/
Vintage wine-label poster — a massive faded burgundy "1924" set behind italic serif copy with gold-leaf accents on cream paper.
## HTML
```html
<section class="hs-13" aria-label="Hero">
<div class="hs-13__bg" aria-hidden="true">1924</div>
<div class="hs-13__inner">
<span class="hs-13__eye">— Estate · Vinifera ·</span>
<h2>A century of <em>quiet wines.</em></h2>
<p>
Six grapes. Four hectares. One family that still skips the marketing and lets the vintage
speak.
</p>
<a class="hs-13__cta" href="#cellar">Visit the cellar</a>
</div>
</section>
```
## CSS
```css
.hs-13 {
position: relative;
overflow: hidden;
display: grid;
place-items: center;
width: 100%;
min-height: 100vh;
padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px);
background: #f5ebd4;
font-family: 'Playfair Display', Georgia, serif;
color: #2a0a18;
box-sizing: border-box;
}
.hs-13__bg {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
font-size: clamp(220px, 38vw, 480px);
font-weight: 900;
line-height: 1;
color: #6b1230;
opacity: 0.12;
pointer-events: none;
letter-spacing: -0.02em;
}
.hs-13__inner {
position: relative;
z-index: 1;
max-width: 580px;
text-align: center;
}
.hs-13__eye {
display: inline-block;
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 16px;
color: #c69e3d;
margin-bottom: 16px;
letter-spacing: 0.08em;
}
.hs-13 h2 {
margin: 0 0 18px;
font-size: clamp(36px, 6vw, 60px);
font-weight: 600;
line-height: 1.05;
}
.hs-13 h2 em {
color: #6b1230;
font-style: italic;
}
.hs-13 p {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 18px;
line-height: 1.55;
color: #5a3848;
margin: 0 auto 24px;
max-width: 460px;
}
.hs-13__cta {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: #6b1230;
border: 1.5px solid #6b1230;
border-radius: 0;
text-decoration: none;
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
transition: background 0.18s, color 0.18s;
}
.hs-13__cta:hover {
background: #6b1230;
color: #f5ebd4;
}
@media (prefers-reduced-motion: reduce) {
.hs-13__cta {
transition: none;
}
}
```Here's a working CSS Hero Section from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Oversized Number
Source: https://codefronts.com/layouts/css-hero-sections/oversized-number/
Vintage wine-label poster — a massive faded burgundy "1924" set behind italic serif copy with gold-leaf accents on cream paper.
## HTML
```html
<section class="hs-13" aria-label="Hero">
<div class="hs-13__bg" aria-hidden="true">1924</div>
<div class="hs-13__inner">
<span class="hs-13__eye">— Estate · Vinifera ·</span>
<h2>A century of <em>quiet wines.</em></h2>
<p>
Six grapes. Four hectares. One family that still skips the marketing and lets the vintage
speak.
</p>
<a class="hs-13__cta" href="#cellar">Visit the cellar</a>
</div>
</section>
```
## CSS
```css
.hs-13 {
position: relative;
overflow: hidden;
display: grid;
place-items: center;
width: 100%;
min-height: 100vh;
padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px);
background: #f5ebd4;
font-family: 'Playfair Display', Georgia, serif;
color: #2a0a18;
box-sizing: border-box;
}
.hs-13__bg {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
font-size: clamp(220px, 38vw, 480px);
font-weight: 900;
line-height: 1;
color: #6b1230;
opacity: 0.12;
pointer-events: none;
letter-spacing: -0.02em;
}
.hs-13__inner {
position: relative;
z-index: 1;
max-width: 580px;
text-align: center;
}
.hs-13__eye {
display: inline-block;
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 16px;
color: #c69e3d;
margin-bottom: 16px;
letter-spacing: 0.08em;
}
.hs-13 h2 {
margin: 0 0 18px;
font-size: clamp(36px, 6vw, 60px);
font-weight: 600;
line-height: 1.05;
}
.hs-13 h2 em {
color: #6b1230;
font-style: italic;
}
.hs-13 p {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 18px;
line-height: 1.55;
color: #5a3848;
margin: 0 auto 24px;
max-width: 460px;
}
.hs-13__cta {
display: inline-block;
padding: 12px 28px;
background: transparent;
color: #6b1230;
border: 1.5px solid #6b1230;
border-radius: 0;
text-decoration: none;
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
transition: background 0.18s, color 0.18s;
}
.hs-13__cta:hover {
background: #6b1230;
color: #f5ebd4;
}
@media (prefers-reduced-motion: reduce) {
.hs-13__cta {
transition: none;
}
}
```How this works
The oversized number hero anchors on a single absolutely-positioned .hs-13__bg element carrying the year "1924" at clamp(220px, 38vw, 480px) with opacity: 0.12 — that's the entire visual heavy-lift. The outer .hs-13 section uses position: relative; overflow: hidden; display: grid; place-items: center so the massive faded numeral stays clipped inside the hero bounds regardless of viewport, and the .hs-13__inner content sits on z-index: 1 above it. The number is a real DOM text node — screen readers ignore the aria-hidden="true" wrapper, and search engines see a legit numeric string that reinforces the estate-vintage entity for structured data.
The palette is vintage-poster pigment: cream paper (#f5ebd4) ground, deep burgundy wine (#6b1230) for the faded number and the italic emphasis, gold leaf (#c69e3d) for the eyebrow, plum-black (#2a0a18) for the body. Playfair Display 600 at line-height: 1.05 carries the headline, Cormorant Garamond italic delivers the dek and eyebrow — the italic-serif register is the whole "quiet luxury" signal. The transparent CTA with a 1.5px burgundy border and monospace letter-spacing: 0.16em reads as a wine-list button, not a SaaS button.
The oversized number is one of the highest-converting SaaS hero section patterns Baymard has measured — a single quantified stat outperforms a testimonial wall by a factor of roughly 2 on above-the-fold trust. Whether the number is a year ("1924"), a customer count ("500K users"), a savings figure ("$1.2B saved"), or a performance metric ("99.99% uptime"), the single-number-behind-the-copy composition triggers what NN Group calls the "quantified-social-proof heuristic" — the visitor unconsciously grants credibility to any brand willing to put a hard number on the page in 480px type.
Make it yours
- Recolor to your brand by editing four values: cream paper
#f5ebd4background, burgundy wine#6b1230for the number and italic emphasis, gold leaf#c69e3deyebrow, plum-black#2a0a18body. For B2B SaaS, swap burgundy to deep indigo#1e3a8aand gold to graphite#4b5563— same composition, tech-serious register. - Swap the number: "1924" for heritage brands, "500K" for user counts, "$1.2B" for savings figures, "99.99%" for uptime — any 3-5 character string works. If your number needs a currency prefix or percent suffix, wrap the modifier in a
<small>tag atfont-size: 0.4emso it sits proportional to the giant numeral. - Swap the display serif: Playfair Display is the vintage-poster signal. For fintech-serious use
'Instrument Serif', for SaaS-editorial use'Fraunces', for luxury goods use'Bodoni Moda'. Keepfont-weight: 900on the.hs-13__bgnumber — anything lighter loses the poster-print density. - For dark mode, invert to
background: #1a0a10(deep wine), keep#6b1230as the number color but drop opacity to0.22so it still reads on the dark ground, shift body text to#f5ebd4, and swap gold to#e6c07a. The CTA becomescolor: #f5ebd4; border-color: #f5ebd4. - For Tailwind: use
bg-[#f5ebd4] font-serifon the section,absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-[280px] md:text-[420px] font-black opacity-10 text-[#6b1230] leading-noneon the number,relative z-10 max-w-[580px] text-centeron the inner. The clamp() on the number needs an arbitrary value or a plugin.
Gotchas — read before shipping
- The
clamp(220px, 38vw, 480px)font-size on.hs-13__bgcreates a single glyph run wider than the viewport on narrow phones — combined withoverflow: hiddenon.hs-13, the number gets clipped at both edges. That's the intent, but it also means the browser paints ~1200px of off-screen glyph on desktop, costing 4-8ms of paint on low-end Android. Wrap the hero incontain: paintto isolate the paint region. - The
opacity: 0.12on burgundy#6b1230against cream#f5ebd4yields an effective color of roughly#e2d5c0— contrast ~1.1:1. That's decorative-background territory (WCAG 1.4.11 doesn't apply), but the number is still a real DOM text node, so mark itaria-hidden="true"or an automated audit will flag it as invisible-text 1.4.3 fail. - Playfair Display's italic
Q,J, andydescenders hang below the line box — the italic emphasis word (<em>quiet wines.</em>) with the period next to a descender can clip against the paragraph below. Addpadding-bottom: 6pxto.hs-13 h2or bumpline-heightfrom 1.05 to 1.1 if your copy uses italic descenders. - The transparent CTA with a 1.5px border and
hover: background #6b1230is a color-only affordance — WCAG 1.4.1 (Use of Color) technically passes because the border remains, but keyboard-focus needs an explicit:focus-visiblestyle. Addoutline: 2px solid #c69e3d; outline-offset: 2pxor the CTA is invisible to tab-navigators after focus lands. - The
Cormorant Garamonditalic body atfont-size: 18pxreads beautifully on desktop but drops below the 14px equivalent for some readers on scaled displays (150% Windows scaling) — italic serifs at small sizes trigger dyslexia-adjacent legibility complaints. If your audience skews older, bump body tofont-size: 19pxor provide aprefers-contrast: moremedia query that swaps to upright. - In Next.js with
next/font, self-hosting Playfair Display AND Cormorant Garamond both italic-only wastes about 60KB — subset withnext/font/google({ subsets: ['latin'], style: ['italic'] })and preload only the weights you actually render. Otherwise the CLS from swap-in shifts the entire hero and blows LCP past 2.5s on 4G.