@font-face {
  font-family: 'MiSans';
  src: url('font/MiSans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'MiSans';
  src: url('font/MiSans-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'MiSans';
  src: url('font/MiSans-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

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

:root {
  --bg:        #f2f3f5;
  --bg2:       #ebedf0;
  --bg3:       #e2e4e8;
  --card:      #ffffff;
  --ink:       #111827;
  --ink-sec:   #374151;
  --ink-faint: #6b7280;
  --accent:    #439288;
  --accent-dk: #357870;
  --border:    rgba(0,0,0,0.07);
  --border-mid:rgba(0,0,0,0.13);
  --radius:    10px;
  --max:       1080px;
  --font:      'MiSans', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ── 滚动出现动画 ── */
[data-a] {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity  0.72s cubic-bezier(.16,1,.3,1),
    transform 0.82s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0s);
}
[data-a].in {
  opacity: 1;
  transform: none;
}

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(244,245,247,0.92);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 15px; font-weight: 700;
  font-family: var(--font);
  letter-spacing: .02em;
  color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.logo-en {
  color: var(--accent);
  font-style: italic;
}
nav { display: flex; gap: 28px; }
nav a {
  font-size: 13px; color: var(--ink-sec);
  transition: color .2s;
}
nav a:hover { color: var(--ink); }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 160px 0 100px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}
.hero .container { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(67,146,136,0.3);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 700;
  font-family: var(--font);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 20px;
  color: var(--ink);
}
.hero-sub {
  font-size: 14px; color: var(--ink-sec);
  line-height: 2; margin-bottom: 40px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 12px 28px; border-radius: 6px;
  border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--accent-dk); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ── Section ── */
.section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.section-dark { background: var(--bg2); }
.section-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -.025em;
  margin-bottom: 64px;
  color: var(--ink);
  line-height: 1.2;
}

/* ── Services ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--card);
  padding: 32px 28px;
  transition: background .2s;
}
.service-card:hover { background: var(--bg3); }
.service-icon {
  font-size: 20px; margin-bottom: 16px;
  color: var(--accent);
}
.service-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; font-family: var(--font); }
.service-card p { font-size: 13px; color: var(--ink-sec); line-height: 1.75; }

/* ── Works ── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  transition: border-color .2s, box-shadow .2s;
}
.work-card:hover {
  border-color: rgba(67,146,136,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.work-tag {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 12px;
}
.work-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; font-family: var(--font); }
.work-card p { font-size: 13px; color: var(--ink-sec); line-height: 1.75; margin-bottom: 18px; }
.work-link { font-size: 13px; color: var(--accent); }
.work-link:hover { text-decoration: underline; }

/* ── Reasons ── */
.reasons { display: flex; flex-direction: column; }
.reason {
  display: flex; gap: 28px; align-items: flex-start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.reason:first-child { border-top: 1px solid var(--border); }
.reason-num {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); flex-shrink: 0; padding-top: 4px;
  width: 28px;
}
.reason h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; font-family: var(--font); }
.reason p { font-size: 13px; color: var(--ink-sec); }

/* ── Contact ── */
.section-contact { background: var(--bg2); }
.contact-sub { font-size: 14px; color: var(--ink-sec); margin-top: -36px; margin-bottom: 44px; }
.contact-form { max-width: 600px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-field label { font-size: 12px; color: var(--ink-faint); letter-spacing: .06em; }
.form-field input,
.form-field textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  padding: 12px 14px;
  font-family: inherit;
  transition: border-color .2s;
  outline: none;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,146,136,0.12); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--ink-faint); }
.contact-form .btn-primary { margin-top: 8px; }
.contact-alt {
  margin-top: 24px; font-size: 13px; color: var(--ink-faint);
}
.contact-alt a { color: var(--ink-sec); text-decoration: underline; }

/* ── Demo 左文右代码 ── */
.demo-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;       /* 顶对齐，与截图一致 */
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.demo-row:first-of-type { padding-top: 0; }
.demo-row:last-child { border-bottom: none; padding-bottom: 0; }
.demo-row-rev .demo-text { order: 2; }
.demo-row-rev .demo-card  { order: 1; }

.demo-num {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; font-weight: 500;
}
.demo-text h3 {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -.02em;
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.2;
}
.demo-text p {
  font-size: 14px; color: var(--ink-sec); line-height: 1.85; margin-bottom: 24px;
}
.demo-checks {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.demo-checks li {
  font-size: 13.5px; color: var(--ink-sec);
  padding-left: 20px; position: relative;
}
.demo-checks li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--accent); font-weight: 700; font-size: 13px;
}

/* 代码卡片 */
.demo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.demo-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
/* 左侧竖线色块 */
.demo-card-header::before {
  content: '';
  display: block;
  width: 3px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.demo-card-tag {
  font-size: 12px; letter-spacing: .04em;
  color: var(--ink-faint); font-weight: 500;
}
.demo-code {
  margin: 0;
  padding: 22px 20px;
  font-size: 12px;
  line-height: 1.9;
  font-family: "JetBrains Mono","Fira Code","Courier New",monospace;
  color: var(--ink-sec);
  background: var(--card);
  overflow-x: auto;
  white-space: pre;
}
/* 代码语法色 */
.dc-cm { color: var(--ink-faint); font-style: italic; }
.dc-kw { color: var(--ink); font-weight: 600; }
.dc-fn { color: var(--accent); }
.dc-str { color: var(--accent-dk); }
.dc-num { color: var(--accent); }

.demo-card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  font-size: 12px; color: var(--ink-faint);
  display: flex; align-items: center; gap: 8px;
}
.demo-card-foot::before {
  content: '→';
  color: var(--accent); font-size: 13px;
}

@media (max-width: 800px) {
  .demo-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .demo-row-rev .demo-text { order: 0; }
  .demo-row-rev .demo-card  { order: 0; }
}

/* ── Footer ── */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-faint);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 10px 24px; border-radius: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Mobile ── */
@media (max-width: 640px) {
  .hero { padding: 120px 0 72px; }
  .hero-sub br { display: none; }
  .form-row { grid-template-columns: 1fr; }
  nav { gap: 18px; }
  .site-footer .container { flex-direction: column; gap: 6px; text-align: center; }
  .reason { gap: 16px; }
}
