/* ============================================================
   星空科技 · 官网样式
   单文件 CSS，无外部依赖
   ============================================================ */

:root {
  --bg: #05070f;
  --bg-soft: #0a0e1c;
  --panel: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --text: #eef2ff;
  --text-dim: #98a2c0;
  --brand: #4d7cff;
  --brand-2: #22d3ee;
  --brand-3: #8b5cf6;
  --radius: 18px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: .5px; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed; left: 0; top: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  z-index: 999; transition: width .1s linear;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 30px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  color: #fff; box-shadow: 0 14px 34px rgba(77, 124, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(77, 124, 255, .5); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--brand); background: rgba(77,124,255,.12); transform: translateY(-2px); }
/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  flex: none; width: 42px; height: 42px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(47, 127, 240, .38);
}
.brand-mark img { width: 100%; height: 100%; }
.brand-text { line-height: 1.1; }
.brand-text strong { font-size: 19px; letter-spacing: 3px; }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 15px; color: var(--text-dim);
  transition: color .25s ease, background .25s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px 0; border-radius: 2px;
  background: var(--text); transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  padding: 136px 0 92px; overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% 12%, rgba(77,124,255,.22), transparent 65%),
    radial-gradient(700px 500px at 12% 78%, rgba(139,92,246,.18), transparent 65%),
    linear-gradient(180deg, #04060d 0%, #070b18 60%, #05070f 100%);
}
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; width: 900px; height: 900px; left: 50%; top: -420px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle, rgba(34,211,238,.16), transparent 60%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
.hero-grid {
  position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 78%);
}
.hero-inner { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px; margin-bottom: 26px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  font-size: 14px; color: var(--text-dim); letter-spacing: 1px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2);
  box-shadow: 0 0 0 0 rgba(34,211,238,.7); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); }
  70% { box-shadow: 0 0 0 12px rgba(34,211,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

.hero-title { font-size: clamp(38px, 6.4vw, 82px); letter-spacing: 4px; margin-bottom: 28px; }
.hero-title .line { display: block; }
.hero-title .gradient {
  background: linear-gradient(100deg, #7aa2ff 0%, #22d3ee 45%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(77,124,255,.45));
}
.hero-sub { max-width: 720px; font-size: 17px; color: var(--text-dim); margin-bottom: 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 58px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--line); overflow: hidden; backdrop-filter: blur(8px);
}
.hero-stats li { padding: 26px 24px; background: rgba(9, 13, 26, .72); }
.hero-stats b {
  display: block; font-size: clamp(26px, 3vw, 38px); letter-spacing: 1px;
  background: linear-gradient(100deg, #9db8ff, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 13.5px; color: var(--text-dim); letter-spacing: 1px; }

/* ---------- 通用区块 ---------- */
.section { position: relative; padding: 82px 0; }
.section-dark { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%); }

.section-head { max-width: 760px; margin-bottom: 46px; }
.section-head h2 {
  position: relative; padding-top: 24px;
  font-size: clamp(28px, 3.6vw, 44px); letter-spacing: 3px; margin-bottom: 18px;
}
.title-bar {
  position: relative; padding-top: 22px;
  font-size: clamp(26px, 3.2vw, 40px); letter-spacing: 3px; margin-bottom: 18px;
}
.section-head h2::before,
.title-bar::before {
  content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 18px rgba(77, 124, 255, .65);
}
.section-desc { color: var(--text-dim); font-size: 16.5px; margin: 0; }

/* ---------- 企业简介 ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.about-lead-line { font-size: 17.5px; color: var(--text); margin: 0 0 14px; }
.about-lead-body { color: var(--text-dim); margin: 0; }
.about-points { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.about-points li {
  position: relative; padding-left: 22px; color: var(--text); font-size: 14.5px;
}
.about-points li::before {
  content: ""; position: absolute; left: 4px; top: .72em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 12px var(--brand-2);
}

.about-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.value-card {
  padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.value-card:hover {
  transform: translateY(-6px); border-color: rgba(77,124,255,.5);
  background: linear-gradient(160deg, rgba(77,124,255,.12), rgba(139,92,246,.06));
}
.value-card h3 { font-size: 16px; margin-bottom: 5px; }
.value-card p { font-size: 13.5px; color: var(--text-dim); margin: 0; }

/* ---------- 核心能力 ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service-card {
  position: relative; overflow: hidden;
  padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  transition: transform .35s ease, border-color .35s ease;
}
.service-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(77,124,255,.22), transparent 60%);
}
.service-card:hover { transform: translateY(-8px); border-color: rgba(77,124,255,.45); }
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }
.service-card h3 { font-size: 17px; margin-bottom: 12px; }
.service-card p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ---------- 产品案例 ---------- */
.case-hero {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 38px; align-items: start;
  padding: 34px; border: 1px solid var(--line); border-radius: 24px;
  background:
    radial-gradient(600px 300px at 8% 0%, rgba(77,124,255,.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  box-shadow: var(--shadow);
}
.case-tag {
  display: inline-block; margin-bottom: 18px; padding: 5px 14px; border-radius: 999px;
  font-size: 12.5px; letter-spacing: 2px; color: #cfe0ff;
  border: 1px solid rgba(77,124,255,.5); background: rgba(77,124,255,.16);
}
.case-info h3 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 18px; letter-spacing: 1.5px; }
.case-info > p { color: var(--text-dim); font-size: 15.5px; }
.case-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.case-metrics div {
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.case-metrics b { display: block; font-size: 16px; color: #cfe0ff; }
.case-metrics span { font-size: 12.5px; color: var(--text-dim); }

.case-features { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.feature {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.03); transition: border-color .3s ease, transform .3s ease;
}
.feature:hover { border-color: rgba(34,211,238,.5); transform: translateY(-4px); }
.feature h4 { font-size: 15.5px; margin-bottom: 6px; color: #dce6ff; }
.feature p { font-size: 13.5px; color: var(--text-dim); margin: 0; }

.gallery { margin-top: 30px; }
.gallery-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 16px; }
.gallery-tab {
  padding: 9px 22px; border-radius: 999px; cursor: pointer; font-size: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text-dim);
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.gallery-tab:hover { color: var(--text); border-color: rgba(77,124,255,.45); }
.gallery-tab.is-active {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  box-shadow: 0 10px 26px rgba(77,124,255,.32);
}
.gallery-stage {
  position: relative; max-width: 660px; margin: 0 auto; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #0b1020; box-shadow: var(--shadow);
}
.gallery-stage img {
  position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease;
}
.gallery-stage img.is-active { position: relative; opacity: 1; }
.gallery-hint { margin-top: 16px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* ---------- 定制流程 ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; counter-reset: step; }
.process-step {
  position: relative; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.03); overflow: hidden;
}
.process-step::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.process-step:hover::after { transform: scaleX(1); }
.process-step:hover { border-color: rgba(77,124,255,.4); }
.step-no {
  display: block; font-size: 30px; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px;
  background: linear-gradient(120deg, #6f96ff, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.process-step h3 { font-size: 17px; margin-bottom: 8px; }
.process-step p { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 56px 0 40px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #03050b);
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-logo {
  width: 56px; height: 56px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 28px rgba(47, 127, 240, .38);
}
.footer-logo img { width: 100%; height: 100%; }
.footer-brand p { margin: 0; font-size: 13.5px; color: var(--text-dim); }
.footer-legal { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--text-dim); }
.footer-legal p { margin: 0 0 8px; }
.footer-icp { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; }
.footer-icp .sep { color: #3a4560; }
.icp {
  display: inline-flex; align-items: center; gap: 6px;
  color: #b9c4e4; border-bottom: 1px solid transparent; transition: color .25s ease, border-color .25s ease;
}
.icp:hover { color: var(--brand-2); border-bottom-color: var(--brand-2); }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 18px;
  color: #fff; border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--brand), var(--brand-3));
  box-shadow: 0 14px 32px rgba(77,124,255,.4);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- 图片放大 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: rgba(2,4,10,.92); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%; max-height: 100%; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: scale(.97); transition: transform .3s ease;
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute; right: 28px; top: 22px; width: 44px; height: 44px; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--text); border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
}
.lightbox-close:hover { background: rgba(255,255,255,.14); }

/* ---------- 滚动出现动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.22,.7,.3,1), transform .8s cubic-bezier(.22,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .about-grid, .case-hero { grid-template-columns: 1fr; gap: 38px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    padding: 10px 24px 24px; background: rgba(5,7,15,.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-link.is-active::after { display: none; }

  .section { padding: 66px 0; }
  .hero { min-height: auto; padding: 130px 0 88px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-actions { margin-bottom: 48px; }
  .case-metrics { grid-template-columns: 1fr; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 640px) {
  .service-grid, .case-features, .process { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: 2px; }
  .section-head { margin-bottom: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
