/* ---------- footer ---------- */

.footer {
    background: var(--navy);
    color: #fff;
}

/* Mobile first: the two short link lists sit side by side so the footer stays
   a footer rather than a full screen. The office block spans both. */

.footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
    padding-block: 34px 30px;
}

.footer__col--office { grid-column: 1 / -1; }

@media (min-width: 768px) {
    .footer__grid { gap: 34px 32px; padding-block: 44px; }
}

@media (min-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr 1.5fr;
        gap: 32px;
        padding-block: 48px;
    }

    .footer__col--office { grid-column: auto; }
}

.footer h2 {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--gold-light);
}

@media (min-width: 768px) {
    .footer h2 { margin-bottom: 18px; font-size: 13px; letter-spacing: 0.14em; }
}

.footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__links li + li { margin-top: 2px; }

.footer__links a {
    display: inline-block;
    padding-block: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.25s;
}

@media (min-width: 768px) {
    .footer__links li + li { margin-top: 4px; }
    .footer__links a { font-size: 15px; line-height: 1.6; }
}

.footer__links a:hover,
.footer__links a:focus-visible { color: #fff; }

.footer__office {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
}

.footer__office li {
    display: flex;
    gap: 9px;
}

.footer__office li + li { margin-top: 8px; }

.footer__office svg {
    margin-top: 3px;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    color: var(--gold-light);
}

@media (min-width: 768px) {
    .footer__office { font-size: 15px; line-height: 1.6; }
    .footer__office li { gap: 10px; }
    .footer__office li + li { margin-top: 10px; }
    .footer__office svg { margin-top: 4px; flex-basis: 16px; width: 16px; height: 16px; }
}

.footer__office a {
    text-decoration: none;
    transition: color 0.25s;
}

.footer__office a:hover,
.footer__office a:focus-visible { color: #fff; }

.footer__bar {
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--navy-deep);
    overflow: hidden;
}

.footer__bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/copy-right-bg.png') center / cover;
    opacity: 0.07;
    mix-blend-mode: screen;
}

.footer__bar-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding-block: 15px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
    .footer__bar-inner {
        flex-direction: row;
        gap: 12px;
        padding-block: 22px;
        font-size: 14px;
        text-align: left;
    }
}

.footer__bar p { margin: 0; }

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 10px;
}

@media (min-width: 768px) {
    .footer__legal { gap: 4px 12px; }
}

.footer__legal a {
    text-decoration: none;
    transition: color 0.25s;
}

.footer__legal a:hover,
.footer__legal a:focus-visible { color: #fff; }

/* ---------- phones and small tablets ----------
   Below 768px the headings go and the footer becomes three tight bands:
   the eight links as a four-column row pair divided by hairlines, the
   office block, and a centred copyright bar. No content is hidden. */

@media (max-width: 767px) {
    .footer__grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 0;
        row-gap: 0;
        padding-block: 9px 8px;
    }

    .footer h2 { display: none; }

    /* each list is exactly one row of four, so the links share one grid */
    .footer__col:not(.footer__col--office),
    .footer__col:not(.footer__col--office) .footer__links { display: contents; }

    .footer__links li { margin: 0; }
    .footer__links li + li { margin-top: 0; }

    /* the divider falls between columns, never at the start of a row */
    .footer__links li:not(:first-child) {
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 9px;
    }

    .footer__links a {
        display: block;
        padding: 2px 0;
        font-size: 11.5px;
        line-height: 1.45;
        white-space: nowrap;
    }

    .footer__col--office {
        grid-column: 1 / -1;
        margin-top: 7px;
        padding-top: 7px;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .footer__office {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0;
        font-size: 11px;
        line-height: 1.5;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .footer__office li { display: flex; gap: 7px; }
    .footer__office li + li { margin-top: 0; }

    /* the pin floats, so the address wraps under it at full width
       instead of in a narrow column beside it */
    .footer__office li:first-child {
        display: block;
        width: 100%;
        margin-bottom: 3px;
    }

    .footer__office li:first-child svg { float: left; margin: 2px 7px 0 0; }

    /* phone and web address share the row, split by a hairline bar */
    .footer__office li:last-child::before {
        content: '|';
        color: rgba(255, 255, 255, 0.28);
        padding: 0 10px;
    }

    .footer__office svg {
        display: block;
        flex: 0 0 13px;
        width: 13px;
        height: 13px;
        margin-top: 2px;
    }

    .footer__office strong { font-weight: 600; color: #fff; }
    .footer__office a { display: inline-block; padding-block: 1px; }

    .footer__bar-inner {
        align-items: center;
        gap: 2px;
        padding-block: 7px;
        font-size: 11px;
        text-align: center;
    }

    .footer__legal { justify-content: center; gap: 0 9px; }
}

/* Narrow phones can't fit four link columns, so there they fall to two. */

@media (max-width: 359px) {
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* with two per row the divider belongs only on the second column */
    .footer__links li:not(:first-child) { border-left: 0; padding-left: 0; }
    .footer__links li:nth-child(2n) {
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 9px;
    }
}
