/* ==========================================================================
   Site footer — deliberately quiet. Contact, ownership, legal.
   ========================================================================== */

.site-footer {
    position: relative;
    z-index: 10;
    flex: none;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.site-footer__inner {
    display: grid;
    gap: var(--space-3);
    padding-block: var(--space-3);
}

.site-footer__pages,
.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: var(--space-2) var(--space-5);
}

.site-footer__pages {
    justify-content: center;
    gap: var(--space-2);
}

.site-footer__links {
    justify-content: space-between;
}

.site-footer__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    color: var(--color-accent);
}

.site-footer__pages .site-footer__link {
    justify-content: center;
    min-width: 7rem;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface-sunken);
    color: var(--color-text);
    font-weight: var(--weight-semibold);
    transition:
        color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

.site-footer__pages .site-footer__link:hover,
.site-footer__pages .site-footer__link:focus-visible {
    border-color: var(--brand-300);
    background: var(--brand-50);
    color: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* The footer competes with the slide for height on a phone, so it gives up the
   descriptive note and keeps only what someone actually needs to reach. */
@media (max-width: 48rem) {
    .site-footer__inner {
        gap: var(--space-2);
        padding-block: var(--space-2);
    }

    .site-footer__links {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--space-2) var(--space-4);
    }

    .site-footer__pages {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-footer__pages .site-footer__link {
        min-width: 0;
        padding-inline: var(--space-2);
    }

    .site-footer__links > :nth-child(2) {
        justify-self: end;
    }

    /* Documents are reachable from inside the bot, where they must be accepted
       anyway; on a phone the room they take belongs to the slide. */
    .site-footer__link--legal {
        display: none;
    }

    .site-footer__links > .site-footer__link--legal {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
