/* 基础变量与重置 */
:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --line: #e2e8f0; /* slate-200 */
  --primary: #5778f3;
  --primary-600: #3f5fe8;
  --accent: #89f7fe;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --text: #e6edf7;
    --muted: #98a2b3;
    --line: #1f2937;
    --primary: #7c91ff;
    --primary-600: #9aa9ff;
    --accent: #5ed8ff;
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1100px, 92vw); margin: 0 auto; }
.section { padding: 72px 0; }
.lead { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }

h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.25; margin: 0 0 16px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.subtitle { color: var(--muted); margin: 8px 0 16px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); transition: all .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-ghost { background: transparent; color: var(--text); }
.btn.full { width: 100%; justify-content: center; }

/* 头部导航 */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(10px); background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { font-size: 20px; }
.brand-text { font-size: 16px; }

.nav-toggle { display: none; border: 1px solid var(--line); background: transparent; padding: 8px 12px; border-radius: 10px; }
.nav-list { display: flex; gap: 12px; align-items: center; list-style: none; margin: 0; padding: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-list { position: absolute; right: 16px; top: 60px; flex-direction: column; align-items: stretch; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); transform-origin: top right; transform: scale(0.98) translateY(-6px); opacity: 0; pointer-events: none; }
  .nav-list.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: all; }
}

/* 首屏区域 */
.hero { padding: 72px 0; background: radial-gradient(1200px 500px at 60% -200px, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 32px; }
.hero-cta { display: flex; gap: 12px; margin: 16px 0 12px; }
.hero-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; color: var(--muted); padding-left: 18px; }
.hero-art { filter: drop-shadow(var(--shadow)); }
.hero-svg { width: 100%; height: auto; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-highlights { grid-template-columns: 1fr; }
}

/* 卡片与网格 */
.cards { display: grid; gap: 16px; margin-top: 16px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: color-mix(in srgb, var(--bg) 96%, transparent); box-shadow: var(--shadow); }
.card ul { margin: 8px 0 0; color: var(--muted); padding-left: 18px; }

@media (max-width: 920px) {
  .cards.two, .cards.three { grid-template-columns: 1fr; }
}

/* 案例 */
.case-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.case-item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: color-mix(in srgb, var(--bg) 96%, transparent); position: relative; box-shadow: var(--shadow); }
.case-badge { position: absolute; top: -10px; left: 12px; font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--primary); color: #fff; }

@media (max-width: 920px) { .case-list { grid-template-columns: 1fr; } }

/* 联系我们 */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-list { list-style: none; padding: 0; margin: 16px 0; color: var(--muted); }
.contact-form { border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); background: color-mix(in srgb, var(--bg) 96%, transparent); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 30%, transparent); border-color: var(--primary); }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 8px; }

@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }

/* 页脚与工具 */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 16px; }
.footer-links { list-style: none; display: grid; grid-auto-flow: row; gap: 6px; margin: 0; padding: 0; }
.brand-line { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }

@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transform: translateY(8px); pointer-events: none; transition: all .2s; }
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
