/* ============================================================
   恰维咨询 · 数字名片  |  样式表
   设计基调：墨蓝（专业）+ 暖金（质感）+ 米白（留白）
   ============================================================ */

:root {
  --ink: #0E1E33;
  --ink-2: #16324F;
  --ink-3: #1F4062;
  --gold: #C6A15B;
  --gold-2: #DFC594;
  --paper: #FAF7F2;
  --paper-2: #FFFFFF;
  --text: #17202B;
  --muted: #6B7785;
  --line: #E8E2D8;
  --ok: #2F7A5B;
  --warn: #B4762A;
  --danger: #B23B3B;
  --radius: 18px;
  --shadow-s: 0 1px 2px rgba(14, 30, 51, .06), 0 4px 14px rgba(14, 30, 51, .05);
  --shadow-m: 0 2px 6px rgba(14, 30, 51, .07), 0 14px 38px rgba(14, 30, 51, .10);
  --shadow-l: 0 10px 30px rgba(14, 30, 51, .14), 0 30px 70px rgba(14, 30, 51, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(198, 161, 91, .10), transparent 60%),
    radial-gradient(800px 400px at 100% 100%, rgba(22, 50, 79, .06), transparent 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- 框架 ---------- */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: calc(74px + var(--safe-b));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(250, 247, 242, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(232, 226, 216, .7);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--ink);
  font-weight: 600;
}
.brand-mini .seal {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--ink-2), var(--ink));
  color: var(--gold-2);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.brand-mini em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .02em;
}

.top-actions { display: flex; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(232, 226, 216, .9);
  transition: transform .18s ease, background .18s ease;
}
.icon-btn:active { transform: scale(.94); background: #fff; }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- 视图切换 ---------- */
.view { display: none; padding: 18px 18px 40px; animation: fadeUp .34s cubic-bezier(.22,.8,.3,1) both; }
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 名片卡（可翻面） ---------- */
.card-scene {
  perspective: 1600px;
  margin: 4px 0 20px;
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.62 / 1;
  transform-style: preserve-3d;
  transition: transform .82s cubic-bezier(.5, .05, .2, 1);
}
.card.flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: var(--shadow-l);
}

/* 正面：深墨蓝 */
.card-front {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(198,161,91,.20), transparent 46%),
    radial-gradient(90% 90% at 0% 100%, rgba(31,64,98,.85), transparent 60%),
    linear-gradient(155deg, #14304C 0%, #0E1E33 60%, #0A1728 100%);
  color: #fff;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 金色细边框 + 右上角斜切装饰 */
.card-front::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(198, 161, 91, .34);
  border-radius: 12px;
  pointer-events: none;
}
.card-front::after {
  content: "";
  position: absolute;
  top: -60px; right: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(198, 161, 91, .22);
  box-shadow: 0 0 0 22px rgba(198,161,91,.05), 0 0 0 46px rgba(198,161,91,.035);
  pointer-events: none;
}

.cf-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 2; }
.cf-org {
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--gold-2);
  text-transform: uppercase;
  font-weight: 500;
}
.cf-org-sub {
  font-size: 11px;
  color: rgba(255,255,255,.52);
  letter-spacing: .08em;
  margin-top: 3px;
}
.cf-logo {
  width: 38px; height: 38px;
  border: 1px solid rgba(198,161,91,.5);
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 17px;
  color: var(--gold-2);
  font-weight: 600;
  background: rgba(255,255,255,.03);
}

.cf-mid { position: relative; z-index: 2; }
.cf-name {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 0 0 6px;
}
.cf-title {
  font-size: 12.5px;
  color: rgba(255,255,255,.78);
  letter-spacing: .1em;
  margin: 0;
}
.cf-divider {
  width: 34px; height: 1px;
  background: var(--gold);
  margin: 12px 0;
  opacity: .8;
}

.cf-bottom { display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 2; gap: 12px; }
.cf-contact { font-size: 11.5px; line-height: 1.9; color: rgba(255,255,255,.72); letter-spacing: .04em; }
.cf-contact span { display: block; }
.cf-contact b { color: #fff; font-weight: 500; letter-spacing: .06em; }

.flip-hint {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 3;
  font-size: 10px;
  color: rgba(255,255,255,.5);
  letter-spacing: .12em;
  display: flex; align-items: center; gap: 5px;
}

/* 背面：米白 */
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #FFFFFF, #F5F1E9);
  border: 1px solid var(--line);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cb-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text); }
.cb-row + .cb-row { margin-top: 9px; }
.cb-k { color: var(--muted); width: 46px; flex: none; font-size: 11.5px; letter-spacing: .06em; }
.cb-v { flex: 1; word-break: break-all; }
.cb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.cb-tag {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(198,161,91,.13);
  color: #8A6A2E;
  border: 1px solid rgba(198,161,91,.24);
  letter-spacing: .04em;
}
.cb-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px; color: var(--muted); letter-spacing: .1em;
  border-top: 1px dashed var(--line);
  padding-top: 9px;
}

/* 企业信息行 */
.info-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }

/* 名片页：服务速览 */
.srv-line {
  display: block; width: 100%; text-align: left;
  padding: 12px 0 12px 14px;
  border-left: 2px solid rgba(198,161,91,.42);
  border-radius: 0 8px 8px 0;
  transition: background .18s ease, border-color .18s ease;
  margin-bottom: 2px;
}
.srv-line:active { background: rgba(198,161,91,.06); border-left-color: var(--gold); }
.srv-line b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .01em; margin-bottom: 2px; }
.srv-line span { display: block; font-size: 12px; color: #66727F; line-height: 1.7; }

/* 团队页说明 */
.team-note {
  font-size: 11.8px; color: var(--muted); line-height: 1.9;
  margin: 0; padding: 14px 16px;
  background: rgba(255,255,255,.6);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.team-note b { color: #44515F; font-weight: 600; }

/* ---------- 主行动区 ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}
.qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .16s ease, box-shadow .16s ease;
}
.qa:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.qa svg { width: 19px; height: 19px; color: var(--ink-2); }
.qa span { font-size: 10.5px; color: var(--muted); letter-spacing: .05em; }
.qa.primary { background: linear-gradient(150deg, var(--ink-2), var(--ink)); border-color: transparent; }
.qa.primary svg { color: var(--gold-2); }
.qa.primary span { color: rgba(255,255,255,.86); }

/* ---------- 通用区块 ---------- */
.sec { margin-bottom: 26px; }
.sec-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 11px;
}
.sec-t {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}
.sec-t::before {
  content: "";
  display: inline-block;
  width: 12px; height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 8px;
}
.sec-more { font-size: 11.5px; color: var(--muted); }

.bio {
  font-size: 14px;
  line-height: 1.85;
  color: #33404F;
  margin: 0;
  text-align: justify;
}

.tagline {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
}
.pill {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #40505F;
  letter-spacing: .03em;
}

/* 企业卡 */
.org-card {
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--ink-2), var(--ink) 70%);
  color: #fff;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-m);
}
.org-card::after {
  content: "";
  position: absolute; right: -40px; bottom: -60px;
  width: 170px; height: 170px; border-radius: 50%;
  border: 1px solid rgba(198,161,91,.24);
  box-shadow: 0 0 0 20px rgba(198,161,91,.05);
}
.oc-name { font-size: 16.5px; font-weight: 600; letter-spacing: .02em; margin: 0 0 4px; line-height: 1.5; }
.oc-slogan { font-size: 12px; color: var(--gold-2); letter-spacing: .1em; margin: 0 0 14px; }
.oc-desc { font-size: 12.8px; line-height: 1.9; color: rgba(255,255,255,.8); margin: 0; position: relative; z-index: 2; }
.oc-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11.5px; color: rgba(255,255,255,.66);
  position: relative; z-index: 2;
}

/* 服务条目 */
.srv {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 9px;
  box-shadow: var(--shadow-s);
  transition: border-color .2s ease, transform .18s ease;
}
.srv:active { transform: scale(.995); border-color: rgba(198,161,91,.5); }
.srv-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.srv-n { font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
.srv-i {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid; place-items: center;
  font-size: 11px;
  flex: none;
}
.srv-d { font-size: 12.5px; color: #57636F; line-height: 1.8; margin: 0; }
.srv-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.srv-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: #F5F1E9; color: #7A6A4E; letter-spacing: .04em;
}

/* 案例 */
.case {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-s);
}
.case-ind {
  display: inline-block; font-size: 10px; letter-spacing: .12em;
  color: #8A6A2E; background: rgba(198,161,91,.14);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.case-t { font-size: 14.5px; font-weight: 600; margin: 0 0 10px; line-height: 1.5; }
.case-line { display: flex; gap: 10px; font-size: 12.3px; line-height: 1.8; margin-bottom: 6px; color: #4A5866; }
.case-line b {
  flex: none; width: 34px; font-weight: 500; color: var(--muted);
  font-size: 11px; letter-spacing: .06em; padding-top: 2px;
}
.case-res {
  margin-top: 10px; padding: 9px 11px;
  background: #F7F4EE; border-radius: 8px;
  font-size: 12.3px; color: #33404F; line-height: 1.75;
  border-left: 2px solid var(--gold);
}

/* 团队 */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.member {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-s);
  transition: transform .16s ease, border-color .16s ease;
  text-align: left; width: 100%;
}
.member:active { transform: scale(.99); }
.member.self { border-color: rgba(198,161,91,.6); background: linear-gradient(120deg, #fff, #FCF9F3); }
.avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600;
  color: var(--gold-2);
  background: linear-gradient(150deg, var(--ink-2), var(--ink));
  flex: none;
  letter-spacing: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-info { flex: 1; min-width: 0; }
.m-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.m-name .badge-self {
  font-size: 9px; font-weight: 500; padding: 1px 5px; border-radius: 3px;
  background: var(--ink); color: var(--gold-2); letter-spacing: .08em;
}
.m-title { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.m-arrow { color: #C0C8D0; font-size: 16px; flex: none; }

/* 空态 */
.empty {
  text-align: center; padding: 26px 16px;
  color: var(--muted); font-size: 12.5px;
  background: #fff; border: 1px dashed var(--line); border-radius: 14px;
}

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + var(--safe-b));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 5px;
  border-radius: 11px;
  color: #93A0AC;
  font-size: 10px;
  letter-spacing: .06em;
  transition: color .2s ease, background .2s ease;
}
.tab svg { width: 19px; height: 19px; }
.tab.active { color: var(--ink); background: rgba(198,161,91,.11); }
.tab.active svg { color: var(--ink-2); }

/* ---------- 名片已停用页 ---------- */
.offline {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 32px 24px;
  gap: 6px;
}
.offline .seal-lg {
  width: 58px; height: 58px; border-radius: 15px;
  background: linear-gradient(150deg, var(--ink-2), var(--ink));
  color: var(--gold-2);
  display: grid; place-items: center;
  font-size: 24px; font-weight: 600;
  margin-bottom: 14px;
}
.offline h1 { font-size: 18px; margin: 0 0 6px; letter-spacing: .02em; }
.offline p { font-size: 13px; color: var(--muted); margin: 0 0 20px; max-width: 300px; line-height: 1.8; }
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--ink-2), var(--ink));
  color: #fff; font-size: 13.5px; letter-spacing: .04em;
  box-shadow: var(--shadow-m);
}
.btn-solid:active { transform: scale(.97); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink); font-size: 13px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 14px);
  z-index: 200;
  background: rgba(14,30,51,.94);
  color: #fff;
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 10px;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  max-width: 82vw;
  text-align: center;
  box-shadow: var(--shadow-m);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- AI 可读区（对人可见、低调，对 AI 是纯文本富矿） ---------- */
.ai-read {
  margin-top: 6px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed var(--line);
}
.ai-read h3 {
  font-size: 11px; letter-spacing: .16em; color: var(--muted);
  font-weight: 600; margin: 0 0 10px; text-transform: uppercase;
}
.ai-read p { font-size: 12.3px; line-height: 1.9; color: #4A5866; margin: 0 0 8px; }
.ai-read p:last-child { margin-bottom: 0; }
.ai-read strong { color: var(--ink); font-weight: 600; }

/* ---------- 桌面端观感 ---------- */
@media (min-width: 520px) {
  body { padding: 28px 0; }
  .app {
    border-radius: 26px;
    background: var(--paper);
    box-shadow: 0 20px 60px rgba(14,30,51,.10);
    overflow: hidden;
    min-height: auto;
    padding-bottom: 0;
  }
  .tabbar { position: sticky; bottom: 0; border-radius: 0 0 26px 26px; }
  .topbar { border-radius: 26px 26px 0 0; }
  .cf-name { font-size: 33px; }
}
