/* HayWire site footer -- the one stylesheet for the one footer.
 *
 * scripts/site_footer.py owns the markup and links this file into every page
 * that carries the footer; page generators link it too. Before 2026-09-03 each
 * page family styled the footer itself (Fraunces links on the hand pages,
 * 14px sans on the state pages, a plain rule on prices.html), so the same
 * markup rendered three different ways. Token fallbacks are the values in
 * haywire-tokens.css, for the two generated pages that define theirs inline.
 *
 * Cached immutable for a year by netlify.toml: bump the ?v= token in
 * site_footer.FOOTER_CSS whenever this file changes.
 */
footer.site {
  padding: 64px 0 36px;
  border-top: 1px solid var(--rule, #d9d0b8);
  background: var(--paper-soft, #efe8d6);
  position: relative; z-index: 2;
  max-width: 100%; overflow-x: hidden;   /* the pages' generic overflow guards no longer list footer */
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink, #1a1612);
}
footer.site .fwrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
footer.site a { color: inherit; text-decoration: none; }

.colophon {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px; margin-bottom: 44px;
}
.footer-logo-img { display: block; height: 36px; width: auto; margin-bottom: 4px; }
.colo-brand p {
  font-size: 13.5px; color: var(--ink-3, #4a443c); line-height: 1.6;
  max-width: 320px; margin: 12px 0 0;
}
.colo-social { display: flex; gap: 16px; margin-top: 18px; align-items: center; }
.colo-social a { color: var(--ink-mute, #6b6453); display: inline-flex; transition: color .15s; }
.colo-social a:hover { color: var(--field-green, #3a5a23); }

.colo-col h6 {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-mute, #6b6453);
  margin: 0 0 18px;
}
.colo-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.colo-col li { margin: 0; }
.colo-col a {
  font-family: 'Fraunces', Georgia, serif; font-size: 15px; font-weight: 500;
  font-variation-settings: "SOFT" 60; color: var(--ink-2, #2c2722); transition: color .15s;
}
.colo-col a:hover { color: var(--field-green, #3a5a23); }

/* One door to the state directory, in place of the 21-link strip. */
.colo-states {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 22px; margin: 0 0 40px;
  border: 1px solid var(--rule, #d9d0b8); border-radius: 4px;
  background: var(--paper, #f5efe1); transition: border-color .15s;
}
.colo-states:hover { border-color: var(--field-green, #3a5a23); }
.colo-states .cs-label {
  font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500;
  letter-spacing: -.2px; color: var(--ink, #1a1612);
}
.colo-states .cs-sub { font-size: 13px; color: var(--ink-mute, #6b6453); flex: 1 1 auto; }
.colo-states .cs-arr { color: var(--field-green, #3a5a23); font-size: 18px; margin-left: auto; }

.colo-bottom {
  padding-top: 28px; border-top: 1px solid var(--rule, #d9d0b8);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px;
  color: var(--ink-mute, #6b6453); letter-spacing: .5px;
}
.colo-bottom p { margin: 0; }

@media (max-width: 860px) {
  footer.site .fwrap { padding: 0 20px; }
  .colophon { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .colo-brand { grid-column: 1 / -1; }
}

/* Phones: one column of brand, then link groups two-up with thumb-sized rows,
   the state directory as a full-width card, and a centred colophon line. */
@media (max-width: 560px) {
  /* !important on these four: editorial-mobile.css set them !important until
     2026-09-03 and is served immutable for a year with no ?v= token, so
     returning visitors still load that copy. Drop them once it is versioned. */
  footer.site { padding: 44px 0 28px !important; }
  footer.site .fwrap { padding: 0 16px; }
  .colophon { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; gap: 28px 20px !important; margin-bottom: 28px !important; }
  .colo-brand { grid-column: 1 / -1; text-align: center; }
  .colo-brand p { margin: 10px auto 0; max-width: 300px; font-size: 13px; }
  .footer-logo-img { margin: 0 auto 4px; height: 32px; }
  .colo-social { justify-content: center; gap: 8px; }
  .colo-social a { width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
  .colo-social a:active { background: var(--paper, #f5efe1); }
  .colo-col h6 { margin-bottom: 8px; }
  .colo-col ul { gap: 0; }
  .colo-col a { display: block; padding: 9px 0; font-size: 15.5px; }
  .colo-states { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; margin-bottom: 28px; }
  .colo-states .cs-arr { margin-left: 0; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
  .colo-states { position: relative; padding-right: 48px; }
  .colo-bottom { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 20px; font-size: 10px; }
}
