/* ==========================================================================
   云书软件开发社 — 设计令牌与全局样式
   依据《云书软件开发社 设计规范》
   ========================================================================== */

:root {
  /* —— 色彩系统 —— */
  --canvas:      #FBFAF7;
  --surface:     #FFFFFF;
  --deep:        #10221F;
  --brand:       #0F766E;
  --brand-soft:  #D6F5EF;
  --spark:       #FF7A3D;
  --spark-soft:  #FFE6D8;
  --ink:         #14201E;
  --ink-muted:   #5B6B67;
  --on-dark:     #F5F3EE;
  --line:        #E4E1DA;

  /* —— 圆角 —— */
  --r-chip:  10px;
  --r-card:  16px;
  --r-panel: 24px;
  --r-pill:  999px;

  /* —— 间距 —— */
  --section-y: 96px;
  --container: 1200px;
  --gutter:    24px;

  /* —— 动效 —— */
  --t-fast:  200ms;
  --t-mid:   480ms;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);

  /* —— 字体 —— */
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  /* —— 阴影 —— */
  --shadow-sm: 0 1px 3px rgba(20, 32, 30, .06), 0 1px 2px rgba(20, 32, 30, .04);
  --shadow-md: 0 4px 16px rgba(20, 32, 30, .08), 0 2px 6px rgba(20, 32, 30, .04);
  --shadow-lg: 0 12px 32px rgba(20, 32, 30, .12), 0 4px 12px rgba(20, 32, 30, .06);
}

/* ==========================================================================
   基础重置
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 64px; line-height: 1.1; }
h2 { font-size: 40px; line-height: 1.2; }
h3 { font-size: 24px; line-height: 1.3; }

p { margin: 0; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--spark); }

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* 焦点可见性（键盘可达） */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

.section {
  padding: var(--section-y) 0;
}

.section--tight { padding: calc(var(--section-y) * .6) 0; }

/* —— 区块标题组 —— */
.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--spark));
}

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

.section-head p {
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--spark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 122, 61, .28);
}

.btn--primary:hover {
  color: #fff;
  background: #FF6A26;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 24px rgba(255, 122, 61, .36);
}

.btn--ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(245, 243, 238, .35);
}

.btn--ghost:hover {
  color: var(--on-dark);
  border-color: var(--on-dark);
  background: rgba(245, 243, 238, .08);
  transform: translateY(-4px) scale(1.03);
}

.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}

.btn--outline:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-4px) scale(1.03);
}

.btn--sm { padding: 11px 22px; font-size: 14px; }

/* ==========================================================================
   标签 / Chip / Pill
   ========================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-chip);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  background: var(--brand-soft);
  color: var(--brand);
}

.chip--spark {
  background: var(--spark-soft);
  color: #C2410C;
}

.pill {
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink-muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.pill:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.pill[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ==========================================================================
   滚动入场动画
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 交错延迟 */
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }
.reveal[data-delay="6"] { transition-delay: 360ms; }

/* ==========================================================================
   工具类
   ========================================================================== */

.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;
}

.text-muted { color: var(--ink-muted); }

/* ==========================================================================
   响应式字号
   ========================================================================== */

@media (max-width: 1023px) {
  h1 { font-size: 52px; }
  h2 { font-size: 34px; }
}

@media (max-width: 767px) {
  :root { --section-y: 64px; --gutter: 20px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 21px; }
  .section-head { margin-bottom: 40px; }

  /* 移动端位移减半 */
  .reveal { transform: translateY(12px); }
}
