/* ============================================================
   MYDESKBOT — brand home
   深色、单页、零依赖。所有视觉都靠 CSS 变量与渐变，
   不引外部字体/图片，保证首屏快且离线可渲染。
   ============================================================ */

:root {
  --bg: #06080f;
  --surface: #0a0e18;
  --surface-2: #0d1220;
  --text: #eef1f8;
  --muted: #949db4;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #6366f1;
  --accent-2: #818cf8;
  --radius: 20px;
  --wrap: 1180px;
  --font:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(var(--wrap), calc(100% - 3rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ── 背景氛围：顶部光晕 + 细网格（静态，不跟随滚动，避免重绘） ── */
.glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(99, 102, 241, 0.28), transparent 68%),
    radial-gradient(620px 320px at 82% 4%, rgba(16, 185, 129, 0.12), transparent 70%);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(1100px 620px at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(1100px 620px at 50% 0%, #000 20%, transparent 78%);
}

/* ── 导航 ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(6, 8, 15, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--text);
}

.brand img {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text) !important;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.nav-cta:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.1);
}

/* ── Hero ── */
.hero {
  padding: clamp(72px, 12vw, 148px) 0 clamp(56px, 8vw, 96px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 6px 14px;
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  margin-bottom: 26px;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.35rem, 5.6vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -0.033em;
  font-weight: 700;
  max-width: 20ch;
  margin-inline: auto;
}

.grad {
  display: block;
  background: linear-gradient(180deg, #ffffff 8%, #a4adc9 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad::after {
  content: '';
}

.lede {
  margin: 0 auto 34px;
  max-width: 60ch;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  color: var(--muted);
  line-height: 1.72;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #6f72ff, #5457e8);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 34px -12px rgba(99, 102, 241, 0.75);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 20px 44px -14px rgba(99, 102, 241, 0.9);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.hero-note {
  font-size: 0.84rem;
  color: #6f7893;
  letter-spacing: 0.01em;
}

/* ── 通用 section ── */
.section {
  padding: clamp(64px, 9vw, 116px) 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018) 14%, transparent);
}

.section-head {
  max-width: 64ch;
  margin-bottom: clamp(36px, 5vw, 58px);
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3.1vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
  max-width: 62ch;
}

/* ── 产品卡 ── */
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.product {
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(560px 220px at 12% -10%, var(--pc-soft), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.product::before {
  /* 顶部一条产品色高光，强化两个产品的识别差异 */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pc), transparent);
  opacity: 0.85;
}

.product:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--pc) 46%, transparent);
  box-shadow: 0 26px 64px -28px var(--pc);
}

.product-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 12px 26px -12px var(--pc);
}

.product-kind {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc);
}

.badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}

.product h3 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  letter-spacing: -0.018em;
  font-weight: 700;
}

.product-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.product-points {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.product-points li {
  position: relative;
  padding-left: 26px;
  font-size: 0.93rem;
  color: #c2c9db;
  line-height: 1.6;
}

.product-points li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.52em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 0 4px var(--pc-soft);
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pc);
  padding-top: 4px;
}

.product-link svg {
  width: 17px;
  height: 17px;
  transition: transform 0.22s ease;
}

.product-link:hover svg {
  transform: translateX(4px);
}

/* ── 原则 ── */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.principle {
  padding: 34px 32px;
  background: var(--surface);
  transition: background 0.25s ease;
}

.principle:hover {
  background: var(--surface-2);
}

.p-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.principle h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

/* ── 收尾 CTA ── */
.closing {
  padding-bottom: clamp(72px, 10vw, 130px);
}

.closing-inner {
  text-align: center;
  padding: clamp(44px, 6vw, 72px) 32px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 260px at 50% -20%, rgba(99, 102, 241, 0.22), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.closing h2 {
  margin-bottom: 12px;
}

.closing p {
  margin: 0 0 28px;
  color: var(--muted);
}

.closing-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── 页脚 ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 34px;
  background: rgba(255, 255, 255, 0.012);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 32ch;
  line-height: 1.68;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d879f;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: #6b7489;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
}

.footer-bottom-links a:hover {
  color: var(--text);
}

/* ── 入场动效 ──
   只在 .js 存在时启用隐藏态（见 index.html head 里的 classList.add('js')）。
   这样 JS 不可用时内容照常可见，不会整页空白。 */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.62s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.62s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ── 响应式 ── */
@media (max-width: 980px) {
  .products,
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 2rem);
  }

  .nav-links {
    gap: 16px;
    font-size: 0.86rem;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .product {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .product:hover {
    transform: none;
  }
}
