/* Shared site footer. */

.site-footer {
  position: relative;
  width: 100%;
  padding: clamp(48px, 6vw, 88px) 32px 32px;
  color: #131417;
  background: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  overflow: clip;
  opacity: 0;
  transition: opacity 0.8s ease, background-color 0.25s ease;
}

.site-footer.is-visible {
  opacity: 1;
}

body[data-theme="dark"] .site-footer {
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.015);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 28px);
  padding: 0 2px;
  transform: translateY(72px);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-footer.is-visible .footer-inner {
  transform: translateY(0);
}

.footer-main {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  padding-bottom: 50px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: clamp(11px, 1.15vw, 18px);
}

.footer-social {
  display: flex;
  width: clamp(38px, 2.6vw, 46px);
  height: clamp(38px, 2.6vw, 46px);
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(19, 20, 23, 0.18);
  border-radius: 50%;
}

body[data-theme="dark"] .footer-social {
  border-color: rgba(240, 240, 240, 0.18);
}

.footer-social img {
  display: block;
  width: 44%;
  max-height: 44%;
  object-fit: contain;
}

body[data-theme="dark"] .footer-social img {
  filter: invert(1);
}

.footer-brand {
  display: flex;
  flex: 0 0 auto;
}

.footer-brand-link {
  display: block;
  color: inherit;
  border-radius: 8px;
}

.footer-brand-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

.footer-logo {
  display: block;
  width: clamp(240px, 20vw, 380px);
  height: auto;
}

.footer-logo-light {
  display: none;
}

body[data-theme="dark"] .footer-logo-dark {
  display: none;
}

body[data-theme="dark"] .footer-logo-light {
  display: block;
}

.footer-rule {
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.38;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-legal {
  display: flex;
  gap: 30px;
}

.footer-legal a {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.footer-legal a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.footer-legal a:hover::after,
.footer-legal a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Copyright à esquerda; links legais como ícones à direita. */
.footer-meta {
  display: grid;
  grid-template-columns: 1fr auto;
}

.footer-meta p {
  grid-column: 1;
  justify-self: start;
  text-align: left;
  margin: 0;
}

.footer-meta .footer-legal {
  grid-column: 2;
  justify-self: end;
}

/* Ícones legais: 20px dentro de uma área de 40px, sem aumentar a altura da linha. */
.footer-legal {
  gap: 10px;
  margin-right: -10px;
}

.footer-legal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -10px 0;
  border-radius: 50%;
  transition: opacity 0.2s ease;
}

.footer-legal-link::after {
  display: none;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  opacity: 0.55;
}

.footer-legal-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

.footer-legal-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.footer-legal-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
