/* ============================================
   某某汽配 - 全局设计系统
   工业控制台风格 · Industrial Control Console
   ============================================ */

/* CSS 变量系统 - 设计令牌 */
:root {
  /* 主色调 - 工业感 */
  --c-ink: #0a0b0e;            /* 主背景：深沉墨黑 */
  --c-ink-2: #11141a;          /* 次级背景 */
  --c-ink-3: #181c24;          /* 卡片背景 */
  --c-ink-4: #232831;          /* 浮层背景 */
  --c-line: #2a2f3a;           /* 边框线 */
  --c-line-2: #3a4050;         /* 强调边框 */

  /* 强调色 - 高可视橙色 (安全色) */
  --c-flame: #ff5722;          /* 主强调 - 工业火焰橙 */
  --c-flame-2: #ff7a47;        /* 浅橙 */
  --c-flame-3: #ff3d00;        /* 深橙 - 按下态 */
  --c-flame-glow: rgba(255, 87, 34, 0.35);

  /* 辅助色 - 工业高可视黄 */
  --c-hi-vis: #ffd60a;
  --c-steel: #4a90e2;          /* 钢蓝 */
  --c-toxic: #00e676;          /* 警示绿 - "有货"状态 */

  /* 文本色 */
  --c-text: #f5f5f7;
  --c-text-2: #a8b0bd;
  --c-text-3: #6b7280;
  --c-text-dim: #4a5160;

  /* 字体系统 */
  --f-display: 'Archivo Black', 'Inter', system-ui, sans-serif;
  --f-sans: 'Inter', -apple-system, system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  /* 间距系统 - 8px基准 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* 圆角 - 工业感硬朗 */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-4: 12px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(0,0,0,0.4);
  --sh-2: 0 4px 12px rgba(0,0,0,0.5);
  --sh-3: 0 16px 48px rgba(0,0,0,0.6);
  --sh-glow: 0 0 32px var(--c-flame-glow);

  /* 动效曲线 - 工业硬朗 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-precise: cubic-bezier(0.7, 0, 0.3, 1);

  /* 容器 */
  --container: 1400px;
  --container-narrow: 1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

body {
  font-family: var(--f-sans);
  background: var(--c-ink);
  color: var(--c-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* 工业网格背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 87, 34, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 87, 34, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

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

input, select, textarea {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  outline: none;
}

/* 容器 */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5);
  position: relative;
  z-index: 1;
}

/* ============================================
   顶部导航栏 - 工业感
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--s-4) 0;
  background: rgba(10, 11, 14, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s var(--ease-out);
}

.nav.scrolled {
  padding: var(--s-3) 0;
  background: rgba(10, 11, 14, 0.92);
  border-bottom: 1px solid var(--c-line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--c-text);
  font-family: var(--f-display);
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--c-flame);
  display: grid;
  place-items: center;
  position: relative;
  transform: rotate(-3deg);
  border-radius: 4px;
  box-shadow: 0 4px 16px var(--c-flame-glow);
}

.brand-mark::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1.5px solid var(--c-ink);
  border-radius: 2px;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text small {
  font-size: 9px;
  color: var(--c-flame);
  font-weight: 700;
  letter-spacing: 0.2em;
  font-family: var(--f-mono);
  margin-bottom: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-2);
  border-radius: var(--r-2);
  transition: all 0.2s var(--ease-out);
  position: relative;
}

.nav-link:hover {
  color: var(--c-text);
  background: var(--c-ink-3);
}

.nav-link.active {
  color: var(--c-flame);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--c-flame);
  border-radius: 1px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--c-ink-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  color: var(--c-text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: all 0.2s var(--ease-out);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  transition: all 0.2s var(--ease-out);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ============================================
   按钮系统
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-2);
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-flame);
  color: var(--c-ink);
  box-shadow: 0 4px 16px var(--c-flame-glow);
}

.btn-primary:hover {
  background: var(--c-flame-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--c-flame-glow);
}

.btn-primary:active {
  background: var(--c-flame-3);
  transform: translateY(0);
}

.btn-ghost {
  background: var(--c-ink-3);
  color: var(--c-text);
  border-color: var(--c-line);
}

.btn-ghost:hover {
  background: var(--c-ink-4);
  border-color: var(--c-line-2);
}

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

.btn-outline:hover {
  background: var(--c-ink-3);
  border-color: var(--c-flame);
  color: var(--c-flame);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 18px 32px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-arrow {
  transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================
   标签 / 徽章
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-1);
  background: var(--c-ink-3);
  color: var(--c-text-2);
  border: 1px solid var(--c-line);
}

.tag-flame {
  background: var(--c-flame);
  color: var(--c-ink);
  border-color: transparent;
}

.tag-hi-vis {
  background: var(--c-hi-vis);
  color: var(--c-ink);
  border-color: transparent;
}

.tag-success {
  background: rgba(0, 230, 118, 0.12);
  color: var(--c-toxic);
  border-color: rgba(0, 230, 118, 0.3);
}

.tag-outline {
  background: transparent;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--c-toxic);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
}

/* ============================================
   表单控件
   ============================================ */
.field {
  position: relative;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--f-mono);
  color: var(--c-text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--c-ink-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  color: var(--c-text);
  font-size: 15px;
  transition: all 0.2s var(--ease-out);
}

.input:hover {
  border-color: var(--c-line-2);
}

.input:focus {
  border-color: var(--c-flame);
  background: var(--c-ink);
  box-shadow: 0 0 0 3px var(--c-flame-glow);
}

.input::placeholder {
  color: var(--c-text-dim);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a8b0bd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

select.input option {
  background: var(--c-ink-3);
  color: var(--c-text);
}

/* ============================================
   通用区块
   ============================================ */
.section {
  padding: var(--s-9) 0;
  position: relative;
}

.section-header {
  margin-bottom: var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--f-mono);
  color: var(--c-flame);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--c-flame);
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--c-text);
  font-weight: 900;
}

.section-title em {
  font-style: normal;
  color: var(--c-flame);
  position: relative;
}

.section-title em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 0.4em;
  background: var(--c-flame);
  opacity: 0.18;
  z-index: -1;
}

.section-subtitle {
  font-size: 17px;
  color: var(--c-text-2);
  line-height: 1.6;
  max-width: 640px;
}

.section-grid {
  display: grid;
  gap: var(--s-5);
}

/* ============================================
   卡片 - 工业感
   ============================================ */
.card {
  background: var(--c-ink-3);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-6);
  position: relative;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-flame);
  transition: width 0.5s var(--ease-out);
}

.card:hover {
  border-color: var(--c-line-2);
  transform: translateY(-2px);
  box-shadow: var(--sh-3);
}

.card:hover::before {
  width: 100%;
}

.card-link {
  display: block;
  cursor: pointer;
}

/* ============================================
   数据展示
   ============================================ */
.metric {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.metric-value {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.metric-value .unit {
  font-size: 0.4em;
  color: var(--c-flame);
  font-weight: 700;
  font-family: var(--f-mono);
  letter-spacing: 0.05em;
  margin-left: 4px;
  text-transform: uppercase;
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  font-family: var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================
   动画工具类
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================
   页脚
   ============================================ */
.footer {
  background: var(--c-ink-2);
  border-top: 1px solid var(--c-line);
  padding: var(--s-8) 0 var(--s-5);
  margin-top: var(--s-9);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--f-mono);
  color: var(--c-text-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.footer-col a {
  color: var(--c-text-2);
  font-size: 14px;
  transition: color 0.2s var(--ease-out);
}

.footer-col a:hover {
  color: var(--c-flame);
}

.footer-brand-text {
  color: var(--c-text-2);
  font-size: 14px;
  line-height: 1.7;
  margin: var(--s-4) 0;
  max-width: 360px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line);
  font-size: 12px;
  color: var(--c-text-3);
  font-family: var(--f-mono);
  letter-spacing: 0.05em;
}

.footer-bottom a {
  color: var(--c-text-3);
}

.footer-bottom a:hover {
  color: var(--c-flame);
}

/* ============================================
   响应式 - 移动端
   ============================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta .btn-ghost {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-6);
  }
}

@media (max-width: 640px) {
  :root {
    --s-9: 64px;
  }

  .container {
    padding: 0 var(--s-4);
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--s-3);
    text-align: center;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 14px;
  }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
