/* ==========================================================================
   法牛全球 · 产品化服务页样式（services.html）
   设计语言对齐 consult.html：品牌蓝 #4D6BFE，移动优先，专业可信。
   ========================================================================== */

:root {
  --brand: #4D6BFE;
  --brand-dark: #3550d8;
  --gold: #C9A227;
  --ink: #16203a;
  --muted: #6b7791;
  --line: #e6eaf3;
  --bg: #f6f8fc;
  --white: #fff;
  --urgent: #e5484d;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(22, 32, 58, .08);
  --shadow-lg: 0 14px 44px rgba(22, 32, 58, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px; /* 给移动端常驻条留位 */
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 顶部 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: .04em; }
.topnav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topnav a { color: var(--ink); }
.topnav a:hover { color: var(--brand); text-decoration: none; }
.nav-call {
  background: var(--brand); color: #fff !important; padding: 7px 13px;
  border-radius: 999px; font-weight: 600; white-space: nowrap;
}
@media (max-width: 720px) {
  .topnav a:not(.nav-call) { display: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(900px 340px at 12% -10%, rgba(77, 107, 254, .16), transparent 62%),
    radial-gradient(700px 300px at 92% 0%, rgba(201, 162, 39, .14), transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 40px;
}
.hero-badge {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand);
  background: rgba(77, 107, 254, .1); border: 1px solid rgba(77, 107, 254, .22);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero-title { font-size: clamp(26px, 5.4vw, 42px); line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.hero-sub { font-size: clamp(15px, 2.4vw, 18px); color: var(--muted); margin: 0 0 18px; }
.hero-sub strong { color: var(--ink); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.tag {
  font-size: 13px; background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; box-shadow: 0 2px 8px rgba(22,32,58,.05);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.hero-note { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(77, 107, 254, .3); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d2e6; }
.btn-block { width: 100%; }
.btn-mini {
  font-size: 12.5px; padding: 6px 12px; border-radius: 8px;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); font-weight: 600;
}
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------------- 区块 ---------------- */
.section { padding: 48px 0; }
.section-alt { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(21px, 3.6vw, 28px); margin: 0 0 8px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
/* 旗舰免费工具（授权委托书）的引导语：说明「先用它、再让律师代办」的路径 */
.section-head .doc-lead {
  margin-top: 10px; font-size: 14px; color: #3d4757;
  background: rgba(77, 107, 254, .07); border-left: 3px solid var(--brand);
  padding: 10px 12px; border-radius: 0 8px 8px 0;
}

/* ---------------- 套餐卡 ---------------- */
.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfd8ec; }
.card-urgent { border-color: rgba(229, 72, 77, .35); }
.card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.card-icon { font-size: 24px; line-height: 1; }
.card h3 { font-size: 16.5px; margin: 0; line-height: 1.4; }
.card-price { margin-bottom: 4px; }
.price-num { font-size: 25px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.card-note { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; min-height: 34px; }
.card-list { list-style: none; padding: 0; margin: 0 0 14px; flex: 1; }
.card-list li {
  font-size: 13.5px; color: #3d4757; padding-left: 20px; position: relative; margin-bottom: 6px;
}
.card-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; font-size: 12.5px;
}
.card-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.card-meta.urgent { color: var(--urgent); font-weight: 600; }

/* 定金提示：已配置在线支付时高亮，给客户明确的下一步 */
.card-deposit {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px dashed var(--line);
  border-radius: 8px; padding: 7px 10px; margin-bottom: 10px; text-align: center;
}
.card-deposit.payable { color: #8A5A00; background: #FFF6E3; border-color: #F0C14B; border-style: solid; }

/* 下单后的支付按钮 + 说明 */
.pay-btn { margin-top: 10px; }
.pay-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* ---------------- 文书 ---------------- */
.doc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.doc-tab {
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px; transition: all .15s ease;
}
.doc-tab:hover { border-color: #c9d2e6; }
.doc-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px rgba(77,107,254,.26); }

.doc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } }

.doc-form-wrap, .doc-output-wrap {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.doc-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.doc-form input, .doc-form select, .doc-form textarea,
.order-form input, .order-form select, .order-form textarea {
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fcfdff; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.doc-form input:focus, .doc-form select:focus, .doc-form textarea:focus,
.order-form input:focus, .order-form select:focus, .order-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77, 107, 254, .13);
  background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.doc-contact {
  border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px;
}
.doc-contact-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }

.consent { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; }
.consent label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; flex-direction: row; }
.consent input { width: auto; margin-top: 3px; flex-shrink: 0; }
.consent b { color: var(--urgent); }

.form-msg { font-size: 13.5px; min-height: 20px; margin-bottom: 10px; }
.form-msg.err { color: var(--urgent); }
.form-msg.ok { color: var(--ok); }

.doc-output-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.doc-actions { display: flex; gap: 8px; }
.doc-output {
  font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word;
  background: #fbfcff; border: 1px solid var(--line); border-radius: 10px;
  padding: 15px; margin: 0; min-height: 320px; max-height: 520px; overflow: auto; color: #2a3448;
}
.doc-disclaimer {
  margin-top: 12px; font-size: 12.5px; line-height: 1.7;
  background: rgba(229, 72, 77, .07); border: 1px solid rgba(229, 72, 77, .22);
  color: #98302f; border-radius: 10px; padding: 10px 12px;
}

/* ---------------- 信任区 ---------------- */
.trust { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
@media (max-width: 820px) { .trust { grid-template-columns: 1fr; } }
.trust-col h3 { font-size: 18px; margin: 0 0 14px; }
.trust-list { list-style: none; padding: 0; margin: 0; }
.trust-list li { font-size: 14px; color: #3d4757; margin-bottom: 12px; padding-left: 22px; position: relative; }
.trust-list li::before { content: "⚖"; position: absolute; left: 0; color: var(--gold); }
.trust-list strong { color: var(--ink); }
.contact-box { display: flex; flex-direction: column; gap: 10px; }
.contact-line {
  font-size: 14.5px; background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; color: var(--ink); font-weight: 600;
}
.contact-line:hover { border-color: var(--brand); text-decoration: none; }
.trust-fine { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ---------------- 页脚 ---------------- */
.footer { background: #101a30; color: #b9c3d8; padding: 26px 0; font-size: 13px; }
.footer p { margin: 0 0 8px; }
.footer strong { color: #fff; }
.footer a { color: #cbd5ea; }

/* ---------------- 移动端常驻条 ---------------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: none; background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(22, 32, 58, .1);
}
.sticky-bar a {
  flex: 1; text-align: center; padding: 13px 4px; font-size: 13.5px; font-weight: 600;
  color: var(--ink); border-right: 1px solid var(--line);
}
.sticky-bar a:last-child { border-right: 0; }
.sticky-bar a:hover { background: var(--bg); text-decoration: none; }
@media (max-width: 720px) { .sticky-bar { display: flex; } }

/* ---------------- 模态框 ---------------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; background: rgba(16, 26, 48, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--white); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close {
  border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 0 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-sub { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.modal-sub strong { color: var(--ink); }
.order-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.order-form label span em { color: var(--urgent); font-style: normal; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
