/* ============================================
   导航栏 (Nav)
   ============================================ */
.nav {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid rgb(16 19 26 / .06);
  background: rgb(255 255 255 / .7);
  backdrop-filter: blur(24px) saturate(145%);
  gap: 64px;
}

.brand {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.3px;
  white-space: nowrap;
}

.brand-v {
  color: var(--orange);
}

.brand b {
  font-size: 17px;
  margin-left: 4px;
}

.brand img {
  display: block;
  width: 128px;
  height: auto;
}

.menu-button {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: transparent;
}

.nav nav {
  display: flex;
  font-size: 14px;
  flex: 1;
  justify-content: center;
  gap: 38px;
}

.nav nav a {
  position: relative;
  font-size: 14px;
  color: #292b30;
  text-decoration: none;
}

.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -25px;
  height: 2px;
  background: var(--orange);
  transition: .3s;
}

.nav nav a:hover::after,
.nav nav a.active::after,
.nav nav .nav-dropdown.active summary > a::after {
  right: 0;
}

.nav-actions { 
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
 }

.nav-action { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 7px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.nav-action:hover { transform: translateY(-1px); }
.nav-login { background: var(--blue); }
.nav-login:hover { background: #2549a0; }

.nav-trial { 
  background: var(--orange); 
  gap: 10px; 
}
.nav-trial:hover { background: #cf3f23; }

/* 通用顶部下拉菜单：为任意 details 添加 nav-dropdown 类即可复用。 */
.nav-dropdown {
  position: relative;
  color: #292b30;
}

.nav-dropdown summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary > a {
  color: inherit;
}

.nav-dropdown ul {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 176px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: rgb(255 255 255 / .97);
  border: 1px solid rgb(16 19 26 / .08);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgb(16 19 26 / .12);
  transform: translateX(-50%);
}

.nav-dropdown li {
  margin: 0;
  text-align: center;
}

.nav nav .nav-dropdown ul a {
  display: block;
  padding: 10px 16px;
  color: #454b57;
  font-size: 13px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.nav nav .nav-dropdown ul a::after {
  display: none;
}

.nav nav .nav-dropdown ul a:hover {
  color: var(--orange) !important;
  background: #fff4f0 !important;
}

.nav nav .nav-dropdown ul:hover a.active {
  color: inherit;
  background: transparent;
}

.nav nav .nav-dropdown ul a.active {
  color: var(--orange);
  background: #fff4f0;
}

.download-btn {
  float: right;
  clear: both;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 17px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

@media (max-width: 900px) {
  .nav.site-header {
    gap: 12px;
    padding: 0 max(18px, calc((100vw - var(--max)) / 2));
  }

  .nav.site-header nav,
  .nav.site-header .nav-actions {
    display: none;
  }

  .nav.site-header .menu-button {
    display: block;
    margin-left: auto;
  }

  .nav.site-header .menu-button i {
    display: block;
    width: 22px;
    height: 1px;
    margin: 6px;
    background: #11131a;
    transition: transform 0.25s ease;
  }

  .nav.site-header.open {
    height: 64px;
  }

  .nav.site-header.open nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    display: block;
    margin: 0;
    padding: 8px 20px 16px;
    box-sizing: border-box;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgb(255 255 255 / .98);
    box-shadow: 0 22px 40px rgb(20 30 60 / .1);
    border-bottom: 1px solid rgb(16 19 26 / .06);
  }

  .nav.site-header.open nav a::after {
    display: none;
  }

  .nav.site-header.open nav > a,
  .nav.site-header.open nav .nav-dropdown summary > a {
    display: block;
    padding: 13px 4px;
    border-bottom: 1px solid #e8e9ed;
  }

  .nav.site-header.open nav .nav-dropdown summary {
    width: 100%;
  }

  .nav.site-header.open nav .nav-dropdown summary > a {
    flex: 1;
  }

  .nav.open .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown summary {
    font-size: 14px;
  }

  .nav-dropdown::after {
    display: none;
  }

  .nav-dropdown ul {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav.site-header.open nav .nav-dropdown ul a {
    display: block;
    padding: 12px 4px;
    font-size: 13px;
    color: #454b57;
    border-bottom: 1px solid #e8e9ed;
  }

  .nav.site-header.open nav .nav-dropdown li {
    text-align: left;
  }
}

.login {
  color: #555;
}

.pill {
  background: var(--ink);
  box-shadow: none;
  border-radius: 8px;
}

.pill:hover {
  box-shadow: none;
  background: var(--blue);
}

.pill.small {
  background: var(--orange);
  border-radius: 7px;
}

/* Shared footer */
body > footer,
.site-footer {
  padding: 70px max(28px, calc((100vw - var(--max)) / 2)) 24px;
  color: #fff;
  background: #0b0e15;
}

.site-footer .brand.inverse {
  color: #fff;
}

.site-footer .brand.inverse img,
.footer-logo img {
  display: block;
  width: 180px;
  height: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.7fr repeat(5, 1fr);
  gap: 30px;
}

.footer-top > div:not(:first-child) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-top b {
  margin-bottom: 7px;
  color: #fff;
  font-size: 13px;
}

.footer-top p,
.footer-top a {
  max-width: 260px;
  color: #858b98;
  font-size: 12px;
  line-height: 1.7;
  transition: color .2s ease;
}

.footer-top a:hover,
.site-footer a:hover {
  color: #fff;
}

.site-footer .socials {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.site-footer .socials span,
.site-footer .socials a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #575757;
  border-radius: 50%;
  color: #bbb;
  font-size: 9px;
}

.social-qr {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  width: 128px;
  height: 128px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 20;
}

.site-footer .socials [data-qr]:hover .social-qr {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.social-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 55px;
  padding-top: 20px;
  border-top: 1px solid #252935;
  color: #646b78;
  font-size: 11px;
}

/* Legacy about-page footer layout. */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(5, 1fr);
  gap: 34px;
  padding-bottom: 48px;
}

.footer-brand img {
  width: 180px;
}

.footer-brand p {
  max-width: 240px;
  margin: 20px 0 0;
  font-size: 14px;
}

.site-footer:has(.footer-grid) {
  padding: 64px 0 0;
  color: rgb(255 255 255 / .68);
}

.site-footer:has(.footer-grid) h3 {
  margin: 0 0 17px;
  color: #fff;
  font-size: 15px;
}

.site-footer:has(.footer-grid) a {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
}

.site-footer:has(.footer-grid) .footer-bottom {
  gap: 24px;
  margin-top: 0;
  padding: 20px 0;
  border-top-color: rgb(255 255 255 / .1);
  font-size: 12px;
}

.site-footer:has(.footer-grid) .footer-bottom a:last-child {
  margin-left: auto;
}

@media (max-width: 1120px) {
  .footer-top {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }

  .footer-grid > div:nth-child(n + 5) {
    margin-top: 10px;
  }
}

@media (max-width: 900px) {
  .footer-top > div:first-child {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer:has(.footer-grid) .footer-bottom a:last-child {
    margin-left: 0;
  }
}
