/* ============================================================
   FOOTER MODULE — prefix: ft-

   Structure only. Every editor-driven value arrives as a --ft-*
   custom property set by the scoped <style> block in module.html.

   Font families are the one exception: brand-locked, never editable.
   Akzidenz-Grotesk for the column headings and the logo wordmark,
   Brandon Grotesque for the tagline, links and bottom bar.
   ============================================================ */

/* ── Brand type tokens (locked) + colour/size defaults (overridden
      per-instance via scope_css) ── */
.ft-footer {
  --ft-heading-font:  'akzidenz-grotesk', 'Akzidenz-Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --ft-body-font:     'brandon-grotesque', 'Brandon Grotesque', 'Helvetica Neue', Arial, sans-serif;

  --ft-bg:             #0a0a14;
  --ft-divider:        rgba(255, 255, 255, 0.07);
  --ft-accent-e:       #8957cf;
  --ft-accent-grad:    linear-gradient(to bottom right, #211f2e 0%, #5a3aaa 50%, #8957cf 100%);
  --ft-tagline:        #9ca3af;
  --ft-nav-head:       #9ca3af;
  --ft-nav-head-hover: #ffffff;
  --ft-nav-link:       #d1d5db;
  --ft-nav-hover:      #ffffff;
  --ft-bottom-text:    #9ca3af;
  --ft-bottom-hover:   #d1d5db;
  --ft-logo-height:    32px;
  --ft-nav-pt:         64px;
  --ft-nav-pr:         48px;
  --ft-nav-pb:         56px;
  --ft-nav-pl:         48px;
  --ft-nav-head-size:  12px;
  --ft-nav-link-size:  16px;
  --ft-nav-link-gap:   10px;
  --ft-tagline-size:   16px;
  --ft-bottom-size:    13px;
}

/* ── Rich text normalisation ──
   HubSpot wraps field output in <p>/<h*>. Inline contexts (headings, link
   labels) collapse those and inherit type, so a stray <h2> inside a nav link
   can't resize itself out of the column. */
.ft-rt > * {
  display: inline;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.ft-rt > * + *::before {
  content: ' ';
}

/* Tagline and copyright keep block flow — a rich text paragraph break there is
   a real break. */
.ft-rt-block > * {
  margin: 0 0 0.6em;
  font: inherit;
  color: inherit;
}

.ft-rt-block > *:last-child {
  margin-bottom: 0;
}

.ft-rt a,
.ft-rt-block a {
  color: inherit;
}

/* ─────────────────────────────────────────────────────────────
   OUTER WRAPPER — full-bleed breakout
───────────────────────────────────────────────────────────── */
.ft-footer {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  margin-bottom: 0 !important;
  background-color: var(--ft-bg);
  overflow: hidden;
  box-sizing: border-box;
  font-family: var(--ft-body-font);
}

.widget-span:has(.ft-footer),
.dnd-section:has(.ft-footer),
.dnd-column:has(.ft-footer),
.cell:has(.ft-footer) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ─────────────────────────────────────────────────────────────
   TOP DIVIDER
───────────────────────────────────────────────────────────── */
.ft-divider {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 1px;
  background-color: var(--ft-divider, rgba(255, 255, 255, 0.07));
  border: none;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   NAVIGATION SECTION
───────────────────────────────────────────────────────────── */
.ft-nav {
  position: relative;
  z-index: 1;
  padding: var(--ft-nav-pt) var(--ft-nav-pr) var(--ft-nav-pb) var(--ft-nav-pl);
}

/* Seven tracks: brand, then Services, Pricing, Markets, Resources, Careers,
   Contact. Pricing, Careers and Contact are heading-only columns, so they take
   the narrower 0.8fr share and leave the width to the three with link lists. */
.ft-nav__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr 1fr 1fr 0.8fr 0.8fr;
  gap: 24px 32px;
  align-items: start;
}

/* ── Brand Column ── */
.ft-nav__logo-link {
  display: inline-block;
  text-decoration: none !important;
  margin-bottom: 14px;
  line-height: 1.1;
}

.ft-nav__logo-img {
  height: var(--ft-logo-height, 32px);
  width: auto;
  display: block;
  max-height: 60px;
  object-fit: contain;
}

.ft-nav__logo-text {
  font-family: var(--ft-heading-font);
  font-size: 22px;
  /* Capped at 700: at 800+ both brand families drop out of the stack entirely and
     the text renders in the generic Helvetica/Arial fallback, not a brand face. */
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
  /* 1.1, not 1.0: a unitless 1 clips the descender on the wordmark's "g" at
     larger logo sizes and leaves no room for user text-spacing overrides. */
  line-height: 1.1;
  /* Solid colour first. In forced-colors mode, in print, or anywhere
     background-clip: text is not honoured, the wordmark must still be
     readable rather than vanishing into transparent fill. */
  color: var(--ft-accent-e, #8957cf);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .ft-nav__logo-text {
    background-image: var(--ft-accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
/* No `color: transparent` here. -webkit-text-fill-color already paints the
       glyphs with the clipped gradient in every engine that honours
       background-clip: text, so zeroing `color` as well changes nothing on
       screen and only makes the computed colour transparent - which a contrast
       checker reads as a 1:1 ratio against any background. The solid colour
       above stays the computed value. */
    -webkit-text-fill-color: transparent;
  }
}

@media (forced-colors: active) {
  .ft-nav__logo-text {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}

.ft-nav__tagline {
  font-family: var(--ft-body-font);
  /* Driven by the Tagline Font Size field in the Style tab. */
  font-size: var(--ft-tagline-size, 16px);
  font-weight: 400;
  color: var(--ft-tagline, #9ca3af);
  line-height: 1.65;
  margin: 0 0 22px;
  max-width: 230px;
}

/* ── Social Icons ── */
.ft-nav__socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ft-nav__social,
.ft-nav__social:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.ft-nav__social:hover {
  background-color: rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.ft-nav__social svg {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Link Columns ── */
/* This is an <h2> in the markup (it labels the list under it). Every dimension
   below is stated explicitly so the UA's h2 typography — 1.5em bold with block
   margins — never reaches it and the column looks exactly as it did as a <p>. */
.ft-nav__col-heading {
  font-family: var(--ft-heading-font);
  font-size: var(--ft-nav-head-size, 12px);
  /* 700, not 600: Akzidenz-Grotesk ships Light, Roman and Bold, so 600 was
     already resolving to Bold. */
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ft-nav-head, #9ca3af);
  margin: 0 0 20px;
  line-height: 1.4;
}

/* The heading is the wrapper; the <a> inside it is what the visitor clicks. */
.ft-nav__col-heading--link > a,
.ft-nav__col-heading--link > a:hover,
.ft-nav__col-heading--link > a:focus,
.ft-nav__col-heading--link > a:active,
.ft-nav__col-heading--link > a:visited {
  display: block;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none !important;
  transition: color 0.18s ease;
}

.ft-nav__col-heading--link > a:hover {
  color: var(--ft-nav-head-hover, #ffffff) !important;
}

/* ── Link-only columns (a heading with no list under it) ──
   Pricing, Careers and Contact are single destinations rather than sections.
   Without this they render as a section label whose links failed to load.
   Matching the nav-link colour is what marks them as clickable, so they look
   exactly like the entries in the other columns. Dropping the 20px gap reserved
   for a list removes the dangling space beneath them. */
.ft-nav__col--solo .ft-nav__col-heading {
  color: var(--ft-nav-link, #d1d5db);
  margin-bottom: 0;
}

.ft-nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ft-nav-link-gap, 10px);
}

/* inline-flex, so a label that outgrows its column wraps inside the link rather
   than pushing the grid track wider — `min-width: 0` and the wrap rules are what
   let it shrink that far. A long single word (a market name, say) breaks instead
   of spilling out of the column. */
.ft-nav__links a,
.ft-nav__links a:hover,
.ft-nav__links a:focus,
.ft-nav__links a:active,
.ft-nav__links a:visited {
  font-family: var(--ft-body-font);
  font-size: var(--ft-nav-link-size, 16px);
  font-weight: 400;
  color: var(--ft-nav-link, #d1d5db);
  text-decoration: none !important;
  transition: color 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.4;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
/* 16px × 1.4 leaves the link ~22px tall, which would clear a 24×24 target only
     through --ft-nav-link-gap, an editor field with no minimum that can be set
     to 0. Stating the height makes the target big enough on its own; the
     `align-items: center` above keeps the label optically centred now that the
     box is taller than the text. */
  min-height: 24px;
}

.ft-nav__links a > .ft-rt {
  min-width: 0;
}

.ft-nav__links a:hover {
  color: var(--ft-nav-hover, #ffffff) !important;
}

/* ─────────────────────────────────────────────────────────────
   BOTTOM BAR
───────────────────────────────────────────────────────────── */
.ft-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ft-divider, rgba(255, 255, 255, 0.07));
  padding: 24px var(--ft-nav-pr) 24px var(--ft-nav-pl);
}

.ft-bottom__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ft-bottom__copyright {
  font-family: var(--ft-body-font);
  font-size: var(--ft-bottom-size, 13px);
  font-weight: 400;
  color: var(--ft-bottom-text, #9ca3af);
  margin: 0;
  line-height: 1.5;
}

/* Three links — Privacy Policy, Accessibility Policy, Terms of Use. They wrap
   rather than squeeze the copyright once the row runs out of room. */
.ft-bottom__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.ft-bottom__links a,
.ft-bottom__links a:hover,
.ft-bottom__links a:focus,
.ft-bottom__links a:active,
.ft-bottom__links a:visited {
  font-family: var(--ft-body-font);
  font-size: var(--ft-bottom-size, 13px);
  font-weight: 400;
  color: var(--ft-bottom-text, #9ca3af);
  text-decoration: none !important;
  transition: color 0.18s ease;
/* Wrapping, not nowrap. These are the privacy/accessibility/terms links, so
     they are the longest labels in the footer and the ones a user's
     text-spacing override grows the most. The bottom bar already wraps as a
     flex row. */
  white-space: normal;
}

.ft-bottom__links a:hover {
  color: var(--ft-bottom-hover, #d1d5db) !important;
}

/* ── Keyboard focus ──
   Every link here sets text-decoration: none, so the UA's default ring is the
   only indicator and on this near-black background it is barely visible. An
   explicit light ring is stated once for all of them. */
.ft-footer a:focus-visible {
  outline: 2px solid var(--ft-nav-hover, #ffffff);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Clears the fixed header when Tab scrolls a footer link into view. Stated on
   the element, not on :focus-visible — the browser scrolls the target into view
   as focus moves, which can precede the class landing. */
.ft-footer a {
  scroll-margin-top: 96px;
}

.ft-nav__social:focus-visible {
  outline-offset: 2px;
}

/* =============================================================
   RESPONSIVE — NARROW DESKTOP  (1025px – 1240px)

   Seven tracks at the full 32px gutter leave the longest labels
   ("Benefits Coordination") a couple of px short of their column. Tightening
   the gap and the section padding buys those px back before anything wraps.
============================================================= */
@media (min-width: 1025px) and (max-width: 1240px) {
  .ft-footer {
    --ft-nav-pr: 32px;
    --ft-nav-pl: 32px;
  }

  .ft-nav__inner {
    gap: 24px 22px;
  }
}

/* =============================================================
   RESPONSIVE — TABLET  (641px – 1024px)
============================================================= */
@media (min-width: 641px) and (max-width: 1024px) {
  .ft-footer {
    --ft-nav-pt: 52px;
    --ft-nav-pr: 32px;
    --ft-nav-pb: 44px;
    --ft-nav-pl: 32px;
  }

  .ft-nav__inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px 28px;
  }

  .ft-nav__brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0 40px;
  }

  .ft-nav__logo-link {
    grid-row: 1;
  }

  .ft-nav__tagline {
    grid-row: 2;
    margin-top: 12px;
    max-width: 300px;
  }

  .ft-nav__socials {
    grid-row: 3;
    margin-top: 16px;
  }

}

/* =============================================================
   RESPONSIVE — MOBILE  (≤ 640px)
============================================================= */
@media (max-width: 640px) {
  .ft-footer {
    --ft-nav-pt: 44px;
    --ft-nav-pr: 20px;
    --ft-nav-pb: 36px;
    --ft-nav-pl: 20px;
  }

  .ft-nav__inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 20px;
  }

  .ft-nav__brand {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }

  .ft-nav__tagline {
    max-width: 100%;
  }

  .ft-nav__col-heading {
    margin-bottom: 16px;
  }

  .ft-bottom {
    padding: 20px var(--ft-nav-pr) 20px var(--ft-nav-pl);
  }

  /* Copyright centred on its own line, the three links centred in a normal row
     underneath it. */
  .ft-bottom__inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .ft-bottom__copyright {
    text-align: center;
  }

  .ft-bottom__links {
    justify-content: center;
    /* Row first, wrap only if the three labels genuinely do not fit — they clear
       a 320px viewport at the default 13px. */
    flex-wrap: wrap;
    gap: 8px 18px;
  }
}

/* =============================================================
   RESPONSIVE — SMALL PHONE  (≤ 380px)

   Two nav columns still beat one here (the labels are short), but the gutters
   and the bottom row need to give way first.
============================================================= */
@media (max-width: 380px) {
  .ft-footer {
    --ft-nav-pt: 36px;
    --ft-nav-pr: 16px;
    --ft-nav-pb: 30px;
    --ft-nav-pl: 16px;
  }

  .ft-nav__inner {
    gap: 30px 14px;
  }

  .ft-bottom {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .ft-bottom__links {
    gap: 8px 14px;
  }
}

/* =============================================================
   ACCESSIBILITY — Reduced motion
============================================================= */
@media (prefers-reduced-motion: reduce) {
  .ft-nav__social,
  .ft-nav__links a,
  .ft-bottom__links a {
    transition: none !important;
  }
}
