/* ============================================================
   FOOTER
   ============================================================ */

/* Slim and darker: at the old height the three columns floated in a pale
   band with nothing between them. Deep indigo ties it to the navbar, which
   frames the page top and bottom. */
.site-footer {
    position: relative;
    margin-top: auto;
    padding-block: var(--space-3);
    background: var(--nav-bg);
    color: var(--nav-text);
    border-top: var(--border-width) solid var(--nav-border);
}

/* Moonlight hairline, mirroring the navbar. */
.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--gold) 50%, transparent),
        transparent
    );
}

/* A three-column grid, not a stretched flex row: `space-between` pushed the
   blocks to the far edges and left a gaping middle on wide screens. The
   columns are balanced and the whole thing is capped so it never sprawls. */
.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    justify-items: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .site-footer__inner {
        /* The brand takes what it needs; the links sit beside it rather than
           being pushed to the far edge. */
        grid-template-columns: auto 1fr auto;
        gap: var(--space-5);
        text-align: left;
    }

    .site-footer__inner > :first-child {
        justify-self: start;
    }

    .site-footer__inner > :last-child {
        justify-self: end;
        text-align: right;
    }
}

/* The brand block stacks its own two lines tightly. */
.site-footer__brand-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

@media (min-width: 768px) {
    /* Side by side rather than stacked: two lines made the whole bar twice as
       tall as it needs to be, for a logo and one short sentence. */
    .site-footer__brand-block {
        flex-direction: row;
        align-items: center;
        gap: var(--space-3);
    }

    .site-footer__links {
        gap: var(--space-3) var(--space-5);
    }
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--nav-text-strong);
    text-decoration: none;
}

.site-footer__logo {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-pill);
}

.site-footer__text {
    font-size: var(--text-xs);
    color: var(--nav-text-muted);
    margin: 0;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer__links a {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--nav-text);
    text-decoration: none;
    white-space: nowrap;
}

.site-footer__links a {
    position: relative;
    transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__links a:hover {
    color: var(--nav-text-strong);
}

/* A gold rule grows under the link on hover. */
.site-footer__links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform var(--duration-base) var(--ease-out);
}

.site-footer__links a:hover::after {
    transform: scaleX(1);
}

/* The copyright and the way back to the cookie question. */
.site-footer__end {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

@media (min-width: 768px) {
    .site-footer__end {
        align-items: flex-end;
    }
}

/* A button, because it acts rather than navigates; styled as the quiet link
   it sits beside. */
.site-footer__consent {
    padding: 0;
    font-size: var(--text-2xs);
    color: var(--nav-text-muted);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__consent:hover {
    color: var(--nav-text-strong);
}
