﻿/*
 * Bespoke Selections - site footer (shared by all pages)
 * slim band / tinted row of four columns / copyright band
 */

.site-footer {
    --footer-band: #62666C;   /* a lighter graphite than the text colour */
    --footer-edge: max(24px, calc((100vw - 1560px) / 2), 4vw);
    position: relative;
    background-color: #EFEEEA;
    color: #4B4E53;
}

.site-footer-band {
    height: 30px;
    background-color: var(--footer-band);
}

.site-footer-main {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 18px var(--footer-edge);
}

.site-footer-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 24px;
}

/* thin dividers that stop short of the bands */
.site-footer-col + .site-footer-col {
    border-left: 2px solid #62666C;
}

.site-footer-logo {
    justify-content: flex-start;
    padding-left: 0;
}

.site-footer .site-footer-logo img {
    display: block;
    width: clamp(210px, 17vw, 300px);
    max-width: none;
    height: auto;
}

.site-footer-contact {
    position: relative;
    padding-bottom: 10px;
    font-size: clamp(17px, 1.3vw, 21px);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4B4E53;
    text-decoration: none;
}

/* gold underline, a little longer than the words */
.site-footer-contact::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% + 36px);
    height: 3px;
    background-color: #8A7E2D;
    transition: width 0.3s ease;
}

.site-footer-contact:hover,
.site-footer-contact:focus {
    color: #4B4E53;
    text-decoration: none;
}

.site-footer-contact:hover::after {
    width: 100%;
}

.site-footer-legal {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.site-footer-legal li + li {
    margin-top: 12px;
}

.site-footer-legal a {
    font-size: 16px;
    letter-spacing: 0.03em;
    color: #4B4E53;
    text-decoration: none;
}

.site-footer-legal a:hover {
    color: #8A7E2D;
    text-decoration: none;
}

.site-footer-social {
    gap: clamp(16px, 2vw, 36px);
}

.site-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(48px, 3.6vw, 66px);
    height: clamp(48px, 3.6vw, 66px);
    border-radius: 50%;
    background-color: #4B4E53;
    color: #fff;
    font-size: clamp(17px, 1.2vw, 22px);
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.site-footer-social a:hover {
    background-color: #8A7E2D;
    color: #fff;
    transform: translateY(-3px);
}

.site-footer-copy {
    height: auto;
    padding: 10px var(--footer-edge);
}

.site-footer-copy p {
    margin: 0;
    padding-left: 14px;
    padding-right: 52px;   /* keeps the text clear of the scroll-to-top button */
    font-size: 15px;
    line-height: 24px;     /* band is 44px tall */
    letter-spacing: 0.02em;
    color: #fff;
}

/* sits in the copyright band, near the right edge */
.site-footer a.link-to-top {
    top: auto;
    bottom: 5px;
    right: 15px;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

/* tablets: 2 x 2 */
@media (max-width: 991.98px) {
    .site-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer-col {
        min-height: 130px;
        justify-content: flex-start;
    }

    /* left column sits on the page edge, right column just inside the divider */
    .site-footer-col:nth-child(odd) {
        padding-left: 0;
    }

    .site-footer-col:nth-child(even) {
        padding-left: 40px;
    }

    /* the logo file has a transparent margin on its left */
    .site-footer .site-footer-logo img {
        margin-left: -12px;
    }

    .site-footer-col:nth-child(3) {
        border-left: none;
    }

    .site-footer-col:nth-child(n+3) {
        border-top: 2px solid #4B4E53;
    }
}

/* phones: one column */
@media (max-width: 575.98px) {
    .site-footer-main {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 0;
        padding-bottom: 0;
    }

    .site-footer-col,
    .site-footer-col:nth-child(n),
    .site-footer-logo {
        min-height: 0;
        padding: 28px 0;
        justify-content: flex-start;
    }

    /* indent the list so the bullets sit inside the edge */
    .site-footer-legal {
        padding-left: 24px;
    }

    .site-footer-col + .site-footer-col {
        border-left: none;
        border-top: 1px solid #62666C;
    }
}
