/*
 * Site footer — matches https://x.ai/ footer system:
 *   mx-auto w-full px-4 lg:px-6 xl:max-w-7xl
 *   border-t border-border pt-10 pb-16
 *   brand column + multi-column link grid
 *   text-[13px] primary/50 links, primary/70 headers
 */

.site-footer {
    width: 100%;
    background-color: hsl(var(--background, 0 0% 100%));
    color: hsl(var(--primary, 0 0% 4%));
    font-family: var(--font-universal-sans, "universalSans", "universalSans Fallback", ui-sans-serif, system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}

.site-footer__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--stripe-content-max-width, 100%);
    margin-inline: auto;
    padding-block: 2.5rem 4rem; /* pt-10 pb-16 */
    padding-inline: var(--stripe-content-margin, 1rem);
    border-top: 1px solid hsl(var(--border, 222 19% 86%)); /* border-border */
}

.site-footer__layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* gap-10 */
}

@media (min-width: 1024px) {
    .site-footer__layout {
        flex-direction: row;
        gap: 4rem; /* lg:gap-16 */
    }
}

/* Left brand column — lg:w-[280px] */
.site-footer__brand {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .site-footer__brand {
        width: 280px;
    }
}

.site-footer__brand-mark {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: inherit;
}

.site-footer__logo-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.site-footer__logo-stack span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 1px;
}

.site-footer__logo-stack .green { background: #22c55e; }
.site-footer__logo-stack .red { background: #ef4444; }
.site-footer__logo-stack .blue { background: #3b82f6; }

.site-footer__brand-name {
    margin: 0;
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: hsl(var(--primary, 0 0% 4%));
}

/* text-secondary text-[10px] — © line */
.site-footer__copy {
    display: block;
    margin-top: 1.25rem; /* mt-5 */
    font-size: 10px;
    line-height: 1;
    font-weight: 400;
    color: hsl(var(--secondary, 216 4% 51%)); /* text-secondary */
}

/* Vertical dashed divider (desktop only) */
.site-footer__divider {
    display: none;
    flex-shrink: 0;
    width: 0;
    border-left: 1px dashed hsl(var(--primary, 0 0% 4%) / 0.1);
    align-self: stretch;
}

@media (min-width: 1024px) {
    .site-footer__divider {
        display: block;
    }
}

/* Link grid — grid-cols-2 md:3 lg:4 */
.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem; /* gap-x-8 */
    row-gap: 2rem; /* gap-y-8 */
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 768px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 3rem; /* md:gap-x-12 */
    }
}

@media (min-width: 1024px) {
    .site-footer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-left: auto; /* lg:ml-auto */
        column-gap: 3.5rem; /* lg:gap-x-14 */
        row-gap: 2.5rem; /* lg:gap-y-10 */
    }
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* text-primary/70 mb-1.5 text-[13px] font-medium */
.site-footer__heading {
    display: block;
    margin: 0 0 0.375rem; /* mb-1.5 */
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    color: hsl(var(--primary, 0 0% 4%) / 0.7);
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* gap-1 */
    margin: 0;
    padding: 0;
    list-style: none;
}

/* text-primary/50 hover:text-primary text-[13px] leading-relaxed */
.site-footer__link {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.625; /* leading-relaxed */
    color: hsl(var(--primary, 0 0% 4%) / 0.5);
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer__link:hover {
    color: hsl(var(--primary, 0 0% 4%));
}

.site-footer__link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
}
