/* ── Footer ─────────────────────────────────────────────────
   Figma: desktop 2510:3594, newsletter states 3219:675,
   mobile 2510:5466, tablet 3033:93155.
   ─────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--color-secondary);
    color: var(--color-white);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: calc(var(--site-max-w) + 2 * var(--pad-x));
    margin: 0 auto;
    padding: var(--pad-y) var(--pad-x);
}

.site-footer a {
    color: inherit;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.site-footer__signup {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 780px;
    max-width: 100%;
}

.site-footer__title {
    font-size: 45px;
    font-weight: 600;
    line-height: 48px;
}

.site-footer__subtitle {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 25px;
}

/* Newsletter */
.newsletter {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 588px;
    max-width: 100%;
}

.newsletter__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 4px 16px;
    border-radius: 6px;
    background: var(--color-white);
    box-shadow: 0 0 12px rgb(0 0 0 / 0.12);
    transition: box-shadow var(--transition);
}

/* Outlines are drawn inside, so the field stays 46px tall in every state. */
.newsletter__row:focus-within {
    box-shadow: inset 0 0 0 3px var(--color-primary), 0 0 12px rgb(0 0 0 / 0.2);
}

.newsletter.is-error .newsletter__row {
    box-shadow: inset 0 0 0 1.5px var(--color-error-light), 0 0 12px rgb(0 0 0 / 0.12);
}

.newsletter__input {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 16px;
    line-height: 20.8px;
    color: var(--color-text);
    outline: none;
}

.newsletter__input::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

.newsletter.is-invalid .newsletter__input {
    color: var(--color-error-light);
}

.newsletter__submit {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 12px;
    border: 0;
    border-radius: 4px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 700;
    line-height: 20.8px;
    cursor: pointer;
    transition: background-color var(--transition), opacity var(--transition);
}

.newsletter__submit:hover,
.newsletter__submit:focus-visible {
    background: var(--color-primary-hover);
}

.newsletter__arrow,
.newsletter__spinner {
    display: none;
}

.newsletter__arrow {
    width: 8px;
    height: 8px;
}

.newsletter.is-loading .newsletter__submit {
    min-width: 86px;
    opacity: 0.75;
    cursor: progress;
}

.newsletter.is-loading .newsletter__label,
.newsletter.is-loading .newsletter__arrow {
    display: none;
}

.newsletter.is-loading .newsletter__spinner {
    display: block;
    animation: button-spin 800ms linear infinite;
}

.newsletter__success {
    display: none;
}

.newsletter.is-success .newsletter__row {
    padding-left: 8px;
}

.newsletter.is-success .newsletter__input,
.newsletter.is-success .newsletter__submit {
    display: none;
}

.newsletter.is-success .newsletter__success {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
}

.newsletter__success-icon {
    flex-shrink: 0;
}

.newsletter__message {
    line-height: 20.8px;
}

.newsletter.is-error .newsletter__message {
    color: var(--color-error-light);
}

.newsletter.is-already .newsletter__message {
    color: var(--color-accent);
}

/* Contact row: socials (desktop), phone, email */
.site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.site-footer__socials {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.site-footer__social {
    display: block;
}

.site-footer__social svg {
    display: block;
}

.site-footer__socials--mobile {
    display: none;
}

.site-footer__contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 20.8px;
    white-space: nowrap;
}

.site-footer__contact-icon {
    flex-shrink: 0;
}

/* Link columns */
.site-footer__links {
    display: flex;
    justify-content: center;
    gap: 80px;
    width: 460px;
}

.site-footer__column:first-child {
    width: 128px;
}

.site-footer__column:last-child {
    width: 221px;
}

.site-footer__heading {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-transform: uppercase;
}

.site-footer__menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    line-height: 20.8px;
}

/* Bottom bar */
.site-footer__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgb(255 255 255 / 0.2);
    line-height: 20.8px;
}

.site-footer__copyright {
    width: 240px;
}

.site-footer__address {
    flex: 1 1 0;
    text-align: center;
}

.site-footer__credit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 201px;
    white-space: nowrap;
}

.site-footer__credit:hover,
.site-footer__credit:focus-visible {
    text-decoration: none;
    opacity: 0.8;
}

.site-footer__credit img {
    display: block;
}

/* ── Laptop ─────────────────────────────────────────────── */
@media (max-width: 1366px) {
    .site-footer__signup {
        width: auto;
        flex: 1 1 0;
    }

    .site-footer__links {
        gap: 48px;
        width: auto;
    }

    .site-footer__bottom {
        align-items: center;
    }
}

/* ── Tablet and mobile: one column, centred bottom ──────── */
@media (max-width: 1024px) {
    .site-footer__inner {
        gap: 25px;
        padding: 40px 24px;
    }

    .site-footer__top {
        flex-direction: column;
        gap: 25px;
    }

    .site-footer__signup {
        gap: 15px;
        width: 100%;
    }

    .site-footer__title {
        font-size: 28px;
        line-height: 36px;
    }

    .site-footer__subtitle {
        display: none;
    }

    .newsletter {
        gap: 15px;
        width: 100%;
    }

    .newsletter__input::placeholder {
        color: var(--color-text);
    }

    /* The button becomes an arrow. */
    .newsletter__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .newsletter__arrow {
        display: block;
    }

    .newsletter__message {
        font-size: 14px;
        color: rgb(255 255 255 / 0.5);
    }

    .site-footer__contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .site-footer__socials--desktop {
        display: none;
    }

    .site-footer__contact-link {
        font-family: var(--font-heading);
        font-size: 20px;
        font-weight: 600;
        line-height: 25px;
    }

    .site-footer__contact-icon {
        width: 26px;
        height: 26px;
    }

    .site-footer__links {
        align-self: center;
        gap: 20px;
        width: 345px;
        max-width: 100%;
    }

    .site-footer__column:first-child,
    .site-footer__column:last-child {
        flex: 1 1 0;
        width: auto;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding-top: 15px;
        text-align: center;
    }

    .site-footer__address {
        order: -1;
    }

    .site-footer__copyright,
    .site-footer__credit {
        width: auto;
    }

    .site-footer__socials--mobile {
        display: flex;
        justify-content: center;
    }
}
