/* ============================================================
   智策云流 · 数字员工官网 — 基础样式
   深夜机房美学：墨蓝底 + LED绿 + 琥珀（办公室时代暖色）
   ============================================================ */

:root {
  --bg: #06090F;
  --bg-2: #090E16;
  --panel: #0D1420;
  --ink: #04060B;
  --line: rgba(148, 178, 214, .12);
  --paper: #E9EEF5;
  --dim: #8A97A8;
  --faint: #55606F;
  --led: #00E5A0;
  --led-soft: rgba(0, 229, 160, .12);
  --amber: #FFB35C;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", Consolas, "JetBrains Mono", "SF Mono", Menlo, ui-monospace, monospace;
  color-scheme: dark;
}

/* ---------- 重置与基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 96px; scrollbar-color: #1B2635 #06090F; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; }
::selection { background: var(--led); color: #03130C; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1B2635; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #243447; }

/* ---------- 胶片颗粒 ---------- */
.grain {
  position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 布局工具 ---------- */
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  padding: 14px 28px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; letter-spacing: .04em;
  transition: transform .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn-primary { background: var(--led); color: #03150D; }
.btn-primary:hover { box-shadow: 0 0 0 1px var(--led), 0 8px 32px rgba(0, 229, 160, .35); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(233, 238, 245, .25); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--led); color: var(--led); transform: translateY(-2px); }
.btn-sm { padding: 9px 20px; font-size: 13.5px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-arrow { font-family: var(--mono); transition: transform .25s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

/* ---------- 滚动显现 ---------- */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 通用动效 ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- 系统状态条 ---------- */
.statusbar {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border-bottom: 1px solid var(--line); background: var(--ink); letter-spacing: .12em;
}
.statusbar-inner {
  max-width: 1280px; margin: auto; display: flex; gap: 28px;
  padding: 9px 24px; align-items: center;
}
.sb-item { white-space: nowrap; }
.sb-live { color: var(--led); display: flex; gap: 7px; align-items: center; }
.sb-dot { width: 6px; height: 6px; background: var(--led); border-radius: 50%; animation: pulse 1.6s infinite; }
.sb-right { margin-left: auto; }
#sbClock { color: var(--dim); }

/* ---------- 主导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 9, 15, .6); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(6, 9, 15, .92); border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1280px; margin: auto; display: flex; align-items: center;
  justify-content: space-between; height: 72px; padding: 0 24px; gap: 24px;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-weight: 900; font-size: 18px; color: var(--paper); letter-spacing: .12em; }
.brand-text small { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: .32em; margin-top: 3px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14.5px; color: var(--dim); text-decoration: none;
  letter-spacing: .06em; padding: 6px 0; position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--led); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 14px; align-items: center; }
.nav-burger {
  display: none; width: 42px; height: 42px; background: none;
  border: 1px solid var(--line); cursor: pointer; position: relative; border-radius: 4px;
}
.nav-burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--paper); transition: .3s; }
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 20px; }
.nav-burger span:nth-child(3) { top: 26px; }
body.nav-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(4, 6, 11, .97); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
}
body.nav-open .nav-mobile { display: block; }
.nav-mobile a {
  display: block; padding: 14px 0; color: var(--dim); text-decoration: none;
  border-bottom: 1px dashed rgba(138, 151, 168, .15); font-size: 15px; letter-spacing: .1em;
}
.nav-mobile .nav-mobile-cta { color: var(--led); border-bottom: none; font-family: var(--mono); font-size: 13px; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: max(640px, 86vh);
  display: flex; align-items: center;
  padding: clamp(80px, 12vh, 140px) 0 100px;
  background:
    radial-gradient(1100px 560px at 74% 18%, rgba(0, 229, 160, .06), transparent 62%),
    radial-gradient(900px 480px at 12% 88%, rgba(76, 194, 255, .05), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(148, 178, 214, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 214, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 78%);
}
.hero-canvas-wrap {
  position: absolute; top: 0; right: 0; bottom: 0; width: 58%; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32%);
  mask-image: linear-gradient(90deg, transparent 0, #000 32%);
}
.hero-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.rack-label {
  position: absolute; right: 28px; font-family: var(--mono); font-size: 11px; color: var(--dim);
  border: 1px solid var(--line); padding: 6px 10px; background: rgba(6, 9, 15, .72);
  display: flex; align-items: center; gap: 8px; letter-spacing: .08em; white-space: nowrap;
}
.rack-label i { width: 6px; height: 6px; background: var(--led); border-radius: 1px; animation: pulse 2s infinite; flex: none; }
.rack-label-1 { top: 100px; }
.rack-label-2 { top: 138px; }
.hero-inner { position: relative; z-index: 1; }
.hero-kicker {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .3em;
}
.hero-kicker i { width: 8px; height: 8px; background: var(--led); flex: none; }
.hero-kicker-en { color: var(--faint); letter-spacing: .22em; }
.hero-title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(36px, 5.6vw, 74px); line-height: 1.34; letter-spacing: .01em;
  margin: 26px 0 18px; color: var(--paper);
  opacity: 0;
}
.hero-title.is-typing { opacity: 1; }
.hero-title em { font-style: normal; color: var(--led); text-shadow: 0 0 28px rgba(0, 229, 160, .4); }
.hero-title .ht-human { color: var(--amber); text-shadow: none; }
/* 打字机：字符逐字出现 + 光标 */
.hero-title .ht-char { display: inline-block; opacity: 0; }
.hero-title .ht-char.on { opacity: 1; }
.hero-title .ht-caret {
  display: inline-block; width: 3px; height: .92em;
  margin-left: 3px; vertical-align: -.08em;
  background: var(--led); box-shadow: 0 0 8px rgba(0, 229, 160, .55);
  opacity: 0;
}
.hero-title .ht-caret.on { opacity: 1; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.hero-slogan {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--dim); letter-spacing: .22em;
  margin: 0 0 36px; white-space: nowrap;
}
.hero-slogan::before { content: ""; width: 32px; height: 1px; background: var(--led); flex: none; }
@media (max-width: 520px) {
  .hero-slogan { letter-spacing: .12em; }
  .hero-slogan::before { display: none; }
}
.hero-sub { font-size: clamp(15px, 1.6vw, 18px); color: #AEB9C7; line-height: 2; margin-bottom: 40px; }
.hero-sub strong { color: var(--paper); font-weight: 700; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0; }
.hero-meta li {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  letter-spacing: .08em; padding-right: 18px; white-space: nowrap;
}
.hero-meta li + li { border-left: 1px solid var(--line); padding-left: 18px; }
.hero-side {
  position: absolute; right: 22px; top: 46%; transform: translateY(-50%);
  writing-mode: vertical-rl; letter-spacing: .5em; font-size: 13px;
  color: var(--faint); font-family: var(--serif); z-index: 1;
}
.hero-coord {
  position: absolute; left: 26px; bottom: 26px; font-family: var(--mono);
  font-size: 11px; color: var(--faint); letter-spacing: .2em; z-index: 1;
}

/* ---------- 入场光照动效：圆形光扫过并聚焦标题 ---------- */
.hero-light {
  position: absolute; z-index: 2; pointer-events: none;
  top: 16%; left: -28%;
  width: clamp(300px, 36vw, 480px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(234, 255, 250, .55) 0%,
    rgba(0, 229, 160, .32) 26%,
    rgba(0, 229, 160, .15) 46%,
    rgba(0, 229, 160, .05) 60%,
    transparent 71%);
  filter: blur(6px);
  opacity: 0;
  animation: hero-light 1.4s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes hero-light {
  0%   { transform: translateX(0) scale(.85); opacity: 0; animation-timing-function: ease-out; }
  6%   { opacity: 1; animation-timing-function: linear; }
  72%  { transform: translateX(50vw) scale(.85); animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  86%  { transform: translateX(50vw) scale(1.15); opacity: 1; animation-timing-function: ease-in; }
  100% { transform: translateX(50vw) scale(1.45); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-light { animation: none; opacity: 0; }
}

/* ---------- 调度日志跑马灯 ---------- */
.ticker {
  display: flex; align-items: stretch; position: relative; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.ticker-label {
  flex: none; display: flex; gap: 8px; align-items: center; padding: 0 18px;
  font-family: var(--mono); font-size: 12px; color: var(--led);
  border-right: 1px solid var(--line); background: var(--bg-2); z-index: 2; white-space: nowrap;
}
.ticker-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--led); animation: pulse 1.6s infinite; flex: none; }
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-move { display: flex; will-change: transform; animation: ticker 42s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-half { display: inline-flex; gap: 48px; padding-right: 48px; align-items: center; }
.tk { font-family: var(--mono); font-size: 12.5px; color: var(--dim); white-space: nowrap; letter-spacing: .04em; }
.tk b { color: var(--led); font-weight: 400; margin-right: 10px; }
