/* ============================================================
 * 全站公共壳统一层（SPA 侧）
 * 基准：品牌静态站 layout/header.html + layout/footer.html
 * 目标：64px 导航、1300/1480 容器、15px 导航字、深色页脚、
 *       与 /site/css/overrides.css 的 sizing / 配色 / 断点一致。
 * 只作用于 .home-nav / .home-footer，不影响用户中心内部布局。
 * ============================================================ */

:root {
  --shell-container: min(1480px, calc(100% - 140px));
  --shell-header-h: 64px;
  --shell-primary: #165dff;
  --shell-primary-hover: #0e42d2;
  --shell-ink: #171d3b;
  --shell-footer-bg: #292b2f;
  --shell-footer-title: #f2f2f3;
  --shell-footer-text: #92959b;
  --shell-footer-muted: #70737a;
  --shell-footer-line: #44464a;
}

/* ---------------- 头部 ---------------- */
.home-nav.qk-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  height: var(--shell-header-h);
  background: rgba(255, 255, 255, .62);
  border-bottom: 1px solid rgba(255, 255, 255, .98);
  box-shadow: 0 1px 0 #fff, 0 8px 24px rgba(58, 68, 89, .05);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.home-nav.qk-nav.tc-nav-scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: #e5e6eb;
  box-shadow: 0 8px 24px rgba(58, 68, 89, .08);
}

.home-nav.qk-nav .home-nav-inner {
  width: var(--shell-container) !important;
  max-width: none !important;
  height: var(--shell-header-h);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: center;
  gap: 0;
}

.home-nav.qk-nav .home-logo {
  justify-self: start;
  gap: 0;
}

.home-nav.qk-nav .home-logo-img {
  height: 36px;
  max-width: 173px;
  object-fit: contain;
}

.home-nav.qk-nav .home-logo::after {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #182f50;
}

.home-nav.qk-nav .home-nav-links {
  height: var(--shell-header-h);
  margin: 0;
  justify-content: center;
  gap: 40px;
}

.home-nav.qk-nav .home-nav-links .nav-item {
  height: var(--shell-header-h);
}

.home-nav.qk-nav .home-nav-links .nav-item > a {
  position: relative;
  height: var(--shell-header-h);
  padding: 0;
  color: var(--shell-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.home-nav.qk-nav .home-nav-links .nav-item > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--shell-primary);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 80ms ease-out;
}

.home-nav.qk-nav .home-nav-links .nav-item > a:hover,
.home-nav.qk-nav .home-nav-links .nav-item.active > a {
  color: var(--shell-primary);
}

.home-nav.qk-nav .home-nav-links .nav-item > a:hover::after,
.home-nav.qk-nav .home-nav-links .nav-item.active > a::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-nav.qk-nav .home-nav-actions {
  justify-self: end;
  height: var(--shell-header-h);
  margin: 0;
  gap: 8px;
}

.home-nav.qk-nav .nav-auth-login,
.home-nav.qk-nav .nav-auth-register,
.home-nav.qk-nav .nav-console-btn {
  min-width: 111px;
  height: 40px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(22, 93, 255, .18);
}

.home-nav.qk-nav .nav-auth-register,
.home-nav.qk-nav .nav-console-btn,
.home-nav.qk-nav .nav-auth-register.arco-btn-primary,
.home-nav.qk-nav .nav-console-btn.arco-btn-primary {
  color: #fff !important;
  background: var(--shell-primary) !important;
  border-color: var(--shell-primary) !important;
}

.home-nav.qk-nav .nav-auth-register:hover,
.home-nav.qk-nav .nav-console-btn:hover,
.home-nav.qk-nav .nav-auth-register.arco-btn-primary:hover,
.home-nav.qk-nav .nav-console-btn.arco-btn-primary:hover {
  color: #fff !important;
  background: var(--shell-primary-hover) !important;
  border-color: var(--shell-primary-hover) !important;
}

.home-nav.qk-nav .nav-mega {
  top: var(--shell-header-h);
}

.home-nav.qk-nav .nav-mega-inner {
  width: var(--shell-container);
  max-width: none;
  margin: 0 auto;
}

/* ---------------- 页脚 ---------------- */
.home-footer.tc-footer {
  padding: 40px 0 0;
  color: var(--shell-footer-text);
  background: var(--shell-footer-bg);
}

/* 静态站页脚没有服务承诺条；SPA 隐藏它，保证首屏页脚高度与栏目结构一致 */
.home-footer.tc-footer .tc-footer-promise {
  display: none;
}

.home-footer.tc-footer .tc-footer-promise-inner {
  width: var(--shell-container);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 24px;
}

.home-footer.tc-footer .tc-footer-promise-icon {
  color: #fff;
  background: #34373c;
}

.home-footer.tc-footer .tc-footer-promise-title {
  color: var(--shell-footer-title);
}

.home-footer.tc-footer .tc-footer-promise-desc {
  color: #9aa0a8;
}

.home-footer.tc-footer .home-footer-inner {
  width: var(--shell-container);
  max-width: none;
  margin: 0 auto;
  padding: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) 250px 140px;
  align-items: start;
  gap: 30px;
}

/* 静态站页脚没有品牌列，品牌只在头部出现；隐藏后 4 列 + 联系 + 二维码正好 6 列 */
.home-footer.tc-footer .home-footer-brand {
  display: none;
}

.home-footer.tc-footer .tc-footer-contact a {
  gap: 10px;
  white-space: nowrap;
}

.home-footer.tc-footer .tc-footer-contact svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #a7a9ad;
}

.home-footer.tc-footer .tc-footer-license {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #92959b;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
}

.home-footer.tc-footer .tc-footer-license svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #a7a9ad;
}

.home-footer.tc-footer .tc-footer-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #74777d;
  text-align: center;
}

.home-footer.tc-footer .tc-footer-qr-code {
  width: 126px;
  height: 126px;
  margin: 0 0 14px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
  box-sizing: border-box;
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-footer.tc-footer .tc-footer-qr-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.home-footer.tc-footer .tc-footer-qr-code img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-footer.tc-footer .tc-footer-qr strong {
  color: #a9adb6;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
}

.home-footer.tc-footer .tc-footer-qr span {
  color: #74777d;
  font-size: 12px;
  line-height: 1.8;
}

.home-footer.tc-footer .tc-footer-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 22, .58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.home-footer.tc-footer .tc-footer-qr-panel {
  position: relative;
  width: min(360px, 100%);
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

.home-footer.tc-footer .tc-footer-qr-panel img {
  display: block;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  margin: 0 auto;
  object-fit: contain;
}

.home-footer.tc-footer .tc-footer-qr-panel p {
  margin: 12px 0 0;
  color: #4e5969;
  font-size: 14px;
}

.home-footer.tc-footer .tc-footer-qr-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.home-footer.tc-footer .home-footer .home-logo-img,
.home-footer.tc-footer .home-logo-img {
  height: 34px;
}

.home-footer.tc-footer .home-footer-desc {
  margin-top: 14px;
  color: #8b8f96;
  font-size: 13px;
  line-height: 1.8;
}

.home-footer.tc-footer .tc-footer-phone {
  margin-top: 16px;
  color: #9aa0a8;
  font-size: 13px;
}

.home-footer.tc-footer .tc-footer-col-title {
  margin-bottom: 20px;
  color: var(--shell-footer-title);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .025em;
}

.home-footer.tc-footer .tc-footer-col a {
  min-height: 38px;
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--shell-footer-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
  transition: color 180ms ease;
}

.home-footer.tc-footer .tc-footer-col a:hover {
  color: #e6e7e9;
}

.home-footer.tc-footer .home-footer-copy {
  width: var(--shell-container);
  max-width: none;
  min-height: 54px;
  margin: 24px auto 0;
  padding: 14px 0;
  border-top: 1px solid var(--shell-footer-line);
  color: var(--shell-footer-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.home-footer.tc-footer .tc-copy-line {
  gap: 6px;
  line-height: 1.8;
}

.home-footer.tc-footer .tc-copy-line a {
  color: inherit;
}

.home-footer.tc-footer .tc-copy-line a:hover {
  color: #b9bbc0;
}

.home-footer.tc-footer .tc-copy-quals {
  gap: 2px 22px;
}

/* ---------------- 断点 ---------------- */
@media (max-width: 1180px) {
  .home-nav.qk-nav {
    height: var(--shell-header-h) !important;
  }

  .home-nav.qk-nav .home-nav-inner {
    height: var(--shell-header-h);
    width: calc(100% - 48px) !important;
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }

  .home-nav.qk-nav .home-nav-links {
    display: none;
  }

  .home-nav.qk-nav .mobile-nav-trigger {
    display: inline-flex;
  }

  .home-nav.qk-nav .home-nav-actions {
    margin-left: auto;
    gap: 6px;
  }

  /* 与静态站一致：移动端头部只保留汉堡，登录/控制台放进右侧抽屉 */
  .home-nav.qk-nav .nav-auth-register,
  .home-nav.qk-nav .nav-console-btn {
    display: none !important;
  }

  .home-nav.qk-nav .nav-auth-login,
  .home-nav.qk-nav .nav-auth-register,
  .home-nav.qk-nav .nav-console-btn {
    min-width: 78px;
    height: 36px;
    padding: 0 14px;
    box-shadow: none;
  }

  .home-footer.tc-footer .tc-footer-promise-inner,
  .home-footer.tc-footer .home-footer-inner,
  .home-footer.tc-footer .home-footer-copy {
    width: calc(100% - 48px);
  }

  .home-footer.tc-footer .home-footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .home-footer.tc-footer .tc-footer-contact a,
  .home-footer.tc-footer .tc-footer-license {
    min-height: 34px;
  }

  .home-footer.tc-footer .tc-footer-promise-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .home-nav.qk-nav .home-nav-inner {
    width: calc(100% - 32px) !important;
  }

  .home-nav.qk-nav .home-logo-img {
    height: 32px;
    max-width: 150px;
  }

  .home-nav.qk-nav .home-logo::after {
    font-size: 17px;
  }

  .home-footer.tc-footer {
    padding-top: 36px;
  }

  .home-footer.tc-footer .tc-footer-promise-inner,
  .home-footer.tc-footer .home-footer-inner,
  .home-footer.tc-footer .home-footer-copy {
    width: calc(100% - 32px);
  }

  .home-footer.tc-footer .tc-footer-promise-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 16px 0;
  }

  .home-footer.tc-footer .home-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 16px;
    padding-top: 30px;
  }

  .home-footer.tc-footer .tc-footer-qr {
    justify-self: start;
    align-items: flex-start;
    text-align: left;
  }

  .home-footer.tc-footer .tc-footer-license {
    white-space: normal;
  }

  .home-footer.tc-footer .home-footer-copy {
    margin-top: 26px;
    padding: 16px 0;
    text-align: left;
  }

  .home-footer.tc-footer .tc-copy-quals {
    justify-content: flex-start;
  }

  .home-footer.tc-footer .tc-copy-line {
    justify-content: flex-start;
  }
}

/* ---------------- 字体与登录卡片：向静态站的结构化圆角/字体靠齐 ---------------- */
.home-nav.qk-nav,
.home-footer.tc-footer,
.auth-shell,
.tc-home,
.pub-main {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-card {
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 60, 140, .08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-form .arco-input-affix-wrapper,
.auth-form .arco-input-wrapper,
.auth-form .arco-btn {
  border-radius: 4px;
}

.auth-form .arco-input-affix-wrapper {
  background: #fff;
}


/* 移动端抽屉底部登录/控制台入口（静态站抽屉同名 CTA 的同位实现） */
.home-nav-mobile-login {
  height: 44px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  background: var(--shell-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.home-nav-mobile-login:hover {
  color: #fff;
  background: var(--shell-primary-hover);
}


/* 移动端导航抽屉：静态站为右侧 300px，页面留出可见背景。
   Arco 的 wrap-class-name 在当前版本未落到 DOM，用 :has 精确限定导航抽屉，
   避免影响用户中心等其他抽屉。 */
@media (max-width: 1180px) {
  .arco-drawer:has(.home-nav-mobile-links) {
    width: min(300px, calc(100vw - 64px)) !important;
    border-radius: 0 !important;
  }

  .arco-drawer:has(.home-nav-mobile-links) .arco-drawer-header {
    height: 64px;
    padding: 0 18px 0 24px;
    border-bottom: 1px solid #edf0f4;
  }

  .arco-drawer:has(.home-nav-mobile-links) .arco-drawer-title {
    color: #313b50;
    font-size: 16px;
    font-weight: 650;
  }

  .arco-drawer:has(.home-nav-mobile-links) .arco-drawer-content {
    padding: 12px 24px 28px;
  }

  .arco-drawer:has(.home-nav-mobile-links) .home-nav-mobile-links a {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 15px;
  }
}

/* ---------------- 导航下拉：与 layout/header.html 同构 ---------------- */
.home-nav.qk-nav .mobile-nav-trigger {
  display: none !important;
}

.home-nav.qk-nav .home-nav-links .nav-item {
  position: relative;
}

.home-nav.qk-nav .home-nav-links .nav-link,
.home-nav.qk-nav .home-nav-links .nav-menu-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: var(--shell-header-h);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--shell-ink);
  font: 500 15px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.home-nav.qk-nav .home-nav-links .nav-label {
  position: relative;
  display: inline-flex;
  height: var(--shell-header-h);
  align-items: center;
}

/* 下划线跟随文字宽度，不覆盖下拉箭头 */
.home-nav.qk-nav .home-nav-links .nav-item > a::after {
  display: none;
}

.home-nav.qk-nav .home-nav-links .nav-label::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--shell-primary);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 80ms ease-out;
}

.home-nav.qk-nav .home-nav-links .nav-link:hover,
.home-nav.qk-nav .home-nav-links .nav-link:focus-visible,
.home-nav.qk-nav .home-nav-links .nav-link.is-current,
.home-nav.qk-nav .home-nav-links .nav-item.is-current > .nav-link,
.home-nav.qk-nav .home-nav-links .nav-item.is-open > .nav-link {
  color: var(--shell-primary);
}

.home-nav.qk-nav .home-nav-links .nav-link:hover .nav-label::after,
.home-nav.qk-nav .home-nav-links .nav-link:focus-visible .nav-label::after,
.home-nav.qk-nav .home-nav-links .nav-link.is-current .nav-label::after,
.home-nav.qk-nav .home-nav-links .nav-item.is-current > .nav-link .nav-label::after,
.home-nav.qk-nav .home-nav-links .nav-item.is-open > .nav-link .nav-label::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-nav.qk-nav .nav-chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 170ms cubic-bezier(.22, 1, .36, 1);
}

.home-nav.qk-nav .nav-item.is-open .nav-chevron {
  transform: translateY(2px) rotate(225deg);
}

.home-nav.qk-nav .nav-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  min-width: 160px;
  max-width: 190px;
  padding: 8px;
  border: 1px solid #eceff4;
  border-radius: 6px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 14px 34px rgba(31, 39, 68, .10), 0 3px 10px rgba(31, 39, 68, .045);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -4px) scale(.98, .94);
  transform-origin: 50% 0;
  transition: opacity 90ms ease, visibility 0s linear 190ms, transform 160ms cubic-bezier(.22, 1, .36, 1);
}

.home-nav.qk-nav .nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition: opacity 120ms ease, visibility 0s, transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.home-nav.qk-nav .nav-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-nav.qk-nav .nav-dropdown-link {
  display: flex;
  height: 42px;
  padding: 0 16px;
  align-items: center;
  border-radius: 4px;
  color: #202642;
  font: 500 14px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  text-decoration: none;
  transition: color 110ms ease, background-color 110ms ease;
}

.home-nav.qk-nav .nav-dropdown-link:hover,
.home-nav.qk-nav .nav-dropdown-link:focus-visible {
  color: var(--shell-primary);
  background: rgba(22, 93, 255, .085);
}

/* 移动抽屉里的「云产品」二级菜单 */
.home-nav-mobile-group {
  border-bottom: 1px solid #f0f2f5;
}

.home-nav-mobile-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #1d2129;
  font: 500 15px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.home-nav-mobile-group.is-open .nav-chevron {
  transform: translateY(2px) rotate(225deg);
}

.home-nav-mobile-sub {
  padding: 0 0 8px 16px;
}

.home-nav-mobile-sub a,
.arco-drawer:has(.home-nav-mobile-links) .home-nav-mobile-sub a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #4e5969;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .home-nav.qk-nav .mobile-nav-trigger {
    display: inline-flex !important;
  }
}

/* 抽屉被 teleport 到 body，箭头样式需独立于 .home-nav 作用域 */
.home-nav-mobile-trigger .nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #4e5969;
  border-bottom: 1.5px solid #4e5969;
  transform: translateY(-2px) rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 170ms cubic-bezier(.22, 1, .36, 1);
}

.home-nav-mobile-group.is-open .home-nav-mobile-trigger .nav-chevron {
  transform: translateY(1px) rotate(225deg);
}
