/* ============================================================
   PLAN — Base / Reset / 通用工具
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.45s ease, color 0.45s ease;
}

h1, h2, h3, p {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: rgba(78, 95, 230, 0.22);
}
[data-theme="dark"] ::selection {
  background: rgba(125, 139, 250, 0.32);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 32px);
}

.section {
  padding-block: clamp(88px, 12vw, 150px);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- 滚动显现（仅在 JS 可用时启用初始隐藏） ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 首屏加载动画 ---------- */

.js [data-load] {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-in 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 跳转链接（无障碍） ---------- */

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-reveal],
  .js [data-load] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}
