/**
 * Site footer (inc/mmp-footer.php): one dark band, as on Sound Archive Books.
 * The logo in white on the left, the links in
 * one row, the gold "Start a project" pill on the right (the homepage hero's
 * gold button); a thin line, then the copyright. Content on the page width
 * (.mmp-container-wide), so it lines up with the header. Phones: stacked and
 * centred.
 */

.mmp-footer {
    --mmp-footer-line: rgba(255, 255, 255, 0.15);
    background: var(--mmp-page-ink);
    color: var(--mmp-parchment);
    font-family: var(--mmp-font-body);
    font-size: 15px;
    line-height: 1.5;
}

.mmp-footer__inner {
    padding-top: 48px;
    padding-bottom: 32px;
}

/* color: primary.css gives every p the muted body colour. */
.mmp-footer p {
    margin: 0;
    color: inherit;
}

.mmp-footer a {
    color: #fff;
    text-decoration: none;
}

.mmp-footer a:is(:hover, :focus-visible) {
    color: var(--mmp-parchment);
    text-decoration: underline;
}

.mmp-footer__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--mmp-footer-line);
}

/* The logo (black artwork, shown white). */
.mmp-footer__logo-link {
    display: inline-block;
}

/* img. outranks WooCommerce's `.woocommerce-page img { height: auto }` on the
   cart, checkout and account pages (the logo showed at 480px there). */
img.mmp-footer__logo {
    display: block;
    width: auto;
    height: 56px;
    filter: brightness(0) invert(1);
}

.mmp-footer__nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The homepage hero's gold pill (home.css .mmp-home-btn). */
.mmp-footer a.mmp-footer__cta {
    flex: none;
    display: inline-block;
    padding: 14px 24px;
    border: 1px solid var(--mmp-page-gold);
    border-radius: 999px;
    background: var(--mmp-page-gold);
    color: var(--mmp-page-ink);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mmp-footer a.mmp-footer__cta:is(:hover, :focus-visible) {
    background: var(--mmp-page-gold-light);
    border-color: var(--mmp-page-gold-light);
    color: var(--mmp-page-ink);
    text-decoration: none;
}

.mmp-footer__base {
    padding-top: 20px;
    font-size: 13px;
}

/* Tablets: the links take their own row under the logo and the button. */
@media (max-width: 1024px) {
    .mmp-footer__main {
        flex-wrap: wrap;
    }

    .mmp-footer__nav {
        order: 3;
        flex-basis: 100%;
    }

    .mmp-footer__nav ul {
        justify-content: flex-start;
    }
}

/* Phones: stacked and centred. */
@media (max-width: 767px) {
    .mmp-footer__inner {
        padding-top: 40px;
    }

    .mmp-footer__main {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .mmp-footer__logo {
        margin-inline: auto;
    }

    .mmp-footer__nav {
        order: 0;
    }

    /* Two rows of three. */
    .mmp-footer__nav ul {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        gap: 8px 28px;
    }

    .mmp-footer__base {
        text-align: center;
    }
}
