/* ============================================================
   水木灵智官网 · 设计系统
   色板：纸白底 + 墨色字 + 品牌绿仅作细线与标记
   ============================================================ */

:root {
  --paper: #fafaf8;
  --surface: #f1f2ec;
  --surface-2: #e8eae0;
  --ink: #12150f;
  --ink-2: #4b5247;
  --muted: #7a8076;
  --line: #e2e4db;
  --line-strong: #cfd2c6;
  --forest: #2b5522;
  --brand: #5e9c3b;
  --leaf: #8fb63f;
  --on-dark: #f3f5ee;
  --on-dark-dim: #a9b1a2;

  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --pad: 20px;
  --section: clamp(56px, 8.5vw, 108px);
  --radius: 2px;
}

@media (min-width: 768px) {
  :root { --pad: 40px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 16px;
  z-index: 60;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 版心 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 排版 ---------- */
.d1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 600;
}

.h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 600;
}

.h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.lead {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 40em;
}

.small {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--forest); border-color: var(--forest); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-light {
  background: transparent;
  color: var(--on-dark);
  border-color: #4a5147;
}
.btn-light:hover { background: #2a3027; border-color: #6b7367; }

/* ---------- 顶部进度线 ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 50;
  pointer-events: none;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.brand-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav-links {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 13px;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle span::before { top: 0; }
.nav-toggle span::after { top: 12px; }

.nav-cta {
  display: none;
}

/* 移动端展开面板 */
.site-header.nav-open .nav-links {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 62px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--pad) 20px;
}
.site-header.nav-open .nav-links a {
  display: block;
  padding: 14px 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--line);
}
.site-header.nav-open .nav-links a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}
.site-header.nav-open .nav-toggle span::before { top: 6px; transform: rotate(45deg); }
.site-header.nav-open .nav-toggle span::after { top: 6px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .nav-inner { height: 72px; }
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-right: 46px;
  }
  .nav-links a {
    position: relative;
    font-size: 0.9375rem;
    color: var(--ink-2);
    padding: 6px 0;
    transition: color .16s ease;
  }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transition: transform .2s ease;
  }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-cta {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: border-color .16s ease, background .16s ease;
  }
  .nav-cta:hover { border-color: var(--ink); background: var(--ink); color: var(--on-dark); }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(52px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 780px; }

.hero-sub {
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--ink-2);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-media {
  margin-top: clamp(40px, 6vw, 64px);
  height: clamp(220px, 44vw, 500px);
  overflow: hidden;
  background: var(--surface-2);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

/* ---------- 数据条 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 5vw, 52px);
}
.metric {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  padding-right: 12px;
}
.metric:nth-child(odd) { padding-right: 16px; }
.metric:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.metric-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.metric-value em {
  font-style: normal;
  font-size: 0.75em;
  font-weight: 500;
  color: var(--brand);
  margin-left: 2px;
}
.metric-label {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .metric { border-bottom: 0; padding: 24px 0 8px; }
  .metric:nth-child(1) { padding-left: 0; border-left: 0; }
  .metric:nth-child(2),
  .metric:nth-child(3),
  .metric:nth-child(4) { padding-left: 24px; border-left: 1px solid var(--line); }
}

/* ---------- 区块 ---------- */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(28px, 4.5vw, 48px);
}
@media (min-width: 900px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }
  .section-head > *:first-child { max-width: 640px; }
}

.section-tint { background: var(--surface); }

/* ---------- 能力网格 ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.cap {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
}
@media (min-width: 1024px) {
  .cap-grid { grid-template-columns: repeat(4, 1fr); column-gap: 40px; }
}
.cap-icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
}
.cap h3 { margin-top: 16px; }
.cap p {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* ---------- 媒体 + 文本行 ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: center;
}
.split.reverse .split-media { order: 2; }
@media (min-width: 900px) {
  .split { grid-template-columns: 7fr 5fr; gap: 56px; }
  .split.reverse { grid-template-columns: 5fr 7fr; }
}
.split-media {
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-body h2 { margin-bottom: 18px; }

.checklist {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.checklist li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
}

/* ---------- 产品行 ---------- */
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}
@media (min-width: 900px) {
  .row {
    grid-template-columns: 190px 1fr auto;
    align-items: baseline;
    gap: 32px;
    padding: 30px 0;
  }
  .row > .row-title { margin: 0; }
}
.row-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.row-desc { color: var(--ink-2); font-size: 0.9375rem; margin: 0; }
.row-link {
  font-size: 0.875rem;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  justify-self: start;
  transition: color .16s ease, border-color .16s ease;
}
.row-link:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- 案例卡 ---------- */
.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 768px) { .case-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 32px; } }
@media (min-width: 1024px) { .case-grid { grid-template-columns: repeat(3, 1fr); gap: 44px 32px; } }

.case {
  display: flex;
  flex-direction: column;
}
.case-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 18px;
}
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.case-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  flex: 0 0 auto;
}
.case h3 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.case p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- 客群 ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.audience {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.audience-label {
  font-size: 0.8125rem;
  color: var(--brand);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}
.audience p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
@media (min-width: 768px) {
  .audience-grid { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
}
@media (min-width: 1024px) {
  .audience-grid { grid-template-columns: repeat(4, 1fr); column-gap: 40px; }
}

/* ---------- 引文 ---------- */
.statement {
  max-width: 900px;
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  line-height: 1.5;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--ink);
}
.statement .hl { color: var(--forest); }

/* ---------- 深色 CTA ---------- */
.cta-band {
  background: var(--ink);
  color: var(--on-dark);
  padding: clamp(52px, 8vw, 92px) 0;
}
.cta-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.cta-band .h2 { color: var(--on-dark); }
.cta-band .lead { color: var(--on-dark-dim); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .cta-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 64px;
  }
  .cta-text { max-width: 620px; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-dim);
  padding: clamp(44px, 6vw, 68px) 0 28px;
  border-top: 1px solid #23281f;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid #23281f;
}
@media (min-width: 900px) {
  .footer-top { grid-template-columns: 5fr 3fr 4fr; gap: 48px; }
}
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand img { width: 30px; height: 30px; object-fit: contain; }
.footer-brand strong {
  display: block;
  color: var(--on-dark);
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.footer-brand span { font-size: 0.8125rem; }
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--on-dark);
  letter-spacing: 0.06em;
}
.footer-col a,
.footer-col p {
  display: block;
  margin: 0 0 6px;
  font-size: 0.875rem;
  color: var(--on-dark-dim);
}
.footer-col a:hover { color: var(--on-dark); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 22px;
  font-size: 0.8125rem;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- 通用小件 ---------- */
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

.note {
  border-left: 2px solid var(--brand);
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.media-portrait {
  overflow: hidden;
  background: var(--surface-2);
}
.media-portrait img { width: 100%; height: auto; }

/* ---------- 手机截图组 ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.shot {
  background: var(--surface);
  overflow: hidden;
}
.shot img { width: 100%; height: auto; }

/* ---------- 公式 ---------- */
.formula {
  margin: 28px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.formula small {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- 联系页 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
}
.contact-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact-line span { font-size: 0.8125rem; color: var(--muted); }
.contact-phone {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.contact-phone a { color: var(--ink); }
.contact-phone a:hover { color: var(--brand); }

.copy-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.copy-btn {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: border-color .16s ease, background .16s ease;
}
.copy-btn:hover { border-color: var(--ink); background: var(--surface); }

.qr-card {
  border: 1px solid var(--line);
  padding: 20px;
  background: #fff;
}
.qr-card img { width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.qr-card p { margin: 16px 0 0; text-align: center; font-size: 0.875rem; color: var(--ink-2); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  padding-right: 20px;
}
@media (min-width: 768px) {
  .step { border-bottom: 0; }
  .step + .step { border-left: 1px solid var(--line); padding-left: 22px; }
  .step:first-child { padding-left: 0; }
}
.step-no {
  font-size: 0.8125rem;
  color: var(--brand);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin: 8px 0 6px; font-size: 1rem; }
.step p { margin: 0; font-size: 0.875rem; color: var(--ink-2); }

/* ---------- 入场动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise .72s cubic-bezier(.2, .7, .2, 1) both;
  }
  .reveal-2 { animation-delay: .09s; }
  .reveal-3 { animation-delay: .18s; }
  .reveal-4 { animation-delay: .27s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
