.site-footer {
  position: relative;
  margin-top: 72px;
  overflow: hidden;
  border-top: 1px solid var(--line, rgba(255, 255, 255, .12));
  background: var(--bg, #030306);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: transparent;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  width: min(var(--max, 1200px), calc(100% - 64px));
  margin: 0 auto;
  padding: 58px 0 52px;
}

.footer-top,
.footer-bottom {
  display: flex;
  min-width: 0;
}

.footer-top {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  max-width: none;
  color: var(--soft, #b8b3c7);
  font-size: 14px;
  line-height: 1.6;
}

.footer-brand strong,
.footer-legal h2 {
  display: block;
  margin: 0;
  color: var(--ink, #fff);
  font-size: 17px;
  font-weight: 760;
}

.footer-logo {
  display: block;
  width: 142px;
  flex: 0 0 auto;
  margin: 0;
  opacity: .9;
  filter: drop-shadow(0 8px 24px rgba(117, 65, 255, .16));
}

.footer-platform {
  display: block;
  color: var(--muted, #a7a1b7);
  text-align: left;
}

.footer-risk {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted, #a7a1b7);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.footer-bottom {
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.footer-support {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted, #a7a1b7);
  text-align: right;
  white-space: nowrap;
}

.footer-support a {
  color: var(--purple-2, #c5a9ff);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 28px;
}

.footer-legal h2 {
  margin-right: 8px;
}

.footer-legal a {
  display: block;
  width: fit-content;
  padding: 0;
  color: var(--muted, #a7a1b7);
  font-size: 14px;
  transition: color .2s ease, transform .2s ease;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--purple-2, #c5a9ff);
  transform: translateX(3px);
}

@media (max-width: 1100px) {
  .footer-inner { width: min(var(--max, 1200px), calc(100% - 40px)); gap: 28px; }
}

@media (max-width: 760px) {
  .footer-inner { width: min(var(--max, 1200px), calc(100% - 32px)); }
}

@media (max-width: 640px) {
  .footer-inner { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 28px; text-align: center; padding: 42px 0 36px; }
  .footer-top,
  .footer-bottom { align-items: center; gap: 18px; }
  .footer-brand { justify-content: center; gap: 8px 18px; }
  .footer-logo { margin-left: auto; margin-right: auto; }
  .footer-platform,
  .footer-support { text-align: center; white-space: normal; }
  .footer-legal { justify-content: center; gap: 10px 18px; }
  .footer-legal h2 { flex-basis: 100%; margin-bottom: 2px; }
  .footer-legal a { padding: 0; }
}
