/* =========================================================================
   Site footer (src/footer.html). Replaces Beaver Builder footer template 2882 in the local build.
   Navy ink background, ui-kit type scale (16 body / 14 small), Proxima Nova 400/600, no underlines.
   Everything is scoped to .ph-footer and written as `.fl-page .ph-footer …` / `body .ph-footer …` so the
   theme skin (loaded later, wins `.fl-page` ties at ≤991) can't restyle it.
   ========================================================================= */
.ph-footer {
  --pf-bg: #1c2737;
  --pf-text: #c3cedd;      /* links, body: 9.6:1 on the navy */
  --pf-muted: #93a4bd;     /* headings, small print: 5.9:1 */
  --pf-strong: #fff;
  --pf-line: rgba(255, 255, 255, .1);
  --pf-blue: #2a6be6;
  --pf-blue-hover: #2256d3;
  --pf-focus: #dcebfd;
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--pf-bg); color: var(--pf-text);
  font-family: "Proxima Nova", "proxima-nova", system-ui, sans-serif; font-size: 16px; line-height: 1.5;
}
/* a soft brand-blue glow behind the logo, so the block has depth without adding content */
.ph-footer::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 720px; height: 720px; left: -260px; top: -380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(42, 107, 230, .22), rgba(42, 107, 230, 0));
}
.ph-footer *, .ph-footer *::before, .ph-footer *::after { box-sizing: border-box; }
.ph-footer .ph-foot-wrap { max-width: 1248px; margin: 0 auto; padding: 72px 24px 0; }

/* ---------- main grid: brand + four link columns ---------- */
.ph-footer .ph-foot-main {
  /* link columns sized to their longest label (bold when it's the current page): Features 176, Solutions 245
     ("Property Management Companies"), About 113, Resources 165, so every label sits on one line at the full 1200px width
     with ~4px to spare. Narrower, About and Resources hold their width and Features (down to "Communications", 121)
     and Solutions (whose long labels then wrap) give way */
  --pf-cols: minmax(124px, 180fr) minmax(0, 250fr) minmax(116px, 116fr) minmax(166px, 166fr);
  display: grid; grid-template-columns: 376px var(--pf-cols);
  gap: 48px 28px; padding-bottom: 56px;
}

/* brand */
.ph-footer .ph-foot-brand { max-width: 340px; } /* the extra 36px of its track + the 28px gap = 64px of air before Features */
.ph-footer .ph-foot-home { display: inline-block; color: var(--pf-strong); line-height: 0; border-radius: 6px; }
.ph-footer .ph-foot-logo { display: block; width: 124px; height: auto; }
.ph-footer .ph-foot-pitch { margin: 20px 0 0; font-size: 18px; line-height: 1.45; color: var(--pf-strong); text-wrap: balance; }
.ph-footer .ph-foot-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0; font-size: 14px; line-height: 1.45; color: var(--pf-muted); }
.ph-footer .ph-foot-trust strong { font-weight: 600; color: var(--pf-strong); }
.ph-footer .ph-foot-stars { display: inline-flex; gap: 2px; }
.ph-footer .ph-foot-stars svg { width: 15px; height: 15px; fill: #fbbf24; }

/* account actions (WP menu "Platform"): pills */
.ph-footer .ph-foot-account { margin-top: 28px; }
.ph-footer .ph-foot-account ul { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-footer .ph-foot-account a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--pf-strong);
  border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .04);
  transition: background-color .15s, border-color .15s;
}
.ph-footer .ph-foot-account a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); color: var(--pf-strong); }
.ph-footer .ph-foot-account a[href*="/sign-up"] { background: var(--pf-blue); border-color: var(--pf-blue); }
.ph-footer .ph-foot-account a[href*="/sign-up"]:hover { background: var(--pf-blue-hover); border-color: var(--pf-blue-hover); }

/* link columns */
.fl-page .ph-footer .ph-foot-h, body .ph-footer .ph-foot-h {
  margin: 0 0 18px; padding: 0; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.3;
  letter-spacing: .08em; text-transform: uppercase; color: var(--pf-muted);
}
.ph-footer ul { list-style: none; margin: 0; padding: 0; }
.ph-footer li { margin: 0; padding: 0; }
.ph-footer .ph-foot-col ul { display: flex; flex-direction: column; gap: 6px; }
.ph-footer a { text-decoration: none; }
.ph-footer a:hover, .ph-footer a:focus, .ph-footer a:active { text-decoration: none; }
.ph-footer .ph-foot-col a {
  position: relative; display: inline-block; padding: 4px 0; /* 32px rows: comfortable tap targets */
  font-size: 16px; line-height: 1.5; color: var(--pf-text); transition: color .15s;
}
.ph-footer .ph-foot-col a:hover { color: var(--pf-strong); }
.ph-footer .current-menu-item > a, .ph-footer a[aria-current="page"] { color: var(--pf-strong); font-weight: 600; }
.ph-footer .ph-foot-col .current-menu-item > a::before, .ph-footer .ph-foot-col a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--pf-blue); /* centred on the first line's caps */
}

/* Gable item: same "New" chip as the header nav (header.css .gable-new metrics). vertical-align lifts the chip so its
   middle meets the middle of the link's caps; inline (not flex) so the " Assistant" span keeps its leading space. */
.ph-footer .ph-foot-col a[href$="gable.html"]::after, .ph-footer .ph-foot-col a[href$="/gable/"]::after {
  content: "New"; display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 3px calc(7px - .04em) 3px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; color: #fff; background: #4645b6;
}
@supports (text-box: trim-both cap alphabetic) {
  .ph-footer .ph-foot-col a[href$="gable.html"]::after, .ph-footer .ph-foot-col a[href$="/gable/"]::after {
    text-box: trim-both cap alphabetic; padding-block: 6px; vertical-align: 1.5px;
  }
}
/* links that leave payhoa.com (WP menu items set to open in a new tab) get an outward arrow, which screen readers
   announce as "opens in new tab" (alt text for generated content; browsers without it keep the plain arrow) */
.ph-footer .ph-foot-col a[target="_blank"]::after, .ph-footer .ph-foot-col a[href^="https://intercom.help"]::after, .ph-footer .ph-foot-col a[href*="facebook.com"]::after {
  content: ""; content: "" / "(opens in new tab)"; display: inline-block; vertical-align: -1px; margin-left: 6px; width: 12px; height: 12px; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 2.5h6v6M9.5 2.5 2.5 9.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 2.5h6v6M9.5 2.5 2.5 9.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- final call to action sits on the footer: square bottom corners, no gap ----------
   Every page ends with one .gbl-final card (the homepage's own, or the site-wide footer CTA). */
body:has(.ph-footer) .gbl-final-sec { padding-bottom: 0; }
body:has(.ph-footer) .gbl-final { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
body:has(.ph-footer) .fl-module:has(.gbl-final-sec) > .fl-module-content { margin-bottom: 0; }
body:has(.ph-footer) .fl-row:has(.gbl-final-sec) > .fl-row-content-wrap { padding-bottom: 0; }

/* ---------- bottom bar: copyright, legal, back to top ---------- */
.ph-footer .ph-foot-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  padding: 24px 0 32px; border-top: 1px solid var(--pf-line); font-size: 14px; color: var(--pf-muted);
}
.fl-page .ph-footer .ph-foot-copy, body .ph-footer .ph-foot-copy { margin: 0; font-size: 14px; color: var(--pf-muted); }
.ph-footer .ph-foot-legal ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ph-footer .ph-foot-legal a, .ph-footer .ph-foot-top { font-size: 14px; color: var(--pf-muted); transition: color .15s; }
.ph-footer .ph-foot-legal a:hover, .ph-footer .ph-foot-top:hover { color: var(--pf-strong); }
.ph-footer .ph-foot-top { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ph-footer .ph-foot-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.ph-footer a:focus-visible { outline: 2px solid var(--pf-focus); outline-offset: 3px; border-radius: 4px; }
.ph-footer .ph-foot-account a:focus-visible { border-radius: 999px; }

/* HubSpot's chat bubble is fixed 16px from the right edge and 60px wide: keep "Back to top" clear of it until the
   page is wide enough that the footer's own margin does that */
@media (min-width: 769px) and (max-width: 1400px) { .ph-footer .ph-foot-bar { padding-right: 88px; } }

/* 1101–1247 and 769–849: the Features column is narrower than "Gable AI Assistant" + chip (176px), so the chip would
   drop to its own line; show the short label there, as phones do */
@media (min-width: 1101px) and (max-width: 1247px), (min-width: 769px) and (max-width: 849px) { .ph-footer .ph-foot-long { display: none; } }

/* ---------- ≤1100: brand on its own row, four columns below ---------- */
@media (max-width: 1100px) {
  .ph-footer .ph-foot-main { grid-template-columns: var(--pf-cols); gap: 40px 32px; }
  .ph-footer .ph-foot-brand {
    grid-column: 1 / -1; max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: end;
    padding-bottom: 40px; border-bottom: 1px solid var(--pf-line);
  }
  .ph-footer .ph-foot-brand > :not(.ph-foot-account) { grid-column: 1; max-width: 520px; }
  .ph-footer .ph-foot-account { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .ph-footer .ph-foot-account ul { justify-content: flex-end; }
}

/* ---------- ≤768: phone ---------- */
@media (max-width: 768px) {
  .ph-footer .ph-foot-wrap { padding: 48px 20px 0; }
  .ph-footer .ph-foot-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; padding-bottom: 40px; }
  .ph-footer .ph-foot-brand { display: block; padding-bottom: 32px; }
  .ph-footer .ph-foot-pitch { font-size: 16px; }
  .ph-footer .ph-foot-account { margin-top: 24px; }
  .ph-footer .ph-foot-account ul { justify-content: flex-start; }
  .ph-footer .ph-foot-account li { flex: 1 1 auto; }
  .ph-footer .ph-foot-account a { width: 100%; justify-content: center; min-height: 44px; }
  .ph-footer .ph-foot-col a { font-size: 15px; }
  .ph-footer .ph-foot-long { display: none; }
  .ph-footer .ph-foot-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 28px; }
  .ph-footer .ph-foot-top { margin-left: 0; }
  .ph-footer .ph-foot-col .current-menu-item > a::before, .ph-footer .ph-foot-col a[aria-current="page"]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ph-footer a { transition: none; } }
