/* ==============================
   12) FOOTER (Dark Theme)
   ============================== */

.site-footer {
    position: relative;
    /* Base Dark Theme (Gradient Only) */
    background: radial-gradient(circle at 50% 0%, #1e3a8a 0%, #0f172a 100%);
    color: #fff;
    padding-block: var(--space-10) var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden; /* For pseudo-element containment */
}

/* Structural Grid with Variable Density (Masked) */
/* Structural Grid (Abstract Flow - Visible) */
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.85;

    background-image: url("data:image/svg+xml,%3Csvg width='160' height='40' viewBox='0 0 160 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M0 10h160'/%3E%3Cpath d='M0 20h160'/%3E%3Cpath d='M0 30h160'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='40' cy='20' r='1'/%3E%3Ccircle cx='80' cy='10' r='1'/%3E%3Ccircle cx='120' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E");

    background-size: 160px 40px;
    background-repeat: repeat;

    /* Fade upward to avoid visual weight */
    mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.6) 50%,
        rgba(0,0,0,0) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0.6) 50%,
        rgba(0,0,0,0) 100%
    );

    pointer-events: none;
    z-index: 0;
}

/* Ensure content sits above the pattern */
.site-footer > * {
    position: relative;
    z-index: 1;
}

.site-footer a:not(.button) {
    color: #cbd5e1; /* Slate 300 */
    transition: color .2s ease;
}

.site-footer a:not(.button):hover {
    color: var(--brand-accent);
    text-decoration: none;
}

/* Grid layout: 1 Brand column + 4 equal Navigation columns */
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: var(--space-8, 2rem);
    align-items: start;
    margin-bottom: var(--space-8, 2rem);
    width: 100%; 
}

/* Logo compound */
.footer__brand-link {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    text-decoration: none;
    color: var(--white);
}
.footer__brand-link:hover {
    text-decoration: none;
}

/* Body text */
.footer__text {
    color: #cbd5e1; /* Slate 300 */
    font-size: 0.925rem;
    max-width: 34ch;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Contact block */
.footer__contact {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.contact__row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.5;
}

.contact__row i {
    color: var(--brand-accent);
    width: 1rem;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

.contact__row a {
    color: var(--white);
    text-decoration: none;
    transition: color .2s ease;
}

.contact__row a:hover {
    color: var(--brand-accent);
}

/* Footer Nav Columns */
.footer__col {
    display: flex;
    flex-direction: column;
}

.footer__col-title {
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 1.25rem 0;
}

.footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__list a,
.footer__list button {
    font-size: 0.875rem;
    background: none;
    border: none;
    padding: 0;
    color: #cbd5e1; /* Slate 300 */
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: color .2s ease;
}

.footer__list button:hover,
.footer__list a:hover {
    color: var(--brand-accent);
    text-decoration: none;
}

/* CTA in Nav Column */
.footer__col-cta {
    margin-top: 1.5rem;
}

.footer__col-cta .button--sm {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
}

/* Bottom Bar */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-6, 1.5rem);
    display: flex;
    justify-content: center;
    text-align: center;
}

.footer__legal {
    font-size: 0.85rem;
    color: #94a3b8; /* Slate 400 */
}

/* Responsive */
@media (max-width: 1200px) {
    .footer__grid {
        grid-template-columns: 1.2fr repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1.3fr repeat(2, 1fr);
        row-gap: 2.5rem;
        column-gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }
    
    .footer__brand {
        grid-column: 1 / -1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .footer__col-title {
        font-size: 0.8rem;
        margin-bottom: 0.9rem;
    }

    .footer__list {
        gap: 0.65rem;
    }

    .footer__list a,
    .footer__list button {
        font-size: 0.825rem;
        line-height: 1.4;
    }

    .footer__col-cta {
        margin-top: 1.25rem;
    }
    
    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1rem;
    }

    .footer__col-cta {
        grid-column: 1 / -1;
    }

    .footer__col-cta .button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}