/* ============================================================
   Sitewide footer.

   Linked by index.html and, through templates/partials.js, by every
   generated page. The markup it styles comes from templates/footer.js.
   Before this file existed the footer rules were transcribed into
   index.html's inline <style> and into listings.css and had to be kept
   in sync by hand; both copies have been removed in favor of this one.

   The footer carries required brokerage and fair-housing disclosures,
   so the sizes below are floors, not preferences. Nothing here drops
   under 13px and nothing relies on a grey that fails contrast: the
   fine print is the part most likely to matter and the least likely
   to be read, which is exactly why it has to stay legible.
============================================================ */

.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: var(--space-6) 0 var(--space-5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  text-align: left;
}

/* ── Logo lock-up and licensee block ── */

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.footer-sep {
  color: var(--slate);
  margin: 0 6px;
  font-weight: 500;
}

/* Real <address>, so the italics browsers apply by default have to go. */
.footer-licensee {
  font-style: normal;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ── Legal nav ──
   Wraps rather than scrolls. Five items do not fit on one line at
   375px, and a footer that scrolls sideways hides the disclosures. */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.site-footer .footer-link,
.site-footer .footer-phone {
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
}

.site-footer .footer-link {
  font-weight: 500;
}

.site-footer .footer-phone {
  font-weight: 600;
}

.site-footer .footer-link:hover,
.site-footer .footer-phone:hover,
.site-footer .footer-link:focus-visible,
.site-footer .footer-phone:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Equal Housing Opportunity ── */

.footer-eho {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* Inherits the color of the line it sits on, which is the point of
   inlining the SVG instead of linking it. */
.footer-eho-mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: currentColor;
}

/* ── Fine print and copyright ── */

.site-footer .footer-fineprint {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 78ch;
}

.site-footer .footer-copyright {
  font-size: 13px;
  color: var(--ink-soft);
}

/* A hairline above the last two blocks, so the substantiation reads as
   footnotes to the page rather than as more footer navigation. */
.site-footer .footer-fineprint {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
  width: 100%;
}

@media (max-width: 640px) {
  .site-footer {
    padding: var(--space-5) 0 var(--space-4);
  }
  .footer-links {
    gap: var(--space-2) var(--space-3);
  }
}
