/* =========================================================
   components.css · 导航 / 按钮 / 卡片 / 页脚 / 弹窗 / 浮动
   ========================================================= */

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(37, 99, 255, 0.42); }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--ink-invert); border: 1px solid rgba(255,255,255,0.28); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.5); }
.btn-outline { background: #fff; color: var(--brand-700); border: 1.5px solid rgba(37,99,255,0.35); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ===================== 导航 ===================== */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 72px; display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, height .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.navbar .inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 22px;
}
/* 悬浮在首屏上方：浅色文字 */
.navbar.top { color: var(--ink-invert); }
.navbar.top .logo-text, .navbar.top .nav-links a { color: rgba(234,242,255,0.86); }
.navbar.top .nav-links a:hover { color: #fff; }
/* 滚动后：实色白底 */
.navbar.solid {
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 6px 22px rgba(11,27,51,0.08);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.navbar.solid .logo-text { color: var(--ink); }
.navbar.solid .logo-text span { color: var(--brand); }
.navbar.solid .nav-links a { color: var(--ink-soft); }
.navbar.solid .nav-links a:hover { color: var(--brand); }
.navbar.solid .nav-phone { color: var(--ink); border-color: var(--line); }
.navbar.solid .nav-phone:hover { border-color: var(--brand); color: var(--brand); }

.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--grad-brand); display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(37,99,255,0.34);
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-text { font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.logo-text span { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links .nav-cta-mobile { display: none; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
  background: var(--grad-brand); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-phone {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.25);
  font-size: 14px; font-weight: 600; color: var(--ink-invert); transition: all .2s ease;
}
.nav-phone:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-cta { margin-left: 2px; }
.navbar.top .nav-cta { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 10px 20px; border-radius: 11px; font-weight: 700; font-size: 14px; transition: all .25s ease; }
.navbar.top .nav-cta:hover { background: #fff; color: var(--brand-700); }
.navbar.solid .nav-cta { background: var(--grad-brand); color: #fff; padding: 10px 20px; border-radius: 11px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-brand); }
.navbar.solid .nav-cta:hover { transform: translateY(-2px); }

.mobile-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; margin-left: auto; }
.mobile-toggle span { width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.navbar.top .mobile-toggle { color: #fff; }
.navbar.solid .mobile-toggle { color: var(--ink); }

/* ===================== 卡片（通用）===================== */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,255,0.25); }

/* 图标盘 */
.ico-badge {
  width: 54px; height: 54px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--bg-tint); color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(37,99,255,0.12);
}
.ico-badge svg { width: 26px; height: 26px; }
.ico-badge.grad { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--navy-900); color: var(--ink-invert-soft); padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid var(--line-dark);
}
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; color: #fff; font-size: 19px; margin-bottom: 16px; }
.footer-brand .logo-mark { width: 34px; height: 34px; }
.footer-desc { font-size: 14px; line-height: 1.8; color: var(--ink-invert-soft); max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 18px; font-weight: 700; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col ul a, .footer-col li { font-size: 14px; color: var(--ink-invert-soft); transition: color .2s ease; }
.footer-col ul a:hover { color: var(--cyan); }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,0.06); color: var(--ink-invert-soft); transition: all .25s ease;
}
.footer-social a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-contact-list li { display: flex; gap: 8px; align-items: baseline; }
.footer-contact-list a { color: var(--cyan); }
.footer-qr {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.05); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-dark);
}
.footer-qr .qr-box { width: 64px; height: 64px; border-radius: 8px; background: #fff; flex: none; display: grid; place-items: center; overflow: hidden; }
.footer-qr .qr-box svg { width: 56px; height: 56px; }
.footer-qr span { font-size: 12px; color: var(--ink-invert-soft); }
.footer-bottom { padding: 22px 0 30px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.footer-bottom .copy { font-size: 13px; color: rgba(169,188,216,0.7); }
.footer-bottom a { font-size: 13px; color: rgba(169,188,216,0.7); }
.footer-bottom a:hover { color: var(--cyan); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===================== 浮动按钮 + 返回顶部 ===================== */
.float-actions { position: fixed; right: 22px; bottom: 26px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.float-btn {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand);
  transition: transform .25s ease; position: relative;
}
.float-btn:hover { transform: translateY(-3px) scale(1.04); }
.float-btn svg { width: 24px; height: 24px; }
.float-btn.back { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.float-btn .tip {
  position: absolute; right: 62px; top: 50%; transform: translateY(-50%);
  background: var(--navy-800); color: #fff; padding: 6px 12px; border-radius: 8px;
  font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.float-btn:hover .tip { opacity: 1; }

/* ===================== 咨询弹窗 ===================== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(5,13,28,0.6); backdrop-filter: blur(4px); animation: fade .25s ease; }
.modal-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-lg);
  animation: pop .3s cubic-bezier(.22,.61,.36,1);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal-close { position: absolute; top: 16px; right: 18px; font-size: 26px; line-height: 1; color: var(--muted); }
.modal-head h3 { font-size: 22px; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.modal-tabs { display: flex; gap: 8px; margin: 20px 0 16px; background: var(--bg-soft); padding: 5px; border-radius: 12px; }
.modal-tab { flex: 1; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: all .2s ease; }
.modal-tab.active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

/* 表单通用 */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.form-group .req { color: #ef4444; }
.form-control {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,255,0.12); }
.form-control::placeholder { color: #aeb9c9; }
textarea.form-control { resize: vertical; min-height: 84px; }
.modal-phone-row {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin-bottom: 16px;
  background: var(--bg-tint); border-radius: 11px; border: 1px solid rgba(37,99,255,0.14);
}
.modal-phone-row svg { color: var(--brand); }
.modal-phone-link { font-weight: 700; color: var(--brand-700); }
.modal-phone-name { margin-left: auto; font-size: 13px; color: var(--muted); }

.submit-btn {
  width: 100%; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--grad-brand); box-shadow: var(--shadow-brand); transition: transform .2s ease;
}
.submit-btn:hover { transform: translateY(-2px); }
.form-success { text-align: center; padding: 26px 10px; display: none; }
.form-success.show { display: block; }
.form-success svg { margin: 0 auto 12px; }
.form-success h4 { font-size: 20px; }
.form-success p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.wechat-box { text-align: center; padding: 8px 0; }
.wechat-qr {
  width: 180px; height: 180px; margin: 0 auto 14px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
}
.wechat-qr svg { width: 160px; height: 160px; }
.wechat-box h4 { font-size: 17px; }
.wechat-box p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 二维码占位（纯 SVG 纹理，无需外部图片）*/
.qr-placeholder { background:
  repeating-linear-gradient(0deg, #0b1b33 0 2px, #fff 2px 4px),
  repeating-linear-gradient(90deg, #0b1b33 0 2px, #fff 2px 4px);
  background-blend-mode: multiply; }
