/* ============================================
   Site footer
   Theme-aligned companion to the global navbar
   ============================================ */

.site-footer {
  --footer-surface: rgba(var(--site-theme-primary-rgb, var(--bs-primary-rgb)), 0.94);
  --footer-border: rgba(255, 255, 255, 0.08);
  --footer-text: rgba(245, 245, 247, 0.92);
  --footer-muted: rgba(245, 245, 247, 0.68);
  --footer-link: rgba(245, 245, 247, 0.78);
  --footer-link-hover: #fff;
  margin-top: auto;
  color: var(--footer-text);
  background: var(--footer-surface);
  border-top: 1px solid var(--footer-border);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.4fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 1.4rem;
}

.site-footer-brand {
  max-width: 28rem;
}

.site-footer-brand-name {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.55rem;
  color: var(--footer-text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-decoration: none;
}

.site-footer-tagline {
  max-width: 25rem;
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.25rem 1.2rem;
  justify-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  color: var(--footer-link);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}

.site-footer-link:hover,
.site-footer-link:focus {
  color: var(--footer-link-hover);
}

.site-footer-link:active {
  transform: translateY(1px);
}

.site-footer-link:focus-visible {
  outline: none;
  color: var(--footer-link-hover);
}

.site-footer-meta {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer-copyright {
  margin: 0;
  color: rgba(245, 245, 247, 0.58);
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-footer-meta-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
}

.site-footer-meta-link {
  color: rgba(245, 245, 247, 0.6);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s ease;
}

.site-footer-meta-link:hover,
.site-footer-meta-link:focus {
  color: var(--footer-link-hover);
}

.site-footer-meta-link:focus-visible {
  outline: none;
  color: var(--footer-link-hover);
}

@media (max-width: 767.98px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 2rem;
  }

  .site-footer-nav {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-meta-links {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .site-footer-nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer *,
  .site-footer *::before,
  .site-footer *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
