/* 全局样式：reset + 布局 + 按钮 + 页头/页脚（由 Angular 端 styles.less / app.less 转换） */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1a2233;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #2f6bff; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary { background: #2f6bff; color: #fff; }
.btn-primary:hover { background: #1f4fd0; }
.btn-ghost { background: transparent; color: #2f6bff; border-color: #2f6bff; }
.btn-ghost:hover { background: rgba(47, 107, 255, 0.08); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #e6eaf2;
}
.header-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: #1a2233;
  text-decoration: none;
}
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { color: #55617a; text-decoration: none; font-size: 15px; }
.main-nav a:hover, .main-nav a.active { color: #2f6bff; }
.header-cta { margin-left: 8px; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span { width: 22px; height: 2px; background: #1a2233; display: block; }

main { display: block; }

.site-footer {
  margin-top: 80px;
  background: #f6f8fc;
  border-top: 1px solid #e6eaf2;
  color: #55617a;
  font-size: 14px;
}
.site-footer a { color: #55617a; text-decoration: none; }
.site-footer a:hover { color: #2f6bff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding: 48px 24px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: #1a2233; margin: 0 0 6px; font-size: 15px; }
.footer-col p { margin: 0; }
.footer-brand p { max-width: 280px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 32px;
  border-top: 1px solid #e6eaf2;
}

/* 右下角常驻浮动：微信小程序码（z-index 需高于 sticky header 的 10） */
.mini-qr {
  position: fixed;
  right: 20px;
  bottom: calc(50vh + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.mini-qr-card {
  position: relative;
  width: 200px;
  padding: 10px 10px 8px;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  /* 2px 实描边 + 8px 淡光环，均为叠加阴影，不改 border 以免挤掉码图尺寸 */
  box-shadow: 0 0 0 2px #2f6bff, 0 0 0 8px rgba(47, 107, 255, 0.14), 0 18px 40px rgba(20, 40, 90, 0.12);
  text-align: center;
}
/* 进场引导：外扩光环呼吸 3 次后静止（只动 opacity，交给合成层，不逐帧重绘圆角阴影） */
.mini-qr-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(47, 107, 255, 0.55);
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  animation: mini-qr-pulse 1.5s ease-out 0.4s 3;
}
@keyframes mini-qr-pulse {
  0% { opacity: 0; transform: scale(1); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(1.1); }
}
/* 无障碍：系统「减少动态效果」时不播脉冲，静态蓝环仍在 */
@media (prefers-reduced-motion: reduce) {
  .mini-qr-card::after { animation: none; }
}
.mini-qr-img { display: block; width: 100%; height: auto; }
.mini-qr-text { margin: 8px 0 2px; font-size: 14px; font-weight: 600; color: #1a2233; }
.mini-qr-toggle { display: none; }
.mini-qr.is-collapsed .mini-qr-card { display: none; }

@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e6eaf2;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav a { padding: 14px 20px; border-top: 1px solid #e6eaf2; }
  .main-nav.open { max-height: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* 小程序码：移动端收窄一档并露出收起按钮，底部避开 iOS Safari 工具栏与安卓手势条 */
  .mini-qr { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mini-qr-card {
    width: 168px;
    padding: 8px 8px 6px;
    box-shadow: 0 0 0 2px #2f6bff, 0 0 0 5px rgba(47, 107, 255, 0.14), 0 18px 40px rgba(20, 40, 90, 0.12);
  }
  .mini-qr-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e6eaf2;
    background: #fff;
    box-shadow: 0 10px 24px rgba(20, 40, 90, 0.16);
    font-size: 18px;
    line-height: 1;
    color: #2f6bff;
    cursor: pointer;
  }
  .mini-qr-toggle::after { content: "\00d7"; }
  .mini-qr.is-collapsed .mini-qr-toggle::after { content: "\1F4F1"; }
}
