/* ============================================================
   FPV Tools 基础样式（reset + 全局排版）
   依赖：tokens.css
   ============================================================ */

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

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

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

a {
  color: var(--brand-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--brand-500); }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- 排版 ---------- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

.section { padding: var(--space-20) 0; }
.section-subtle { background: var(--bg-subtle); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.section-head .eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: var(--radius-full);
  padding: 2px 12px;
  margin-bottom: var(--space-3);
}
[data-theme="dark"] .section-head .eyebrow {
  background: rgba(59, 110, 246, 0.15);
}

.section-head h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

/* ---------- 页面标题区（子页通用） ---------- */
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--brand-50), transparent),
    var(--bg-page);
}
[data-theme="dark"] .page-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(37, 87, 232, 0.18), transparent),
    var(--bg-page);
}
.page-hero h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.page-hero p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 560px;
}

/* ---------- 可访问性 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--brand-200);
  color: var(--gray-900);
}
