Pill-stuck hero
A blush first screen with a pill menu bar, a three-line condensed orange headline under tilted rocking black pills, big orange loops at the edges and a walking ink drawing of a mechanic with a bicycle and a dog.
Part of the style
Tangerine Pill Parade
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/tangerine-pill-parade/hero/figma.html?palette=bc3c15bc00a286f1
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/tangerine-pill-parade/hero/figma.html?palette=bc3c15bc00a286f1 and pass that whole HTML document to the html_to_figma tool, so the part "Pill-stuck 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 {
--blush: #c6dcda;
--cream: #d5e8e6;
--sand: #c3dad7;
--shell: #cde1df;
--ink: #300c05;
--ink-soft: #5e352b;
--white: #2a3938;
--orange: #947769;
--orange-deep: #a88c7e;
--orange-faint: rgba(186, 155, 140, 0.45);
}
</style>
<section class="hero">
<header class="hero__bar">
<nav class="hero__links" aria-label="Main">
<a class="hero__link" href="#">Repairs</a>
<a class="hero__link" href="#">The bench</a>
</nav>
<a class="hero__wordmark" href="#">Wobble<span class="hero__wordmark-dot" aria-hidden="true"></span>Cycles</a>
<div class="hero__aside">
<p class="hero__hours">Tuesday–Saturday<br>9:00 – 18:00</p>
<a class="hero__cta" href="#">Book a fix <span class="hero__cta-dot" aria-hidden="true">→</span></a>
</div>
<button class="hero__menu" type="button" aria-expanded="false" aria-label="Open menu">
<span class="hero__menu-lines" aria-hidden="true"></span>
</button>
</header>
<div class="hero__stage">
<svg class="hero__loop hero__loop--left" viewBox="0 0 220 260" aria-hidden="true">
<path d="M200 30 C80 -10 10 60 30 140 C50 220 160 240 170 170 C180 110 90 110 90 170 C90 230 160 250 220 240" />
</svg>
<svg class="hero__loop hero__loop--right" viewBox="0 0 220 260" aria-hidden="true">
<path d="M0 60 C90 20 200 50 190 130 C180 200 70 210 60 150 C50 90 150 80 160 150 C170 210 100 250 20 250" />
</svg>
<h1 class="hero__title">
<span class="hero__line">Wheels,</span>
<span class="hero__line">back in</span>
<span class="hero__line">business</span>
</h1>
<span class="hero__pill" style="--x: 52%; --y: 14%; --tilt: -4deg; --delay: 0s">Neighbourhood workshop</span>
<span class="hero__pill" style="--x: 27%; --y: 42%; --tilt: -7deg; --delay: -1.1s">Spokes & brakes</span>
<span class="hero__pill" style="--x: 64%; --y: 66%; --tilt: 5deg; --delay: -2.2s">No upselling</span>
<svg class="hero__scene" viewBox="0 0 600 290" role="img" aria-label="A drawn mechanic in a cap walks a bicycle along, a spotted dog trotting ahead">
<!-- mechanic -->
<g class="hero__walker" transform="translate(20 0)">
<path class="hero__sleeve hero__sleeve--back" d="M138 116 L128 162" />
<g class="hero__leg hero__leg--back">
<path class="hero__fill-white" d="M141 176 L161 176 L160 256 L144 256 Z" />
<path class="hero__fill-ink" d="M140 254 L166 254 Q175 256 175 266 L138 266 Z" />
</g>
<g class="hero__leg hero__leg--front">
<path class="hero__fill-white" d="M141 176 L161 176 L160 256 L144 256 Z" />
<path class="hero__fill-ink" d="M140 254 L166 254 Q175 256 175 266 L138 266 Z" />
</g>
<path class="hero__fill-white" d="M126 176 L133 176 L131 199 L124 197 Z" />
<path class="hero__fill-orange" d="M126 104 Q150 94 174 104 L180 186 L122 186 Z" />
<path class="hero__stroke" d="M151 100 L151 186 M128 150 L146 150" />
<path class="hero__fill-white" d="M144 86 L157 86 L157 102 L144 102 Z" />
<circle class="hero__fill-white" cx="146" cy="74" r="4" />
<circle class="hero__fill-white" cx="153" cy="72" r="20" />
<path class="hero__fill-orange" d="M134 66 Q126 80 136 88 Q138 78 140 70 Z" />
<path class="hero__fill-ink" d="M133 66 Q134 46 155 46 Q173 48 173 64 Z M166 61 L189 63 Q190 68 168 68 Z" />
<circle class="hero__dot" cx="163" cy="73" r="2.2" />
<path class="hero__stroke" d="M172 74 q5 4 0 7 M160 85 q6 3 11 -2" />
<path class="hero__sleeve" d="M168 114 L198 142 L248 154" />
</g>
<!-- bicycle -->
<g class="hero__bike">
<g class="hero__wheel">
<circle class="hero__tyre" cx="232" cy="236" r="44" />
<circle class="hero__rim" cx="232" cy="236" r="38" />
<g class="hero__spokes">
<path class="hero__stroke" d="M232 198 L232 274 M194 236 L270 236 M205 209 L259 263 M259 209 L205 263" />
</g>
<circle class="hero__dot" cx="232" cy="236" r="4" />
</g>
<g class="hero__wheel">
<circle class="hero__tyre" cx="400" cy="236" r="44" />
<circle class="hero__rim" cx="400" cy="236" r="38" />
<g class="hero__spokes">
<path class="hero__stroke" d="M400 198 L400 274 M362 236 L438 236 M373 209 L427 263 M427 209 L373 263" />
</g>
<circle class="hero__dot" cx="400" cy="236" r="4" />
</g>
<path class="hero__frame-edge" d="M232 236 L286 164 L305 236 Z M286 164 L380 162 M305 236 L386 184 M380 160 L400 236" />
<path class="hero__frame" d="M232 236 L286 164 L305 236 Z M286 164 L380 162 M305 236 L386 184 M380 160 L400 236" />
<path class="hero__stroke hero__stroke--thick" d="M286 164 L282 156 M380 162 L376 146 M368 148 Q382 140 398 150" />
<path class="hero__fill-ink" d="M266 152 Q280 146 296 152 Q282 160 266 152 Z" />
<circle class="hero__fill-white" cx="305" cy="236" r="10" />
<path class="hero__stroke hero__stroke--thick" d="M305 236 L318 252 M312 252 L326 252" />
</g>
<!-- dog -->
<g class="hero__dog">
<path class="hero__tail" d="M464 208 Q446 196 452 180" />
<path class="hero__stroke hero__stroke--leg" d="M476 224 L472 254 M488 228 L490 254 M514 228 L511 254 M528 224 L533 254" />
<ellipse class="hero__fill-white" cx="500" cy="212" rx="40" ry="19" />
<path class="hero__fill-ink" d="M484 196 Q500 192 508 200 Q502 214 486 210 Z" />
<path class="hero__fill-orange" d="M528 198 L540 192 L546 204 L534 210 Z" />
<circle class="hero__fill-white" cx="546" cy="190" r="15" />
<ellipse class="hero__fill-white" cx="558" cy="197" rx="10" ry="6.5" />
<circle class="hero__dot" cx="567" cy="194" r="3" />
<circle class="hero__dot" cx="549" cy="186" r="2" />
<path class="hero__fill-ink" d="M534 180 Q526 194 535 200 Q542 190 539 178 Z" />
</g>
</svg>
</div>
<nav class="hero__drawer" aria-label="Main, small screens">
<a class="hero__link" href="#">Repairs</a>
<a class="hero__link" href="#">The bench</a>
<a class="hero__link" href="#">Book a fix</a>
</nav>
</section>
<style>
.hero {
position: relative;
overflow: hidden;
padding: var(--space-m) var(--edge) 0;
background: var(--blush);
}
/* bar */
.hero__bar {
position: relative;
z-index: 3;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: var(--space-m);
}
.hero__links {
display: flex;
gap: var(--space-s);
}
.hero__link {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 18px;
border-radius: var(--pill);
background: var(--white);
color: var(--ink);
font-size: var(--text-xs);
font-weight: 500;
text-decoration: none;
transition: background-color var(--quick) var(--ease), color var(--quick) var(--ease);
}
.hero__link:hover,
.hero__link:focus-visible {
background: var(--orange);
color: var(--white);
}
.hero__wordmark {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 44px;
color: var(--orange);
font-family: var(--font-display);
font-stretch: var(--display-width);
font-size: clamp(26px, 2.6vw, 34px);
font-weight: 600;
letter-spacing: -0.01em;
text-decoration: none;
}
.hero__wordmark-dot {
width: 0.42em;
height: 0.42em;
border: 3px solid var(--orange);
border-radius: 50%;
}
.hero__aside {
display: flex;
justify-content: flex-end;
align-items: center;
gap: var(--space-m);
}
.hero__hours {
margin: 0;
color: var(--ink);
font-size: 12px;
font-weight: 500;
line-height: 1.25;
}
.hero__cta {
display: inline-flex;
align-items: center;
gap: 10px;
min-height: 44px;
padding: 0 6px 0 18px;
border-radius: var(--pill);
background: var(--ink);
color: var(--white);
font-size: var(--text-xs);
font-weight: 500;
text-decoration: none;
box-shadow: var(--drop);
}
.hero__cta-dot {
display: grid;
place-items: center;
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--orange);
font-size: 15px;
transition: transform var(--quick) var(--ease);
}
.hero__cta:hover .hero__cta-dot,
.hero__cta:focus-visible .hero__cta-dot {
transform: rotate(-45deg) scale(1.12);
}
.hero__menu {
display: none;
justify-self: end;
width: 44px;
height: 44px;
padding: 0;
border: var(--line) solid var(--orange);
border-radius: 8px;
background: transparent;
cursor: pointer;
}
.hero__menu-lines,
.hero__menu-lines::before {
display: block;
width: 18px;
height: 2px;
margin: 0 auto;
background: var(--orange);
transition: transform var(--quick) var(--ease);
}
.hero__menu-lines::before {
content: "";
transform: translateY(6px);
}
.hero.is-open .hero__menu-lines { transform: translateY(3px) rotate(45deg); }
.hero.is-open .hero__menu-lines::before { transform: rotate(-90deg); }
.hero__drawer {
display: none;
}
/* stage */
.hero__stage {
position: relative;
padding-top: clamp(20px, 3vw, 40px);
}
.hero__title {
position: relative;
margin: 0;
color: var(--orange);
font-family: var(--font-display);
font-stretch: var(--display-width);
font-size: var(--display-xl);
font-weight: 800;
line-height: 0.84;
letter-spacing: -0.015em;
text-align: center;
text-transform: uppercase;
}
.hero__line {
display: block;
}
.hero__pill {
position: absolute;
z-index: 2;
left: var(--x);
top: calc(var(--y) + clamp(20px, 3vw, 40px));
padding: 8px 16px;
border-radius: var(--pill);
background: var(--ink);
color: var(--white);
font-size: clamp(12px, 1.2vw, 15px);
font-weight: 500;
white-space: nowrap;
rotate: var(--tilt);
animation: hero-rock 3.2s var(--ease-swing) var(--delay) infinite alternate;
}
@keyframes hero-rock {
to { rotate: calc(var(--tilt) + 2.5deg); translate: 0 -3px; }
}
.hero__loop {
position: absolute;
z-index: 0;
width: clamp(120px, 17vw, 240px);
fill: none;
stroke: var(--orange);
stroke-width: var(--loop);
stroke-linecap: round;
}
.hero__loop--left { left: calc(var(--edge) * -1 - 40px); top: 46%; }
.hero__loop--right { right: calc(var(--edge) * -1 - 50px); top: 12%; }
.hero__scene {
position: relative;
z-index: 1;
width: min(100%, max(600px, 50vw));
height: auto;
margin: clamp(-8px, -1vw, 0px) auto 0;
overflow: visible;
}
.hero__scene * { stroke-linejoin: round; stroke-linecap: round; }
.hero__fill-white { fill: var(--white); stroke: var(--ink); stroke-width: var(--line); }
.hero__fill-orange { fill: var(--orange); stroke: var(--ink); stroke-width: var(--line); }
.hero__fill-ink { fill: var(--ink); stroke: var(--ink); stroke-width: var(--line); }
.hero__dot { fill: var(--ink); }
.hero__stroke { fill: none; stroke: var(--ink); stroke-width: var(--line); }
.hero__stroke--thick { stroke-width: 4px; }
.hero__stroke--leg { stroke-width: 6px; }
.hero__sleeve {
fill: none;
stroke: var(--orange);
stroke-width: 11px;
stroke-linecap: round;
/* four hard 1.5 px drops draw the ink edge around the orange sleeve */
filter: drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink)) drop-shadow(0 1.5px 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink)); }
.hero__tyre { fill: none; stroke: var(--ink); stroke-width: 6px; }
.hero__rim { fill: none; stroke: var(--ink); stroke-width: 1.5px; }
.hero__frame-edge { fill: none; stroke: var(--ink); stroke-width: 10px; }
.hero__frame { fill: none; stroke: var(--orange); stroke-width: 6px; }
.hero__tail { fill: none; stroke: var(--ink); stroke-width: 5px; }
.hero__leg,
.hero__spokes,
.hero__tail,
.hero__dog,
.hero__walker {
transform-box: view-box;
}
.hero__leg { transform-origin: 151px 178px; animation: hero-stride 0.9s var(--ease-swing) infinite alternate; }
.hero__leg--back { animation-delay: -0.9s; }
.hero__spokes { transform-box: fill-box; transform-origin: center; animation: hero-spin 1.6s linear infinite; }
.hero__tail { transform-origin: 464px 208px; animation: hero-wag 0.45s var(--ease-swing) infinite alternate; }
.hero__dog { animation: hero-trot 0.45s var(--ease-swing) infinite alternate; }
@keyframes hero-stride { from { rotate: -18deg; } to { rotate: 18deg; } }
@keyframes hero-spin { to { rotate: 360deg; } }
@keyframes hero-wag { from { rotate: -14deg; } to { rotate: 16deg; } }
@keyframes hero-trot { to { translate: 0 -3px; } }
.hero.is-paused * { animation-play-state: paused !important; }
@media (max-width: 760px) {
.hero__bar { grid-template-columns: 1fr auto; }
.hero__links,
.hero__aside { display: none; }
.hero__wordmark { justify-self: start; }
.hero__menu { display: block; }
.hero__drawer {
position: absolute;
z-index: 4;
top: 72px;
right: var(--edge);
flex-direction: column;
gap: var(--space-s);
align-items: flex-end;
}
.hero.is-open .hero__drawer { display: flex; }
.hero__pill { padding: 6px 12px; }
.hero__loop--right { top: auto; bottom: 12%; }
}
@media (prefers-reduced-motion: reduce) {
.hero__pill,
.hero__leg,
.hero__spokes,
.hero__tail,
.hero__dog { animation: none; }
}
</style>
<script>
(() => {
for (const root of document.querySelectorAll('.hero')) {
const menu = root.querySelector('.hero__menu');
menu.addEventListener('click', () => {
const open = root.classList.toggle('is-open');
menu.setAttribute('aria-expanded', String(open));
menu.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
});
new IntersectionObserver(([entry]) => {
root.classList.toggle('is-paused', !entry.isIntersecting);
}).observe(root);
}
})();
</script>