/* 小海螺项目助手 · 官网
   极简静态页：零依赖、零 JS。配色与小程序一致（主色 #2f6fed），支持深色模式。 */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #9aa1ac;
  --line: #e8eaee;
  --accent: #2f6fed;
  --accent-soft: #eef3ff;
  --radius: 16px;
  --wrap: 1000px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d10;
    --panel: #121419;
    --panel-soft: #15181e;
    --ink: #eceef2;
    --ink-2: #a9aeb8;
    --ink-3: #6f7581;
    --line: #23262d;
    --accent: #7ea4ff;
    --accent-soft: #172033;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* 键盘可达性：只在键盘聚焦时显示轮廓 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  z-index: 10;
}
.skip:focus { left: 16px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  /* 不支持 color-mix 的浏览器退回纯色，避免滚动时文字压在内容上 */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark { font-size: 20px; line-height: 1; }

.brand-name { font-size: 15.5px; }

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--ink-2);
}

.topnav a:hover { color: var(--ink); }

.topnav-cta {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.topnav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 64px;
  padding-top: 92px;
  padding-bottom: 84px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  font-weight: 650;
  text-wrap: balance; /* 支持时自动平衡两行；不支持就自然换行 */
}

.lede {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }

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

.hero-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* 小程序码卡片 */
.qr-card {
  margin: 0;
  padding: 18px 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  justify-self: end;
  width: 100%;
  max-width: 300px;
}

.qr-card img {
  display: block;
  width: 100%;
  max-width: 258px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  background: #fff; /* 码是白底，深色模式下也保持白底，保证可扫 */
}

.qr-card figcaption {
  display: block;
  margin-top: 14px;
}

.qr-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.qr-card span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- 通用区块 ---------- */
.section {
  padding-top: 76px;
  padding-bottom: 76px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 650;
}

/* ---------- 功能卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

/* 手机上单列，避免卡片被压成窄条 */
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  padding: 24px 22px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-no {
  display: block;
  margin-bottom: 26px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ---------- 数据说明 ---------- */
.about { max-width: 760px; }

.notes {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.notes li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
}

.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

.notes strong { color: var(--ink); font-weight: 600; }

/* ---------- 三步开始 ---------- */
.steps {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: none; padding-top: 6px; }

.step-no {
  flex: none;
  width: 30px;
  padding-top: 1px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.steps strong { font-size: 15.5px; font-weight: 600; }

.steps p {
  margin: 3px 0 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 18px;
}

.foot p { margin: 0; }

.foot-meta a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.foot-meta a:hover {
  color: var(--ink-2);
  border-bottom-color: currentColor;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
  }
  /* 窄屏让标题自然换行，不用手动断行 */
  .only-wide { display: none; }
  .qr-card {
    justify-self: start;
    max-width: 280px;
  }
  .section { padding-top: 60px; padding-bottom: 60px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .topnav { gap: 14px; font-size: 13px; }
  .brand-name { font-size: 14.5px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .qr-card { max-width: none; }
}

/* 窄屏只留一个「扫码使用」入口，避免顶栏挤成两行 */
@media (max-width: 480px) {
  .topnav a:not(.topnav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
