.site-footer {
    position: relative;
    margin-top: 72px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    box-shadow: 0 -14px 36px rgba(37, 99, 235, .06);
}

.site-footer::before {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: min(720px, 62vw);
    height: 2px;
    content: "";
    border-radius: 0 0 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, .62), rgba(59, 130, 246, .22) 58%, transparent);
    box-shadow: 0 3px 12px rgba(37, 99, 235, .12);
}

.footer-main {
    position: relative;
    overflow: hidden;
    padding: 64px 20px 58px;
}

.footer-main::before {
    position: absolute;
    top: -160px;
    right: -100px;
    width: 360px;
    height: 360px;
    content: "";
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft) 0, transparent 68%);
    opacity: .6;
}

.footer-main::after {
    position: absolute;
    top: 0;
    left: -30%;
    width: 24%;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, #fff, transparent);
    opacity: .8;
    animation: footer-shimmer 7s ease-in-out infinite;
}

@keyframes footer-shimmer {
    0%, 18% { left: -30%; }
    58%, 100% { left: 110%; }
}

.footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(130px, .65fr) minmax(130px, .65fr) minmax(280px, 1.35fr);
    gap: clamp(32px, 5vw, 72px);
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-logo .custom-logo {
    display: block;
    width: auto;
    max-width: 190px;
    height: auto;
    max-height: 58px;
}

.footer-logo .site-title {
    color: var(--text-primary);
    font-size: 1.45rem;
    font-weight: var(--fw-bold);
    text-decoration: none;
}

.footer-intro {
    max-width: 32ch;
    margin: 20px 0 24px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-socials a {
    display: inline-grid;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 11px;
    background: var(--bg-soft);
    place-items: center;
    box-shadow: 0 2px 8px transparent;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
    color: #fff;
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}

.footer-socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-column h2,
.footer-newsletter h2 {
    margin: 0 0 20px;
    color: var(--text-primary);
    font-size: var(--fs-base);
}

.footer-column ul {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column a {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    text-decoration: none;
}

.footer-column a:hover,
.footer-column a:focus-visible {
    color: var(--accent-primary);
}

.footer-newsletter {
    padding: 26px;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    background: var(--bg-soft);
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.footer-newsletter:hover {
    border-color: color-mix(in srgb, var(--accent-primary) 32%, var(--border-light));
    box-shadow: 0 16px 38px rgba(37, 99, 235, .12);
    transform: translateY(-4px);
}

.footer-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-primary);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-newsletter h2 {
    margin-bottom: 8px;
    font-size: var(--fs-md);
}

.footer-newsletter > p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.footer-newsletter-form {
    display: block;
}

.footer-email-row {
    display: flex;
    gap: 8px;
}

.footer-email-row input {
    min-width: 0;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    outline: none;
    background: var(--input-bg);
}

.footer-email-row input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.footer-email-row button {
    min-width: 70px;
    padding: 0 16px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: var(--accent-primary);
    font-weight: var(--fw-semibold);
    cursor: pointer;
}

.footer-email-row button:hover {
    background: var(--accent-hover);
}

.footer-newsletter-form .newsletter-consent {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 11px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.footer-newsletter-form .newsletter-consent input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.footer-newsletter-form .newsletter-message {
    margin-top: 8px;
    font-size: 12px;
}

.footer-account-cta {
    color: var(--accent-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-decoration: none;
}

.footer-bottom {
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    background: var(--bg-soft);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 20px;
    font-size: var(--fs-xs);
}

@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: 1.35fr .65fr .65fr;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .site-footer {
        margin-top: 48px;
    }

    .footer-main {
        padding: 44px 20px 40px;
    }

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

    .footer-brand,
    .footer-newsletter {
        grid-column: 1 / -1;
    }

    .footer-bottom-inner {
        display: grid;
        text-align: center;
    }
}

@media (max-width: 390px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand,
    .footer-newsletter {
        grid-column: auto;
    }

    .footer-email-row {
        display: grid;
    }

    .footer-email-row button {
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-main::after {
        animation: none;
    }

    .footer-newsletter,
    .footer-socials a {
        transition: none;
    }
}
