.site-footer {
    background: var(--eave-shadow);
    color: var(--trim-shade);
    font-size: var(--type-label);
    padding-top: 56px;
}

.footer-grid {
    display: grid;
    /* fit-content, not a minmax track: the info plate's own two columns are
       already capped by .footer-brand/.footer-contact's max-width, so the
       track should hug that content instead of reserving a fixed width the
       divider then floats inside of, leaving dead space before it. */
    grid-template-columns: fit-content(29rem) minmax(0, 1fr);
    column-gap: clamp(48px, 6vw, 96px);
    align-items: start;
    padding-bottom: 48px;
}

/* Branding left, contact/hours right: two content-sized columns, not a
   stretchy 1fr, so they sit close together instead of spreading across
   the full stacked-width at the 1100px breakpoint. */
.footer-info {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    column-gap: 12px;
    padding-right: clamp(8px, 1.5vw, 28px);
    border-right: 1px solid rgba(246, 245, 241, 0.12);
}

/* A landing page's footer has no directory beside the plate, so no divider. */
.footer-info:only-child {
    padding: 0;
    border: 0;
}

.footer-brand {
    max-width: 240px;
}

/* One size at every width, so the slogan below always spans the logo. The
   header steps down on phones; the footer has the room. */
.site-footer .brand-lockup {
    height: 64px;
}

.footer-info p {
    max-width: 42ch;
    margin-top: 4px;
    font-size: var(--type-ui);
    line-height: 1.55;
    letter-spacing: 0.01em;
}

/* The brand line, not a sentence of copy: set at subhead size. */
/* Centred on the lockup, leaf to the last "s": the slogan block is exactly
   the logo's width (228px at the footer's 64px height). */
.footer-slogan {
    width: 228px;
    margin-top: 0;
    font-size: var(--type-ui);
    line-height: 1.4;
    text-align: center;
    text-wrap: balance;
    color: var(--trim-shade);
}

.footer-nav {
    display: grid;
}

/* Each category is a ruled row, label beside a horizontally wrapped link
   list, echoing the .service-block label-column idiom instead of stacking
   every link one per line. */
.footer-category {
    display: grid;
    grid-template-columns: 128px 1fr;
    column-gap: 24px;
    padding-block: 18px;
    border-top: 1px solid rgba(246, 245, 241, 0.12);
}

.footer-category:first-child {
    border-top: 0;
    padding-top: 0;
}

.footer-category:last-child {
    padding-bottom: 0;
}

.site-footer h2 {
    font-size: var(--type-ui);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--trim-white);
}

.footer-category ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

/* Screen width alone doesn't tell you the input method: a landscape phone
   or small tablet lands well above the 600px stacking breakpoint but is
   still a thumb, not a cursor. Loosen the wrap's pitch there without
   restructuring it, full block rows are reserved for the width the wrap
   itself can no longer use (max-width: 600px, below). */
@media (pointer: coarse) {
    .footer-category ul {
        gap: 16px 26px;
    }

    .footer-category ul a {
        display: inline-block;
        padding-block: 6px;
    }

    .footer-contact {
        gap: 14px;
    }
}

.site-footer a {
    color: var(--trim-white);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .brand {
    color: var(--trim-white);
    margin-bottom: 16px;
}

.site-footer .brand:hover {
    text-decoration: none;
}

.footer-contact {
    display: grid;
    gap: 6px;
    max-width: 170px;
    padding-left: 14px;
    border-left: 1px solid rgba(246, 245, 241, 0.12);
    font-size: var(--type-label);
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.footer-bottom {
    border-top: 1px solid rgba(246, 245, 241, 0.12);
    padding-block: 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: var(--type-label);
}

.footer-bottom nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.eho {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .footer-info {
        padding-right: 0;
        border-right: none;
        padding-bottom: 32px;
        border-bottom: 1px solid rgba(246, 245, 241, 0.12);
    }
}

@media (max-width: 600px) {
    /* Footer on a phone. One link per full-width row ran to thirty rows and
       two and a half screens. The four groups sit two abreast instead, so
       every link is still on the page at about half the height; call and
       email become two buttons; the legal links share one line. */
    .footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
    }

    .footer-category,
    .footer-category:first-child,
    .footer-category:last-child {
        display: block;
        padding: 0;
        border-top: 0;
    }

    .footer-category:nth-child(n + 3) {
        padding-top: 24px;
        border-top: 1px solid rgba(246, 245, 241, 0.12);
    }

    .site-footer h2 {
        margin-bottom: 4px;
    }

    .footer-category ul {
        display: block;
    }

    .footer-category ul a {
        font-size: var(--type-ui);
        line-height: 1.25;
        color: var(--trim-shade);
    }

    .footer-info {
        grid-template-columns: 1fr;
        row-gap: 24px;
    }

    .footer-brand,
    .footer-contact {
        max-width: none;
    }

    /* Stacked, the logo and slogan centre on the page as one block. */
    .footer-brand {
        display: grid;
        justify-items: center;
    }

    .footer-contact {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding-left: 0;
        border-left: 0;
    }

    /* .site-footer is in the selector to outrank the 44px touch floor set on
       .footer-contact > a further down the file. */
    .site-footer .footer-contact > a {
        display: inline-flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 14px;
        border: 1px solid rgba(246, 245, 241, 0.32);
        border-radius: 3px;
        font-size: var(--type-ui);
        white-space: nowrap;
    }

    .footer-contact > span {
        flex: 1 1 100%;
        padding-block: 4px 0;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .footer-bottom nav {
        gap: 0 22px;
    }
}

/* ---------------------------------------------------------------------------
   Touch target floor

   WCAG 2.5.5 (AAA) wants 44px. The footer links sat at 39.4px and the area
   card-links at 24px, close enough to look fine and miss often, one-handed.
   Prose links are deliberately excluded: an inline link inside a sentence is
   exempt under 2.5.8, and padding one out would wreck the line box.
   --------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .site-footer nav a,
    .footer-bottom nav a,
    .footer-contact > a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
