.site-footer {
    background-color: var(--card);
    border-top: 1px solid var(--rgba2);
    color: var(--text1);
    padding-block: 4rem 2rem;
    padding-inline: 2rem;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--text1);
}

.footer-brand .accent {
    color: var(--primary2);
}

.footer-tagline {
    color: var(--rgba3);
    font-size: 14px;
    margin-bottom: 2rem;
    max-width: 90%;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rgba2);
    color: var(--text1);
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-social a:focus-visible {
    outline: 2px solid var(--primary1);
    outline-offset: 3px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    font-size: 15px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--rgba3);
    text-decoration: none;
    font-size: 13.5px;
    font-family: 'Manrope', sans-serif;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-col a:focus-visible {
    outline: 2px solid var(--primary1);
    outline-offset: 3px;
    border-radius: 3px;
}

.footer-divider {
    height: 1px;
    background-color: var(--rgba2);
    margin: 2rem 0;
    transition: background-color 0.3s ease;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--rgba3);
    font-size: 13px;
}

.footer-copy {
    margin: 0;
}

.footer-copy strong {
    color: var(--text1);
    font-weight: 600;
}

.footer-made {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-made i {
    color: var(--primary1);
}

.footer-mini {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-mini a {
    color: var(--rgba3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-mini a:focus-visible {
    outline: 2px solid var(--primary1);
    outline-offset: 3px;
    border-radius: 3px;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary2);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--rgba1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease,
                visibility 0.3s ease, background-color 0.3s ease,
                box-shadow 0.3s ease;
    z-index: 9999;
    will-change: transform, opacity;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:focus-visible {
    outline: 2px solid var(--primary1);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .footer-social a:hover {
        background: var(--primary2);
        color: #ffffff;
        transform: translateY(-3px);
        box-shadow: 0 4px 12px var(--rgba1);
    }

    .footer-col a:hover {
        color: var(--primary2);
        transform: translateX(5px);
    }

    .footer-mini a:hover {
        color: var(--text1);
    }

    .back-to-top:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 8px 16px var(--rgba1);
    }
}

@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-tagline {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .site-footer {
        padding-block: 3rem 1.5rem;
        padding-inline: 1.5rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand .footer-logo {
        justify-content: center;
    }

    .footer-mini {
        justify-content: center;
        flex-wrap: wrap;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer,
    .footer-social a,
    .footer-col a,
    .footer-mini a,
    .back-to-top {
        transition: none;
    }
}