Boot screen
Black intro that types a column of capability lines and a warning, with a red load line crawling along the bottom; replays on click.
Part of the style
Hostile HUD
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/hostile-hud/boot/figma.html?palette=1406a215da83e5d7&type=difference-deck
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/hostile-hud/boot/figma.html?palette=1406a215da83e5d7&type=difference-deck and pass that whole HTML document to the html_to_figma tool, so the part "Boot screen" 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 */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&family=Fraunces:ital,opsz,wght@1,9..144,400..600&display=swap");
:root {
--void: #e9e9e9;
--night: #cccccc;
--night-2: #cfcfcf;
--bar: #a7a7a6;
--text: #363736;
--text-dim: rgba(54, 55, 54, 0.55);
--text-ghost: rgba(54, 55, 54, 0.22);
--rule: rgba(54, 55, 54, 0.14);
--chrome: #3b3c3b;
--alarm: #4bb299;
--signal: #2fb295;
--alarm-deep: #75af9e;
--rgb-r: #2e9f85;
--frost: #04735f;
--rgb-g: #198d75;
--rgb-b: #3ca68d;
--font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, monospace;
}
</style>
<section class="boot" aria-label="Loading Mostly Wrecked">
<svg class="boot__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M10 2h4v4h6v3h-6v9l5-3 2 3-9 5-9-5 2-3 5 3V9H4V6h6Z" fill="currentColor"/>
</svg>
<p class="boot__name boot__item">Mostly Wrecked</p>
<p class="boot__about boot__item"><span class="boot__cursor"></span>Seabed survey<br>Est. 2019<br>North Sea</p>
<ul class="boot__list">
<li class="boot__item">Sonar mapping</li>
<li class="boot__item">Wreck photography</li>
<li class="boot__item">Hull inspection</li>
<li class="boot__item">Salvage paperwork</li>
<li class="boot__item">Night dives</li>
<li class="boot__item">Cold water</li>
<li class="boot__item">Colder water</li>
<li class="boot__item">Regret</li>
</ul>
<div class="boot__warning">
<p class="boot__item boot__dim">00</p>
<p class="boot__item">For a worse experience<br>take off your wetsuit</p>
<p class="boot__item boot__dim">Ok</p>
</div>
<div class="boot__foot">
<span class="boot__count" aria-live="off">000</span>
<span class="boot__status boot__item">Loading the bottom of the sea</span>
<button class="boot__replay" type="button">Again +</button>
</div>
<span class="boot__load" aria-hidden="true"></span>
</section>
<style>
.boot {
position: relative;
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
grid-template-rows: auto 1fr auto auto;
gap: var(--space-m) var(--space-s);
height: clamp(480px, 50vw, 720px);
padding: var(--edge);
overflow: hidden;
background: var(--void);
color: var(--text);
font-size: var(--text-xs);
line-height: var(--leading-hud);
}
.boot p { margin: 0; }
.boot__mark {
grid-column: 1 / 3;
width: 18px;
color: var(--text);
}
.boot__name { grid-column: 4 / 6; }
.boot__about {
grid-column: 7 / 10;
position: relative;
padding-left: var(--space-s);
}
.boot__cursor {
position: absolute;
left: 0;
top: 0;
width: 3px;
height: 1.1em;
background: var(--text);
animation: boot-blink 0.9s steps(1, end) infinite;
animation-play-state: paused;
}
.boot.is-live .boot__cursor { animation-play-state: running; }
.boot__list {
grid-column: 7 / 10;
grid-row: 2;
align-self: center;
margin: 0;
padding: 0;
list-style: none;
}
.boot__warning {
grid-column: 7 / 11;
grid-row: 3;
display: grid;
grid-template-columns: 2em 1fr auto;
gap: var(--space-s);
}
.boot__dim { color: var(--text-dim); }
.boot__foot {
grid-column: 1 / -1;
grid-row: 4;
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: var(--space-s);
align-items: center;
}
.boot__count {
grid-column: 1 / 3;
font-family: var(--font-mono);
letter-spacing: 0;
}
.boot__status { grid-column: 7 / 10; }
.boot__replay {
grid-column: 11 / -1;
justify-self: end;
min-height: var(--tap);
padding: 0 var(--space-m);
border: 0;
background: transparent;
color: var(--text-dim);
font: inherit;
letter-spacing: inherit;
text-transform: inherit;
cursor: pointer;
transition: color var(--quick) ease, background var(--quick) ease;
}
.boot__replay:hover,
.boot__replay:focus-visible {
color: var(--void);
background: var(--text);
outline: none;
}
.boot__load {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
background: var(--signal);
transform: scaleX(0);
transform-origin: 0 0;
}
.boot.is-running .boot__load {
animation: boot-load var(--boot) linear forwards;
}
/* Each line is cut in from the left in hard steps, one after another. */
.boot__item {
clip-path: inset(0 100% 0 0);
}
.boot.is-running .boot__item {
animation: boot-peek 0.3s var(--step) forwards;
animation-delay: calc(var(--order, 0) * var(--line-in));
}
.boot.is-done .boot__item { clip-path: none; }
@keyframes boot-peek { to { clip-path: inset(0 0 0 0); } }
@keyframes boot-load { to { transform: scaleX(1); } }
@keyframes boot-blink { 50% { opacity: 0; } }
@media (max-width: 40rem) {
.boot { grid-template-rows: auto auto 1fr auto auto; }
.boot__name { grid-column: 4 / -1; grid-row: 1; }
.boot__about { grid-column: 4 / -1; grid-row: 2; }
.boot__list { grid-column: 4 / -1; grid-row: 3; }
.boot__warning { grid-column: 1 / -1; grid-row: 4; }
.boot__foot { grid-row: 5; }
.boot__status { grid-row: 1; grid-column: 1 / -1; }
.boot__count { grid-row: 2; grid-column: 1 / 4; }
.boot__replay { grid-row: 2; grid-column: 4 / -1; }
}
@media (prefers-reduced-motion: reduce) {
.boot__item { clip-path: none; }
.boot__load { transform: none; }
.boot__cursor { animation: none; }
}
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
function run(root) {
const count = root.querySelector('.boot__count');
const length = parseFloat(getComputedStyle(root).getPropertyValue('--boot')) * 1000 || 2400;
let frame = 0;
root.querySelectorAll('.boot__item').forEach((item, order) => item.style.setProperty('--order', order));
const showCount = (share) => {
count.textContent = String(Math.round(share * 100)).padStart(3, '0');
};
const play = () => {
cancelAnimationFrame(frame);
root.classList.remove('is-running', 'is-done');
if (still.matches) {
root.classList.add('is-done');
showCount(1);
return;
}
void root.offsetWidth;
root.classList.add('is-running');
const start = performance.now();
const step = (now) => {
const share = Math.min(1, (now - start) / length);
showCount(share);
if (share < 1) frame = requestAnimationFrame(step);
else root.classList.add('is-done');
};
frame = requestAnimationFrame(step);
};
root.querySelector('.boot__replay').addEventListener('click', play);
let played = false;
new IntersectionObserver(([entry]) => {
root.classList.toggle('is-live', entry.isIntersecting);
if (entry.isIntersecting && !played) {
played = true;
play();
}
}).observe(root);
}
document.querySelectorAll('.boot').forEach(run);
})();
</script>