/* ============================================================
   CREDIT KERNEL — Footer (Figma layout)
   ============================================================ */

.site-footer {
  position: relative;
  background: var(--bg-alt);
  padding: var(--space-7) 0 var(--space-5);
  color: var(--text-muted);
  font-size: 14px;
  transition: background .2s, border-color .2s;
  overflow: hidden;
}
[data-theme="dark"] .site-footer {
  background: rgba(40,52,48,.24);
  padding: 67.6px 0 54.4px;
  color: #b8cec2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ── Geometric circles (bottom-right) ─────────────────────── */
.footer__circles {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  right: -200px;
  bottom: -200px;
  width: 564px;
  height: 564px;
  opacity: 0.6;
}
.footer__circles svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Main frame (three columns, Figma layout) ─────────────── */
.footer__frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 154px;
}

/* ── Brand column ─────────────────────────────────────────── */
.footer__brand-col {
  display: flex;
  flex-direction: column;
}
.footer__brand-top {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer__brand-top .brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.footer__brand-top .brand-logo { display: none; }
.footer__brand-top .brand-logo--light { display: block; height: 32px; width: auto; }
[data-theme="dark"] .footer__brand-top .brand-logo--light { display: none; }
[data-theme="dark"] .footer__brand-top .brand-logo--dark { display: block; height: 32px; width: auto; }

.footer__tagline {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: black;
  white-space: nowrap;
}
[data-theme="dark"] .footer__tagline {
  color: #e6eeea;
}

/* ── Sublinks (Privacy / Terms + icon) ────────────────────── */
.footer__sublinks {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: auto;
  margin-bottom: 43px;
}
.footer__sublinks a {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  color: #5c5c5c;
  white-space: nowrap;
}
.footer__sublinks a:hover { color: var(--text); }
[data-theme="dark"] .footer__sublinks a { color: #bcbcbc; }
[data-theme="dark"] .footer__sublinks a:hover { color: #e6eeea; }
.footer__social-icon,
.footer__terms-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #000;
  line-height: 0;
}
.footer__social-icon svg,
.footer__social-icon img,
.footer__terms-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}
.footer__social-icon svg path,
.footer__terms-icon svg path {
  fill: currentColor;
}

/* ── Menu column (Products + Company + Copyright) ─────────── */
.footer__menu-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__menu-inner {
  display: flex;
  gap: 48px;
}

/* ── Nav columns ──────────────────────────────────────────── */
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__col h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #5c5c5c;
  letter-spacing: normal;
}
.footer__col a {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: black;
  white-space: nowrap;
}
.footer__col a:hover { color: var(--text); }
[data-theme="dark"] .footer__col a { color: #b8cec2; }
[data-theme="dark"] .footer__col a:hover { color: #e6eeea; }

/* ── Divider ──────────────────────────────────────────────── */
.footer__divider {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  border: none;
  border-top: 1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .footer__divider {
  border-top-color: rgba(255,255,255,.08);
}

/* ── Legal bar (copyright + lang/theme utils) ─────────────── */
.footer__legal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__legal-utils {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer__copy {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 18px;
  color: #9a9a9a;
  white-space: nowrap;
}

/* ── QR code ──────────────────────────────────────────────── */
.footer__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.footer__qr img {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 4px;
}
.footer__qr-label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 10px;
  line-height: 14px;
  color: #9a9a9a;
  text-align: center;
}
[data-theme="dark"] .footer__qr-label { color: #bcbcbc; }

/* ── Language selector in footer ──────────────────────────── */
.footer__lang-col {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.footer__social-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.lang-switch-footer {
  display: flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 0;
  height: 25px;
  box-sizing: border-box;
}
.lang-switch-footer a {
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color .15s, background .15s;
  letter-spacing: 0.04em;
}
.lang-switch-footer a:hover { color: var(--text); }
.lang-switch-footer a.active {
  background: black;
  color: white;
}
[data-theme="dark"] .lang-switch-footer a.active {
  background: white;
  color: black;
}

/* ── Theme selector ───────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  color: #5c5c5c;
  background: transparent;
}
.theme-toggle__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 20px);
  align-items: center;
  width: 45px;
  height: 25px;
  padding: 1px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-sizing: border-box;
}
.theme-toggle__icon {
  position: relative;
  z-index: 2;
  width: 13px;
  height: 13px;
  justify-self: center;
}
.theme-toggle__thumb {
  position: absolute;
  z-index: 1;
  left: 1px;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: black;
  transition: transform .2s ease;
}
.theme-toggle__icon--sun {
  color: white;
}
.theme-toggle__icon--moon {
  color: #9a9a9a;
}
[data-theme="dark"] .theme-toggle {
  color: #d1d5dc;
}
[data-theme="dark"] .theme-toggle__track {
  border-color: black;
  background: black;
}
[data-theme="dark"] .theme-toggle__thumb {
  background: white;
  transform: translateX(20px);
}
[data-theme="dark"] .theme-toggle__icon--sun {
  color: #9a9a9a;
}
[data-theme="dark"] .theme-toggle__icon--moon {
  color: black;
}
[data-theme="dark"] .footer__sublinks a,
[data-theme="dark"] .footer__col h4 {
  color: #bcbcbc;
}
[data-theme="dark"] .footer__col a,
[data-theme="dark"] .footer__tagline {
  color: #fff;
}
[data-theme="dark"] .footer__social-icon,
[data-theme="dark"] .footer__terms-icon {
  color: #fff;
}
[data-theme="dark"] .footer__social-icon img {
  filter: invert(1);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer__frame {
    flex-direction: column;
    gap: 40px;
  }
  .footer__brand-col {
    min-height: auto;
  }
  .footer__tagline { white-space: normal; }
}
@media (max-width: 560px) {
  .footer__menu-inner {
    flex-direction: column;
    gap: 24px;
  }
}
