/* ════════════════════════════════════════
   V5 SITE FOOTER — shared across V5-style pages.

   Surfaces adapt by body class:
   - Default            → tusk surface, abyss text  (light pages)
   - body.dark
     | body.contact-abyss
     | body.service-details-dark → abyss surface, tusk text  (dark pages)

   Brand SVG uses currentColor so it inherits the right contrast.

   Two layouts coexist during migration:
   - LEGACY  .footer-top + .footer-bottom         (1-row links)
   - V6      .footer-main + .footer-legal         (4-col grid + legal row)
   Pages are migrated to the V6 markup as we touch them.
════════════════════════════════════════ */

.site-footer {
  background: var(--jxm-tusk);
  color: var(--jxm-abyss);
  border-top: 1px solid rgba(34, 31, 50, 0.10);
  /* Horizontal padding moves to .footer-inner (below) so the footer
     content lines up with the top nav's max-width:90rem container.
     Otherwise the footer's outer padding pushed content edge-to-edge
     of the inner box while the nav's inner padding sits inside the
     90rem box — a ~40px misalignment on viewports wider than 90rem. */
  padding: 3.5rem 0 2rem;
}
body.dark .site-footer,
body.contact-abyss .site-footer,
body.service-details-dark .site-footer {
  background: var(--jxm-abyss);
  color: var(--jxm-tusk);
  border-top-color: rgba(243, 241, 236, 0.10);
}

.site-footer .footer-inner {
  max-width: 90rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 1024px) {
  .site-footer .footer-inner {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ──────────────────────────────────────────
   LEGACY layout — keep until every page is on V6
────────────────────────────────────────── */
.site-footer .footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.site-footer .footer-brand svg { fill: currentColor; }

.site-footer .footer-bottom {
  border-top: 1px solid rgba(34, 31, 50, 0.10);
  margin-top: 2rem;
  padding-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
body.dark .site-footer .footer-bottom,
body.contact-abyss .site-footer .footer-bottom,
body.service-details-dark .site-footer .footer-bottom {
  border-top-color: rgba(243, 241, 236, 0.10);
}

.site-footer .footer-main-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.site-footer .footer-main-links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(34, 31, 50, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer .footer-main-links a:hover { color: var(--jxm-abyss); }
body.dark .site-footer .footer-main-links a,
body.contact-abyss .site-footer .footer-main-links a,
body.service-details-dark .site-footer .footer-main-links a {
  color: rgba(243, 241, 236, 0.75);
}
body.dark .site-footer .footer-main-links a:hover,
body.contact-abyss .site-footer .footer-main-links a:hover,
body.service-details-dark .site-footer .footer-main-links a:hover {
  color: var(--jxm-tusk);
}

.site-footer .footer-cta-link { color: var(--jxm-kermit) !important; }
.site-footer .footer-cta-link:hover { color: #ffe4a0 !important; }

.site-footer .footer-copy {
  font-size: 0.8125rem;
  color: rgba(34, 31, 50, 0.55);
  line-height: 1.6;
}
body.dark .site-footer .footer-copy,
body.contact-abyss .site-footer .footer-copy,
body.service-details-dark .site-footer .footer-copy {
  color: rgba(243, 241, 236, 0.55);
}
@media (min-width: 1024px) {
  .site-footer { padding: 4.5rem 0 2.5rem; }
  .site-footer .footer-bottom {
    grid-template-columns: 3fr 7fr;
    grid-template-rows: auto auto;
    row-gap: 0.75rem;
  }
  .site-footer .footer-main-links {
    grid-column: 2 / 3;
    grid-row: 1;
  }
  .site-footer .footer-main-links ul { justify-content: flex-end; }
  .site-footer .footer-copy {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    align-self: center;
  }
}


/* ════════════════════════════════════════
   V6 PRE-FOOTER CTA BAND — photographic backdrop, centered headline +
   button. Lives as a sibling <section class="footer-cta"> placed
   immediately before the <footer>.
   ════════════════════════════════════════ */
.footer-cta {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  /* Top margin breathes the band away from the section above it.
     Margin (not padding) so on light-bg pages the gap fills with the
     page color, not the band's abyss. */
  margin-top: clamp(4rem, 8vw, 6rem);
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  min-height: 360px;
  background: var(--jxm-abyss);
  color: var(--jxm-tusk);
  overflow: hidden;
}
.footer-cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}
.footer-cta-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(34, 31, 50, 0.55) 0%, rgba(34, 31, 50, 0.85) 100%);
  pointer-events: none;
}
.footer-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 52rem;
  display: grid;
  gap: 2rem;
  justify-items: center;
}
.footer-cta-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.7);
  margin: 0;
}
/* Compound selectors below (.footer-cta .…) so they beat sitewide
   rules: body[class*="body-"] h2 { color: var(--primary) } in
   jxm-brand.css forces abyss on every h2, and per-page rules like
   .contact-abyss a { color: var(--jxm-tusk) } would otherwise pull
   the button text. Specificity 0,2,0+ wins both. */
.footer-cta .footer-cta-headline {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--jxm-tusk);
  margin: 0;
}
.footer-cta .footer-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 2.5rem;
  background: var(--jxm-tusk);
  color: var(--jxm-abyss);
  /* 1.5px tusk border stays visible when bg flips to abyss on hover,
     so the button doesn't disappear into the dark band. */
  border: 1.5px solid var(--jxm-tusk);
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 200ms ease;
}
.footer-cta .footer-cta-button:hover,
.footer-cta .footer-cta-button:focus-visible {
  background: var(--jxm-abyss);
  color: var(--jxm-tusk);
  transform: translateY(-2px);
}


/* ════════════════════════════════════════
   V6 LAYOUT — 3-column footer + brand block + legal row.
   Markup pattern:
     .site-footer
       .footer-inner
         .footer-main           ← brand block + columns grid
           .footer-brand-block
             .footer-brand        (logo svg)
             .footer-tagline
             .footer-social
           .footer-cols
             .footer-col          (×3: GET JXM, Solutions, Company)
               .footer-col-title
               ul > li > a   |   ul > li > [icon + text]
         .footer-legal          ← privacy + copyright
           .footer-legal-links
           .footer-copy
   ════════════════════════════════════════ */

.site-footer .footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
@media (min-width: 1024px) {
  .site-footer { padding: 5rem 0 2rem; }
  .site-footer .footer-main {
    grid-template-columns: minmax(20rem, 1fr) minmax(0, 2fr);
    gap: 4rem;
    padding-bottom: 4rem;
  }
}

/* ── Brand block (left column on desktop) ── */
.site-footer .footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  max-width: 22rem;
}
.site-footer .footer-brand-block .footer-brand svg {
  width: 96px;
  height: auto;
  display: block;
  fill: currentColor;
}
.site-footer .footer-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(34, 31, 50, 0.72);
  margin: 0;
  max-width: 22rem;
}
body.dark .site-footer .footer-tagline,
body.contact-abyss .site-footer .footer-tagline,
body.service-details-dark .site-footer .footer-tagline {
  color: rgba(243, 241, 236, 0.72);
}

.site-footer .footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}
.site-footer .footer-social a {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(34, 31, 50, 0.7);
  text-decoration: none;
  transition: color 160ms ease-out;
}
.site-footer .footer-social a:hover { color: var(--jxm-abyss); }
body.dark .site-footer .footer-social a,
body.contact-abyss .site-footer .footer-social a,
body.service-details-dark .site-footer .footer-social a {
  color: rgba(243, 241, 236, 0.7);
}
body.dark .site-footer .footer-social a:hover,
body.contact-abyss .site-footer .footer-social a:hover,
body.service-details-dark .site-footer .footer-social a:hover {
  color: var(--jxm-tusk);
}

/* ── Link columns (right side on desktop) ── */
.site-footer .footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 720px) {
  .site-footer .footer-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.site-footer .footer-col-title {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(34, 31, 50, 0.55);
  margin: 0 0 1rem;
}
body.dark .site-footer .footer-col-title,
body.contact-abyss .site-footer .footer-col-title,
body.service-details-dark .site-footer .footer-col-title {
  color: rgba(243, 241, 236, 0.55);
}

.site-footer .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.site-footer .footer-col a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--jxm-abyss);
  text-decoration: none;
  transition: color 160ms ease-out;
}
.site-footer .footer-col a:hover { color: var(--jxm-kermit); }
body.dark .site-footer .footer-col a,
body.contact-abyss .site-footer .footer-col a,
body.service-details-dark .site-footer .footer-col a {
  color: var(--jxm-tusk);
}
body.dark .site-footer .footer-col a:hover,
body.contact-abyss .site-footer .footer-col a:hover,
body.service-details-dark .site-footer .footer-col a:hover {
  color: var(--jxm-kermit);
}

/* ── Icon contact list (Company column) ── */
.site-footer .footer-contact-list li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.85rem;
  align-items: start;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--jxm-abyss);
}
body.dark .site-footer .footer-contact-list li,
body.contact-abyss .site-footer .footer-contact-list li,
body.service-details-dark .site-footer .footer-contact-list li {
  color: var(--jxm-tusk);
}
.site-footer .footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  color: rgba(34, 31, 50, 0.55);
}
body.dark .site-footer .footer-contact-icon,
body.contact-abyss .site-footer .footer-contact-icon,
body.service-details-dark .site-footer .footer-contact-icon {
  color: rgba(243, 241, 236, 0.55);
}
.site-footer .footer-contact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
}
.site-footer .footer-contact-list a {
  text-decoration: none;
  color: inherit;
  transition: color 160ms ease-out;
}
.site-footer .footer-contact-list a:hover { color: var(--jxm-kermit); }

/* ── Legal row (bottom) ── */
.site-footer .footer-legal {
  border-top: 1px solid rgba(34, 31, 50, 0.10);
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: center;
}
body.dark .site-footer .footer-legal,
body.contact-abyss .site-footer .footer-legal,
body.service-details-dark .site-footer .footer-legal {
  border-top-color: rgba(243, 241, 236, 0.10);
}
@media (min-width: 720px) {
  .site-footer .footer-legal {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.site-footer .footer-legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-footer .footer-legal-links a {
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(34, 31, 50, 0.55);
  text-decoration: none;
  transition: color 160ms ease-out;
}
.site-footer .footer-legal-links a:hover { color: var(--jxm-abyss); }
body.dark .site-footer .footer-legal-links a,
body.contact-abyss .site-footer .footer-legal-links a,
body.service-details-dark .site-footer .footer-legal-links a {
  color: rgba(243, 241, 236, 0.55);
}
body.dark .site-footer .footer-legal-links a:hover,
body.contact-abyss .site-footer .footer-legal-links a:hover,
body.service-details-dark .site-footer .footer-legal-links a:hover {
  color: var(--jxm-tusk);
}

@media (min-width: 720px) {
  .site-footer .footer-legal .footer-copy { text-align: right; white-space: normal; }
}
