/* ── Site footer ─────────────────────────────────────────────
   Figma: desktop 903:38235, tablet 1349:175, mobile 903:38293.
   ─────────────────────────────────────────────────────────── */

.site-footer {
    padding: var(--pad-y) var(--pad-x) 36px;
    background: var(--color-canvas);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.site-footer__top {
    display: flex;
    gap: 48px;
}


/* ── Logo, social links and contact ───────────────────────── */
.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex-shrink: 0;
    width: 212px;
}

.site-footer__logo-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.site-footer__logo {
    display: block;
    width: 130px;
}

.site-footer__logo img {
    width: 130px;
    height: 105px;
}

.site-footer__contact {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-style: normal;
    line-height: 1.55;
    letter-spacing: 0.07px;
    color: var(--color-ink-soft);
    white-space: nowrap;
}

/* Phone and email: at least 24px tall each, so a finger can tell them apart
   on a phone (WCAG 2.5.8; at 22px they sat too close). */
.site-footer__contact a {
    display: flex;
    align-items: center;
    align-self: flex-start;
    min-height: 24px;
}

/* A blank line between the address and the phone number. */
.site-footer__address {
    margin-bottom: 1.55em;
}

.site-footer__contact a:hover {
    color: var(--color-copper-text);
}

/* Location, Contact: tablet only */
.site-footer__label {
    display: none;
}


/* ── Social links: a 24px icon in a 44px tap area ─────────── */
.site-footer__social {
    display: flex;
    gap: 18px;
    margin: 0 0 0 -10px; /* the icons, not their tap areas, line up */
    padding: 0;
    list-style: none;
}

/* Over the copyright: mobile only */
.site-footer__social--bottom {
    display: none;
}

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    color: var(--color-beamwood);
    transition: color var(--transition);
}

.site-footer__social-link svg {
    width: 24px;
    height: 24px;
}

.site-footer__social-link:hover {
    color: var(--color-copper);
}

.site-footer__social-link:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 0;
}

.site-footer__logo:focus-visible,
.site-footer__contact a:focus-visible,
.site-footer__link:focus-visible,
.site-footer__credit:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 2px;
}


/* ── Link columns ─────────────────────────────────────────── */
.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    flex: 1;
}

.site-footer__column,
.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer__link {
    display: block;
    font-family: var(--font-heading);
    font-size: 22px;
    font-style: italic;
    font-weight: 400;
    font-variation-settings: "SOFT" 0, "WONK" 1;
    line-height: 1.2;
    color: var(--color-beamwood);
    transition: color var(--transition);
}

.site-footer__link:hover {
    color: var(--color-copper-text);
}


/* ── Copyright and credit ─────────────────────────────────── */
.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
}

.site-footer__credit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-family: "Metropolis", sans-serif;
    font-size: 16px;
    line-height: 20.8px;
    color: var(--color-walnut);
}

.site-footer__credit img {
    width: 78px;
    height: 13px;
}


/* Tablet — 1024px and below */
@media (max-width: 1024px) {
    .site-footer__top {
        flex-direction: column;
        gap: 40px;
    }

    /* The logo with the icons under it, then the contact details, which
       take their Location and Contact labels */
    .site-footer__brand {
        flex-direction: row;
        gap: 84px;
        width: auto;
    }

    .site-footer__logo,
    .site-footer__logo img {
        width: 141px;
    }

    .site-footer__logo img {
        height: 114px;
    }

    .site-footer__social {
        gap: 21px;
    }

    .site-footer__label {
        display: block;
        font-size: 14px;
        line-height: 1.4;
        letter-spacing: 4.48px;
        text-transform: uppercase;
        color: var(--color-ink-soft);
    }

    .site-footer__label--spaced {
        margin-top: 0;
    }

    .site-footer__address {
        margin-bottom: 29px;
    }

    .site-footer__contact a,
    .site-footer__address {
        font-weight: 500;
    }

    /* Three across: the last as wide as its words against the right
       edge, the first two sharing what's left (as Figma: columns start
       0, 263 and 526px into 663px). */
    .site-footer__columns {
        grid-template-columns: minmax(max-content, 1fr) minmax(max-content, 1fr) max-content;
        gap: 40px 24px;
    }

    /* Copyright on two lines */
    .site-footer__copyright span {
        display: block;
    }

    .site-footer__copyright .site-footer__separator {
        display: none;
    }
}

/* Tablet only: the logo and contact row shares the columns' grid, so the
   contact details line up with the second column. The last column (Legal)
   fills the two cells beside Help, its links two to a row (as many rows as
   there are links), lined up with the columns above. */
@media (min-width: 768px) and (max-width: 1024px) {
    .site-footer__top {
        display: grid;
        grid-template-columns: minmax(max-content, 1fr) minmax(max-content, 1fr) max-content;
        column-gap: 24px;
    }

    .site-footer__brand,
    .site-footer__columns {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: subgrid;
        column-gap: normal; /* normal: the footer grid's own column gap */
    }

    .site-footer__contact {
        grid-column: 2 / -1;
    }

    .site-footer__column:last-child {
        display: grid;
        grid-column: span 2;
        grid-template-columns: subgrid;
        gap: 14px normal; /* normal: the footer grid's own column gap */
    }

    .site-footer__column:last-child > * {
        grid-column: 1 / -1;
    }

    .site-footer__column:last-child .site-footer__links {
        display: grid;
        grid-template-columns: subgrid;
        gap: 14px normal;
    }
}

/* Mobile — 767px and below */
@media (max-width: 767px) {
    .site-footer {
        padding-bottom: var(--pad-y);
    }

    .site-footer__top {
        gap: 32px;
    }

    .site-footer__brand {
        justify-content: space-between;
        gap: 24px;
    }

    .site-footer__logo,
    .site-footer__logo img {
        width: 106px;
    }

    .site-footer__logo img {
        height: 86px;
    }

    .site-footer__columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 60px;
    }

    /* Each link a 24px tap target (19.2px of text + 2.4px above and
       below), the gap 4.8px smaller so the list looks exactly as before. */
    .site-footer__link {
        font-size: 16px;
        padding-block: 2.4px;
    }

    .site-footer__links {
        gap: 9.2px;
    }

    .site-footer__bottom {
        flex-direction: column;
        padding-top: 0;
        text-align: center;
    }

    /* The icons over the copyright, not in the brand block; no labels */
    .site-footer__social--brand,
    .site-footer__label {
        display: none;
    }

    .site-footer__social--bottom {
        display: flex;
        justify-content: center;
        margin: 0;
    }

    .site-footer__contact a,
    .site-footer__address {
        font-weight: 400;
    }

    .site-footer__address {
        margin-bottom: 1.55em;
    }
}
