/* =========================================================
   Section 9 — Crawford-style Premium Footer
   Scoped under .nx-footer. Reuses --nx-* tokens + .hero-mark.
   ========================================================= */

.nx-footer {
    position: relative;
    background: var(--nx-bg);
    color: var(--nx-text);
    border-top: 1px solid var(--nx-border);
    padding: clamp(3.5rem, 8vh, 5.5rem) 0 clamp(2rem, 4vh, 2.75rem);
    padding-bottom: calc(clamp(2rem, 4vh, 2.75rem) + 4.5rem);
    overflow: hidden;
}

.nx-footer__inner {
    position: relative;
    z-index: 1;
}

.nx-footer__inner:has(.nx-footer__mark) {
    display: flex;
    flex-direction: column;
    gap: clamp(2.25rem, 5vh, 3.5rem);
}

.nx-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem 3rem;
}

.nx-footer__action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.nx-footer__prompt {
    margin: 0;
    max-width: 11ch;
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    font-weight: 650;
    letter-spacing: -0.035em;
    line-height: 1.15;
    color: var(--nx-text);
}

.nx-footer__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.8rem 1.35rem;
    border-radius: 999px;
    background: var(--nx-accent);
    border: 1px solid transparent;
    color: #fff;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(79, 124, 255, 0.2);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    flex-shrink: 0;
}

.nx-footer__cta span {
    display: inline-block;
    color: inherit;
    transition: transform 0.25s ease;
}

.nx-footer__cta:hover {
    background: var(--nx-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(79, 124, 255, 0.28);
}

.nx-footer__cta:hover span {
    transform: translateX(4px);
}

.nx-footer__bar .nx-footer__cta {
    background: rgba(79, 124, 255, 0.16);
    border-color: rgba(79, 124, 255, 0.28);
    color: var(--nx-text);
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nx-footer__bar .nx-footer__cta span {
    color: var(--nx-accent);
}

.nx-footer__bar .nx-footer__cta:hover {
    background: rgba(79, 124, 255, 0.24);
    border-color: rgba(79, 124, 255, 0.45);
    box-shadow: none;
}

.nx-footer__bar .nx-footer__cta:hover span {
    transform: translate(2px, -2px);
}

.nx-footer__cta:focus-visible {
    outline: 2px solid var(--nx-accent);
    outline-offset: 3px;
}

.nx-footer__nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 2.5rem;
    margin: 0 0 clamp(2.75rem, 5vh, 3.75rem);
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: auto;
}

.nx-footer__bar .nx-footer__nav {
    grid-template-columns: repeat(2, minmax(7.5rem, max-content));
    gap: 0.35rem 3.5rem;
    margin: 0;
}

.nx-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nx-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(245, 247, 250, 0.78);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.nx-footer__top ~ .nx-footer__nav .nx-footer__links a {
    min-height: 44px;
    padding: 0.35rem 0;
}

.nx-footer__links a:hover {
    color: #fff;
}

.nx-footer__links a:focus-visible {
    outline: 2px solid var(--nx-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.nx-footer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.nx-footer__legal {
    margin: 0;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    color: var(--nx-text-muted);
}

.nx-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nx-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: rgba(245, 247, 250, 0.7);
    border-radius: 999px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.nx-footer__social a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nx-footer__social a:focus-visible {
    outline: 2px solid var(--nx-accent);
    outline-offset: 3px;
}

/* Giant brand mark with corner crosshairs */
.nx-footer__mark.hero-mark {
    --hero-mark: rgba(168, 184, 214, 0.55);
    --hero-mark-arm: clamp(0.55rem, 1.4vw, 0.9rem);
    display: block;
    width: 100%;
    margin: clamp(0.5rem, 2vh, 1.25rem) 0 0;
    padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1rem, 3vw, 2rem);
    border-color: rgba(120, 140, 180, 0.22);
    background: linear-gradient(
        180deg,
        rgba(79, 124, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    white-space: normal;
    text-align: center;
}

.nx-footer__wordmark {
    display: block;
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(3.75rem, 16vw, 11.5rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.04em;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(
        105deg,
        #f5f7fa 0%,
        #d7deea 38%,
        #8fa3c9 72%,
        #6b82b0 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: filter 0.25s ease;
}

.nx-footer__wordmark:hover {
    filter: brightness(1.08);
}

.nx-footer__wordmark:focus-visible {
    outline: 2px solid var(--nx-accent);
    outline-offset: 8px;
    border-radius: 4px;
}

/* Legacy footer structure (other pages) */
.nx-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem 3rem;
    padding-bottom: clamp(2.75rem, 5vh, 3.75rem);
    margin-bottom: clamp(2.5rem, 4.5vh, 3.25rem);
    border-bottom: 1px solid var(--nx-border);
}

.nx-footer__brand {
    max-width: 28rem;
}

.nx-footer__logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 0.95;
    color: var(--nx-text);
    text-decoration: none;
    transition: color 0.25s ease;
}

.nx-footer__logo:hover {
    color: #fff;
}

.nx-footer__logo:focus-visible {
    outline: 2px solid var(--nx-accent);
    outline-offset: 6px;
    border-radius: 2px;
}

.nx-footer__tagline {
    margin: 1.15rem 0 0;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.55;
    color: var(--nx-text-muted);
    max-width: 22rem;
}

.nx-footer__group-title {
    margin: 0 0 1.1rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.nx-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--nx-border);
}

.nx-footer__location {
    margin: 0;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: var(--nx-text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .nx-footer__cta,
    .nx-footer__cta span,
    .nx-footer__links a,
    .nx-footer__social a,
    .nx-footer__wordmark {
        transition: none !important;
    }

    .nx-footer__cta:hover {
        transform: none;
    }

    .nx-footer__cta:hover span {
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nx-footer {
        padding-top: 3.25rem;
        padding-bottom: calc(2.5rem + 5.5rem + env(safe-area-inset-bottom, 0px));
    }

    .nx-footer__bar {
        flex-direction: column;
        gap: 1.75rem;
    }

    .nx-footer__bar .nx-footer__cta {
        width: 100%;
        justify-content: center;
    }

    .nx-footer__bar .nx-footer__nav {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem 2rem;
    }

    .nx-footer__inner > .nx-footer__nav {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nx-footer__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .nx-footer__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.75rem;
    }

    .nx-footer__top .nx-footer__cta {
        width: 100%;
        justify-content: center;
    }

    .nx-footer__mark.hero-mark {
        padding: 1.5rem 0.85rem;
    }

    .nx-footer__wordmark {
        font-size: clamp(3.4rem, 18vw, 5.5rem);
        letter-spacing: -0.035em;
    }
}

@media (max-width: 1024px) {
    .nx-footer__inner > .nx-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .nx-footer__bar .nx-footer__nav {
        gap: 0.15rem 1.25rem;
    }

    .nx-footer__links a {
        font-size: 0.9rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .nx-footer__wordmark {
        font-size: clamp(3.1rem, 20vw, 4.25rem);
    }

    .nx-footer__social a {
        width: 44px;
        height: 44px;
    }
}

/* Service pages also use body.service-page (light tokens). Keep the
   homepage footer colors when this stylesheet is loaded there. */
body.service-page .nx-footer {
    background: var(--nx-bg);
    color: var(--nx-text);
}
