/* Site footer: shared by every page. Dark, so the white logo mark (altigrid-logo-footer.svg) reads.
   The layout still comes from each page's Tailwind classes; this file only sets the colors and the logo.
   Selectors use the element name too, so they win over Tailwind's single-class color utilities. */

:root {
    --footer-bg: #000000;
    --footer-text: #ffffff;
    --footer-text-muted: #a3a3a3;   /* 8.5:1 on black */
    --footer-line: rgba(255, 255, 255, 0.14);
}

/* Geist throughout, over the pages' older Ronzino rule */
footer.site-footer,
footer.site-footer *,
div.site-footer-bar,
div.site-footer-bar * {
    font-family: "Geist", -apple-system, system-ui, sans-serif !important;
}

footer.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    box-shadow: 0 0 0 100vmax var(--footer-bg); /* full-bleed background, even inside a narrower page wrapper */
    clip-path: inset(0 -100vmax);
}

footer.site-footer * {
    border-color: var(--footer-line);
}

/* Column headings grey, links white (design-refs/footer.png) */
footer.site-footer h4 {
    color: var(--footer-text-muted) !important; /* #a3a3a3 */
    font-family: "Geist Mono", ui-monospace, monospace !important;
    font-size: 0.8125rem !important; /* 13px */
}

footer.site-footer p,
footer.site-footer ul {
    color: var(--footer-text-muted);
}

footer.site-footer a {
    color: var(--footer-text) !important; /* beats the pages' old grey "footer a" rule */
    transition: color 0.2s ease;
}

div.site-footer-bar a {
    color: var(--footer-text-muted) !important;
    transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    footer.site-footer a:hover {
        color: var(--footer-text-muted) !important;
        opacity: 1;
    }

    div.site-footer-bar a:hover {
        color: var(--footer-text) !important;
        opacity: 1;
    }
}

footer.site-footer a:focus-visible,
div.site-footer-bar a:focus-visible {
    color: var(--footer-text) !important;
    outline: 2px solid var(--footer-text);
    outline-offset: 2px;
}

/* The logo mark, on its own at the left end (design-refs/footer.png): 30px tall on phones, about 35px at 1440px,
   40px max. No tagline under it, and no lines between the link columns. */
footer.site-footer .site-footer__logo {
    display: block;
    width: auto;
    max-width: none;
    height: clamp(1.875rem, 1.65rem + 0.6vw, 2.5rem);
}

/* The columns sit side by side, each as wide as its longest link (64px apart on tablets). From 1024px the first
   column (Solutions) starts exactly where "Solutions" starts in the header: the logo column is as wide as the
   header logo plus the 32px gap before Solutions, less the 112px gap between the columns (the logo may spill into that gap on narrow laptops). */
@media (min-width: 1024px) {
    footer.site-footer > div > .grid {
        grid-template-columns: calc(var(--logo-width) + var(--header-gap) + var(--nav-offset) - 7rem) repeat(3, max-content);
        column-gap: 7rem;
    }
}

/* Bottom bar (© line): same black, with a thin line between it and the footer */
div.site-footer-bar > div:first-child {
    background-color: var(--footer-bg);
    border-color: var(--footer-line);
    border-bottom: 0;
}

div.site-footer-bar span {
    color: var(--footer-text-muted);
}

/* Bottom bar (design-refs/footer-notes.png): LinkedIn and X as dark rounded squares at the bottom left, the
   copyright and legal links on the right. Stacked and left-aligned on phones. */
.site-footer-bar__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem max(var(--gutter), env(safe-area-inset-right)) 1.25rem max(var(--gutter), env(safe-area-inset-left));
}

@media (min-width: 768px) {
    .site-footer-bar__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.site-footer-social {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

div.site-footer-bar .site-footer-social a {
    display: grid;
    place-items: center;
    width: 2.75rem; /* 44px: the tap size */
    height: 2.75rem;
    border-radius: 0.5rem;
    background-color: #222222;
    color: var(--footer-text) !important;
    transition: background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    div.site-footer-bar .site-footer-social a:hover {
        background-color: #333333;
    }
}

@media (hover: none) {
    div.site-footer-bar .site-footer-social a:active {
        background-color: #333333;
        transform: scale(0.97);
    }
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin: 0;
    color: #575757;
    font-size: 0.8125rem; /* 13px */
    line-height: 1.5 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase; /* "© 2026 ALTIGRID · PRIVACY POLICY · TERMS OF SERVICE" (design-refs/footer-notes.png) */
}

div.site-footer-bar .site-footer-legal span,
div.site-footer-bar .site-footer-legal a {
    color: #575757 !important;
}

/* Below 1024px the legal line is 10px, as the founder asked (smaller than the site's usual 12px floor) */
@media (max-width: 1023.98px) {
    .site-footer-legal {
        font-size: 0.625rem;
    }

    footer.site-footer h4 {
        font-size: 0.71875rem !important; /* the column headings: 11.5px below 1024px, 13px from there */
    }
}

/* Phones: a little more space above the footer logo (40px instead of the columns' 15px) */
@media (max-width: 767.98px) {
    footer.site-footer > div > .grid > div:first-child {
        padding-top: 2.5rem;
    }
}

/* The legal line in Geist Mono, over the footer's Geist rule */
div.site-footer-bar .site-footer-legal,
div.site-footer-bar .site-footer-legal * {
    font-family: "Geist Mono", ui-monospace, monospace !important;
}

@media (hover: hover) and (pointer: fine) {
    div.site-footer-bar .site-footer-legal a:hover {
        color: var(--footer-text) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    footer.site-footer a,
    div.site-footer-bar a {
        transition: none;
    }
}
