/*
 * nr-footer — modern infrastructure-aesthetic footer.
 *
 * Layered on top of the inline footer styles in footer.php (which we
 * intentionally leave alone to avoid breaking the markup contract).
 * This file:
 *   - Replaces the bright blue/green Service & Support gradient with a
 *     dark navy + green-radial that matches the hero treatment
 *   - Mono-types the phone number, ASN, and copyright lines
 *   - Tightens column typography (smaller, tighter, more cards-of-info)
 *   - Adds an "infra status footer" row at the very bottom: ASN, IPv6
 *     readiness, BGP looking glass, status link — terminal-style
 *   - Monochrome social icons, square (not circular)
 *   - Subtler dividers, refined hover states
 *
 * Loads on every page via the always-on stack in functions.php.
 */

/* ──────────────────────────────────────────────────────────────────
 * 1. Pre-footer CTA — "Ready to deploy?"
 * Replaces the bright illustrated Service & Support bar with a
 * terminal-flavored CTA + a compact mono-typed contact card.
 * ─────────────────────────────────────────────────────────────── */
.nr-footer__cta {
    /* Vertical gradient instead of 135deg — keeps the bottom edge uniformly
     * dark so it bleeds into the footer body without a brightness spike at
     * the bottom-right corner (user feedback: footer transition was harsh). */
    background:
        radial-gradient(ellipse at 12% 25%, rgba(20, 187, 96, 0.18), transparent 55%),
        radial-gradient(ellipse at 88% 30%, rgba(82, 167, 255, 0.08), transparent 60%),
        linear-gradient(180deg, #0a1626 0%, #061826 65%, #050f1c 100%) !important;
    padding: clamp(48px, 6vw, 96px) 0 !important;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
/* Isometric grid pattern echo from the hero */
.nr-footer__cta::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 70% 50%, rgba(0, 0, 0, 0.5), transparent 70%);
    pointer-events: none;
}
.nr-footer__cta > .container { position: relative; z-index: 1; }

.nr-footer__cta-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
@media (max-width: 991px) {
    .nr-footer__cta-grid { grid-template-columns: 1fr; }
}
.nr-footer__cta-eyebrow {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    color: rgba(20, 187, 96, 0.95);
    margin: 0 0 16px;
    padding: 4px 10px;
    background: rgba(20, 187, 96, 0.08);
    border: 1px solid rgba(20, 187, 96, 0.20);
    border-radius: 4px;
    letter-spacing: 0;
}
.nr-footer__cta-headline {
    font-size: clamp(2rem, 4.5vw, 3.4rem) !important;
    line-height: 1.05;
    color: #ffffff;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -0.025em;
}
.nr-footer__cta-sub {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 28px;
    max-width: 560px;
}
.nr-footer__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.nr-footer__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    border-radius: 6px;
    text-decoration: none !important;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease-out, background 200ms ease-out;
}
.nr-footer__cta-btn--primary {
    background: linear-gradient(135deg, #14bb60 0%, #10a153 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(20, 187, 96, 0.30);
}
.nr-footer__cta-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(20, 187, 96, 0.45);
}
.nr-footer__cta-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.nr-footer__cta-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.40);
    transform: translateY(-1px);
}

/* Compact contact card — mono-typed values, dark glass, brand pulse */
.nr-footer__contact {
    background: rgba(10, 22, 38, 0.62);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.30);
}
.nr-footer__contact-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nr-footer__contact-bar strong {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: rgba(255, 255, 255, 0.70);
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif);
}
/* Contact-card pulsing dot culled — duplicates the infra-line dot a few rows
 * below. Kept in markup for rollback. */
.nr-footer__contact-dot {
    display: none;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary, #14bb60);
    box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.20);
    animation: nr-footer-pulse 2.4s ease-in-out infinite;
}
.nr-footer__contact-tag {
    margin-left: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary, #14bb60);
}
.nr-footer__contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nr-footer__contact-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.nr-footer__contact-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}
.nr-footer__contact-value {
    color: #ffffff !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    text-align: right;
    transition: color 140ms ease-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nr-footer__contact-value:hover { color: var(--primary, #14bb60) !important; }
.nr-footer__contact-flag {
    width: 18px !important;
    height: auto !important;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ──────────────────────────────────────────────────────────────────
 * 2. Footer body — typography + columns
 * ─────────────────────────────────────────────────────────────── */
.nr-site-footer {
    --nr-footer-link: rgba(255, 255, 255, 0.55);
    --nr-footer-line: rgba(255, 255, 255, 0.06);
    --nr-footer-social-bg: rgba(255, 255, 255, 0.04);
    /* Mirror the topbar gradient so the page is bookended by the same
     * dark navy chrome at top and bottom. Slightly darker on the left
     * for a subtle horizontal cue without being noisy. */
    background: linear-gradient(90deg, #050f1c 0%, #061826 100%) !important;
    padding-top: 4.5rem !important;
    padding-bottom: 1.5rem !important;
    position: relative;
    overflow: hidden;
}
/* Hairline separator between service bar and footer body */
.nr-site-footer::before {
    background: rgba(255, 255, 255, 0.06) !important;
}
/* Massive blurred brand orb in the bottom-left corner — adds depth
   without competing with content. Same vibe as the hero orbs. */
.nr-site-footer::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%,
        rgba(20, 187, 96, 0.10),
        rgba(20, 187, 96, 0.02) 50%,
        transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}
.nr-site-footer > * { position: relative; z-index: 1; }

/* Column headers: small caps, mono-spaced, muted — looks like
   section labels in a config file. */
.nr-site-footer .nr-footer-mega h6 {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.10em !important;
    color: rgba(255, 255, 255, 0.45) !important;
    margin: 0 0 18px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Footer links: tighter, lighter, snappier hover */
.nr-site-footer .footer-links a {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    transition: color 140ms ease-out, padding-left 200ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-block;
}
.nr-site-footer .footer-links a:hover,
.nr-site-footer .footer-links a:focus {
    color: var(--primary, #14bb60) !important;
    padding-left: 4px;
}
.nr-site-footer .nr-footer-mega .footer-links li {
    margin-bottom: 12px !important;
}

/* Mobile accordion: dark backgrounds + accent on expanded */
.nr-footer-nav-accordion .accordion-item {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}
.nr-footer-nav-accordion .accordion-button {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
}
.nr-footer-nav-accordion .accordion-button:not(.collapsed) {
    background: transparent !important;
    color: var(--primary, #14bb60) !important;
}
.nr-footer-nav-accordion .accordion-body {
    background: transparent !important;
}

/* ──────────────────────────────────────────────────────────────────
 * 3. Social: monochrome square pills, not circles
 * ─────────────────────────────────────────────────────────────── */
.nr-footer-social-wrap {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}
.nr-footer-social-wrap .nr-footer-social-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: rgba(255, 255, 255, 0.45) !important;
}
.nr-footer-social-wrap .social-links a {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 6px !important;
    width: 40px !important;
    height: 40px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    transition: border-color 180ms ease-out, color 180ms ease-out, background 180ms ease-out !important;
}
.nr-footer-social-wrap .social-links a:hover,
.nr-footer-social-wrap .social-links a:focus {
    color: var(--primary, #14bb60) !important;
    border-color: rgba(20, 187, 96, 0.40) !important;
    background: rgba(20, 187, 96, 0.08) !important;
}

/* ──────────────────────────────────────────────────────────────────
 * 4. EEAT entity cards (legal entities + addresses)
 * ─────────────────────────────────────────────────────────────── */
.nr-footer-eeat .nr-entity-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    border-radius: 8px !important;
}
.nr-footer-eeat .nr-entity-card:hover {
    border-color: rgba(20, 187, 96, 0.30) !important;
}
.nr-footer-eeat .nr-entity-card h3 {
    font-family: var(--masterfont, "sofia-pro", system-ui, sans-serif) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
.nr-footer-eeat .nr-meta-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    color: rgba(255, 255, 255, 0.40) !important;
}
.nr-footer-eeat .nr-meta-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    color: rgba(255, 255, 255, 0.92) !important;
}
.nr-footer-eeat .nr-entity-address {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* ──────────────────────────────────────────────────────────────────
 * 5. Copyright + legal
 * ─────────────────────────────────────────────────────────────── */
.nr-footer-copy,
.nr-footer-legal-nav {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}
.nr-footer-copy {
    color: rgba(255, 255, 255, 0.40) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 12px !important;
    letter-spacing: -0.005em;
}
.nr-footer-copy a { color: rgba(255, 255, 255, 0.55) !important; text-decoration-color: rgba(255, 255, 255, 0.20); }
.nr-footer-copy a:hover, .nr-footer-copy a:focus { color: var(--primary, #14bb60) !important; }

.nr-footer-legal-list a {
    color: rgba(255, 255, 255, 0.55) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 11.5px !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nr-footer-legal-list a:hover { color: var(--primary, #14bb60) !important; }
.nr-footer-legal-list li + li::before {
    background: rgba(255, 255, 255, 0.20) !important;
}

/* ──────────────────────────────────────────────────────────────────
 * 6. Payment-method strip
 * ─────────────────────────────────────────────────────────────── */
.nr-footer-payments-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    border-radius: 4px !important;
}
.nr-footer-payments-item:hover,
.nr-footer-payments-item:focus-within {
    border-color: rgba(20, 187, 96, 0.30) !important;
    background: rgba(20, 187, 96, 0.04) !important;
}

/* ──────────────────────────────────────────────────────────────────
 * 7. Infra status footer — appended via JS in nr-footer.js
 * Renders right above the copyright. Terminal-styled "live" line:
 *
 *     ● AS6206  ·  IPv6 dual-stack  ·  BGP looking glass  ·
 *       status.netrouting.com  ·  built with ♥ in Amsterdam
 *
 * ─────────────────────────────────────────────────────────────── */
.nr-footer-infra-line {
    margin: 1.5rem auto 0;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    max-width: min(900px, 100%);
}
.nr-footer-infra-line .nr-footer-infra-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary, #14bb60);
    box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.18);
    animation: nr-footer-pulse 2.4s ease-in-out infinite;
    display: inline-block;
}
.nr-footer-infra-line .nr-footer-infra-pill {
    color: rgba(255, 255, 255, 0.85);
}
.nr-footer-infra-line .nr-footer-infra-sep {
    color: rgba(255, 255, 255, 0.20);
    user-select: none;
}
.nr-footer-infra-line a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.20);
    transition: color 140ms ease-out, border-color 140ms ease-out;
}
.nr-footer-infra-line a:hover {
    color: var(--primary, #14bb60);
    border-bottom-color: rgba(20, 187, 96, 0.55);
}
@keyframes nr-footer-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(20, 187, 96, 0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(20, 187, 96, 0.04); }
}
@media (prefers-reduced-motion: reduce) {
    .nr-footer-infra-line .nr-footer-infra-dot { animation: none; }
}
