.mathus-footer {
  padding: 0 0 0.125rem;
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
}

.mathus-footer__surface {
  position: relative;
  width: calc(100% + 2px);
  margin: 0 -1px;
  max-width: none;
  padding: clamp(6px, 0.8vw, 10px) 0 clamp(4px, 0.5vw, 6px);
  border: 1px solid rgba(10, 47, 107, 0.08);
  border-bottom: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.mathus-footer__surface::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 110%;
  transform: translateX(-50%);
  background: #ffffff;
  z-index: 0;
}

.mathus-footer__surface > * {
  position: relative;
  z-index: 1;
}

.mathus-footer__grid {
  display: grid;
  gap: clamp(8px, 1vw, 12px);
}

.mathus-footer__brand-column {
  display: grid;
  gap: 1rem;
}

.mathus-footer__brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
}

.mathus-footer__logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
}

.mathus-footer__description {
  max-width: 34ch;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.mathus-footer__column {
  display: grid;
  gap: 0.18rem;
}

.mathus-footer__heading {
  margin: 0;
  color: var(--color-accent-strong);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.mathus-footer__list {
  display: grid;
  gap: 0.16rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mathus-footer__list a,
.mathus-footer__contact-value a,
.mathus-footer__legal a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.mathus-footer__list a:hover,
.mathus-footer__list a:focus-visible,
.mathus-footer__contact-value a:hover,
.mathus-footer__contact-value a:focus-visible,
.mathus-footer__legal a:hover,
.mathus-footer__legal a:focus-visible {
  color: var(--color-accent);
}

.mathus-footer__contact-list {
  display: grid;
  row-gap: 0.04rem;
}

.mathus-footer__contact-line {
  margin: 0;
  line-height: 1.7;
  white-space: nowrap;
}

.mathus-footer__contact-label {
  margin: 0;
  color: var(--color-accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mathus-footer__contact-value {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.mathus-footer__bar {
  display: grid;
  gap: 0.25rem;
  margin-top: clamp(6px, 0.8vw, 10px);
  padding-top: 0.35rem;
  padding-inline: clamp(16px, 2vw, 20px);
  border-top: 1px solid rgba(10, 47, 107, 0.08);
}

.mathus-footer__copyright {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.mathus-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}

@media (min-width: 768px) {
  .mathus-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mathus-footer__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .mathus-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .mathus-footer__brand-column {
    align-self: start;
  }

  .mathus-footer__logo {
    transform: translateY(-6px);
  }

  .mathus-footer__legal {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767px) {
  .mathus-footer__surface {
    border-radius: 0;
  }
}
