/* Shared site chrome. Loaded on every page, after ergodic-landing.css,
   which remains the token source. */

/* ---------- Brand mark ---------- */

.brand-mark {
    display: grid;
    grid-template-columns: repeat(2, 6px);
    grid-template-rows: repeat(3, 6px);
    gap: 3px;
    flex-shrink: 0;
}

    .brand-mark span {
        background: var(--white);
    }

        .brand-mark span.accent {
            background: var(--accent);
            width: 60%;
            height: 60%;
            align-self: center;
            justify-self: center;
        }

/* ---------- Top bar ---------- */

/* Pinned so the way back into the site is always reachable, which matters most
   on the legal pages, where the reader may be thousands of pixels down. */
.site-topbar {
    position: sticky;
    top: 0;
    background: var(--bg-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 32px;
    z-index: 20;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .03em;
    transition: opacity .25s var(--ease);
}

    .site-brand:hover {
        opacity: .75;
    }

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: .09em;
}

    .site-nav a {
        color: var(--text-muted);
        text-decoration: none;
        white-space: nowrap;
        padding-bottom: 3px;
        border-bottom: 1px solid transparent;
        transition: color .25s var(--ease), border-color .25s var(--ease);
    }

        .site-nav a:hover {
            color: var(--white);
        }

        .site-nav a.is-current {
            color: var(--white);
            border-bottom-color: var(--accent);
        }

        .site-nav a:focus-visible {
            outline: 1.5px solid var(--accent);
            outline-offset: 3px;
        }

@media (max-width: 640px) {
    .site-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 18px 20px;
    }

    .site-nav {
        gap: 16px;
        font-size: 10px;
        flex-wrap: wrap;
    }
}

/* ---------- Footer ---------- */

/* ergodic-landing.css pins the footer for the fixed-height home hero and gives
   it a translucent blur so the field shows through. On paper pages that blur
   picks up the white content behind it and turns grey, so it is opaque here. */
.site-footer {
    position: static;
    background: var(--bg-navy);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
}

/* ---------- Footer groups ---------- */

/* Navigation (home only) and legal are different kinds of link. */
.site-footer nav {
    align-items: center;
    gap: 24px;
}

.footer-group {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Dividers, so the links read as separate items rather than one run of text. */
    .footer-group a + a::before {
        content: '';
        display: inline-block;
        width: 1px;
        height: 9px;
        margin-right: 14px;
        vertical-align: -1px;
        background: rgba(255,255,255,.22);
    }

.footer-group + .footer-legal {
    padding-left: 24px;
    border-left: 1px solid rgba(255,255,255,.22);
}

@media (max-width: 760px) {
    .site-footer nav {
        flex-direction: column;
        gap: 9px;
    }

    .footer-group + .footer-legal {
        padding-left: 0;
        border-left: none;
    }
}

/* ---------- Footer legibility ---------- */

/* ergodic-landing.css sets 10.5px in --text-faint (#4a5f7d), which lands under
   3.5:1 against navy — below the AA threshold for small text, and harder still
   in wide-tracked mono. The footer should recede, not strain the reader. This
   matters most on the home page, where the footer is the only route into the
   site: if the links go unnoticed, the reveal is a dead end. */
.site-footer {
    font-size: 11.5px;
    color: var(--text-muted);
}

    .site-footer nav a {
        color: var(--text-muted);
    }

        .site-footer nav a:hover {
            color: var(--white);
        }

    .site-footer .copyright {
        color: var(--text-faint);
    }
