/**
 * Site footer — Contact (2 cols) + nav menu + wordmark.
 * Visual fidelity with react-src/components/layout/footer.
 */

:root {
    --site-footer-ease: cubic-bezier(0.26, 1.04, 0.54, 1);
    --site-footer-mail-bg: #0F0F0F;
    --site-footer-mail-fg: #FFFFFF;
    --site-footer-address-bg: #F7F7F7;
    --site-footer-address-fg: #000000;
    --site-footer-nav-bg: #f6f6f6;
    --site-footer-nav-fg: #000000;
    --site-footer-gap: clamp(16px, 3vw, 48px);
}

/* Horizontal padding comes from body (--page-gutter). Vertical is react-src:
   top = 2 × margin, bottom = margin. */
.site-footer {
    position: relative;
    padding: calc(2 * var(--page-gutter)) 0 var(--page-gutter);
    font-family: var(--wp--preset--font-family--sharp-grotesk, "sharp-grotesk", Arial, Helvetica, sans-serif);
}

/* ---------- Contact (2 cols desktop, stacked mobile) ---------- */

.site-footer__contact {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: var(--site-footer-gap);
}

@media (min-width: 769px) {
    .site-footer__contact {
        grid-template-columns: 1fr 1fr;
    }
}

.site-footer__mail,
.site-footer__address {
    box-sizing: border-box;
    padding: 6.03vw;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .site-footer__mail,
    .site-footer__address {
        padding: 3.02vw;
    }
}

.site-footer__mail {
    background-color: var(--site-footer-mail-bg);
    color: var(--site-footer-mail-fg);
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 30vh;
}

.site-footer__address {
    background-color: var(--site-footer-address-bg);
    color: var(--site-footer-address-fg);
}

/* H2 "Interact with us" / "or pass by, the human way" — matches
 * react-src ContactTitle (8vw mobile, 3.5vw desktop, no letter-spacing). */
.site-footer__title {
    margin: 0;
    font-weight: 500;
    font-size: 8vw;
    line-height: 1.1;
}

@media (min-width: 769px) {
    .site-footer__title {
        font-size: 3.5vw;
    }
}

/* "Send mail" button — clone of react-src's Button base (height + horizontal
 * padding, no vertical padding) plus MailButton's margin-top above. */
.site-footer__mail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 10.73vw;
    padding: 0 6.12vw;
    background: #FFF;
    color: #000;
    font-family: var(--wp--preset--font-family--sharp-grotesk-expanded, "sharp-grotesk-expanded", Arial, Helvetica, sans-serif);
    font-size: 2.67vw;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
    align-self: center;
    margin-top: 6.03vw;
    transition: transform 1s var(--site-footer-ease);
    will-change: transform;
}

@media (min-width: 769px) {
    .site-footer__mail-button {
        height: 3.02vw;
        padding: 0 2.13vw;
        font-size: 0.73vw;
        margin-top: 1.51vw;
    }
}

.site-footer__mail-button:hover {
    transform: scale(1.08);
}
.site-footer__mail-button:active {
    transform: scale(1.04);
}

/* Spacing between the address block and the opening-hours block, and
 * between the h2 and the first block — matches react-src's `p { margin-top }`
 * inside FooterAddressContainer: 6.03vw mobile, 1.51vw (= 3.02/2) desktop. */
.site-footer__block {
    margin-top: 6.03vw;
}

.site-footer__block p {
    margin: 0;
    font-size: 3vw;
    line-height: 1.5;
}

@media (min-width: 769px) {
    .site-footer__block {
        margin-top: 1.51vw;
    }

    .site-footer__block p {
        font-size: 1.4vw;
        line-height: 1.4;
    }
}

.site-footer__block-label {
    font-weight: 500;
}

.site-footer__block a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* ---------- Nav menu row (animated buttons) ---------- */

/* Menu ⇢ wordmark gap = nav margin-bottom + logo padding-top.
 * react-src has just `margin: 3.02vw 0` on FooterNavMenu and zero on Logo,
 * so the only contribution is 3.02vw desktop / 6.03vw mobile. */
.site-footer__nav {
    margin: 0 0 6.03vw;
}

@media (min-width: 769px) {
    .site-footer__nav {
        margin-bottom: 3.02vw;
    }
}

/* Container — react-src FooterMenu uses border-right: none so the right
 * edge of the menu is provided by the last cell's own border-right. */
.site-footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    border: 2px solid #000;
    border-right: none;
}

/* Cell height matches react-src FooterLink: 14.2vw on all viewports
 * (272px @ 1920, 53px @ 375 mobile) — pure vw, no clamp. */
.site-footer-nav-list > li {
    flex: 1 1 auto;
    position: relative;
    height: 14.2vw;
    background-color: var(--site-footer-nav-bg);
    overflow: hidden;
    border-right: 2px solid #000;
}

/* The sliding black fill and the label sit in ::before / ::after, reproducing
   the react-src mix-blend-mode trick: the label color stays readable both on
   light and dark backgrounds thanks to difference blending. */
.site-footer-nav-list > li::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #000;
    transform: translate3d(0, 101%, 0);
    transition: transform 700ms var(--site-footer-ease);
    z-index: 1;
}

/* Label — react-src FooterLink::after font-size: 3vw mobile / 1.5vw desktop.
 * No letter-spacing in react-src either. */
.site-footer-nav-list > li > a {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    mix-blend-mode: difference;
    font-family: var(--wp--preset--font-family--sharp-grotesk-expanded, "sharp-grotesk-expanded", Arial, Helvetica, sans-serif);
    font-size: 3vw;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 700ms var(--site-footer-ease);
    z-index: 2;
}

@media (min-width: 769px) {
    .site-footer-nav-list > li > a {
        font-size: 1.5vw;
    }
}

.site-footer-nav-list > li:hover::before,
.site-footer-nav-list > li:focus-within::before {
    transform: translate3d(0, 0, 0);
}

.site-footer-nav-list > li:hover > a,
.site-footer-nav-list > li:focus-within > a {
    transform: translate3d(0, -0.4vw, 0);
}

.site-footer-nav-list .current-menu-item::before,
.site-footer-nav-list .current_page_item::before {
    transform: translate3d(0, 0, 0);
}

/* ---------- Wordmark ---------- */

/* No padding on the wordmark itself — react-src's Logo is a raw SVG and
 * relies on FooterNavMenu's margin-bottom (above) and FooterContainer's
 * padding-bottom (below, = `.site-footer` padding-bottom here) to provide
 * its breathing room. */
.site-footer__logo {
    display: block;
    color: #000;
    padding: 0;
}

.site-footer__logo svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Small screens ---------- */

@media (max-width: 768px) {
    /* Mobile hover lift is larger to keep the motion proportional to the
     * 14.2vw cell height (which is ~53px on a 375 viewport). */
    .site-footer-nav-list > li:hover > a,
    .site-footer-nav-list > li:focus-within > a {
        transform: translate3d(0, -1vw, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer-nav-list > li::before,
    .site-footer-nav-list > li > a,
    .site-footer__mail-button {
        transition-duration: 0.01ms !important;
    }
}
