/* ==========================================================
   某某公司 BarcodePro - 设计系统
   主题：工业光码 Industrial Light Code
   风格：HUD / 蓝图 / 工业 B2B
   ========================================================== */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
  /* Brand Colors - 工业光码色板 */
  --color-bg-primary: #060912;
  --color-bg-secondary: #0B1220;
  --color-bg-tertiary: #111A2E;
  --color-surface: #162038;
  --color-surface-light: #1E2A48;
  --color-border: rgba(0, 217, 255, 0.12);
  --color-border-hover: rgba(0, 217, 255, 0.4);
  --color-border-bright: rgba(0, 217, 255, 0.8);

  /* Accent Colors */
  --color-accent-cyan: #00D9FF;        /* 扫描光束 - 主品牌色 */
  --color-accent-cyan-soft: rgba(0, 217, 255, 0.18);
  --color-accent-amber: #FFB020;      /* 工业警示 */
  --color-accent-amber-soft: rgba(255, 176, 32, 0.15);
  --color-accent-green: #00FF94;      /* 兼容通过 */
  --color-accent-red: #FF4757;        /* 警告 */
  --color-accent-magenta: #FF00E5;    /* 重点强调 */
  --color-accent-purple: #7C5CFF;     /* 次级强调 */

  /* Text */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B8C5D6;
  --color-text-muted: #6E7A8C;
  --color-text-faded: #4A5568;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #7C5CFF 100%);
  --gradient-amber: linear-gradient(135deg, #FFB020 0%, #FF4757 100%);
  --gradient-dark: linear-gradient(180deg, #060912 0%, #0B1220 100%);
  --gradient-glow: radial-gradient(circle at 50% 50%, rgba(0,217,255,0.15) 0%, transparent 60%);
  --gradient-mesh: linear-gradient(135deg, #060912 0%, #0B1220 50%, #111A2E 100%);

  /* Typography */
  --font-display: 'Space Grotesk', 'PingFang SC', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Spacing */
  --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;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadow & Glow */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0, 217, 255, 0.3);
  --shadow-glow-amber: 0 0 40px rgba(255, 176, 32, 0.3);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ---------- Global Background Grid Pattern ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100vh;
  background: radial-gradient(ellipse at top, rgba(0,217,255,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
main, header, footer, section { position: relative; z-index: var(--z-base); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.section {
  padding: var(--space-24) 0;
  position: relative;
}
.section-sm { padding: var(--space-16) 0; }

/* ---------- Typography Helpers ---------- */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.text-mono { font-family: var(--font-mono); }
.text-display { font-family: var(--font-display); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

/* ---------- Section Heading ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent-cyan-soft);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-cyan);
  margin-bottom: var(--space-6);
}
.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-accent-cyan);
  animation: pulse 2s infinite;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid transparent;
  user-select: none;
}
.btn-primary {
  background: var(--color-accent-cyan);
  color: var(--color-bg-primary);
  box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 217, 255, 0.4), 0 0 40px rgba(0, 217, 255, 0.3);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-hover);
}
.btn-secondary:hover {
  background: var(--color-accent-cyan-soft);
  border-color: var(--color-border-bright);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-surface-light);
  border-color: var(--color-border-hover);
}
.btn-amber {
  background: var(--color-accent-amber);
  color: var(--color-bg-primary);
}
.btn-amber:hover {
  background: #FFC947;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 176, 32, 0.4);
}
.btn-lg { padding: var(--space-4) var(--space-8); font-size: 16px; min-height: 48px; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: 13px; min-height: 36px; }
.btn-icon { padding: var(--space-3); }
.btn { min-height: 44px; }
.btn:active { transform: scale(0.97); }

/* ---------- Animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
@keyframes scan {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 217, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 217, 255, 0.6); }
}
@keyframes barcodeLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.3s; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-hover), transparent);
  margin: var(--space-12) 0;
}
.glow-text { text-shadow: 0 0 20px rgba(0, 217, 255, 0.5); }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Selection */
::selection {
  background: var(--color-accent-cyan);
  color: var(--color-bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--color-surface);
  border-radius: 5px;
  border: 2px solid var(--color-bg-primary);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-cyan); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
