.site-footer {
    position: relative;
    border-top: var(--border-width) solid var(--color-border);
    background: color-mix(in srgb, var(--color-soft) 45%, var(--color-white));
    color: var(--color-text);
    padding: calc(var(--space-9) + var(--space-3)) var(--space-6) var(--space-7);
}

.site-footer a { transition: color var(--transition-fast); }
.site-footer a:hover { color: var(--color-primary-dark); }

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.1fr 1.2fr;
    gap: var(--space-7);
    padding-bottom: var(--space-7);
    border-bottom: var(--border-width) solid var(--color-border);
}

.footer-col--brand {
    display: grid;
    gap: var(--space-2);
    align-content: start;
    max-width: 40ch;
    margin-top: -10px;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
}

.footer-col .footer-brand {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--color-text);
    margin: 0;
}

.footer-col .footer-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-mid);
    line-height: 1.7;
    max-width: 32ch;
    margin: 0;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    list-style: none;
    padding: 0;
    margin: var(--space-4) 0 0;
}

.footer-social {
    display: flex;
    color: var(--color-text-mid);
    opacity: 0.7;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.footer-social svg {
    width: 19px;
    height: 19px;
}

.footer-social:hover {
    color: var(--color-primary-dark);
    opacity: 1;
    transform: translateY(-2px);
}

.footer-contact-line {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.footer-contact-line:last-child { margin-bottom: 0; }

/* Scoped to .footer-col so it outranks the later .footer-col a display rule,
   which would otherwise drop the icon onto its own line. */
.footer-col .footer-contact-line a,
.footer-contact-text {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 0;
}

.footer-contact-line a.is-copied::after {
    content: 'Copied!';
    position: absolute;
    left: calc(100% + var(--space-2));
    padding: 2px var(--space-2);
    border-radius: 999px;
    background: var(--color-text);
    color: var(--color-white);
    font-size: var(--text-xs);
    white-space: nowrap;
    animation: footer-copied-fade 1.6s ease forwards;
}

@keyframes footer-copied-fade {
    0% { opacity: 0; transform: translateY(2px); }
    15% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.footer-contact-icon {
    display: flex;
    flex-shrink: 0;
    opacity: 0.6;
}

.footer-contact-icon svg {
    width: 15px;
    height: 15px;
}

.footer-contact-line a:hover .footer-contact-icon { opacity: 1; }

/* Plain small headings rather than the old letter-spaced caps. */
.footer-col .label {
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-text);
}

.footer-col a,
.footer-col p {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-mid);
    line-height: 1.8;
    letter-spacing: 0.01em;
    margin-bottom: var(--space-2);
    /* An email address has no spaces to break at and widened the whole page
       at the larger accessibility text sizes. */
    overflow-wrap: anywhere;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-primary-dark);
    transform: translateX(3px);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: var(--space-6) auto 0;
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    color: var(--color-text-mid);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

@media (max-width: 860px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .site-footer { padding: var(--space-7) var(--space-5) var(--space-5); }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6) var(--space-4);
        padding-bottom: var(--space-5);
    }

    /* Logo and church name share the first row, so the brand block costs two
       lines instead of three. */
    .footer-col--brand {
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: var(--space-2) var(--space-3);
        max-width: none;
        margin-top: 0;
    }

    .footer-col--brand > a,
    .footer-col--brand .footer-brand { grid-row: 1; }

    .footer-col--brand .footer-brand {
        font-size: var(--text-base);
        line-height: 1.25;
        white-space: normal;
    }

    .footer-col--brand .footer-tagline,
    .footer-col--brand .footer-socials { grid-column: 1 / -1; }

    .footer-logo { height: 40px; }
    .footer-socials { margin-top: var(--space-1); }

    /* Visit and Community are short enough to pair up; the contact lines are
       not, so they keep the full width. */
    .footer-inner > .footer-col:last-child { grid-column: 1 / -1; }

    .footer-col .label { margin-bottom: var(--space-2); }

    .footer-col a,
    .footer-col p {
        margin-bottom: 0;
        padding: 5px 0;
        line-height: 1.45;
    }

    .footer-contact-line { margin-bottom: 0; }

    .footer-bottom { margin-top: var(--space-5); }
}
