/* =========================================================================
 * style.css  —  Gene Analysis Agent · 全局设计系统 + 首页
 * 风格：精致未来生物科技 · 冷白底 + 蓝青发光 · Glassmorphism
 * ========================================================================= */

:root {
  /* 色板 */
  --bg-0:        #f6f9ff;
  --bg-1:        #eef4ff;
  --ink:         #0b1b34;
  --ink-2:       #3b4a63;
  --muted:       #6b7a93;
  --line:        rgba(37, 99, 235, 0.12);

  --blue:        #2563eb;
  --blue-d:      #1d4ed8;
  --cyan:        #06b6d4;
  --cyan-l:      #22d3ee;
  --sky:         #38bdf8;
  --deep:        #0a1530;

  --glass:       rgba(255, 255, 255, 0.62);
  --glass-2:     rgba(255, 255, 255, 0.45);
  --glow:        0 0 0 1px rgba(34,211,238,.35), 0 12px 40px rgba(37,99,235,.18);
  --shadow:      0 10px 30px rgba(15, 35, 80, 0.08);
  --shadow-lg:   0 24px 60px rgba(15, 35, 80, 0.14);

  --r:           18px;
  --r-sm:        12px;

  --font-display:"Sora", "Noto Sans SC", system-ui, sans-serif;
  --font-body:   "Noto Sans SC", "Sora", system-ui, sans-serif;
  --font-mono:   "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 70% -10%, #dbeafe 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 10%, #cffafe 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 粒子/DNA 背景画布 */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* 页面淡入 + blur 进入 */
.page-fade {
  animation: pageIn .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes pageIn {
  from { opacity: 0; filter: blur(14px); transform: translateY(14px) scale(.99); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
/* 离场（跳转时由 JS 添加） */
body.leaving { animation: pageOut .45s ease forwards; }
@keyframes pageOut {
  to { opacity: 0; filter: blur(16px); transform: scale(1.01); }
}

a { color: inherit; text-decoration: none; }
.container { width: min(1200px, 92vw); margin: 0 auto; position: relative; z-index: 1; }

/* ---------------- 导航栏 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(160%);
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 2px 8px rgba(34,211,238,.4)); }
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand .name small { display:block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 1.5px; font-family: var(--font-mono); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  transition: .25s cubic-bezier(.2,.7,.2,1); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: rgba(34,211,238,.45); }
.btn-primary {
  border: none; color: #fff;
  background: linear-gradient(120deg, var(--blue), var(--cyan));
  box-shadow: 0 8px 24px rgba(37,99,235,.32);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(34,211,238,.5); }

/* ---------------- Hero ---------------- */
.hero { padding: 86px 0 60px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 1.5px;
  color: var(--blue-d); background: rgba(37,99,235,.08);
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px;
  text-transform: uppercase;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan-l); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.hero h1 {
  font-family: var(--font-display); font-weight: 800; line-height: 1.08;
  font-size: clamp(34px, 5vw, 58px); margin: 22px 0 18px; letter-spacing: -1px;
}
.hero h1 .grad {
  background: linear-gradient(110deg, var(--blue), var(--cyan-l) 70%, var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 540px; margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta .btn { padding: 13px 26px; font-size: 15px; }

.hero-stats { display: flex; gap: 30px; margin-top: 38px; }
.hero-stats .stat .num { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--blue-d); }
.hero-stats .stat .lab { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* DNA 可视化舞台 */
.dna-stage {
  position: relative; height: 440px;
  display: grid; place-items: center;
}
.dna-stage .ring {
  position: absolute; border-radius: 50%; border: 1px dashed rgba(37,99,235,.25);
  animation: spin 30s linear infinite;
}
.dna-stage .ring.r1 { width: 380px; height: 380px; }
.dna-stage .ring.r2 { width: 300px; height: 300px; animation-direction: reverse; animation-duration: 22s; border-color: rgba(34,211,238,.3); }
@keyframes spin { to { transform: rotate(360deg); } }
.dna-stage canvas { position: relative; z-index: 2; }
.dna-halo {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.28), transparent 65%);
  filter: blur(8px); z-index: 1;
}

/* 浮动代码 chips */
.float-chip {
  position: absolute; font-family: var(--font-mono); font-size: 11px;
  color: var(--blue-d); background: var(--glass); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 10px; box-shadow: var(--shadow); z-index: 3;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ---------------- 通用区块标题 ---------------- */
.section { padding: 64px 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.5px;
  font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px;
}
.section-head p { color: var(--ink-2); font-size: 16px; line-height: 1.7; }

/* ---------------- 业务矩阵卡片 ---------------- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; padding: 26px 22px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  transition: .3s cubic-bezier(.2,.7,.2,1); overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r);
  padding: 1px; background: linear-gradient(130deg, transparent, rgba(34,211,238,.6), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(34,211,238,.18));
  color: var(--blue-d); margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.card .tag { display:inline-block; margin-top:14px; font-family: var(--font-mono); font-size:11px; color: var(--cyan); background: rgba(6,182,212,.08); padding: 4px 9px; border-radius: 7px; }

/* ---------------- AI Workflow 流程 ---------------- */
.flow-wrap { position: relative; }
.flow {
  display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 10px 4px 24px;
  scrollbar-width: thin;
}
.flow-node {
  flex: 0 0 200px; position: relative; padding: 18px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); margin-right: 46px;
}
.flow-node:last-child { margin-right: 0; }
.flow-node::after {
  content: ""; position: absolute; top: 50%; right: -46px; width: 46px; height: 2px;
  background: linear-gradient(90deg, var(--cyan-l), rgba(34,211,238,.1));
  transform: translateY(-50%);
}
.flow-node:last-child::after { display: none; }
.flow-node .pulse-dot {
  position: absolute; top: 50%; right: -28px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); transform: translateY(-50%);
  animation: flowPulse 2.2s linear infinite;
}
@keyframes flowPulse { 0%{box-shadow:0 0 0 0 rgba(34,211,238,.5)} 70%{box-shadow:0 0 0 9px rgba(34,211,238,0)} 100%{box-shadow:0 0 0 0 rgba(34,211,238,0)} }
.flow-node .step { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.flow-node h4 { font-family: var(--font-display); font-size: 15px; margin: 6px 0 12px; }
.flow-node .meta { display: grid; gap: 6px; font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-2); }
.flow-node .meta span b { color: var(--blue-d); font-weight: 600; }
.status-pill { display:inline-flex; align-items:center; gap:6px; font-size:11px; padding:3px 9px; border-radius:999px; font-family: var(--font-mono); }
.status-pill .led { width:6px; height:6px; border-radius:50%; }
.s-done { background: rgba(16,185,129,.12); color:#0f9d72; }
.s-done .led { background:#10b981; }
.s-running { background: rgba(37,99,235,.12); color: var(--blue-d); }
.s-running .led { background: var(--blue); animation: pulse 1s infinite; }
.s-queued { background: rgba(107,122,147,.12); color: var(--muted); }
.s-queued .led { background: var(--muted); }

/* ---------------- Footer ---------------- */
.footer {
  margin-top: 60px; border-top: 1px solid var(--line);
  background: rgba(255,255,255,.5); backdrop-filter: blur(12px);
}
.footer-inner { display:flex; justify-content: space-between; align-items:center; padding: 30px 0; flex-wrap: wrap; gap:16px; }
.footer .muted { color: var(--muted); font-size: 13px; }
.footer .brand .name { font-size: 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dna-stage { height: 360px; order: -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  .nav .name small { display: none; }
}
