/* ── 律法科技官网 · 设计系统 ────────────────────────────────────
   面向律所/法务的信息化服务商官网。视觉基调取自法律行业本身：
   深藏青（庄重）+ 铜金（卷宗烫金）+ 纸白（案卷）。
   刻意不用 SaaS 那套荧光紫渐变 —— 律所决策人看到那种配色第一反应是
   "又一个不懂我们的互联网公司"。

   全站零外链：不引 CDN、不引外部字体。原因有二 ——
   1. 国内网络下 Google Fonts 会挂住整页渲染几秒；
   2. 备案/等保检查时，外链资源是常见的扣分项。
   ───────────────────────────────────────────────────────── */

:root {
  --ink: #0c1a2b;          /* 主文字/深底 */
  --ink-2: #16324f;
  --brand: #1b4f7e;
  --brand-2: #2c6da6;
  --gold: #c3a15c;         /* 强调色，克制使用。**只用于深色底** */
  /* 同一个金色在浅底上只有 2.45:1，连大文本的 3:1 都不到。
     浅底要用的是这支压暗版：白底 6.02:1 / 纸白底 5.62:1。
     两支金必须分开命名 —— 合成一个变量的话，改任何一边都会砸掉另一边。 */
  --gold-ink: #7a5f22;
  --gold-soft: #e8d9b5;
  --paper: #f6f7f9;
  --line: #e3e7ec;
  --text: #2a3542;
  /* 压到 #5b6879：原来的 #6b7787 在纸白底上只有 4.25:1，不达 AA。 */
  --muted: #5b6879;
  --white: #fff;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(12, 26, 43, .06), 0 4px 16px rgba(12, 26, 43, .06);
  --shadow-2: 0 8px 30px rgba(12, 26, 43, .12);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 顶栏是 sticky 的，不留出这段的话锚点跳过去标题正好被压在导航底下。
     手机上导航会换行变高，所以按最高的那个算。 */
  scroll-padding-top: 130px;
}

body {
  margin: 0;
  /* 中文字体栈：优先各系统自带的现代黑体，最后回落到宋体。
     苹方/思源在标题字重上差别很大，所以标题单独压字重（见 h1-h3）。 */
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.5px; }
h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.3px; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── 顶栏 ───────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 18px; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__sub { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 1.5px; display: block; margin-top: -6px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav__links a { color: var(--text); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__links a:hover { color: var(--brand); }
.nav__links a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--gold); font-weight: 600; }
.nav__toggle { display: none; }

/* ── 按钮 ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--ink-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
/* 金色主按钮做成类，而不是内联 style —— 内联声明优先级高于任何普通选择器，
   写在元素上会让 :hover 永远不生效。文字用深墨色：金底白字只有 2.45:1。 */
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #a98847; color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--line { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--line:hover { border-color: var(--brand); color: var(--brand); }

/* ── 首屏 ───────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0c1a2b 0%, #16324f 55%, #1b4f7e 100%);
  color: #fff; padding: 92px 0 100px;
}
/* 背景纹样：条文栏 + 电路走线的杂交体。放得很淡，只做质感不抢内容。 */
.hero__pattern { position: absolute; inset: 0; opacity: .16; pointer-events: none; }
.hero__in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero__lead { font-size: 18px; color: #c8d6e5; max-width: 34em; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 2px; color: var(--gold);
  border: 1px solid rgba(195, 161, 92, .4); border-radius: 99px;
  padding: 5px 14px; margin-bottom: 22px;
}
.hero__cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hero__stats b { display: block; font-size: 30px; color: #fff; line-height: 1.2; }
.hero__stats span { font-size: 13px; color: #8fa6bd; }

/* 首屏右侧的产品示意窗 */
.mockup {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); transform: perspective(1200px) rotateY(-7deg) rotateX(2deg);
}
.mockup__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #eef1f5; border-bottom: 1px solid var(--line); }
.mockup__dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd3dd; }
.mockup__url { margin-left: 10px; font-size: 11px; color: var(--muted); background: #fff; border-radius: 6px; padding: 3px 10px; flex: 1; }
.mockup__body { padding: 18px; }
.mockup__row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.mockup__row + .mockup__row { margin-top: 6px; }
.mockup__row--head { background: var(--ink); color: #fff; font-weight: 600; }
.mockup__row--alt { background: var(--paper); }
.tag { font-size: 11px; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.tag--green { background: #e4f4ea; color: #1f7a45; }
.tag--amber { background: #fdf0d9; color: #96631a; }
.tag--red { background: #fce8e8; color: #a8302f; }
.tag--blue { background: #e5eef7; color: #1b4f7e; }

/* ── 通用区块 ───────────────────────────────────────── */
.sec { padding: 88px 0; }
.sec--paper { background: var(--paper); }
.sec--ink { background: var(--ink); color: #c8d6e5; }
.sec--ink h2, .sec--ink h3 { color: #fff; }
.sec__head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.sec__head p { color: var(--muted); font-size: 17px; margin: 0; }
.sec--ink .sec__head p { color: #8fa6bd; }
.eyebrow { display: block; font-size: 13px; letter-spacing: 2.5px; color: var(--gold-ink); font-weight: 600; margin-bottom: 12px; }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #cfd8e3; }
.card__icon {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 18px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card__list { margin: 16px 0 0; padding: 0; list-style: none; }
.card__list li { font-size: 14px; color: var(--text); padding-left: 20px; position: relative; }
.card__list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}

/* 痛点 → 做法 对照 */
.pain { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.pain__box { border-radius: var(--radius); padding: 26px 28px; }
.pain__box--bad { background: #fff; border: 1px dashed #d8c3c3; }
.pain__box--good { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.pain__box h3 { font-size: 15px; margin-bottom: 14px; }
.pain__box--bad h3 { color: #a8302f; }
.pain__box--good h3 { color: #1f7a45; }
.pain__box ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
.pain__box li { margin-bottom: 8px; }
.pain__arrow { color: var(--gold); font-size: 26px; }

/* 流程 */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-size: 15px; font-weight: 700; color: var(--brand);
  background: #fff; border: 1px solid var(--line); border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
}
.step::after {
  content: ""; position: absolute; top: 17px; left: 40px; right: -18px; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.step:last-child::after { display: none; }
.step h3 { margin-bottom: 6px; font-size: 16px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

/* 案例卡 */
.case { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .2s; }
.case:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
/* 用 aspect-ratio 而不是写死高度：写死高度配 preserveAspectRatio=slice，
   窄屏下容器宽高比一变，图就按短边填充并把两侧裁掉 —— 实测手机上切掉 37%，
   而这一页的全部主张就是「先看东西」。 */
.case__shot { aspect-ratio: 400 / 190; background: var(--ink); position: relative; overflow: hidden; }
.case__shot--lg { aspect-ratio: 520 / 300; }
.case__shot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.case__body { padding: 24px 26px 28px; }
.case__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.case__body p { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }
.case__kpi { display: flex; gap: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.case__kpi b { display: block; font-size: 20px; color: var(--brand); }
.case__kpi span { font-size: 12px; color: var(--muted); }

/* 表格 */
/* min-width 是横滑容器的前提。中文可以逐字折行，min-content 极小，
   浏览器宁可把列压到 58px 宽也不肯溢出，于是 .tbl-wrap 的 overflow-x 形同虚设。 */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.tbl-wrap .tbl { min-width: 560px; }
.tbl-wrap .tbl--3col { min-width: 640px; }
.tbl th, .tbl td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--paper); font-weight: 600; color: var(--ink); font-size: 14px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* 常见问题 */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  padding: 20px 24px; cursor: pointer; font-weight: 600; color: var(--ink);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 400; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 24px 20px; margin: 0; color: var(--muted); font-size: 15px; }

/* 行动号召 */
.cta { background: linear-gradient(140deg, var(--ink) 0%, var(--brand) 100%); color: #fff; border-radius: 20px; padding: 56px 48px; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #c8d6e5; max-width: 40em; margin: 0 auto 28px; }
.cta__btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 表单 */
.form { display: grid; gap: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; color: var(--text); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 79, 126, .35);
}
/* **不要写 outline:none**。强制高对比模式下 box-shadow 会被剥离、
   border-color 被系统色覆盖，再把 outline 关掉，焦点位置就彻底看不见了。 */
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible,
.btn:focus-visible, .nav__links a:focus-visible, .faq summary:focus-visible,
.skip:focus, .cell__v:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.field textarea { min-height: 120px; resize: vertical; }
.form__note { font-size: 13px; color: var(--muted); }
/* 同意勾选。整行可点（label 包着 input），别做成"只有那个小方块能点"——
   小方块在手机上是 13px 见方，点十次中三次。 */
.check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14px; color: var(--text); cursor: pointer; line-height: 1.6;
}
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }

/* 页脚 */
.foot { background: var(--ink); color: #8fa6bd; padding: 60px 0 28px; font-size: 14px; }
.foot a { color: #c8d6e5; }
.foot a:hover { color: var(--gold); }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.foot h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 9px; }
/* 触控目标至少 44px：页脚链接原本只有 18px 高，手机上很难点中。 */
.foot li a { display: inline-block; padding: 6px 0; min-height: 32px; }
.foot__bar { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.foot__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 12px; }

/* 跳过导航。平时藏在视口外，键盘 Tab 到才滑进来 —— 用 display:none 藏的话
   它连焦点都拿不到，等于没做。 */
.skip {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 0 0 8px 8px; transition: top .15s ease;
}
.skip:focus { top: 0; color: #fff; }

/* 待替换占位：**故意做成可见的**。
   上线前必须有人逐个换掉，做成灰色小字的话没人会注意到，
   最后就是官网上挂着 400-000-0000。 */
.ph {
  background: #fff6e0; border-bottom: 1px dashed var(--gold);
  padding: 0 3px; border-radius: 3px; color: #8a6a1f;
}
.foot .ph { background: rgba(195, 161, 92, .16); color: var(--gold-soft); }

/* 进场动效：只做一次，很轻。
   prefers-reduced-motion 必须尊重 —— 这类站会有法务/合规的人用读屏或降级模式看。 */
/* **必须挂在 .js 下面**：初始态是透明，而让它显形的 .in 类只有 app.js 会加。
   不加这道闸的话，浏览器禁用 JS 或 app.js 加载失败时，全站正文一片空白 ——
   contact.html 尤其致命，左右两栏各被一个 .rise 包着，整页只剩页脚。
   head 里那行 `documentElement.className += ' js'` 是同步执行的，
   在样式生效前就打上标记，所以不会有先显示再隐藏的闪动。 */
.js .rise { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .card:hover, .case:hover, .btn--primary:hover { transform: none; }
}

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero__in { grid-template-columns: 1fr; }
  .mockup { transform: none; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  /* .grid--2 在这一档必须也塌成一栏：三栏塌成两栏之后，
     原本的两栏反而比它们还窄，越往中间尺寸看越挤。 */
  .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .pain { grid-template-columns: 1fr; }
  .pain__arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 640px) {
  .sec { padding: 58px 0; }
  .hero { padding: 62px 0 70px; }
  .grid--2, .grid--3, .grid--4, .steps { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta { padding: 40px 24px; }
  /* 手机上导航收成一行可横滑：做汉堡菜单要 JS，
     而这站的导航只有 5 项，横滑更省事也更不容易坏。 */
  /* 只写 padding-block —— 用 padding 简写会把 .wrap 的左右 24px 一起清掉，
     Logo 和导航直接贴死屏幕边缘，而这段 header 五个页面共用。 */
  .nav__in { height: auto; padding-block: 12px; flex-wrap: wrap; gap: 10px; }
  .nav__links { margin-left: 0; width: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; }
  .nav__links a { white-space: nowrap; font-size: 14px; padding: 10px 0; }
  /* 必须满 16px：iOS Safari 对小于 16px 的文本输入控件会强制放大整页，
     而且之后不缩回。差 1px 就触发。
     **不要**改用 maximum-scale=1 规避 —— 那是把所有人的缩放能力砸掉。 */
  .field input, .field textarea, .field select { font-size: 16px; }
  /* 内联 gap 在窄屏覆盖不掉，统一收口 */
  .grid--2[style], .grid--3[style] { gap: 24px !important; }
}
