/* =============================================================
   base.css — 设计变量 / 重置 / 排版 / 基础组件
   铭风科技官网 | applin.cn
   改品牌色只需要改这一段的变量，全站同步生效
   ============================================================= */

:root {
  /* ---------- 颜色：底色与面板 ---------- */
  --bg:            #0B0F1A;
  --bg-soft:       #0F1524;
  --panel:         #131A2A;
  --panel-hover:   #182136;
  --border:        #1F2A3D;
  --border-strong: #2E3D57;

  /* ---------- 颜色：文字 ---------- */
  --text:      #E6EAF2;
  --text-dim:  #94A3B8;
  --text-mute: #64748B;

  /* ---------- 颜色：品牌 ---------- */
  --brand-1:    #3B82F6;
  --brand-2:    #8B5CF6;
  --brand-grad: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --accent:     #22D3EE;

  /* ---------- 尺寸 ---------- */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --maxw:      1200px;
  --nav-h:     68px;

  /* ---------- 字号 ---------- */
  --fs-hero: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
  --fs-h2:   clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  --fs-h3:   1.125rem;
  --fs-body: 1rem;
  --fs-sm:   0.875rem;
  --fs-xs:   0.8125rem;

  /* ---------- 动效 ---------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =============================================================
   重置
   ============================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans CJK SC", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video {
  display: block;
  max-width: 100%;
}

/* 图片必须带宽高属性，这里兜底保证不撑破容器 */
img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

/* 键盘焦点必须可见（无障碍要求，不要删） */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 尊重系统的"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 屏幕阅读器专用文本 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 跳转到主内容（键盘用户第一个 Tab 就能用） */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--brand-1);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}
.skip-link:focus { top: 12px; }

/* =============================================================
   排版
   ============================================================= */

h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

strong { font-weight: 600; color: var(--text); }

/* 渐变文字：用于关键标题的高亮片段 */
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =============================================================
   布局容器
   ============================================================= */

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

.section {
  padding: 88px 0;
}

.section--tight { padding: 64px 0; }

.section--alt { background: var(--bg-soft); }

/* 区块标题 */
.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head--left {
  margin-left: 0;
  text-align: left;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}

.section-head h2 { margin-bottom: 16px; }

.section-head p {
  color: var(--text-dim);
  font-size: 1.0625rem;
}

/* =============================================================
   按钮
   ============================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--radius);
  font-size: var(--fs-body);
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(99, 102, 241, 0.8);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(99, 102, 241, 0.9);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
  border-color: var(--brand-1);
  color: #fff;
  transform: translateY(-2px);
}

.btn--sm { min-height: 40px; padding: 0 18px; font-size: var(--fs-sm); }

.btn svg { flex: none; }

/* =============================================================
   通用卡片 / 标签
   ============================================================= */

.card {
  position: relative;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              background-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--panel-hover);
}

.tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

/* 图标底板 */
.icon-box {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.icon-box svg { width: 26px; height: 26px; }

/* =============================================================
   滚动进入动画（由 main.js 添加 .is-in）
   ============================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* 没有 JS 时不能把内容藏起来 */
.no-js .reveal { opacity: 1; transform: none; }
