/*

What We Build — the catalogue page (what-we-build/index.html).

A layout of its own, on purpose: the home page sells the catalogue as a horizontal
snap-scroll of cards, Downloads is a grid of the kit's artwork cards, Insights is a dated
reading list and the write-up pages are hero + body + demo. This page is an INDEX — three
groups, each with its own heading and its own grid of entry cards, every card naming what the
system is and linking to its write-up.

Kit tokens only (white / ink #111 / orange #FF4500 / green #00FA9A / magenta #FF00FF,
Space Grotesk). No dark full-bleed band: the kit's back-to-top button is ink on white and
only inverts over an element with id="orin", which no page carries any more, so a dark
band here would swallow it.

*/

.cat {
    background: var(--white);
    padding: 0 0 0;
}

.cat-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---- hero ---------------------------------------------------------------- */

.cat-hero {
    padding: 122px 0 40px;
    border-bottom: 2px solid var(--ink);
}

.cat-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    align-items: end;
}

.cat-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0 0 14px;
}

.cat-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.02;
    font-weight: 700;
    margin: 0 0 18px;
}

.cat-lede {
    font-size: 1.08rem;
    line-height: 1.6;
    color: #333;
    max-width: 58ch;
    margin: 0;
}

/* ---- a group of entries -------------------------------------------------- */

.cat-group {
    padding: 46px 0 14px;
}

.cat-group + .cat-group {
    border-top: 1px solid #e6e6e6;
}

.cat-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.cat-group-head {
    max-width: 64ch;
}

.cat-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 8px;
}

/* Each group carries one accent from the kit, on its eyebrow and the top rule of its cards,
   so the three grids read as three sets without another heading. */
#run .cat-kicker,
#run .cat-row { border-top-color: var(--orange); }
#run .cat-kicker { color: var(--orange); }
#numbers .cat-row { border-top-color: var(--ink); }
#guard .cat-kicker { color: var(--magenta); }
#guard .cat-row { border-top-color: var(--magenta); }

.cat-group-head h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.1;
    margin: 0 0 10px;
}

.cat-group-head p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ---- the grid of entries ------------------------------------------------- */

.cat-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
    gap: 22px;
}

.cat-row {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    border: 2px solid var(--ink);
    border-top-width: 6px;
    background: var(--white);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-top-color 0.18s ease;
}

.cat-row:hover {
    transform: translateY(-4px);
    box-shadow: 7px 7px 0 var(--green);
}

/* The mark is the home page's own card artwork, carried over verbatim - the visual thread
   between the home page carousel and this page. Decorative here: the name is the heading
   right beside it, so the wrapper is aria-hidden. */
.cat-art {
    margin: 2px 0 16px;
}

.cat-art svg {
    display: block;
    width: 88px;
    height: 88px;
    transition: transform 0.18s ease;
}

.cat-row:hover .cat-art svg {
    transform: scale(1.05);
}

.cat-n {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #cbcbcb;
    transition: color 0.18s ease;
}

.cat-row:hover .cat-n {
    color: var(--ink);
}

.cat-row-body {
    flex: 1 1 auto;
}

.cat-row h3 {
    font-size: 1.24rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 10px;
    padding-right: 44px;   /* clears the corner index */
}

.cat-row h3 a {
    color: var(--ink);
    text-decoration: none;
}

.cat-row h3 a:hover {
    color: var(--orange);
}

.cat-kind {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #666;
    border: 1px solid #cfcfcf;
    padding: 2px 8px;
    margin: 0 8px 0 0;
}

.cat-tag {
    display: inline;
    font-size: 0.88rem;
    color: var(--orange);
    font-weight: 600;
    margin: 0;
}

.cat-sum {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin: 12px 0 0;
}

.cat-go {
    align-self: flex-start;
    margin-top: 20px;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 3px solid var(--green);
    padding-bottom: 3px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cat-go:hover {
    border-bottom-color: var(--magenta);
    color: var(--magenta);
}

/* ---- close --------------------------------------------------------------- */

.cat-close {
    margin-top: 52px;
    background: var(--green);
    border-top: 2px solid var(--ink);
    padding: 46px 0 54px;
}

.cat-close-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 44px;
    align-items: center;
}

.cat-close h2 {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.1;
    margin: 0 0 12px;
}

.cat-close p {
    font-size: 1rem;
    line-height: 1.65;
    color: #1c1c1c;
    margin: 0;
    max-width: 56ch;
}

.cat-close-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.cat-btn,
.cat-btn-ghost {
    display: inline-block;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    padding: 14px 26px;
    border: 2px solid var(--ink);
}

.cat-btn {
    background: var(--ink);
    color: #fff;
}

.cat-btn:hover {
    background: var(--white);
    color: var(--ink);
}

.cat-btn-ghost {
    color: var(--ink);
    background: transparent;
}

.cat-btn-ghost:hover {
    background: var(--ink);
    color: #fff;
}

/* ---- narrow -------------------------------------------------------------- */

@media (max-width: 900px) {
    .cat-wrap { padding: 0 20px; }
    .cat-hero { padding: 34px 0 28px; }
    .cat-close-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
    .cat-row { padding: 20px 18px 18px; }
    .cat-rows { gap: 16px; }
    .cat-group { padding: 36px 0 12px; }
}
