/* Shared branding aligned with https://help.airuan.net/. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #e8edf5;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.7;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1200px, calc(100% - 56px));
  height: 68px;
  margin: 0 auto;
}

.topbar-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.topbar-brand strong {
  display: block;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.topnav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 32px);
  max-width: 820px;
  min-width: 0;
}

.topnav a {
  display: flex;
  flex: 0 1 120px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #333;
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.18s;
}

.topnav a:hover,
.topnav a.is-active {
  background: #f2f2f2;
}

.topbar a:focus-visible {
  outline: 2px solid #0a84ff;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
    width: calc(100% - 32px);
    height: auto;
    min-height: 68px;
    padding: 12px 0;
  }

  .topbar-brand {
    flex-shrink: 1;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-brand strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .topnav {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .topnav a {
    min-width: 0;
    min-height: 44px;
    padding: 8px 4px;
    font-size: 14px;
  }
}

.site-footer {
  flex: none;
  padding: 0;
  color: #d0d0d0;
  background: #303030;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.75;
}

.footer-wrap {
  width: min(1200px, calc(100% - 56px));
  margin: 0 auto;
}

.site-footer p,
.site-footer ul,
.site-footer figure {
  margin: 0;
  padding: 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 64px;
  padding-top: 34px;
  padding-bottom: 40px;
}

.footer-main > * {
  min-width: 0;
}

.site-footer h2 {
  margin: 4px 0 20px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
}

.site-footer a {
  transition: color 0.18s;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer a:focus-visible {
  border-radius: 3px;
  outline: 2px solid #86bdff;
  outline-offset: 5px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.site-footer .footer-brand:hover {
  text-decoration: none;
}

.footer-logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: #fff;
}

.footer-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-footer .footer-slogan {
  margin: 10px 0 26px;
}

.footer-about h2 {
  margin: 0 0 8px;
}

.footer-description {
  max-width: 370px;
  line-height: 1.65;
}

.footer-legal {
  display: grid;
  gap: 10px;
  margin-top: 21px;
}

.footer-legal > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.footer-legal span {
  color: #909090;
}

.footer-products ul {
  display: grid;
  gap: 13px;
  list-style: none;
}

.footer-products li a {
  display: inline-block;
  overflow-wrap: anywhere;
}

.site-footer .footer-all-products {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: #52b6ff;
}

.site-footer .footer-all-products:hover {
  color: #9dd7ff;
}

.footer-contact p {
  overflow-wrap: anywhere;
}

.site-footer .footer-wechat-tip {
  margin-top: 10px;
}

.site-footer .footer-wechat {
  width: 112px;
  margin-top: 8px;
}

.footer-wechat img {
  width: 112px;
  height: 112px;
  background: #fff;
  object-fit: contain;
}

.footer-wechat figcaption {
  margin-top: 4px;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.footer-bottom {
  padding: 23px 0 28px;
  border-top: 1px solid #414141;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.footer-bottom p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 5px;
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px 48px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-description {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .footer-wrap {
    width: calc(100% - 32px);
  }
}

@media (max-width: 560px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-top: 28px;
    padding-bottom: 30px;
  }

  .footer-about {
    grid-column: auto;
  }

  .site-footer .footer-slogan {
    margin-bottom: 22px;
  }

  .footer-main h2 {
    margin-bottom: 14px;
  }

  .footer-about h2 {
    margin-bottom: 8px;
  }

  .footer-bottom {
    padding: 20px 0 24px;
    font-size: 12px;
    text-align: left;
  }

  .footer-bottom p {
    justify-content: flex-start;
  }
}

/* Integrate the shared navigation with the existing company homepage. */
html {
  scroll-padding-top: 84px;
}

.topbar {
  display: block;
  height: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar img,
.site-footer img {
  display: block;
  max-width: 100%;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 130px;
  }
}
