---
import Icon from './Icon.astro';
import facets from '../data/facets.json';
import { SOURCES, SOURCE_META, SOURCE_ROUTE } from '../lib/taxonomy';
import { url } from '../lib/url';
/**
* The home hero — a dark plate on the contour field, carrying the glitching, decoding
* DÆMONBINS wordmark and an inverse (cream) ledger of the five collections. The
* ledger's active deck cycles on a loop and takes over on hover/focus
* (scripts/hero.ts); the stat counters roll up from zero on load. The whole
* thing is server-rendered and fully legible with JS off — the script only
* adds the motion, and it all collapses under prefers-reduced-motion.
*
* Ported in spirit from daemon-sec.xyz's HeroLoop (the deck-lighting inverse
* plate) — rebuilt as progressive enhancement over static markup rather than a
* canvas cinematic, so it stays framework-free and degrades cleanly.
*/
const c = facets.counts;
const decks = SOURCES.map((id, i) => {
const s = SOURCE_META[id];
return {
n: String(i + 1).padStart(2, '0'),
tag: s.tag,
label: s.label,
accent: s.accent,
blurb: s.blurb,
count: c.bySource[id] ?? 0,
route: SOURCE_ROUTE[id],
};
});
const WORDMARK = 'DÆMONBINS';
---
<section class="hero-deck plate bleed" data-hero aria-label="DÆMONBins">
<!-- The contour field (scripts/dmn/contour-field.ts). The small type and
the deck are marked `data-contour-clear`, so the lines run round them:
the deck by its box, the type (`="text"`) as far as its words reach.
The wordmark is large enough to carry lines behind it. -->
<canvas class="contour-field" data-contour aria-hidden="true"></canvas>
<span class="banner__scrim" aria-hidden="true"></span>
<span class="grain grain--local" aria-hidden="true"></span>
<span class="scanlines" aria-hidden="true"></span>
<div class="wrap hero-deck__body">
<div class="hero-deck__lede">
<p class="eyebrow" style="--acc: var(--love);" data-contour-clear="text">
<span class="eyebrow__n">00</span>
<span class="eyebrow__mark">^:</span>
<span>DÆMONBins</span>
<span class="eyebrow__rule" aria-hidden="true"></span>
</p>
<h1 class="hero-deck__wordmark glitch" data-text={WORDMARK} data-unscramble={WORDMARK}>{WORDMARK}</h1>
<p class="hero-deck__tagline" data-contour-clear="text">the Off-the-Land Almanac</p>
<p class="hero-deck__blurb" data-contour-clear="text">
GTFOBins, LOLBAS, WADComs and LOOBins, with DÆMON's command references.
Filter by access, environment and execution context. Configure templates and keep useful commands close.
</p>
<div class="hero-deck__actions" data-contour-clear="text">
<a class="btn" href={url('catalog')}><Icon name="terminal" /> Open the catalog</a>
<button class="btn btn--ghost" data-search-open type="button"><Icon name="search" /> Search</button>
<span class="hero-deck__hint">or press <kbd>/</kbd></span>
</div>
<div class="hero-deck__stats" data-contour-clear="text">
<div class="hero-deck__stat" style="--acc: var(--love);">
<b data-count={c.techniques}>{c.techniques.toLocaleString()}</b><span>Techniques</span>
</div>
<div class="hero-deck__stat" style="--acc: var(--foam);">
<b data-count={c.tools}>{c.tools.toLocaleString()}</b><span>Tools</span>
</div>
<div class="hero-deck__stat" style="--acc: var(--gold);">
<b data-count={c.added}>{c.added.toLocaleString()}</b><span>DÆMON new</span>
</div>
</div>
</div>
<aside class="hero-deck__panel plate-dawn corners" data-hero-panel data-contour-clear>
<div class="hero-deck__panelhead">
<span class="hero-deck__paneleyebrow"><span class="mark">^:</span> The collections</span>
<span class="hero-deck__panellive">
<span class="dmn-dot" style="--dot: var(--pine);"><i class="dmn-anim-pulse"></i><u class="dmn-anim-ring"></u></span>
live
</span>
</div>
<p class="hero-deck__deckblurb" data-hero-blurb>{decks[0].blurb}</p>
<ul class="hero-deck__list">
{decks.map((d, i) => (
<li>
<a
class:list={['hero-deck__row', i === 0 && 'is-lit']}
href={url(d.route)}
style={`--acc: var(--${d.accent});`}
data-hero-row={i}
data-blurb={d.blurb}
aria-current={i === 0 ? 'true' : undefined}
>
<span class="hero-deck__rn">{d.n}</span>
<span class="hero-deck__rtag">{d.tag}</span>
<span class="hero-deck__rname">{d.label}</span>
<span class="hero-deck__rcount">{d.count.toLocaleString()}</span>
<span class="hero-deck__rarrow" aria-hidden="true">→</span>
</a>
</li>
))}
</ul>
</aside>
</div>
</section>
<style>
.hero-deck {
position: relative;
overflow: hidden;
background: var(--plate);
border-bottom: 1px solid var(--fg);
}
/* The scanlines/grain ride over the field; the body is lifted above them. */
.hero-deck > .scanlines { opacity: 0.4; }
.hero-deck__body {
position: relative;
z-index: 2;
display: grid;
gap: 2rem 3.5rem;
align-items: center;
padding-block: clamp(2.4rem, 6vw, 4.6rem);
}
@media (min-width: 960px) {
.hero-deck__body { grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); }
}
/* ---- Left: the lede ---------------------------------------------------- */
.hero-deck__wordmark {
margin-top: 1.1rem;
font-family: var(--font-wordmark);
font-weight: 850;
font-stretch: 68%;
text-transform: uppercase;
font-size: clamp(2.7rem, 8.5vw, 5.6rem);
line-height: 0.9;
letter-spacing: -0.005em;
color: var(--fg);
}
.hero-deck__tagline {
margin-top: 0.5rem;
font-family: var(--font-lockup);
font-style: italic;
font-size: clamp(1.15rem, 2.6vw, 1.7rem);
line-height: 1.1;
color: var(--foam);
}
.hero-deck__blurb {
margin-top: 1.1rem;
max-width: 48ch;
color: var(--fg-dim);
font-size: 0.98rem;
line-height: 1.55;
text-wrap: pretty;
}
.hero-deck__actions {
margin-top: 1.5rem;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.7rem;
}
.hero-deck__hint {
font-family: var(--font-mono);
font-size: 11.5px;
letter-spacing: 0.04em;
color: var(--fg-faint);
}
.hero-deck__hint kbd {
font-family: var(--font-mono);
border: 1px solid var(--rule-hi);
padding: 0.05rem 0.35rem;
color: var(--fg-dim);
}
.hero-deck__stats {
margin-top: 1.9rem;
padding-top: 1.3rem;
border-top: 1px solid var(--rule);
display: grid;
grid-template-columns: repeat(3, auto);
justify-content: start;
gap: 0 clamp(1.6rem, 4vw, 3rem);
}
.hero-deck__stat b {
display: block;
font-family: var(--font-display);
font-weight: 800;
font-stretch: 84%;
font-size: clamp(1.7rem, 3.4vw, 2.5rem);
letter-spacing: -0.03em;
line-height: 1;
color: var(--acc);
font-variant-numeric: tabular-nums;
}
.hero-deck__stat span {
display: block;
margin-top: 0.35rem;
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--fg-faint);
}
/* ---- Right: the inverse deck ledger ------------------------------------ */
.hero-deck__panel {
background: var(--base);
border: 1px solid var(--fg);
padding: 1.2rem 1.35rem 0.6rem;
color: var(--fg);
}
.hero-deck__panelhead {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding-bottom: 0.7rem;
border-bottom: 1px solid var(--rule);
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--fg-faint);
}
.hero-deck__paneleyebrow .mark { color: var(--iris); margin-right: 0.35rem; }
.hero-deck__panellive { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-deck__deckblurb {
margin: 0;
padding: 0.9rem 0 1rem;
font-size: 0.86rem;
line-height: 1.5;
color: var(--fg-dim);
/* Clamp to four lines so the cycling copy holds a constant height and the
ledger below it never jumps as the active deck changes. */
display: -webkit-box;
-webkit-line-clamp: 4;
line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
min-height: calc(0.86rem * 1.5 * 4 + 1.9rem);
}
.hero-deck__list { list-style: none; margin: 0; padding: 0; }
.hero-deck__row {
position: relative;
display: grid;
grid-template-columns: auto auto minmax(0, 1fr) auto auto;
align-items: center;
gap: 0.7rem;
padding: 0.72rem 0.2rem 0.72rem 0.9rem;
border-top: 1px solid var(--rule);
color: var(--fg);
text-decoration: none;
transition: background-color 220ms ease;
}
.hero-deck__row::before {
content: '';
position: absolute;
left: 0; top: 0; bottom: 0;
width: 2px;
background: var(--acc);
transform: scaleY(0);
transform-origin: 50% 50%;
transition: transform 260ms var(--ease-in);
}
.hero-deck__row.is-lit::before,
.hero-deck__row:hover::before { transform: scaleY(1); }
.hero-deck__row.is-lit,
.hero-deck__row:hover { background: var(--wash-strong); }
.hero-deck__rn {
font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
color: var(--fg-faint); transition: color 200ms ease;
}
.hero-deck__rtag {
font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
text-transform: uppercase; color: var(--acc);
}
.hero-deck__rname {
font-family: var(--font-display); font-weight: 700; font-stretch: 86%;
font-size: 1.02rem; letter-spacing: -0.01em; text-transform: uppercase;
color: var(--fg); transition: color 200ms ease; min-width: 0;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-deck__rcount {
font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint);
font-variant-numeric: tabular-nums;
}
.hero-deck__rarrow { color: var(--acc); transition: transform 250ms var(--ease); }
.hero-deck__row.is-lit .hero-deck__rn { color: var(--acc); }
.hero-deck__row.is-lit .hero-deck__rname { color: var(--acc); }
.hero-deck__row.is-lit .hero-deck__rarrow,
.hero-deck__row:hover .hero-deck__rarrow { transform: translateX(4px); }
</style>