/*
 * Site footer (home/templates/base/footer.html), on every page. Scoped to .site-footer.
 * Same 1200px box (16px gutters) as the site header, so the edges line up.
 * Global traps: universal.css styles every h1-h6 (Montserrat, --text-title) and `a:hover` (--dark), so the
 * rules below that override them carry two classes.
 */

.site-footer {
    --sf-bg: hsl(210, 25%, 2.5%);
    --sf-border: hsla(0, 0%, 100%, 0.08);
    --sf-text: hsla(0, 0%, 100%, 0.92);
    --sf-muted: hsla(0, 0%, 100%, 0.6);
    --sf-faint: hsla(0, 0%, 100%, 0.4);

    flex: none;
    background: var(--sf-bg);
    border-top: 1px solid var(--sf-border);
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sf-muted);
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Brand + link columns ---------- */

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    padding: 56px 0 48px;
}

.site-footer__logo {
    display: inline-block;
}

.site-footer__logo img {
    display: block;
    height: 34px;
    width: auto;
}

.site-footer__blurb {
    max-width: 36ch;
    margin: 18px 0 22px;
    line-height: 1.6;
}

.site-footer a.site-footer__discord {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid hsla(0, 0%, 100%, 0.16);
    border-radius: 9px;
    font-weight: 500;
    color: var(--sf-text);
    transition: background-color .15s ease, border-color .15s ease;
}

.site-footer a.site-footer__discord:hover {
    background: hsla(0, 0%, 100%, 0.05);
    border-color: hsla(0, 0%, 100%, 0.28);
    color: #fff;
}

.site-footer__discord i {
    font-size: 16px;
}

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

.site-footer .site-footer__heading {
    margin-bottom: 16px;
    font-family: 'Montserrat', 'Roboto', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sf-text);
}

.site-footer__list {
    display: grid;
    gap: 11px;
    list-style: none;
}

.site-footer__list a {
    color: var(--sf-muted);
    transition: color .15s ease;
}

.site-footer .site-footer__list a:hover {
    color: #fff;
}

.site-footer a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- Copyright + legal ---------- */

.site-footer__bottom {
    display: grid;
    gap: 6px;
    padding: 22px 0 28px;
    border-top: 1px solid var(--sf-border);
    font-size: 12.5px;
    color: var(--sf-faint);
}

.site-footer__copy {
    color: var(--sf-muted);
}

.site-footer__legal {
    max-width: 90ch;
    font-size: 12px;
}

/* The floating chat launcher (chatbox.css: 56px, 20px from the corner) sits over the footer's bottom-right
   corner once the page is scrolled to the end, unless the window is wide enough for the 1200px box to clear it. */
@media (max-width: 1360px) {
    .site-footer--chat .site-footer__bottom {
        padding-right: 72px;
    }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
    .site-footer__top {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding: 44px 0 40px;
    }
}

@media (max-width: 600px) {
    .site-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
    }

    /* Everything is stacked here, so clear the chat launcher (52px + 16px on phones) from below instead */
    .site-footer--chat .site-footer__bottom {
        padding-right: 0;
        padding-bottom: 84px;
    }
}
