/* ============================================================
   智在科技官网 · 基础样式
   Aesthetic: Industrial / utilitarian
   ============================================================ */

/* ---------- 字体（全部本地化，无外部请求） ---------- */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/chakra-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/chakra-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plexsans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexsans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexmono-500.woff2') format('woff2');
}

/* ---------- 设计令牌 ---------- */
:root {
  --ink-900: #0F1317;
  --ink-850: #12171B;
  --ink-800: #171D22;
  --ink-700: #1E262D;
  --line: #2A333B;
  --line-soft: #1F272E;

  --text-hi: #EDEAE4;
  --text-mid: #8A949C;
  --text-low: #5E686F;

  --amber: #E0A32E;
  --amber-deep: #8A6420;
  --teal: #4FA08E;
  --teal-deep: #2C5F55;

  --font-display: 'Chakra Petch', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
  --font-body: 'IBM Plex Sans', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --shell: 1280px;
}

/* ---------- 基底 ---------- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--ink-900);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--ink-900); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-850); }
::-webkit-scrollbar-thumb { background: #2E3841; border: 2px solid var(--ink-850); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3C4854; }

a { color: inherit; text-decoration: none; }

/* ---------- 排版工具 ---------- */
.zd-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.zd-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.zd-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
}

/* ---------- 纹理与背景 ---------- */
.zd-grid-bg {
  background-image:
    linear-gradient(to right, rgba(42, 51, 59, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 51, 59, 0.42) 1px, transparent 1px);
  background-size: 72px 72px;
}
.zd-grid-fade {
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
}
.zd-hairline-top { border-top: 1px solid var(--line); }
.zd-hairline-bottom { border-bottom: 1px solid var(--line); }

/* 工业角标：四角短刻线 */
.zd-tick { position: relative; }
.zd-tick::before,
.zd-tick::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--amber);
  border-style: solid;
  opacity: 0.75;
}
.zd-tick::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.zd-tick::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ---------- 组件 ---------- */
.zd-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  transition: border-color 0.35s ease, background-color 0.35s ease, transform 0.35s ease;
}
.zd-card:hover {
  border-color: #3A4650;
  background: var(--ink-700);
  transform: translateY(-3px);
}

.zd-btn {
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: var(--ink-900);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
/* display 单独放 :where() 里，把优先级降为 0：
   否则本文件（在 tailwind.css 之后加载）的 .zd-btn{display:inline-flex}
   会压过同优先级的 Tailwind .hidden，导致导航里 `zd-btn hidden md:inline-flex`
   的「预约演示」按钮在移动端关不掉，挤占固定导航栏。 */
:where(.zd-btn) {
  display: inline-flex;
}
.zd-btn:hover { background: #F0B843; border-color: #F0B843; }

.zd-btn-ghost {
  background: transparent;
  color: var(--text-hi);
  border-color: var(--line);
}
.zd-btn-ghost:hover {
  background: transparent;
  border-color: var(--text-mid);
  color: var(--text-hi);
}

/* 超大区块编号，故意溢出容器边界 */
.zd-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px #303B44;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
}

/* 导航 */
.zd-nav-link {
  position: relative;
  font-size: 14px;
  color: var(--text-mid);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}
.zd-nav-link:hover { color: var(--text-hi); }
.zd-nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--amber);
  transition: width 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.zd-nav-link:hover::after { width: 100%; }
.zd-nav-link[aria-current='page'] { color: var(--text-hi); }
.zd-nav-link[aria-current='page']::after { width: 100%; background: var(--amber); }

/* 数据流动线（纯 CSS，双引擎示意） */
.zd-flow {
  position: relative;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
  overflow: hidden;
}
.zd-flow::after {
  content: '';
  position: absolute;
  top: -1px; left: -30%;
  width: 30%; height: 3px;
  background: linear-gradient(to right, transparent, var(--amber), transparent);
  animation: zd-sweep 3.4s linear infinite;
}
@keyframes zd-sweep {
  0%   { left: -30%; }
  100% { left: 100%; }
}

/* 脉冲指示点 */
.zd-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(79, 160, 142, 0.6);
  animation: zd-pulse 2.2s ease-out infinite;
}
@keyframes zd-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 160, 142, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(79, 160, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 160, 142, 0); }
}

/* ---------- 滚动进入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .zd-flow::after, .zd-pulse { animation: none; }
}

/* ---------- 移动端导航 ---------- */
.zd-mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.zd-mobile-panel.is-open { max-height: 420px; }
