/* ==========================================================================
   Income Outsource — Site Footer
   Dark ink surface, multi-column, responsive. Mono "ledger" treatment on
   the copyright line only — the one signature touch, restraint elsewhere.
   All values pulled from variables.css — nothing hardcoded here.
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-on-ink);
  padding-block: var(--space-9);
}

.site-footer a {
  color: var(--color-on-ink);
}

/* ---------------------------------------------------------------------
   Grid
   --------------------------------------------------------------------- */
.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.site-footer__col {
  min-width: 0;
}

/* ---------------------------------------------------------------------
   Brand column
   --------------------------------------------------------------------- */
.site-footer__logo img {
  display: block;
  max-height: 64px;
  width: auto;
}

.site-footer__site-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
}

.site-footer__tagline {
  margin-top: var(--space-3);
  max-width: 32ch;
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  opacity: 0.75;
}

/* ---------------------------------------------------------------------
   Headings shared by nav + social columns
   --------------------------------------------------------------------- */
.site-footer__heading {
  margin: 0 0 var(--space-4);
  /* Explicit color, not inherited — base.css's global `h1..h6 { color:
     var(--color-primary) }` reset is a direct declaration on this element
     (it's an <h2>), which always wins over an ancestor's inherited color
     regardless of specificity. Without this, both footer column headings
     rendered as invisible dark-ink-on-dark-ink text. */
  color: var(--color-on-ink);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------------------------------------------------------------------
   Nav column
   --------------------------------------------------------------------- */
.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list a {
  display: inline-block;
  padding-block: var(--space-2);
  font-size: var(--fs-small);
  transition: color var(--duration-base) var(--ease-out);
}

.site-footer__list a:hover,
.site-footer__list a:focus-visible {
  color: var(--color-accent);
}

/* ---------------------------------------------------------------------
   Search column — reuses the shared .search-form-custom component
   (base.css), overridden here since that component's default colors
   (--color-surface-1/--color-border) are tuned for the page background,
   not this footer's non-flipping --color-ink surface. Selectors repeat
   base.css's `input[type="search"]` prefix (not just the class) to match
   its specificity — a plain 2-class descendant selector here would lose
   to base.css's type+attribute+class rule regardless of load order.
   --------------------------------------------------------------------- */
.site-footer__col--search input[type="search"].search-form-custom__input {
  color: var(--color-on-ink);
  background: var(--color-ink-light);
  border-color: var(--color-ink-light);
}

.site-footer__col--search input[type="search"].search-form-custom__input::placeholder {
  color: var(--color-on-ink);
  opacity: 0.5;
}

.site-footer__col--search input[type="search"].search-form-custom__input:hover {
  border-color: var(--color-on-ink);
}

.site-footer__col--search input[type="search"].search-form-custom__input:focus-visible {
  border-color: var(--color-accent);
}

.site-footer__col--search .search-form-custom__submit {
  background: var(--color-accent);
}

.site-footer__col--search .search-form-custom__submit:hover,
.site-footer__col--search .search-form-custom__submit:focus-visible,
.site-footer__col--search .search-form-custom__submit:focus,
.site-footer__col--search .search-form-custom__submit:active {
  background: var(--color-accent-hover);
}

/* ---------------------------------------------------------------------
   Bottom bar
   --------------------------------------------------------------------- */
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-ink-light);
}

.site-footer__copyright {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.site-footer__legal-list {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__legal-list a {
  font-size: var(--fs-caption);
  transition: color var(--duration-base) var(--ease-out);
}

.site-footer__legal-list a:hover,
.site-footer__legal-list a:focus-visible {
  color: var(--color-accent);
}

/* ---------------------------------------------------------------------
   Breakpoints
   --------------------------------------------------------------------- */
@media (min-width: 700px) {
  .site-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8) var(--space-6);
  }

  .site-footer__col--brand {
    grid-column: 1 / -1;
  }

  .site-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 922px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .site-footer__col--brand {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  .site-footer {
    padding-block: var(--space-12);
  }

  .site-footer__grid {
    gap: var(--space-10);
  }
}
