/* ============ Pixfanta 官网 ============ */
:root {
  --bg: #05070c;
  --bg-2: #0a0e17;
  --bg-card: #0c111c;
  --cyan: #00E5FB;
  --cyan-dim: rgba(0, 229, 251, 0.14);
  --white: #f2f6f9;
  --dim: #8b98a9;
  --line: rgba(0, 229, 251, 0.14);
  --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-en: 'Chakra Petch', 'Noto Sans SC', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }

::selection { background: var(--cyan); color: #04121a; }

/* ============ 开屏像素转场（JS 生成） ============ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  pointer-events: none;
}
.boot i {
  background: var(--bg-2);
  transform: scale(1);
  transition: transform 0.35s steps(4), opacity 0.35s steps(4);
}
.boot i.flash { background: var(--cyan); }
.boot.out i { transform: scale(0); opacity: 0; }

/* ============ 滚动进度条 ============ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 251, 0.8);
  z-index: 200;
}

/* ============ 光标跟随像素（仅 PC） ============ */
.cursor-px {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--cyan);
  z-index: 300;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
}
.cursor-px-lag {
  width: 6px; height: 6px;
  background: rgba(242, 246, 249, 0.75);
}
@media (pointer: coarse) {
  .cursor-px { display: none; }
}

/* ============ 导航 ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 15px;
  color: var(--dim);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -6px;
  width: 6px; height: 6px;
  background: var(--cyan);
  transform: translateX(-50%) scale(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: translateX(-50%) scale(1); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 110px 0 90px;
}
#pixel-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* 底部透视网格 */
.hero-grid {
  position: absolute;
  left: -20%; right: -20%; bottom: -12%;
  height: 46%;
  background:
    linear-gradient(rgba(0, 229, 251, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 251, 0.10) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(420px) rotateX(58deg);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%, transparent 92%);
  mask-image: linear-gradient(to bottom, transparent, #000 32%, transparent 92%);
  animation: grid-flow 7s linear infinite;
  pointer-events: none;
}
@keyframes grid-flow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 44px, 0 0; }
}
.hero-glow {
  position: absolute;
  left: 50%; top: 54%;
  width: 980px; height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(0, 229, 251, 0.10) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}
.hero-logo {
  height: 58px;
  width: auto;
  margin: 0 auto 42px;
  filter: drop-shadow(0 0 26px rgba(0, 229, 251, 0.22));
}
.hero-title {
  font-size: 68px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 18px;
  color: var(--dim);
  margin-bottom: 44px;
  min-height: 2em;
}
.type-caret {
  display: inline-block;
  width: 9px; height: 18px;
  background: var(--cyan);
  margin-left: 4px;
  vertical-align: -2px;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-cta { display: flex; justify-content: center; margin-bottom: 54px; }

/* 标题 glitch：周期性错位残影 */
.glitch { position: relative; }
html.js .glitch::before,
html.js .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
html.js .glitch::before {
  color: var(--cyan);
  animation: glitch-a 4.2s steps(1) infinite;
}
html.js .glitch::after {
  color: rgba(242, 246, 249, 0.85);
  animation: glitch-b 4.2s steps(1) infinite;
}
@keyframes glitch-a {
  0%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
  93% { opacity: 0.8; transform: translate(-6px, 2px); clip-path: inset(12% 0 58% 0); }
  95% { opacity: 0.8; transform: translate(5px, -2px); clip-path: inset(62% 0 8% 0); }
  97% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.7; transform: translate(6px, -3px); clip-path: inset(38% 0 34% 0); }
  96% { opacity: 0.7; transform: translate(-5px, 3px); clip-path: inset(76% 0 2% 0); }
  98% { opacity: 0; }
}

/* 像素风按钮 */
.btn-pixel {
  position: relative;
  display: inline-block;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: 500;
  color: var(--cyan);
  border: 2px solid var(--cyan);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn-pixel::before,
.btn-pixel::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--cyan);
  transition: transform 0.18s;
}
.btn-pixel::before { top: -5px; left: -5px; }
.btn-pixel::after { bottom: -5px; right: -5px; }
.btn-pixel:hover {
  background: var(--cyan);
  color: #04121a;
  box-shadow: 0 0 42px rgba(0, 229, 251, 0.45);
}
.btn-pixel:hover::before { transform: translate(-3px, -3px); }
.btn-pixel:hover::after { transform: translate(3px, 3px); }

/* Hero 数据条 */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}
.stat-num {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.2;
}
.stat-label { font-size: 13px; color: var(--dim); }
.stat-sep {
  width: 6px; height: 6px;
  background: rgba(0, 229, 251, 0.4);
}

/* Hero 入场动画 */
.stagger {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-logo.stagger { animation-delay: 0.1s; }
.hero-title.stagger { animation-delay: 0.25s; }
.hero-sub.stagger { animation-delay: 0.4s; }
.hero-cta.stagger { animation-delay: 0.55s; }
.hero-stats.stagger { animation-delay: 0.7s; }
.hero-scroll.stagger { animation-delay: 1.1s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
  position: absolute;
  bottom: 30px; left: 50%;
  margin-left: -4px;
}
.scroll-dot {
  display: block;
  width: 8px; height: 8px;
  background: var(--cyan);
  animation: drop 1.6s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0.2; }
  71% { transform: translateY(0); opacity: 0; }
}

/* ============ 跑马灯 ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 23, 0.6);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-seq {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(139, 152, 169, 0.85);
  white-space: nowrap;
}
.px-sep {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--cyan);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ 通用 section ============ */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-2); }
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}
.head-px {
  width: 12px; height: 12px;
  background: var(--cyan);
  flex-shrink: 0;
  align-self: center;
  box-shadow: 0 0 14px rgba(0, 229, 251, 0.7);
}
.section-head h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.head-note { font-size: 15px; color: var(--dim); }

/* 滚动进场（无 JS 时直接可见） */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ============ 产品卡片 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 900px;
}
.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
  will-change: transform;
  /* 光斑跟随（JS 更新 --mx/--my） */
  --mx: 50%;
  --my: 50%;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(0, 229, 251, 0.10), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 1;
}
.product-card:hover::before { opacity: 1; }
.product-card:hover {
  border-color: rgba(0, 229, 251, 0.5);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 229, 251, 0.08);
}
/* 扫描线 */
.card-scan {
  position: absolute;
  left: 0; right: 0;
  height: 46px;
  top: -60px;
  background: linear-gradient(to bottom, transparent, rgba(0, 229, 251, 0.08), transparent);
  pointer-events: none;
  z-index: 1;
}
.product-card:hover .card-scan { animation: scan 1.6s linear infinite; }
@keyframes scan {
  from { top: -60px; }
  to { top: 110%; }
}
.card-stage {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(0, 229, 251, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 251, 0.03) 1px, transparent 1px);
  background-size: 14px 14px;
  overflow: hidden;
}

/* 像素问号：box-shadow 逐格画出 */
.px-question {
  width: 10px; height: 10px;
  background: transparent;
  margin-left: -30px;
  margin-top: -40px;
  box-shadow:
    10px 0 var(--cyan), 20px 0 var(--cyan), 30px 0 var(--cyan), 40px 0 var(--cyan),
    0 10px var(--cyan), 50px 10px var(--cyan),
    50px 20px var(--cyan),
    40px 30px var(--cyan),
    30px 40px var(--cyan),
    30px 50px var(--cyan),
    30px 70px var(--cyan);
  animation: blink 2.4s steps(1) infinite;
  opacity: 0.85;
}
.product-card:hover .px-question { animation-duration: 0.9s; }
@keyframes blink {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.35; }
}

.card-body { padding: 24px 26px 28px; position: relative; z-index: 2; }
.card-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card-body p {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 16px;
}
.tag-soon {
  display: inline-block;
  font-size: 12px;
  padding: 3px 12px;
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* ============ 理念 ============ */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.approach-card {
  padding: 40px 34px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.5);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s;
}
.approach-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 229, 251, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 251, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.approach-card:hover::before { opacity: 1; }
.approach-card:hover { border-color: rgba(0, 229, 251, 0.5); }
.corner-px {
  position: absolute;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--cyan);
  opacity: 0;
  transition: opacity 0.25s;
}
.corner-px::after {
  content: '';
  position: absolute;
  top: 0; left: 14px;
  width: 6px; height: 6px;
  background: rgba(0, 229, 251, 0.5);
}
.approach-card:hover .corner-px { opacity: 1; }
.approach-num {
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}
.approach-card h3 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 14px;
  position: relative;
}
.approach-card p { font-size: 15px; color: var(--dim); position: relative; }

/* ============ 路线图 ============ */
.road { position: relative; }
.road-line {
  position: absolute;
  left: 0; right: 0;
  top: 58px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 251, 0.35) 8%, rgba(0, 229, 251, 0.35) 92%, transparent);
}
.road-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.road-node { text-align: left; padding-top: 34px; position: relative; }
.road-time {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 12px;
}
.road-dot {
  width: 14px; height: 14px;
  background: var(--cyan);
  margin-bottom: 22px;
  box-shadow: 0 0 16px rgba(0, 229, 251, 0.7);
}
.road-dot-live { animation: pulse-px 1.4s steps(2) infinite; }
@keyframes pulse-px {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 229, 251, 0.7); }
  50% { box-shadow: 0 0 30px rgba(0, 229, 251, 1); }
}
.road-dot-hollow {
  background: transparent;
  border: 2px solid rgba(0, 229, 251, 0.6);
  box-shadow: none;
}
.road-node h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.road-node p { font-size: 14px; color: var(--dim); }

/* ============ 关于 ============ */
.about-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 72px;
  align-items: center;
}
.about-art { text-align: center; }
#life {
  width: 240px; height: 240px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.6);
  image-rendering: pixelated;
}
.life-note {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(139, 152, 169, 0.6);
}
.about-text p {
  font-size: 16px;
  color: var(--dim);
  margin-bottom: 18px;
}
.about-text .section-head { margin-bottom: 30px; }

/* ============ 灵感投递 ============ */
.idea-inner { max-width: 720px; }
.idea-form {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 38px 36px 34px;
}
.idea-form::before,
.idea-form::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: var(--cyan);
}
.idea-form::before { top: -6px; left: -6px; }
.idea-form::after { bottom: -6px; right: -6px; }
.idea-field { margin-bottom: 24px; }
.idea-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}
.idea-opt {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(139, 152, 169, 0.7);
}
.idea-field textarea,
.idea-field input[type="text"] {
  width: 100%;
  background: rgba(5, 7, 12, 0.7);
  border: 1px solid rgba(0, 229, 251, 0.2);
  color: var(--white);
  font-family: var(--font-cn);
  font-size: 15px;
  line-height: 1.7;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.idea-field textarea { resize: vertical; min-height: 120px; }
.idea-field input[type="text"] { height: 46px; }
.idea-field textarea:focus,
.idea-field input[type="text"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 229, 251, 0.35), 0 0 22px rgba(0, 229, 251, 0.08);
}
.idea-field ::placeholder { color: rgba(139, 152, 169, 0.5); }
.idea-count {
  text-align: right;
  font-family: var(--font-en);
  font-size: 12px;
  color: rgba(139, 152, 169, 0.6);
  margin-top: 6px;
}
.idea-actions { display: block; }
.idea-submit {
  display: block;
  width: 100%;
  cursor: pointer;
  background: transparent;
  font-family: var(--font-cn);
}
.idea-submit:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.idea-msg {
  font-size: 14px;
  color: var(--dim);
  min-height: 1.6em;
  text-align: center;
  margin-top: 14px;
}
.idea-msg.ok { color: var(--cyan); }
/* 蜜罐字段隐藏 */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ============ 页脚 ============ */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 96px 0 60px;
  text-align: center;
  overflow: hidden;
}
.footer-word {
  position: absolute;
  left: 50%; top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-size: 150px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 229, 251, 0.10);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.footer-inner { position: relative; padding: 0 24px; }
.footer-logo {
  height: 20px;
  width: auto;
  margin: 0 auto 22px;
  opacity: 0.85;
}
.footer-company { font-size: 14px; color: var(--dim); margin-bottom: 6px; }
.footer-copy {
  font-family: var(--font-en);
  font-size: 13px;
  color: rgba(139, 152, 169, 0.55);
  letter-spacing: 0.06em;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .product-grid, .approach-grid { grid-template-columns: 1fr; }
  .road-line { display: none; }
  .road-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 90px 0 70px; }
  .hero-title { font-size: 36px; letter-spacing: 0.02em; }
  .hero-sub { font-size: 15px; }
  .hero-logo { height: 42px; margin-bottom: 32px; }
  .hero-stats { gap: 20px; }
  .stat-num { font-size: 20px; }
  .stat-label { font-size: 12px; }
  .section { padding: 76px 0; }
  .section-head h2 { font-size: 26px; }
  .approach-card h3 { font-size: 32px; }
  .footer-word { font-size: 64px; top: 22px; }
  .footer { padding: 78px 0 52px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .idea-form { padding: 28px 20px 26px; }
  .marquee-seq { font-size: 13px; gap: 20px; padding-right: 20px; }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .stagger, html.js .reveal { animation: none; transition: none; opacity: 1; transform: none; }
  .scroll-dot, .px-question, .marquee-track, .hero-grid,
  .card-scan, .road-dot-live, .type-caret { animation: none; }
  html.js .glitch::before, html.js .glitch::after { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}
