/*
 * Site Footer
 * Template: footer.php
 * Auto-enqueued by functions.php after css/theme.css.
 *
 * Deep green band (the text colour, so it sits darker than the primary
 * green sections above it) with the pale motif ghosted in the top-right
 * corner. Four columns, then a hairline-ruled legal bar.
 */

.site-footer {
    --footer-rule: rgba(251, 254, 252, 0.12);
    --footer-muted: rgba(251, 254, 252, 0.72);
    --motif-size: 36rem;
    position: relative;
    margin-top: auto;
    padding-block: var(--space-3xl) var(--space-lg);
    color: var(--color-contrast);
    background-color: var(--color-text);
    overflow: clip;
}

/* Ghosted motif, bleeding off the top-right corner behind the columns. */
.site-footer__motif {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--motif-size);
    height: var(--motif-size);
    translate: 22% -38%;
    background: url('../../assets/graphics/motif-lg.svg') center / contain no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

.site-footer > .container {
    position: relative;
}

/*
 * Short pages (login, an empty archive): the footer stays at the bottom of
 * the viewport. Kept here rather than theme.css so it never reaches the
 * block editor, which reuses theme.css.
 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Columns ------------------------------------------------------------- */

.site-footer__main {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: var(--space-2xl) var(--space-xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--footer-rule);
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    max-width: 22rem;
}

.site-footer__logo-link {
    display: block;
    line-height: 0;
}

.site-footer__logo {
    display: block;
    width: auto;
    height: var(--space-2xl);
}

.site-footer__strapline {
    margin: 0;
    font-size: var(--text-0);
    font-weight: var(--font-light);
    color: var(--footer-muted);
}

.site-footer__social {
    list-style: none;
    margin: var(--space-2xs) 0 0;
    padding: 0;
    display: flex;
    gap: var(--space-xs);
}

/* Round icon buttons: hairline ring at rest, secondary green on hover. */
.site-footer__social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--space-xl);
    height: var(--space-xl);
    color: var(--color-contrast);
    border: 1px solid var(--footer-rule);
    border-radius: 50%;
    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.site-footer__social-link::before {
    content: "";
    width: var(--space-sm);
    height: var(--space-sm);
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.site-footer__social-link--linkedin {
    --icon: url('../../assets/graphics/social-linkedin.svg');
}

.site-footer__social-link--x {
    --icon: url('../../assets/graphics/social-x.svg');
}

/* Networks without an icon in assets/graphics show their label as a small pill instead. */
.site-footer__social-link--text {
    width: auto;
    padding-inline: var(--space-sm);
    font-size: var(--text--1);
}

.site-footer__social-link--text::before {
    display: none;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.site-footer__heading {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text--1);
    font-weight: var(--font-heavy);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-background);
}

.site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.site-footer__list a {
    display: inline-block;
    color: var(--footer-muted);
    font-weight: var(--font-light);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.site-footer__list a:hover,
.site-footer__list a:focus-visible {
    color: var(--color-background);
}

/* Contact items: small secondary-green icon before each line. */
.site-footer__list--contact {
    gap: var(--space-xs);
}

.site-footer__contact-item {
    position: relative;
    padding-left: calc(var(--space-sm) + var(--space-xs));
    font-weight: var(--font-light);
    color: var(--footer-muted);
}

.site-footer__contact-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: var(--space-sm);
    height: var(--space-sm);
    background-color: var(--color-secondary);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.site-footer__contact-item--phone {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E");
}

.site-footer__contact-item--email {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2V5zm2 2v.5l8 5 8-5V7H4zm16 3.2-8 5-8-5V17h16v-6.8z'/%3E%3C/svg%3E");
}

.site-footer__contact-item--address {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 1 7 7c0 5.2-7 13-7 13S5 14.2 5 9a7 7 0 0 1 7-7zm0 4.5A2.5 2.5 0 1 0 12 11.5 2.5 2.5 0 0 0 12 6.5z'/%3E%3C/svg%3E");
}

.site-footer__contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.site-footer__contact-item a:hover,
.site-footer__contact-item a:focus-visible {
    color: var(--color-background);
}

.site-footer__address {
    font-style: normal;
}

/* --- Legal bar ----------------------------------------------------------- */

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xs) var(--space-lg);
    padding-top: var(--space-lg);
    font-size: var(--text--1);
    font-weight: var(--font-light);
    color: var(--footer-muted);
}

.site-footer__copyright {
    margin: 0;
}

.site-footer__legal-sep {
    margin-inline: var(--space-2xs);
}

.site-footer__legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.site-footer__legal-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.site-footer__legal-links a:hover,
.site-footer__legal-links a:focus-visible {
    color: var(--color-background);
}

.site-footer__top {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
}

/* --- Responsive ---------------------------------------------------------- */

@media screen and (max-width: 1024px) {

    .site-footer__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }

}

@media screen and (max-width: 600px) {

    .site-footer {
        --motif-size: 22rem;
        padding-top: var(--space-2xl);
    }

    .site-footer__main {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .site-footer__legal {
        flex-direction: column;
        align-items: flex-start;
    }

}
