/* The Human Need — site footer (see components/site-chrome.tsx)
   Loaded globally from app/layout.tsx so every route shares one footer. Replaces
   the per-page .footer rules that used to live in home/story/stories.css.
   Centered, minimal composition: logo, tagline, a single inline link row, and a
   quiet legal line. Tokens come from /styles/tokens.css. */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: var(--space-8) auto 0;
  padding: var(--space-7) 0 var(--space-6);
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer__brand {
  display: inline-flex;
}

.site-footer__logo {
  display: block;
  width: 128px;
  height: auto;
}

.site-footer__tagline {
  margin: 0;
  max-width: 34ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink-muted);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.site-footer__nav a {
  position: relative;
  padding-bottom: 2px;
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease);
}

.site-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}

.site-footer__nav a:hover::after,
.site-footer__nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-footer__nav a:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
  border-radius: 2px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.site-footer__legal a {
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease);
}

.site-footer__legal a:hover {
  color: var(--ink);
}

.site-footer__legal a:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .site-footer {
    margin-top: var(--space-6);
    padding: var(--space-6) 0 var(--space-5);
  }

  .site-footer__logo {
    width: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__nav a::after,
  .site-footer__nav a,
  .site-footer__legal a {
    transition: none;
  }
}
