/* ============================================================
   律师作品集 · 样式
   主色：深蓝（专业/稳重） + 金（品质/权威）
   ============================================================ */

:root {
  --navy-900: #0B233F;
  --navy-800: #0F2C4C;
  --navy-700: #1B3A5C;
  --navy-600: #2A4A70;
  --gold-500: #C9A55C;
  --gold-400: #D9BC7F;
  --gold-100: #F5EEDC;
  --ink-900: #16212E;
  --ink-700: #374151;
  --ink-500: #6B7280;
  --ink-300: #9CA3AF;
  --line: #E5E1D8;
  --bg: #F7F6F3;
  --card: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(11, 35, 63, .06), 0 1px 2px rgba(11, 35, 63, .04);
  --shadow-md: 0 4px 16px rgba(11, 35, 63, .08);
  --shadow-lg: 0 12px 40px rgba(11, 35, 63, .16);
  --radius: 14px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 35, 63, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 165, 92, .18);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  display: grid; place-items: center;
  font-weight: 700; color: var(--navy-900); font-size: 15px;
}
.nav-name { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: rgba(255, 255, 255, .72); text-decoration: none;
  font-size: 14px; transition: color .2s;
}
.nav-links a:hover { color: var(--gold-400); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-700) 62%, var(--navy-600) 100%);
  color: #fff; padding: 68px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 165, 92, .16), transparent 68%);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; gap: 48px; align-items: center; position: relative; z-index: 1;
}
@media (max-width: 860px) { .hero-inner { flex-direction: column; gap: 28px; text-align: center; } }

.avatar-box { flex-shrink: 0; position: relative; }
.avatar {
  width: 168px; height: 168px; border-radius: 20px; object-fit: cover;
  border: 3px solid rgba(201, 165, 92, .55);
  box-shadow: var(--shadow-lg);
  background: var(--navy-700);
}
.avatar-badge {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold-500); color: var(--navy-900);
  font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
  white-space: nowrap; box-shadow: var(--shadow-md);
}

.hero-text { flex: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(201, 165, 92, .14); border: 1px solid rgba(201, 165, 92, .34);
  color: var(--gold-400); font-size: 12.5px; font-weight: 600;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 16px;
}
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }
.hero h1 { font-size: 42px; font-weight: 700; letter-spacing: 1px; line-height: 1.25; }
.hero-title { font-size: 16px; color: var(--gold-400); margin-top: 8px; font-weight: 500; }
.hero-desc {
  font-size: 15px; color: rgba(255, 255, 255, .78); margin-top: 16px;
  max-width: 620px; line-height: 1.85;
}
@media (max-width: 860px) { .hero-desc { margin-left: auto; margin-right: auto; } }

.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
@media (max-width: 860px) { .hero-actions { justify-content: center; } }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; transition: all .2s;
  font-family: inherit;
}
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, .08); color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }

/* Hero 数据条 */
.hero-stats {
  max-width: var(--maxw); margin: 44px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255, 255, 255, .12); border-radius: var(--radius); overflow: hidden;
  position: relative; z-index: 1;
}
@media (max-width: 760px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }
.hstat { background: var(--navy-800); padding: 20px 16px; text-align: center; }
.hstat-num {
  font-size: 28px; font-weight: 700; color: var(--gold-400); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.hstat-num small { font-size: 14px; margin-left: 2px; }
.hstat-label { font-size: 12.5px; color: rgba(255, 255, 255, .6); margin-top: 4px; }

/* ---------------- 区块通用 ---------------- */
.section { padding: 62px 0; }
.section-head { margin-bottom: 32px; }
.section-kicker {
  font-size: 12.5px; font-weight: 700; color: var(--gold-500);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}
.section-title { font-size: 27px; font-weight: 700; color: var(--navy-800); }
.section-sub { font-size: 14.5px; color: var(--ink-500); margin-top: 8px; }

/* ---------------- 专业领域 ---------------- */
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .fields { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.field-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative; overflow: hidden; transition: all .25s;
}
.field-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-400));
  transform: scaleY(0); transform-origin: top; transition: transform .25s;
}
.field-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.field-card:hover::before { transform: scaleY(1); }
.field-icon {
  width: 42px; height: 42px; border-radius: 11px; background: var(--gold-100);
  display: grid; place-items: center; margin-bottom: 14px;
}
.field-icon svg { width: 22px; height: 22px; }
.field-name { font-size: 16.5px; font-weight: 700; color: var(--navy-800); margin-bottom: 8px; }
.field-desc { font-size: 13.5px; color: var(--ink-500); line-height: 1.8; }
.field-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ftag {
  font-size: 11.5px; color: var(--navy-700); background: #EEF2F7;
  padding: 3px 9px; border-radius: 5px;
}

/* ---------------- 代表案例 ---------------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }
.case-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: all .25s; display: flex; flex-direction: column;
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.case-type {
  font-size: 11.5px; font-weight: 700; color: var(--gold-500);
  background: var(--gold-100); padding: 4px 10px; border-radius: 5px; white-space: nowrap;
}
.case-year { font-size: 12.5px; color: var(--ink-300); font-variant-numeric: tabular-nums; }
.case-title { font-size: 17px; font-weight: 700; color: var(--navy-800); line-height: 1.5; margin-bottom: 10px; }
.case-body { font-size: 13.5px; color: var(--ink-700); line-height: 1.85; flex: 1; }
.case-label {
  font-size: 12px; font-weight: 700; color: var(--navy-700);
  margin: 14px 0 5px; display: flex; align-items: center; gap: 6px;
}
.case-label::before {
  content: ""; width: 3px; height: 12px; background: var(--gold-500); border-radius: 2px;
}
.case-result {
  margin-top: 14px; padding: 13px 15px; background: #F1F7F3;
  border-left: 3px solid #34A853; border-radius: 0 8px 8px 0;
  font-size: 13.5px; color: #1B5E20; line-height: 1.75;
}
.case-result b { color: #14532D; }

/* ---------------- 资质与数据 ---------------- */
.creds { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; }
@media (max-width: 860px) { .creds { grid-template-columns: 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.panel-title { font-size: 16px; font-weight: 700; color: var(--navy-800); margin-bottom: 18px; }
.qual-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.qual-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ink-700); line-height: 1.7;
}
.qual-check {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px;
  background: var(--gold-100); border-radius: 50%; display: grid; place-items: center;
}
.qual-check svg { width: 11px; height: 11px; }

.bars { display: flex; flex-direction: column; gap: 16px; }
.bar-item {}
.bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.bar-name { font-size: 13.5px; color: var(--ink-700); font-weight: 500; }
.bar-val { font-size: 13px; font-weight: 700; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; background: #EDEAE3; border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-700), var(--gold-500));
  width: 0; transition: width 1.1s cubic-bezier(.22, 1, .36, 1);
}

/* ---------------- 专业观点 ---------------- */
.views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .views { grid-template-columns: 1fr; } }
.view-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: all .25s; cursor: default;
}
.view-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.view-date { font-size: 12px; color: var(--ink-300); }
.view-title { font-size: 15.5px; font-weight: 700; color: var(--navy-800); margin: 8px 0; line-height: 1.55; }
.view-sum { font-size: 13px; color: var(--ink-500); line-height: 1.8; }

/* ---------------- 联系 ---------------- */
.contact {
  background: linear-gradient(150deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 60px 0;
}
.contact-inner { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; text-align: center; } }
.contact h2 { font-size: 26px; font-weight: 700; }
.contact p { color: rgba(255, 255, 255, .72); font-size: 14.5px; margin-top: 10px; }
.contact-meta { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 860px) { .contact-meta { justify-content: center; } }
.cmeta { font-size: 13px; color: rgba(255, 255, 255, .6); }
.cmeta b { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-top: 3px; }

/* ---------------- 页脚 ---------------- */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .42); padding: 26px 0; font-size: 12.5px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .disclaimer { color: rgba(201, 165, 92, .78); font-weight: 600; }

/* ============================================================
   AI 律师助手 · 悬浮聊天
   ============================================================ */
.ai-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: #fff; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; transition: transform .22s, box-shadow .22s;
}
.ai-fab:hover { transform: scale(1.06); }
.ai-fab svg { width: 26px; height: 26px; }
.ai-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--gold-500); opacity: .55;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .55; }
  70% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

.ai-panel {
  position: fixed; right: 26px; bottom: 96px; z-index: 91;
  width: 396px; max-width: calc(100vw - 40px); height: 552px;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: all .26s cubic-bezier(.22, 1, .36, 1);
  border: 1px solid var(--line);
}
.ai-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.ai-head {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 15px 18px; display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.ai-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  display: grid; place-items: center; color: var(--navy-900); font-weight: 700; font-size: 14px;
}
.ai-head-txt { flex: 1; min-width: 0; }
.ai-head-name { font-size: 15px; font-weight: 600; }
.ai-head-status { font-size: 11.5px; color: rgba(255, 255, 255, .62); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.ai-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }
.ai-close {
  background: rgba(255, 255, 255, .1); border: none; color: #fff; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
}
.ai-close:hover { background: rgba(255, 255, 255, .2); }
.ai-close svg { width: 14px; height: 14px; }

.ai-body {
  flex: 1; overflow-y: auto; padding: 18px;
  background: #FBFAF8; display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: #D6D2C8 transparent;
}
.ai-body::-webkit-scrollbar { width: 6px; }
.ai-body::-webkit-scrollbar-thumb { background: #D6D2C8; border-radius: 3px; }

.msg { display: flex; gap: 9px; max-width: 100%; }
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.msg.ai .msg-avatar { background: var(--gold-100); color: var(--navy-800); }
.msg.user .msg-avatar { background: var(--navy-700); color: #fff; }
.msg-bubble {
  padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.8;
  max-width: 82%; word-break: break-word; white-space: pre-wrap;
}
.msg.ai .msg-bubble { background: #fff; color: var(--ink-900); border: 1px solid var(--line); }
.msg.user .msg-bubble { background: var(--navy-700); color: #fff; }
.msg-bubble.typing { display: flex; gap: 4px; align-items: center; padding: 15px 14px; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300);
  animation: blink 1.3s infinite;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.ai-quick {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 12px; background: #FBFAF8; flex-shrink: 0;
}
.ai-quick.has-msgs { display: none; }
.quick-btn {
  font-size: 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--navy-700);
  font-family: inherit; transition: all .18s;
}
.quick-btn:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

.ai-foot {
  border-top: 1px solid var(--line); padding: 12px 14px; background: #fff;
  display: flex; gap: 9px; align-items: flex-end; flex-shrink: 0;
}
.ai-input {
  flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px;
  font-size: 13.5px; font-family: inherit; resize: none; outline: none;
  max-height: 88px; line-height: 1.6; background: #FBFAF8; color: var(--ink-900);
}
.ai-input:focus { border-color: var(--navy-700); background: #fff; }
.ai-send {
  width: 38px; height: 38px; border-radius: 11px; border: none; cursor: pointer; flex-shrink: 0;
  background: var(--navy-700); color: #fff; display: grid; place-items: center; transition: all .2s;
}
.ai-send:hover:not(:disabled) { background: var(--navy-900); }
.ai-send:disabled { opacity: .4; cursor: not-allowed; }
.ai-send svg { width: 17px; height: 17px; }

.ai-note {
  text-align: center; font-size: 11px; color: var(--ink-300);
  padding: 0 16px 9px; background: #fff; flex-shrink: 0;
}

@media (max-width: 480px) {
  .ai-panel { right: 12px; left: 12px; bottom: 88px; width: auto; height: 68vh; }
  .ai-fab { right: 16px; bottom: 16px; }
}
