/* =============================================================
   base.css —— reset、排印、栅格、断点、全局动效基础
   断点：PC ≥1200 / 平板 768–1199 / 移动 <768
   ============================================================= */

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

* { margin: 0; }

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4 {
  color: var(--color-text-strong);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p { color: var(--color-text-muted); }

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

::selection {
  background: var(--color-brand);
  color: var(--color-text-on-brand);
}

/* ---------- 栅格与容器（12 列自适应） ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.container--wide { max-width: var(--container-wide); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-3);
}

.section {
  position: relative;
  padding-block: var(--sp-10);
}

.section--alt {
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
}

/* ---------- 排印工具类 ---------- */
.h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); }
.h3 { font-size: clamp(20px, 2.2vw, 26px); }

.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--color-text-muted);
  line-height: 1.8;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand-strong);
  font-family: var(--font-mono);
}

.mono { font-family: var(--font-mono); }

.text-grad {
  background: linear-gradient(120deg, var(--color-text-strong), var(--color-brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--color-text-muted); }
.faint { color: var(--color-text-faint); }
.center { text-align: center; }

/* 区块分隔光带 */
.band {
  height: 1px;
  background: var(--grad-band);
  opacity: 0.6;
  border: 0;
}

/* ---------- 焦点可达（辉光 Focus Ring） ---------- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ---------- 滚动显现基础态 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- 页面过渡（≤300ms 淡入 + 16px 上移） ---------- */
.page {
  animation: page-in var(--dur-slow) var(--ease-out) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- reduced-motion：仅保留 ≤150ms 淡入 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.15s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 断点：平板 768–1199 ---------- */
@media (max-width: 1199px) {
  .section { padding-block: var(--sp-8); }
}

/* ---------- 断点：移动 <768 ---------- */
@media (max-width: 767px) {
  .section { padding-block: var(--sp-6); }
  .h1 { font-size: clamp(30px, 9vw, 40px); }
}
