/* ============================================================
   中元智数 IoT 平台 · 官网样式
   深色科技风 / 纯静态
   ============================================================ */

:root {
  --bg: #04070f;
  --bg-soft: #070d1b;
  --bg-alt: #060b17;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e9effc;
  --text-soft: #c3cde0;
  --muted: #8b99b3;
  --cyan: #38e1ff;
  --blue: #4f7cff;
  --violet: #8b5cf6;
  --green: #34d399;
  --gradient: linear-gradient(92deg, #38e1ff 0%, #4f7cff 55%, #8b5cf6 100%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1200px;
  --header-h: 72px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(79, 124, 255, 0.4); color: #fff; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--gradient);
  color: #041018;
  box-shadow: 0 8px 28px rgba(56, 225, 255, 0.22), 0 2px 10px rgba(79, 124, 255, 0.25);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(56, 225, 255, 0.32), 0 4px 14px rgba(79, 124, 255, 0.32);
}
.btn--ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: rgba(56, 225, 255, 0.5); color: #fff; transform: translateY(-2px); }

/* ---------- 顶部导航 ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(4, 7, 15, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 19px; font-weight: 700; letter-spacing: 0.06em; }
.brand__text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 6px; }.nav__link {
  position: relative;
  padding: 9px 14px;
  font-size: 15px;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: translateX(-50%);
  transition: width 0.25s ease;
}
.nav__link:hover, .nav__link.is-active { color: #fff; }
.nav__link.is-active::after { width: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.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: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% 12%, rgba(79, 124, 255, 0.14), transparent 60%),
    radial-gradient(900px 560px at 12% 84%, rgba(56, 225, 255, 0.08), transparent 62%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 25%, transparent 75%);
  pointer-events: none;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hero__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.35;
}
.hero__glow--a { top: -160px; right: -80px; background: #1c3fae; }
.hero__glow--b { bottom: -220px; left: -120px; background: #0e5f74; }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 56px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(56, 225, 255, 0.28);
  background: rgba(56, 225, 255, 0.06);
  color: #9fe9f7;
  font-size: 13px;
  letter-spacing: 0.12em;
}
.hero__eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 2.4s ease-in-out infinite;
}

.hero__title {
  margin-top: 26px;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hero__title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  margin-top: 24px;
  max-width: 560px;
  font-size: 17px;
  color: var(--muted);
}
.hero__actions { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 44px;
}
.hero__chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}
.hero__chips li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 8px rgba(56, 225, 255, 0.8);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.hero__scroll span {
  width: 18px; height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  position: relative;
}
.hero__scroll span::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 7px;
  border-radius: 3px;
  background: var(--cyan);
  transform: translateX(-50%);
  animation: wheel 1.8s ease-in-out infinite;
}

/* 首屏右侧设备面板 */
.hero__visual {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.glass-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(2, 6, 18, 0.55);
}
.device-card {
  width: min(400px, 100%);
  padding: 26px;
  animation: floaty 7s ease-in-out infinite;
}
.device-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.device-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #c9f7ea;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-out infinite;
}
.device-card__id { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.device-card__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding-top: 22px;
  align-items: center;
}
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring__track { stroke: rgba(255, 255, 255, 0.07); }
.ring__value {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: calc(326.7 * (1 - var(--pct) / 100));
  filter: drop-shadow(0 0 8px rgba(56, 225, 255, 0.55));
  animation: ringIn 1.6s 0.4s ease-out both;
}
.ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.ring__label strong { font-size: 26px; font-weight: 700; }
.ring__label strong span { font-size: 13px; color: var(--muted); margin-left: 1px; }
.ring__label small { font-size: 11px; color: var(--muted); margin-top: 4px; }

.device-card__meta { display: flex; flex-direction: column; gap: 10px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.meta-row strong { font-size: 14px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.meta-row .ok { color: var(--green); }

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 44px;
  margin-top: 6px;
}
.sparkline span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, rgba(56, 225, 255, 0.9), rgba(79, 124, 255, 0.25));
  transform-origin: bottom;
  animation: barIn 0.9s ease-out both;
}
.sparkline span:nth-child(2n) { animation-delay: 0.06s; }
.sparkline span:nth-child(3n) { animation-delay: 0.12s; }
.sparkline__caption { font-size: 11px; color: var(--muted); }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
}
.float-card strong { display: block; font-size: 13.5px; font-weight: 600; }
.float-card small { font-size: 11.5px; color: var(--muted); }
.float-card__icon {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
  flex: none;
}
.float-card__icon--violet { background: rgba(139, 92, 246, 0.14); color: #b79bff; }
.float-card--a { top: 4%; left: -4%; animation: floaty 6s 0.8s ease-in-out infinite; }
.float-card--b { bottom: 6%; right: -2%; animation: floaty 7.5s 0.2s ease-in-out infinite reverse; }

/* ---------- 通用区块 ---------- */
.section { position: relative; padding: 118px 0; }
.section--alt { background: var(--bg-alt); }
.section--alt::before,
.section--alt::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }

.section__head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section__head--left { margin: 0 0 44px; text-align: left; }
.section__eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.32em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section__title {
  margin-top: 14px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.section__desc { margin-top: 16px; font-size: 16px; color: var(--muted); }

/* ---------- 核心业务卡片 ---------- */
.grid { display: grid; gap: 22px; }
.grid--services { grid-template-columns: repeat(4, 1fr); }

.service-card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--panel-border);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at 50% -20%, rgba(79, 124, 255, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 124, 255, 0.45);
  box-shadow: 0 20px 46px rgba(2, 8, 24, 0.6);
}
.service-card:hover::before { opacity: 1; }

.service-card__icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(56, 225, 255, 0.16), rgba(79, 124, 255, 0.1));
  border: 1px solid rgba(56, 225, 255, 0.22);
  color: var(--cyan);
  margin-bottom: 22px;
}
.service-card__icon svg { width: 26px; height: 26px; }

.service-card h3 { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.service-card p { margin-top: 12px; font-size: 14px; color: var(--muted); }

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.service-card__tags li {
  padding: 4px 11px;
  font-size: 12px;
  color: #a9c4e8;
  background: rgba(79, 124, 255, 0.1);
  border: 1px solid rgba(79, 124, 255, 0.2);
  border-radius: 999px;
}

/* ---------- 用户旅程 ---------- */
.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.journey::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 225, 255, 0.4), rgba(139, 92, 246, 0.4), transparent);
}
.journey__step {
  position: relative;
  padding-top: 64px;
}
.journey__step::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(56, 225, 255, 0.6);
}
.journey__num {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  font-variant-numeric: tabular-nums;
}
.journey__step h3 { font-size: 17px; font-weight: 700; margin-top: 14px; }
.journey__step p { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 64px 0 32px;
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand--footer .brand__mark { width: 36px; height: 36px; }
.footer__slogan { font-size: 13.5px; color: var(--muted); letter-spacing: 0.08em; }
.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer__bottom a { color: var(--muted); transition: color 0.2s ease; }
.footer__bottom a:hover { color: var(--cyan); }

/* ---------- 动效 ---------- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@keyframes wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 10px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes ringIn {
  from { stroke-dashoffset: 326.7; }
  to { stroke-dashoffset: calc(326.7 * (1 - var(--pct) / 100)); }
}
@keyframes barIn {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .journey::before { display: none; }
  .hero__inner { grid-template-columns: 1fr; gap: 64px; }
  .hero { padding-top: calc(var(--header-h) + 72px); }
  .hero__subtitle { max-width: none; }
  .hero__visual { min-height: 0; }
  .float-card--a { left: 0; }
  .float-card--b { right: 0; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    background: #0a1120;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link { padding: 13px 16px; border-radius: 12px; }
  .nav__link.is-active { background: rgba(56, 225, 255, 0.08); }
  .nav__link::after { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 88px 0; }
  .section__head { margin-bottom: 48px; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 40px); }
  .brand__text strong { font-size: 17px; }
  .hero__title { font-size: clamp(30px, 9vw, 40px); }
  .hero__subtitle { font-size: 15px; }
  .hero__actions .btn { flex: 1; padding: 0 16px; }
  .hero__chips { gap: 8px 16px; }
  .hero__chips li { font-size: 13px; }
  .hero__scroll { display: none; }

  .device-card { padding: 20px; }
  .device-card__body { grid-template-columns: 1fr; justify-items: center; }
  .device-card__meta { width: 100%; }
  .hero__visual { margin: 8px 0 30px; }
  .float-card--a { top: -58px; left: 4px; }
  .float-card--b { bottom: -22px; right: 4px; }
  .float-card { padding: 10px 14px; }

  .grid--services { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .journey__step { padding-top: 52px; }
}
