/* Shared footer — public pages (this file) + app (copy at end of styles.css). Keep both in sync. */

.site-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5, 12px);
  text-align: center;
  font-size: var(--fs-sm, 14px);
  color: var(--muted, #5e636e);
}

.site-foot__links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4, 10px) var(--sp-5, 12px);
  max-width: 100%;
}

.site-foot a {
  color: var(--muted, #5e636e);
  text-decoration: none;
}

.site-foot__links a {
  font-size: var(--fs-xs, 12px);
  line-height: 1.35;
  white-space: nowrap;
}

.site-foot a:hover,
.site-foot__links a[aria-current="page"] {
  color: var(--ink, #15171c);
}

.site-foot__copy {
  margin: 0;
  font-size: var(--fs-xs, 12px);
  line-height: 1.35;
}

.has-app-nav .site-foot,
main.auth .site-foot {
  padding-top: var(--sp-8, 18px);
  border-top: 1px solid var(--line-soft, #ececea);
  margin-top: auto;
}
.has-app-nav .site-foot { padding-bottom: var(--sp-2, 6px); }
main.auth .site-foot {
  padding-bottom: calc(var(--sp-2, 6px) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  .site-foot__links a {
    font-size: var(--fs-2xs, 11px);
    letter-spacing: -0.01em;
  }

  body.page-legal,
  body.page-contact {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  body.page-legal > main.wrap,
  body.page-contact > main.wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  body.page-legal .site-foot,
  body.page-contact .site-foot {
    margin-top: auto;
  }
}

@media (min-width: 768px) {
  .site-foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: var(--sp-4, 10px) var(--sp-8, 24px);
  }

  .site-foot__links {
    flex-wrap: wrap;
    justify-content: flex-end;
    order: 2;
    margin-left: auto;
    gap: var(--sp-4, 10px) var(--sp-8, 24px);
  }

  .site-foot__links a {
    font-size: var(--fs-sm, 14px);
    letter-spacing: normal;
  }

  .site-foot__copy {
    order: 1;
    font-size: var(--fs-sm, 14px);
  }

  .has-app-nav .site-foot,
  main.auth .site-foot {
    margin-top: auto;
    padding-bottom: 0;
  }
}
