/* ============================================================
   Nova 全局样式 · reset / 顶栏 / 卡片 / 冲击波 / 命令面板 / Toast
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";                     /* 数字 tabular-nums */
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; }
::selection { background: rgba(69, 224, 200, .3); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-btn); }
.skip-link {
  position: absolute; left: -9999px; top: var(--s2); z-index: 200;
  background: var(--bg-elevated); color: var(--text-1);
  padding: var(--s2) var(--s4); border-radius: var(--r-btn);
}
.skip-link:focus { left: var(--s2); }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--s6); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: var(--s5);
  height: 64px; max-width: var(--page); margin: 0 auto; padding: 0 var(--s6);
}
.logo { display: flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.logo svg { color: var(--brand); }
.nav { display: flex; gap: var(--s1); margin-left: var(--s5); }
.nav a {
  padding: var(--s2) var(--s3); border-radius: var(--r-btn);
  color: var(--text-2); font-size: 14px; transition: color var(--t-fast) var(--e-out), background var(--t-fast) var(--e-out);
}
.nav a:hover { color: var(--text-1); background: rgba(233, 237, 247, .06); }
.nav a[aria-current="page"] { color: var(--brand); }
.topbar__spacer { flex: 1; }

/* 命令面板触发按钮 */
.cmdk-btn {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-btn);
  color: var(--text-3); font-size: 13px;
  transition: border-color var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.cmdk-btn:hover { border-color: rgba(69, 224, 200, .4); color: var(--text-2); }
.cmdk-btn kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg-elevated); color: var(--text-3);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: var(--s3) var(--s5); border-radius: var(--r-btn);
  font-size: 15px; font-weight: 600;
  transition: transform var(--t-fast) var(--e-out), box-shadow var(--t-mid) var(--e-out), opacity var(--t-fast) var(--e-out);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--cta); color: #07121A; }
.btn--primary:hover { box-shadow: var(--glow-brand); }
.btn--ghost { border: 1px solid var(--line); color: var(--text-2); background: transparent; }
.btn--ghost:hover { color: var(--text-1); border-color: rgba(233, 237, 247, .25); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Hero · 超新星冲击波 ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {                                  /* 深空渐变网格背景 */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 30%, rgba(139, 124, 255, .12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(69, 224, 200, .08), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative; display: grid; grid-template-columns: 1.2fr .8fr;
  align-items: center; gap: var(--s7);
  padding: var(--s8) var(--s6) var(--s7); max-width: var(--page); margin: 0 auto;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--brand); margin-bottom: var(--s4);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.12; font-weight: 800;
  letter-spacing: -.02em; margin-bottom: var(--s5);
}
.hero h1 .grad {
  background: var(--cta); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__sub { color: var(--text-2); font-size: 17px; max-width: 52ch; margin-bottom: var(--s6); }
.hero__cta { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* 冲击波本体 */
.nova-core { position: relative; width: min(320px, 60vw); aspect-ratio: 1; margin-inline: auto; }
.nova-core__star {                                /* 中心光核 */
  position: absolute; inset: 34%; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFF 0%, var(--brand) 38%, var(--brand-2) 78%, transparent 100%);
  box-shadow: 0 0 48px rgba(69, 224, 200, .45), 0 0 120px rgba(139, 124, 255, .25);
  animation: core-pulse 6s var(--e-out) infinite;
}
.nova-core__wave {                                /* 三圈冲击波，错相 2s */
  position: absolute; inset: 12%; border-radius: 50%;
  border: 1px solid rgba(69, 224, 200, .5);
  animation: shockwave 6s var(--e-out) infinite;
}
.nova-core__wave:nth-of-type(2) { animation-delay: 2s; }
.nova-core__wave:nth-of-type(3) { animation-delay: 4s; }
.nova-core__dust {                                /* 星尘 */
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-1); opacity: .7;
  animation: twinkle 3.4s ease-in-out infinite;
}
@keyframes shockwave  { 0% { transform: scale(.22); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes core-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes twinkle    { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }

/* ---------- 四工作台宫格 ---------- */
.stations-sec { padding: var(--s7) var(--s6) var(--s8); max-width: var(--page); margin: 0 auto; }
.sec-title {
  display: flex; align-items: baseline; gap: var(--s3);
  font-size: 13px; font-family: var(--font-mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s5);
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.stations { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
.station {
  position: relative; display: block;
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--s6); box-shadow: var(--shadow-card);
  transition: border-color var(--t-mid) var(--e-out), transform var(--t-mid) var(--e-out), box-shadow var(--t-mid) var(--e-out);
  animation: rise var(--t-slow) var(--e-out) backwards;
}
.station:nth-child(2) { animation-delay: 60ms; }
.station:nth-child(3) { animation-delay: 120ms; }
.station:nth-child(4) { animation-delay: 180ms; }
.station::before {                                /* 顶部内高光 */
  content: ""; position: absolute; inset: 0 var(--r-card); top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 237, 247, .18), transparent);
}
.station:hover { transform: translateY(-4px); }
.station[data-station="docs"]:hover { border-color: rgba(91, 157, 255, .55); box-shadow: 0 0 28px rgba(91, 157, 255, .18); }
.station[data-station="data"]:hover { border-color: rgba(183, 140, 255, .55); box-shadow: 0 0 28px rgba(183, 140, 255, .18); }
.station[data-station="flow"]:hover { border-color: rgba(61, 220, 151, .55); box-shadow: 0 0 28px rgba(61, 220, 151, .18); }
.station[data-station="mind"]:hover { border-color: rgba(255, 138, 92, .55); box-shadow: 0 0 28px rgba(255, 138, 92, .18); }

.station__head { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s3); }
.station__no {
  font-family: var(--font-mono); font-size: 14px; color: var(--text-3); letter-spacing: .1em;
}
.station__name { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.station__cn { font-size: 14px; color: var(--text-3); }
.station[data-station="docs"] .station__name { color: var(--accent-docs); }
.station[data-station="data"] .station__name { color: var(--accent-data); }
.station[data-station="flow"] .station__name { color: var(--accent-flow); }
.station[data-station="mind"] .station__name { color: var(--accent-mind); }
.station__desc { color: var(--text-2); font-size: 14px; margin-bottom: var(--s4); }
.station__tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag {
  font-size: 12px; color: var(--text-3); padding: 2px var(--s2);
  border: 1px solid var(--line); border-radius: 6px; background: rgba(233, 237, 247, .03);
}
.station__arrow {
  position: absolute; right: var(--s5); bottom: var(--s5); color: var(--text-3);
  transition: transform var(--t-mid) var(--e-out), color var(--t-mid) var(--e-out);
}
.station:hover .station__arrow { transform: translateX(6px); color: var(--text-1); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 隐私徽章区 ---------- */
.trust {
  display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6);
  padding: var(--s4) var(--s5); border-radius: var(--r-inner);
  border: 1px dashed var(--line); background: rgba(233, 237, 247, .02);
}
.trust__item { display: flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--text-2); }
.trust__item svg { color: var(--ok); flex: none; }

/* ---------- Nova Command 命令面板 ---------- */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(5, 8, 16, .6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center; padding: 14vh var(--s4) var(--s4);
}
.cmdk-overlay[data-open="true"] { display: flex; animation: fade var(--t-fast) var(--e-out); }
.cmdk {
  width: min(var(--cmdk), 100%);
  background: var(--bg-elevated); border: 1px solid rgba(233, 237, 247, .12);
  border-radius: var(--r-modal); box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  overflow: hidden; animation: pop var(--t-mid) var(--e-out);
}
.cmdk__search { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.cmdk__search svg { color: var(--text-3); flex: none; }
.cmdk__search input {
  flex: 1; background: none; border: 0; outline: none; color: var(--text-1);
  font: inherit; font-size: 16px;
}
.cmdk__search input::placeholder { color: var(--text-3); }
.cmdk__list { max-height: 46vh; overflow-y: auto; padding: var(--s2); }
.cmdk__group {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-3); padding: var(--s3) var(--s3) var(--s1);
}
.cmdk__item {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; text-align: left; padding: var(--s3); border-radius: var(--r-btn);
  color: var(--text-2); transition: background var(--t-fast) var(--e-out);
}
.cmdk__item[data-selected="true"] { background: rgba(69, 224, 200, .1); color: var(--text-1); }
.cmdk__item-title { flex: 1; font-size: 14px; }
.cmdk__item-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.cmdk__empty { padding: var(--s6); text-align: center; color: var(--text-3); font-size: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------- Toast ---------- */
.toast-zone { position: fixed; bottom: var(--s5); right: var(--s5); z-index: 160; display: grid; gap: var(--s2); }
.toast {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--r-inner);
  padding: var(--s3) var(--s4); box-shadow: var(--shadow-card); font-size: 14px;
  animation: toast-in var(--t-mid) var(--e-out);
}
.toast[data-type="ok"]    { border-left: 3px solid var(--ok); }
.toast[data-type="warn"]  { border-left: 3px solid var(--warn); }
.toast[data-type="error"] { border-left: 3px solid var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all var(--t-mid) var(--e-out); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: var(--s6); text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: var(--s7); }
  .nova-core { width: min(220px, 50vw); order: -1; }
}
@media (max-width: 720px) {
  .nav { display: none; }                          /* 移动端导航收进 ⌘K */
  .stations { grid-template-columns: 1fr; }
  .topbar__inner, .hero__inner, .stations-sec { padding-left: var(--s4); padding-right: var(--s4); }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .nova-core__wave { opacity: .25; }
}
