/* 官网首页 · 深色长页版（jingyun-demo 设计落地）。
   背景：视频 + 备用光斑 + 遮罩 + 颗粒；产品章节按 PRODUCTS 循环渲染。
   仅首页引用；博客/更新日志仍用 /static/home/home.css 的浅色网格。 */

:root {
  --bg: #04060c;
  --ink: #eef2f8;
  --ink2: #93a0b5;
  --ink3: #5b6678;
  --hair: rgba(255, 255, 255, .09);
  --hair2: rgba(255, 255, 255, .18);
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --maxw: 76rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.6; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(59, 130, 246, .4); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 背景层：视频 + 备用光斑 + 遮罩 ---------- */
.bg-fixed { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-fixed video {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.15) brightness(1.0);
}
.bg-fixed video.is-off { display: none; }
.blob {
  position: fixed; border-radius: 50%; filter: blur(140px); opacity: .22;
  z-index: 0; will-change: transform; pointer-events: none;
}
.b1 {
  width: 52vw; height: 52vw; left: -14vw; top: -18vw;
  background: radial-gradient(circle at 35% 35%, #1d4ed8, transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.b2 {
  width: 44vw; height: 44vw; right: -12vw; top: 30vh;
  background: radial-gradient(circle at 60% 40%, #0e7490, transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.b3 {
  width: 40vw; height: 40vw; left: 22vw; bottom: -24vw;
  background: radial-gradient(circle at 50% 50%, #5b21b6, transparent 65%);
  animation: drift3 38s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(9vw, 7vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vw, -8vh) scale(.92); } }
@keyframes drift3 { to { transform: translate(6vw, -9vh) scale(1.1); } }
.bg-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 12, .30) 0%, rgba(4, 6, 12, .52) 42%, rgba(4, 6, 12, .80) 100%);
}
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 顶栏 ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(4, 6, 12, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--hair);
}
.header-in {
  max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 26px; height: 26px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, .45));
}
.brand b { font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.nav {
  display: flex; gap: 1.9rem; font-family: var(--mono); font-size: .7rem;
  color: var(--ink2); letter-spacing: .16em;
}
.nav a { color: inherit; text-decoration: none; transition: color .3s; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width .35s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

main { position: relative; z-index: 10; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto; padding: 7rem 2.5rem 5rem;
}
.kicker {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .3em; color: var(--cyan);
  display: inline-flex; align-items: center; gap: .75rem; text-transform: uppercase;
  opacity: 0; animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) forwards;
}
.kicker::before {
  content: ""; width: 2.4rem; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.hero h1 {
  margin-top: 1.5rem; font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700;
  line-height: 1.12; letter-spacing: -.02em;
  opacity: 0; animation: rise 1s .3s cubic-bezier(.2, .7, .2, 1) forwards;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--cyan) 5%, #60a5fa 40%, #a78bfa 70%, var(--cyan));
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero .sub {
  margin-top: 1.4rem; max-width: 33rem; color: var(--ink2);
  font-size: 1rem; line-height: 1.8; font-weight: 300;
  opacity: 0; animation: rise 1s .45s cubic-bezier(.2, .7, .2, 1) forwards;
}
.hero-meta {
  margin-top: 2.6rem; display: flex; gap: 2.6rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: .68rem; color: var(--ink3); letter-spacing: .15em;
  opacity: 0; animation: rise 1s .6s cubic-bezier(.2, .7, .2, 1) forwards;
}
.hero-meta b {
  display: block; color: var(--ink); font-size: 1.6rem; font-weight: 600;
  font-family: var(--sans); margin-bottom: .25rem;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.scroll-hint {
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .32em; color: var(--ink3);
  text-align: center; opacity: 0; animation: rise 1s 1s forwards;
}
.scroll-hint::after {
  content: ""; display: block; width: 1px; height: 40px; margin: .8rem auto 0;
  background: linear-gradient(180deg, var(--ink3), transparent);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 产品章节 ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto; padding: 9rem 2.5rem;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: center;
}
.section.flip { grid-template-columns: 1.1fr 1fr; }
.section.flip .txt { order: 2; }
.section[id] { scroll-margin-top: 3rem; }
.reveal {
  opacity: 0; transform: translateY(44px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
}
.reveal.on { opacity: 1; transform: none; }

.num {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .26em; margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .8rem; text-transform: uppercase;
}
.num::after { content: ""; flex: 0 0 2.4rem; height: 1px; }
.t-cyan { color: var(--cyan); }
.t-cyan::after { background: linear-gradient(90deg, var(--cyan), transparent); }
.t-blue { color: #60a5fa; }
.t-blue::after { background: linear-gradient(90deg, #60a5fa, transparent); }
.t-violet { color: #a78bfa; }
.t-violet::after { background: linear-gradient(90deg, #a78bfa, transparent); }
.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700;
  line-height: 1.25; letter-spacing: -.01em;
}
.section .lead {
  margin-top: 1.1rem; color: var(--ink2); font-size: .95rem;
  line-height: 1.85; font-weight: 300;
}
.feats { margin-top: 1.8rem; display: grid; gap: .85rem; }
.feats li {
  list-style: none; display: flex; gap: .7rem; align-items: flex-start;
  color: var(--ink2); font-size: .88rem; line-height: 1.6; font-weight: 300;
}
.feats li::before { content: ""; flex: 0 0 5px; height: 5px; border-radius: 50%; margin-top: .55em; }
.t-cyan-li li::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.t-blue-li li::before { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.t-violet-li li::before { background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.cta {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 2.2rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: .85rem 1.5rem; border-radius: 999px;
  border: 1px solid var(--hair2);
  transition: border-color .35s, box-shadow .35s, transform .35s;
}
.cta:hover { border-color: rgba(255, 255, 255, .4); transform: translateY(-2px); }
.cta.cyan:hover { box-shadow: 0 8px 32px -8px rgba(34, 211, 238, .5); }
.cta.blue:hover { box-shadow: 0 8px 32px -8px rgba(59, 130, 246, .5); }
.cta.violet:hover { box-shadow: 0 8px 32px -8px rgba(139, 92, 246, .5); }
.cta .arr { transition: transform .3s; }
.cta:hover .arr { transform: translateX(4px); }

/* 截图展示：悬浮浏览器框 */
.shot { position: relative; }
.shot-frame {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--hair2); background: #0a0e18;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.flip .shot-frame { transform: perspective(1400px) rotateY(6deg) rotateX(2deg); }
.shot:hover .shot-frame { transform: perspective(1400px) rotateY(0) rotateX(0); }
.shot-bar { display: flex; gap: 6px; padding: .65rem .9rem; border-bottom: 1px solid var(--hair); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #28303f; }
.shot-bar i:first-child { background: #ff5f57; }
.shot-bar i:nth-child(2) { background: #febc2e; }
.shot-bar i:nth-child(3) { background: #28c840; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot .glow {
  position: absolute; inset: auto -8% -14% -8%; height: 56%; z-index: -1;
  filter: blur(60px); opacity: .4; border-radius: 50%;
}
.g-cyan { background: var(--cyan); }
.g-blue { background: var(--blue); }
.g-violet { background: var(--violet); }
.shot-cap {
  margin-top: 1rem; font-family: var(--mono); font-size: .64rem;
  letter-spacing: .2em; color: var(--ink3); text-transform: uppercase; text-align: center;
}

/* 双图组合（仓鼠用） */
.duo { position: relative; }
.duo .shot-frame { position: relative; z-index: 1; }
.duo .phone {
  position: absolute; right: -7%; bottom: -9%; width: 34%; z-index: 2;
  border-radius: 14px; border: 1px solid var(--hair2); overflow: hidden;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .85);
  transform: perspective(900px) rotateY(8deg); transition: transform .8s;
}
.duo:hover .phone { transform: perspective(900px) rotateY(0) translateY(-4px); }
.duo .phone img { display: block; width: 100%; }

/* ---------- 收尾 ---------- */
.end {
  max-width: var(--maxw); margin: 0 auto; padding: 8rem 2.5rem 5rem; text-align: center;
}
.end h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; }
.end h2 .grad {
  background: linear-gradient(100deg, var(--cyan), #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.end p { margin-top: 1.1rem; color: var(--ink2); font-weight: 300; line-height: 1.8; }
.end-links {
  margin-top: 2.4rem; display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap;
}
footer {
  position: relative; z-index: 10; border-top: 1px solid var(--hair);
  padding: 2rem 2.5rem; text-align: center;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--ink3);
}
footer .foot-links {
  display: flex; justify-content: center; gap: 1.4rem; flex-wrap: wrap; margin-bottom: .9rem;
}
footer .foot-links a { transition: color .2s; }
footer .foot-links a:hover { color: var(--ink2); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .section, .section.flip { grid-template-columns: 1fr; gap: 2.5rem; padding: 5rem 1.4rem; }
  .section.flip .txt { order: 0; }
  .hero { padding: 6rem 1.4rem 4rem; }
  .duo .phone { width: 30%; right: -3%; bottom: -7%; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .header-in { padding: 1rem 1.4rem; }
  .hero-meta { gap: 1.8rem; }
  .end { padding: 5rem 1.4rem 4rem; }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .kicker, .hero h1, .hero .sub, .hero-meta, .scroll-hint { opacity: 1; }
}
