.site-footer {
  background: var(--color-card-bg);
  border-top: 1px solid var(--color-divider);
  padding: 12px 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  font-family: 'Inter', sans-serif;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 var(--space-md);
  min-height: 56px;
  gap: var(--space-sm);
}

.footer-brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-main);
}

.footer-logo {
  height: 24px;
  width: 24px;
}

.footer-legal {
  justify-self: center;
  text-align: center;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  color: #6B7280;
}

/* Normalize paragraph margin inside legal */
.footer-legal p { margin: 0; }

.footer-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin: 0;
}

.footer-links a:hover {
  color: var(--color-text-main);
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr;
  text-align: center;
    padding: var(--space-sm) var(--space-md);
    row-gap: var(--space-md);
    min-height: unset;
  }

  .footer-brand,
  .footer-legal,
  .footer-links {
    justify-self: center;
    margin: 0 auto;
  }

  .footer-links {
    justify-content: center;
    width: 100%;
    white-space: normal;
    gap: var(--space-sm);
  }
}