Sky hero
Gradient sky with grain, a block-letter wordmark where each letter is pushed back in its own direction, serif caps links that go italic on hover, and a stadium frame with a rose outline holding a drawn dusk scene with drifting steam under a headline between two dotted rows. The frame grows in on load. Comes with the address line, a bar that slides in after scrolling, a full-screen phone menu and the fixed round stamp with turning lettering.
Part of the style
Dusk Sky Stadium
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/dusk-sky-stadium/hero/figma.html?palette=2c2b2f5b2d64bab8
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/dusk-sky-stadium/hero/figma.html?palette=2c2b2f5b2d64bab8 and pass that whole HTML document to the html_to_figma tool, so the part "Sky hero" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--ink: #0d101f;
--ink-soft: #232634;
--mist: #e3e3e4;
--stone: #cccccf;
--stone-shade: #565965;
--veil: rgba(2, 3, 13, 0.34);
--teal: #505cb4;
--sun: #e4ecfe;
--moss: #5e6c90;
--rose: #5b955f;
}
</style>
<header class="hero">
<div class="hero__sky">
<div class="hero__top">
<button class="hero__burger" type="button" aria-expanded="false" aria-label="Open menu">
<span class="hero__burger-lines" aria-hidden="true"></span>
</button>
<a class="hero__mark" href="#" aria-label="Sundog, home">
<span class="hero__letter" aria-hidden="true">S</span>
<span class="hero__letter" aria-hidden="true">U</span>
<span class="hero__letter" aria-hidden="true">N</span>
<span class="hero__letter" aria-hidden="true">D</span>
<span class="hero__letter" aria-hidden="true">O</span>
<span class="hero__letter" aria-hidden="true">G</span>
</a>
<nav class="hero__nav" aria-label="Main">
<a class="hero__link" href="#" data-label="The house">The house</a>
<a class="hero__link" href="#" data-label="Hot pools">Hot pools</a>
<a class="hero__link" href="#" data-label="Tea garden">Tea garden</a>
<a class="hero__link" href="#" data-label="Journal">Journal</a>
<a class="hero__link" href="#" data-label="Hours">Hours</a>
</nav>
</div>
<div class="hero__frame">
<svg class="hero__view" viewBox="0 0 1200 600" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="hero-dusk" x1="0" y1="0" x2="0" y2="1">
<stop class="hero__dusk-high" offset="0" />
<stop class="hero__dusk-mid" offset="0.4" />
<stop class="hero__dusk-low" offset="0.68" />
</linearGradient>
<linearGradient id="hero-pool" x1="0" y1="0" x2="0" y2="1">
<stop class="hero__pool-far" offset="0" />
<stop class="hero__pool-near" offset="1" />
</linearGradient>
<filter id="hero-soft"><feGaussianBlur stdDeviation="0.9" /></filter>
<filter id="hero-haze" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="16" /></filter>
</defs>
<g filter="url(#hero-soft)">
<rect class="hero__dusk" width="1200" height="600" />
<circle class="hero__halo" cx="952" cy="150" r="128" />
<circle class="hero__sun" cx="952" cy="150" r="34" />
<circle class="hero__dog" cx="824" cy="150" r="10" />
<circle class="hero__dog" cx="1080" cy="150" r="10" />
<path class="hero__ridge-far" d="M0 334C120 304 220 292 330 320S520 352 640 330 900 282 1030 308 1150 332 1200 318V600H0Z" />
<path class="hero__ridge-near" d="M0 374C160 352 260 382 420 368S700 394 860 366 1100 374 1200 354V600H0Z" />
<path class="hero__marsh" d="M0 408C200 396 420 418 600 406S1000 398 1200 412V600H0Z" />
<path class="hero__channel" d="M150 424C300 414 420 432 560 424S800 416 900 424C800 430 700 428 560 434S300 426 150 424Z" />
<path class="hero__channel" d="M700 446C800 440 960 448 1090 442 960 452 820 452 700 446Z" />
<path class="hero__tree" d="M92 470C58 400 70 250 96 176 124 250 132 400 104 470Z" />
<path class="hero__tree" d="M164 470C140 420 148 310 168 250 190 310 196 420 176 470Z" />
<path class="hero__tree" d="M246 470C230 430 236 350 250 306 266 350 270 430 256 470Z" />
<path class="hero__tree" d="M1090 470C1058 404 1068 262 1094 190 1122 262 1130 404 1102 470Z" />
<path class="hero__tree" d="M1016 470C996 426 1002 330 1020 278 1040 330 1044 426 1026 470Z" />
<path class="hero__deck" d="M0 462C300 436 900 436 1200 462V600H0Z" />
<ellipse class="hero__rim" cx="600" cy="530" rx="452" ry="84" />
<ellipse class="hero__water" cx="600" cy="534" rx="430" ry="72" />
<ellipse class="hero__glint" cx="880" cy="494" rx="64" ry="6" />
<ellipse class="hero__glint" cx="872" cy="512" rx="42" ry="5" />
<ellipse class="hero__glint" cx="884" cy="530" rx="24" ry="4" />
<path class="hero__bather" d="M452 520a15 15 0 1 1 30 0c14 4 22 12 24 22h-78c2-10 10-18 24-22Z" />
<path class="hero__bather" d="M642 514a13 13 0 1 1 26 0c12 4 19 11 21 20h-68c2-9 9-16 21-20Z" />
<path class="hero__bather" d="M706 528a12 12 0 1 1 24 0c11 3 18 10 20 18h-64c2-8 9-15 20-18Z" />
</g>
<g class="hero__steam" filter="url(#hero-haze)">
<ellipse class="hero__puff" cx="330" cy="470" rx="120" ry="34" />
<ellipse class="hero__puff" cx="620" cy="446" rx="170" ry="30" />
<ellipse class="hero__puff" cx="900" cy="476" rx="130" ry="32" />
</g>
</svg>
<div class="hero__veil"></div>
<div class="hero__words">
<span class="hero__dots" aria-hidden="true"></span>
<h1 class="hero__title">Hot pools and tea garden above the salt marsh</h1>
<span class="hero__dots" aria-hidden="true"></span>
</div>
</div>
<p class="hero__address">
<span class="hero__address-line">14 Larkspur Terrace, lower deck and upper deck, seaward side of Quarry Hill</span>
<span class="hero__address-line">Port Aldous, North Shore</span>
</p>
</div>
<div class="hero__bar">
<button class="hero__burger" type="button" aria-expanded="false" aria-label="Open menu">
<span class="hero__burger-lines" aria-hidden="true"></span>
</button>
<a class="hero__bar-mark" href="#" aria-label="Sundog, home">Sundog</a>
<nav class="hero__bar-nav" aria-label="Main, short"></nav>
</div>
<div class="hero__menu" inert>
<button class="hero__close" type="button" aria-label="Close menu"></button>
<nav class="hero__menu-nav" aria-label="Main, full screen"></nav>
<p class="hero__menu-note">Open daily, 7 to 23</p>
</div>
<a class="hero__stamp" href="#" aria-label="Book a soak">
<svg class="hero__stamp-ring" viewBox="0 0 100 100" aria-hidden="true" focusable="false">
<path id="hero-stamp-circle" d="M50 50m-34 0a34 34 0 1 1 68 0 34 34 0 1 1-68 0" fill="none" />
<text class="hero__stamp-text"><textPath href="#hero-stamp-circle" textLength="208" lengthAdjust="spacing">Book a soak · hot pools ·</textPath></text>
</svg>
<svg class="hero__stamp-sign" viewBox="0 0 40 40" aria-hidden="true" focusable="false">
<circle cx="20" cy="15" r="5" />
<path d="M8 15a12 12 0 0 1 24 0M4 15h2M34 15h2M9 25c2.8-2.4 4.6-2.4 7.4 0s4.6 2.4 7.2 0 4.6-2.4 7.4 0M11 31c2.3-2 3.7-2 6 0s3.7 2 6 0 3.7-2 6 0" />
</svg>
</a>
</header>
<style>
.hero {
position: relative;
}
/* Sky: one tall gradient, grain on top, a dark wash that lifts while the frame grows. */
.hero__sky {
position: relative;
isolation: isolate;
display: grid;
align-content: start;
justify-items: center;
min-height: min(75vw, 46rem);
padding: var(--space-m) var(--gutter) var(--space-xl);
overflow: clip;
background: var(--sky);
}
.hero__sky::before,
.hero__sky::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
}
.hero__sky::before {
z-index: 2;
background: var(--ink);
opacity: 0;
}
.hero__sky::after {
z-index: 3;
background: var(--grain);
opacity: var(--grain-strength);
mix-blend-mode: overlay;
}
.hero__top {
position: relative;
display: grid;
justify-items: center;
width: 100%;
}
/* Wordmark: block letters, each pushed back in its own direction like a row of cut stones. */
.hero__mark {
display: flex;
align-items: center;
gap: 0.16em;
min-height: var(--tap);
color: var(--stone);
font-family: var(--font-mark);
font-size: clamp(2.25rem, 5.2vw, 4.7rem);
font-weight: 400;
line-height: var(--leading-tight);
text-decoration: none;
}
.hero__letter {
--hero-push-x: 0em;
--hero-push-y: 0.014em;
display: block;
text-shadow:
calc(var(--hero-push-x) * 1) calc(var(--hero-push-y) * 1) 0 var(--stone-shade),
calc(var(--hero-push-x) * 2) calc(var(--hero-push-y) * 2) 0 var(--stone-shade),
calc(var(--hero-push-x) * 3) calc(var(--hero-push-y) * 3) 0 var(--stone-shade),
calc(var(--hero-push-x) * 4) calc(var(--hero-push-y) * 4) 0 var(--stone-shade),
calc(var(--hero-push-x) * 5) calc(var(--hero-push-y) * 5) 0 var(--stone-shade),
calc(var(--hero-push-x) * 6) calc(var(--hero-push-y) * 6) 0 var(--stone-shade),
calc(var(--hero-push-x) * 7) calc(var(--hero-push-y) * 7) 0 var(--stone-shade),
calc(var(--hero-push-x) * 8) calc(var(--hero-push-y) * 8) 0 var(--stone-shade),
calc(var(--hero-push-x) * 9) calc(var(--hero-push-y) * 9) 0 var(--stone-shade),
calc(var(--hero-push-x) * 10) calc(var(--hero-push-y) * 10) 0 var(--stone-shade);
}
.hero__letter:nth-child(1) { --hero-push-x: -0.016em; --hero-push-y: 0.009em; }
.hero__letter:nth-child(2) { --hero-push-x: 0.007em; --hero-push-y: 0.015em; }
.hero__letter:nth-child(3) { --hero-push-x: 0.016em; --hero-push-y: 0.008em; }
.hero__letter:nth-child(4) { --hero-push-x: -0.008em; --hero-push-y: 0.015em; }
.hero__letter:nth-child(5) { --hero-push-x: -0.017em; --hero-push-y: 0.006em; }
.hero__letter:nth-child(6) { --hero-push-x: 0.015em; --hero-push-y: 0.011em; }
.hero__mark:focus-visible,
.hero__bar-mark:focus-visible,
.hero__link:focus-visible,
.hero__burger:focus-visible,
.hero__close:focus-visible,
.hero__stamp:focus-visible {
outline: var(--line-focus) solid currentColor;
outline-offset: var(--line-focus);
}
/* Links: serif capitals that lean into italics on hover. A hidden italic copy holds the width so nothing shifts. */
.hero__nav {
display: flex;
flex-wrap: wrap;
justify-content: center;
column-gap: clamp(0rem, 1.1vw, 1rem);
margin-top: var(--space-m);
}
.hero__link {
display: inline-grid;
place-content: center;
place-items: center;
min-height: 3.75rem;
padding: 0.2em var(--space-s) 0;
color: var(--mist);
font-family: var(--font-display);
font-size: var(--text-l);
line-height: var(--leading-tight);
text-decoration: none;
white-space: nowrap;
}
.hero__link::after {
content: attr(data-label);
height: 0;
overflow: hidden;
font-style: italic;
visibility: hidden;
}
.hero__link:hover,
.hero__link:focus-visible {
font-style: italic;
}
/* Frame: a stadium with a thin rose outline. The picture inside is drawn, softened and washed dark for the headline. */
.hero__frame {
position: relative;
display: grid;
place-items: center;
width: 100%;
aspect-ratio: 1200 / 583;
margin-top: var(--space-s);
overflow: hidden;
border: var(--line-frame) solid var(--rose);
border-radius: var(--radius-frame);
background: var(--teal);
}
.hero__view,
.hero__veil {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.hero__veil {
background: var(--veil);
}
.hero__dusk { fill: url(#hero-dusk); }
.hero__dusk-high { stop-color: color-mix(in oklab, var(--teal) 62%, var(--mist)); }
.hero__dusk-mid { stop-color: color-mix(in oklab, var(--rose) 58%, var(--sun)); }
.hero__dusk-low { stop-color: color-mix(in oklab, var(--sun) 72%, var(--mist)); }
.hero__halo {
fill: none;
stroke: var(--mist);
stroke-width: 3;
opacity: 0.4;
}
.hero__sun { fill: var(--mist); }
.hero__dog { fill: var(--mist); opacity: 0.7; }
.hero__ridge-far { fill: color-mix(in oklab, var(--teal) 58%, var(--rose)); }
.hero__ridge-near { fill: color-mix(in oklab, var(--teal) 72%, var(--moss)); }
.hero__marsh { fill: color-mix(in oklab, var(--moss) 72%, var(--ink)); }
.hero__channel { fill: color-mix(in oklab, var(--sun) 60%, var(--rose)); opacity: 0.85; }
.hero__tree { fill: color-mix(in oklab, var(--ink) 62%, var(--moss)); }
.hero__deck { fill: color-mix(in oklab, var(--ink) 78%, var(--teal)); }
.hero__rim { fill: color-mix(in oklab, var(--stone-shade) 62%, var(--ink)); }
.hero__water { fill: url(#hero-pool); }
.hero__pool-far { stop-color: color-mix(in oklab, var(--rose) 46%, var(--sun)); }
.hero__pool-near { stop-color: var(--teal); }
.hero__glint { fill: var(--mist); opacity: 0.75; }
.hero__bather { fill: var(--ink); }
.hero__puff { fill: var(--mist); opacity: 0.4; }
.hero__words {
position: relative;
display: grid;
justify-items: center;
gap: clamp(0.9rem, 1.7vw, 1.5rem);
padding: 0 6%;
color: var(--mist);
text-align: center;
}
.hero__title {
max-width: 13.5em;
margin: 0;
font-family: var(--font-display);
font-size: var(--display-xl);
font-weight: 400;
line-height: var(--leading-tight);
text-wrap: balance;
}
.hero__dots {
--hero-dot: clamp(0.5rem, 0.83vw, 0.75rem);
width: calc(var(--hero-dot) * 17.52);
height: var(--hero-dot);
background: radial-gradient(circle closest-side, currentColor 92%, transparent) 0 0 / calc(var(--hero-dot) * 2.92) 100% repeat-x;
}
.hero__address {
display: grid;
justify-items: center;
max-width: 44em;
margin: var(--space-m) 0 0;
color: var(--ink-soft);
font-size: var(--text-m);
line-height: var(--leading-tight);
text-align: center;
text-wrap: balance;
}
/* Bar: slides in once the big wordmark and links have scrolled away. */
.hero__bar {
position: fixed;
inset: 0 0 auto;
z-index: 20;
display: flex;
align-items: center;
height: var(--bar-height);
padding: 0 clamp(1rem, 2.8vw, 2.5rem);
background: var(--mist);
transform: translateY(-101%);
visibility: hidden;
transition: transform var(--time-fade) var(--ease-intro), visibility 0s var(--time-fade);
}
.hero.is-stuck .hero__bar {
transform: none;
visibility: visible;
transition-delay: 0s;
}
.hero__bar-mark {
display: inline-flex;
align-items: center;
min-height: var(--tap);
color: var(--stone-shade);
font-family: var(--font-mark);
font-size: 1.5rem;
letter-spacing: 0.16em;
line-height: var(--leading-tight);
text-decoration: none;
transition: color var(--time) var(--ease);
}
.hero__bar-mark:hover {
color: var(--ink);
}
/* The links join the bar's own row: wordmark and last link take equal shares, so the rest sit dead centre. */
.hero__bar-nav {
display: contents;
}
.hero__bar-mark,
.hero__bar .hero__link:last-child {
flex: 1 0 0;
}
.hero__bar .hero__link {
min-height: var(--tap);
color: var(--ink);
font-size: var(--text-xs);
}
.hero__bar .hero__link:last-child {
justify-items: end;
padding-right: 0;
}
.hero__burger,
.hero__close {
display: none;
place-items: center;
width: var(--tap);
height: var(--tap);
padding: 0;
border: 0;
background: none;
color: var(--mist);
cursor: pointer;
}
.hero__bar .hero__burger {
color: var(--ink);
}
.hero__burger-lines {
width: 1.5rem;
height: 1.125rem;
background: linear-gradient(currentColor, currentColor) top / 100% var(--line-focus) no-repeat, linear-gradient(currentColor, currentColor) center / 100% var(--line-focus) no-repeat, linear-gradient(currentColor, currentColor) bottom / 100% var(--line-focus) no-repeat;
}
.hero__close::before,
.hero__close::after {
content: "";
grid-area: 1 / 1;
width: 1.625rem;
height: var(--line-focus);
background: currentColor;
rotate: 45deg;
}
.hero__close::after {
rotate: -45deg;
}
/* Phone menu: the top of the sky fills the screen, links rise in one after another. */
.hero__menu {
position: fixed;
inset: 0;
z-index: 40;
display: grid;
grid-template-rows: auto 1fr auto;
justify-items: center;
padding: var(--space-s) var(--gutter) var(--space-l);
overflow-y: auto;
overscroll-behavior: contain;
background: linear-gradient(var(--ink), var(--teal) 28%, var(--moss));
color: var(--mist);
opacity: 0;
visibility: hidden;
transition: opacity var(--time-fade) var(--ease), visibility 0s var(--time-fade);
}
.hero.is-open .hero__menu {
opacity: 1;
visibility: visible;
transition-delay: 0s;
}
.hero__close {
display: grid;
justify-self: start;
}
.hero__menu-nav {
display: grid;
align-content: center;
justify-items: center;
}
.hero__menu .hero__link {
min-height: 4rem;
font-size: var(--display-l);
opacity: 0;
translate: 0 1rem;
transition: opacity var(--time-fade) var(--ease), translate var(--time-fade) var(--ease-intro);
}
.hero.is-open .hero__menu .hero__link {
opacity: 1;
translate: 0 0;
}
.hero.is-open .hero__menu .hero__link:nth-child(1) { transition-delay: calc(var(--stagger) * 2); }
.hero.is-open .hero__menu .hero__link:nth-child(2) { transition-delay: calc(var(--stagger) * 3); }
.hero.is-open .hero__menu .hero__link:nth-child(3) { transition-delay: calc(var(--stagger) * 4); }
.hero.is-open .hero__menu .hero__link:nth-child(4) { transition-delay: calc(var(--stagger) * 5); }
.hero.is-open .hero__menu .hero__link:nth-child(5) { transition-delay: calc(var(--stagger) * 6); }
.hero__menu-note {
margin: 0;
font-size: var(--text-s);
}
/* Stamp: stays in the corner of the screen, its lettering turns slowly. */
.hero__stamp {
position: fixed;
right: clamp(1rem, 2.8vw, 2.5rem);
bottom: clamp(1rem, 2.8vw, 2.5rem);
z-index: 30;
display: grid;
place-items: center;
width: var(--stamp-size);
height: var(--stamp-size);
border-radius: 50%;
background: var(--rose);
color: var(--ink);
transition: scale var(--time) var(--ease), background-color var(--time) var(--ease);
}
.hero__stamp:hover,
.hero__stamp:focus-visible {
background: var(--sun);
scale: 1.08;
}
.hero__stamp-ring,
.hero__stamp-sign {
grid-area: 1 / 1;
}
.hero__stamp-ring {
width: 100%;
height: 100%;
}
.hero__stamp-text {
fill: currentColor;
font-family: var(--font-text);
font-size: 15px;
font-weight: 400;
text-transform: none;
}
.hero__stamp-sign {
width: 36%;
fill: none;
stroke: currentColor;
stroke-width: 1.4;
stroke-linecap: round;
}
@keyframes hero-grow {
from { transform: scale(0.5); }
}
@keyframes hero-arrive {
from { opacity: 0; }
}
@keyframes hero-lift {
from { opacity: 0.55; }
}
@keyframes hero-spin {
to { rotate: 1turn; }
}
@keyframes hero-drift {
from { transform: translate(-28px, 6px); }
to { transform: translate(28px, -10px); }
}
@media (prefers-reduced-motion: no-preference) {
.hero__frame {
animation: hero-grow var(--time-intro) var(--ease-intro) both;
}
.hero__sky::before {
animation: hero-lift var(--time-intro) var(--ease) both;
}
.hero__top,
.hero__words,
.hero__address {
animation: hero-arrive var(--time-fade) var(--ease) calc(var(--time-intro) * 0.55) both;
}
.hero__stamp-ring {
animation: hero-spin var(--time-spin) linear infinite;
}
.hero__steam {
animation: hero-drift calc(var(--time-spin) / 2) ease-in-out infinite alternate;
}
}
@media (max-width: 59.99rem) {
.hero__frame {
aspect-ratio: 1.6;
}
}
/* Phones: links move behind the burger once the script is running, the frame stands upright. */
@media (max-width: 47.99rem) {
.hero__sky {
padding-top: var(--space-s);
}
.hero.is-ready .hero__nav,
.hero__bar-nav {
display: none;
}
.hero.is-ready .hero__burger {
display: grid;
}
.hero__top .hero__burger {
position: absolute;
left: 0;
top: 0;
}
.hero__nav {
margin-top: var(--space-xs);
}
.hero__nav .hero__link {
min-height: var(--tap);
padding-inline: var(--space-xs);
}
.hero__frame {
aspect-ratio: 0.7;
margin-top: var(--space-m);
}
.hero__title {
max-width: 7.2em;
}
.hero__bar {
justify-content: center;
}
.hero__bar-mark {
flex: none;
}
.hero__bar .hero__burger {
position: absolute;
left: clamp(1rem, 2.8vw, 2.5rem);
}
}
@media (prefers-reduced-motion: reduce) {
.hero__bar,
.hero__bar-mark,
.hero__menu,
.hero__menu .hero__link,
.hero__stamp {
transition-duration: 0s;
transition-delay: 0s;
}
.hero__menu .hero__link {
translate: 0 0;
}
}
</style>
<script>
(() => {
const copyLinksInto = (target, links) => {
links.forEach((link) => target.append(link.cloneNode(true)));
};
const watchForLeavingTop = (root) => {
const top = root.querySelector(".hero__top");
const observer = new IntersectionObserver(([entry]) => {
root.classList.toggle("is-stuck", !entry.isIntersecting && entry.boundingClientRect.bottom <= 0);
});
observer.observe(top);
};
const wireMenu = (root) => {
const menu = root.querySelector(".hero__menu");
const closeButton = root.querySelector(".hero__close");
const burgers = root.querySelectorAll(".hero__burger");
let opener = null;
const setOpen = (open) => {
root.classList.toggle("is-open", open);
menu.inert = !open;
burgers.forEach((burger) => burger.setAttribute("aria-expanded", String(open)));
};
const close = () => {
if (!root.classList.contains("is-open")) return;
setOpen(false);
if (opener) opener.focus();
};
burgers.forEach((burger) => {
burger.addEventListener("click", () => {
opener = burger;
setOpen(true);
closeButton.focus();
});
});
closeButton.addEventListener("click", close);
menu.addEventListener("click", (event) => {
if (event.target.closest(".hero__link")) close();
});
root.addEventListener("keydown", (event) => {
if (event.key === "Escape") close();
});
};
document.querySelectorAll(".hero").forEach((root) => {
const links = root.querySelectorAll(".hero__nav .hero__link");
copyLinksInto(root.querySelector(".hero__bar-nav"), links);
copyLinksInto(root.querySelector(".hero__menu-nav"), links);
watchForLeavingTop(root);
wireMenu(root);
root.classList.add("is-ready");
});
})();
</script>