/* ==========================================================================
   安徽之检技术服务有限公司 · 官网
   base.css — 设计 Token / 重置 / 排版 / 工具类
   ========================================================================== */

:root {
  /* 品牌色 — 精密青（指挥中心） */
  --color-primary: #1ee0ff;
  --color-primary-hover: #6aedff;
  --color-primary-active: #00b8d4;
  --color-primary-soft: rgba(30, 224, 255, 0.12);
  --color-primary-softer: rgba(30, 224, 255, 0.06);
  --color-primary-border: rgba(30, 224, 255, 0.38);
  --color-amber: #f5b942;

  /* 渐变 */
  --gradient-hero: linear-gradient(135deg, #031018 0%, #06344f 48%, #041525 100%);
  --gradient-soft: linear-gradient(180deg, #080d18 0%, #05080f 100%);
  --gradient-brand: linear-gradient(135deg, #0096c7 0%, #1ee0ff 55%, #7af8ff 100%);

  /* 语义色 */
  --color-success: #3dffc8;
  --color-success-soft: rgba(61, 255, 200, 0.12);
  --color-warning: #f5b942;
  --color-warning-soft: rgba(245, 185, 66, 0.14);
  --color-error: #ff5d6c;
  --color-error-soft: rgba(255, 93, 108, 0.14);
  --color-info: #1ee0ff;

  /* 中性色 */
  --color-text: #e8f1ff;
  --color-text-secondary: #9bb0c9;
  --color-text-tertiary: #6d829c;
  --color-text-disabled: #4a5a70;
  --color-border: rgba(30, 224, 255, 0.12);
  --color-border-strong: rgba(30, 224, 255, 0.28);
  --color-divider: rgba(255, 255, 255, 0.06);

  /* 背景层 */
  --color-bg: #05080f;
  --color-bg-soft: #080d18;
  --color-bg-strong: #0c1424;
  --color-bg-elevated: #101a2c;
  --color-bg-dark: #03050a;
  --color-bg-dark-2: #07101c;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  /* 阴影 — 分层 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.48);
  --shadow-brand: 0 0 28px rgba(30, 224, 255, 0.32);

  /* 间距 — 8dp 体系 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* 容器 */
  --container-max: 1200px;
  --container-wide: 1320px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Chakra Petch", "Noto Sans SC", sans-serif;
  --font-mono: "Share Tech Mono", "Cascadia Code", Consolas, monospace;

  /* 字号 */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;

  /* 行高 */
  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* 动效 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-slow: 360ms;

  /* 层级 */
  --z-header: 100;
  --z-dropdown: 200;
  --z-sticky: 90;
  --z-modal: 1000;
  --z-toast: 1100;
}

/* ====== 重置 ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  color-scheme: dark;
}

@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-hover);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

/* ====== 排版工具 ====== */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-center { text-align: center; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

/* ====== 布局工具 ====== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--space-20);
}

.section-sm {
  padding-block: var(--space-16);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: 0.04em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 640px;
}

.section-header {
  margin-bottom: var(--space-12);
  text-align: center;
  margin-inline: auto;
  max-width: 720px;
}

.section-header .section-subtitle {
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bg-soft { background-color: var(--color-bg-soft); }
.bg-strong { background-color: var(--color-bg-strong); }
.bg-gradient-soft { background: var(--gradient-soft); }

/* ====== 焦点态（无障碍） ====== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ====== 滚动条 ====== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(30, 224, 255, 0.28);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-bg-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

/* ====== 选中文本 ====== */
::selection {
  background: rgba(30, 224, 255, 0.35);
  color: #fff;
}

/* ====== 可访问性辅助 ====== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-toast);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
  color: #fff;
}

/* ====== 进入动画 ====== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
