/* ==========================================================================
   layout.css — 导航栏、页脚、二维码弹窗、回到顶部
   全站 8 个页面共用
   ========================================================================== */

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--nav-h);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav__brand:hover {
  color: var(--ink);
}

.nav__logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav__link:hover {
  background: var(--brand-50);
  color: var(--brand-ink);
}

.nav__link.is-active {
  color: var(--brand);
  font-weight: 600;
}

.nav__actions {
  display: none;
  align-items: center;
  gap: 10px;
  flex: none;
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.nav__toggle svg {
  width: 20px;
  height: 20px;
}

.nav__toggle .icon-close {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* 移动端展开面板 */
.nav__drawer {
  display: none;
  padding: 8px 0 22px;
  border-top: 1px solid var(--line);
}

.nav__drawer.is-open {
  display: block;
}

.nav__drawer .nav__link {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  font-size: 1rem;
}

.nav__drawer .nav__link:hover {
  background: none;
}

.nav__drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .nav__links,
  .nav__actions {
    display: flex;
  }
  .nav__toggle,
  .nav__drawer {
    display: none !important;
  }
  .nav__actions {
    margin-left: 8px;
  }
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding: clamp(48px, 4vw, 72px) 0 32px;
  background: #0e1730;
  color: #b6c2e0;
  font-size: 0.92rem;
}

.footer__top {
  display: grid;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

@media (min-width: 760px) {
  .footer__top {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
  }
}

.footer__brand-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
}

.footer__brand-name img {
  width: 32px;
  height: 32px;
}

.footer__tagline {
  max-width: 320px;
  margin-top: 14px;
  color: #8fa0c6;
  line-height: 1.8;
}

.footer__col-title {
  margin-bottom: 14px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.footer__col li + li {
  margin-top: 10px;
}

.footer__col a {
  color: #b6c2e0;
}

.footer__col a:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  padding-top: 26px;
  color: #7e8fb8;
  font-size: 0.86rem;
}

.footer__bottom a {
  color: #7e8fb8;
}

.footer__bottom a:hover {
  color: #fff;
}

.footer__police {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer__police svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* 备案号未填写时的醒目提示，上线前替换掉即可 */
.footer__todo {
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-size: 0.8rem;
}

/* ---------- 二维码弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal.is-open {
  display: flex;
  animation: modal-fade 0.22s var(--ease);
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 32px 28px 28px;
  border-radius: var(--r-xl);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modal-rise 0.28s var(--ease);
}

@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.modal__close:hover {
  background: var(--surface-mute);
  color: var(--ink);
}

.modal__close svg {
  width: 18px;
  height: 18px;
}

.modal__qr {
  width: 190px;
  height: 190px;
  margin: 6px auto 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}

.modal__title {
  font-size: 1.2rem;
}

.modal__text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* 滚动锁定：弹窗打开时禁止页面滚动 */
body.is-locked {
  overflow: hidden;
}
