/* ============================================================
   记工表 官网 · 基础层：重置 / 排版 / 容器 / 导航 / 按钮 / 页脚
   令牌见 tokens.css（唯一真相源）；本文件禁裸色值/裸圆角
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* 焦点态（修 WCAG P0：teal on white/bg 4.99 ≥3:1；深底用白环） */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.ink-surface :focus-visible,
.footer :focus-visible,
.download .panel :focus-visible { outline-color: #fff; }

/* 跳到主内容（键盘 / 读屏） */
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: var(--z-toast);
  background: var(--surface); color: var(--teal-700); font-weight: 700;
  padding: 0.6rem 1rem; border-radius: var(--r-btn); box-shadow: var(--shadow-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

h1, h2, h3 { color: var(--ink); line-height: var(--lh-title); letter-spacing: var(--ls-title); font-weight: 800; text-wrap: balance; word-break: keep-all; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 700; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
strong { color: var(--ink); font-weight: 800; }

/* —— 容器 / 区块 —— */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section-y); position: relative; }
.section-head { max-width: 44ch; margin-bottom: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-kicker {
  display: inline-block; font-size: var(--t-sm); font-weight: 700; color: var(--teal-700);
  margin-bottom: 0.9rem; letter-spacing: 0.02em;
}
.section-title { font-size: var(--t-h2); }
.section-sub { margin-top: 1rem; font-size: var(--t-lead); color: var(--ink-3); line-height: 1.55; }

/* —— 蓝图点阵纹理（工地图纸气质，极淡，固定不滚动） —— */
.blueprint {
  position: absolute; inset: 0; z-index: var(--z-blueprint); pointer-events: none;
  background-image: radial-gradient(var(--grid-blueprint) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
}

/* —— 按钮 —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.02rem; line-height: 1; white-space: nowrap;
  padding: 0.95rem 1.6rem; border-radius: var(--r-btn);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn .ic { width: 1.15em; height: 1.15em; }
/* 主 CTA 纯实色（修 P1①：白字 5.21 达 AA，弃渐变浅端 2.52） */
.btn-primary { background: var(--cta-solid); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--teal-press); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--teal-300); transform: translateY(-2px); color: var(--teal-700); }
.btn-ghost:active { transform: translateY(0) scale(.985); }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* —— 标签胶囊 —— */
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.9rem; border-radius: var(--r-chip);
  font-size: var(--t-sm); font-weight: 600; color: var(--teal-700);
  background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal-100);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); }

/* ============================================================
   顶部导航（单行，≤68px）
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(247,251,251,.82);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
/* 低端机 / 弱网 / reduce：关毛玻璃，实色兜底（早期 .is-cheap 类驱动） */
.is-cheap .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(247,251,251,.96); }
.nav.is-stuck { border-bottom-color: var(--line); }
.nav-inner { height: 68px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; color: var(--ink); font-size: 1.18rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--grad-surface); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.nav-links { display: flex; gap: 0.4rem; margin-left: auto; }
.nav-links a {
  padding: 0.55rem 0.85rem; border-radius: 10px; font-size: 0.96rem; font-weight: 600; color: var(--ink-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a:hover, .nav-links a.is-current { color: var(--teal-700); background: var(--teal-50); }
.nav-cta { margin-left: 0.4rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 0.2rem;
    position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    background: var(--surface); padding: 0.8rem 1.1rem 1.3rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav-cta { display: inline-flex; margin: 0.6rem 1.1rem 0; }
  .nav.is-open .nav-links a { padding: 0.85rem 0.6rem; font-size: 1.05rem; }
}

/* ============================================================
   页脚
   ============================================================ */
.footer { background: var(--ink-surface); color: var(--ink-on-dark-2); padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem 1.5rem; }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer-about { max-width: 30ch; font-size: 0.95rem; line-height: 1.6; color: var(--ink-on-dark-2); }
.footer-col h4 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.6rem; }
/* 触控 ≥44px（修 WCAG P2） */
.footer-col a { display: flex; align-items: center; min-height: 44px; padding: 0.1rem 0; font-size: 0.92rem; color: var(--ink-on-dark-2); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--teal-300); }
.footer-bottom {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.4rem); padding-top: 1.6rem;
  border-top: 1px solid var(--line-on-dark);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-items: center;
  font-size: 0.82rem; color: var(--ink-on-dark-2);
}
.footer-bottom a:hover { color: var(--teal-300); }
.footer-beian { display: inline-flex; align-items: center; gap: 0.4rem; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brandcol { grid-column: 1 / -1; }
}

/* ============================================================
   滚动揭示（IntersectionObserver 驱动）
   .js 门控：无 JS / 爬虫 → .reveal 默认可见（修 reveal 内容门控 P2）
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: 0.06s; }
.js .reveal[data-d="2"] { transition-delay: 0.12s; }
.js .reveal[data-d="3"] { transition-delay: 0.18s; }
.js .reveal[data-d="4"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .float, .pm-wrap, .pm-float, .glow { animation: none !important; }
  .btn { transition: none; }
}
/* 低端机：停首屏无限动画（早期 .is-cheap 类驱动，非仅 media-query） */
.is-cheap .pm-wrap, .is-cheap .pm-float, .is-cheap .glow { animation: none !important; }
