:root {
  --bg: #070b16;
  --bg-soft: #0d1424;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef3ff;
  --text-soft: #a8b5d1;
  --text-mute: #7c8aa8;
  --primary: #4f7cff;
  --primary-2: #8b5cf6;
  --accent: #22d3ee;
  --amber: #fbbf24;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
  --max: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fc;
    --bg-soft: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(15, 23, 42, 0.1);
    --text: #0f172a;
    --text-soft: #475569;
    --text-mute: #64748b;
    --primary: #2f5bff;
    --primary-2: #7c3aed;
    --accent: #0891b2;
    --shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.35);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 10% -10%, rgba(79, 124, 255, 0.22), transparent 60%),
    radial-gradient(900px 520px at 95% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(34, 211, 238, 0.1), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: light) {
  body {
    background-image:
      radial-gradient(1100px 600px at 10% -10%, rgba(79, 124, 255, 0.14), transparent 60%),
      radial-gradient(900px 520px at 95% 0%, rgba(139, 92, 246, 0.12), transparent 60%),
      radial-gradient(800px 500px at 50% 110%, rgba(8, 145, 178, 0.08), transparent 65%);
  }
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  padding-bottom: 0.5em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
}

h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text);
  margin-top: 1.6em;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--primary);
}

blockquote {
  margin: 1.4em 0;
  padding: 1.1em 1.3em;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

blockquote p {
  margin: 0.35em 0;
  color: var(--text);
  font-style: italic;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (prefers-color-scheme: light) {
  #site-header {
    background: rgba(255, 255, 255, 0.75);
  }
}

#site-header:hover {
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.brand svg {
  border-radius: 12px;
  box-shadow: 0 8px 20px -8px rgba(79, 124, 255, 0.7);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 12px 28px -8px rgba(139, 92, 246, 0.8);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

#site-header nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: 10px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav a:hover {
  color: var(--text);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

/* ============ Layout ============ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

section {
  margin: 0 0 2.4rem;
  animation: rise 0.7s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  margin-top: 1.2rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(79, 124, 255, 0.24), rgba(139, 92, 246, 0.2) 45%, rgba(34, 211, 238, 0.16)),
    var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  animation: float 12s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%);
  filter: blur(36px);
  pointer-events: none;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-24px, 22px, 0); }
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero-title {
  max-width: 22ch;
  background: linear-gradient(92deg, var(--text) 20%, var(--primary) 60%, var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lead {
  max-width: 68ch;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 1.8rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px -12px rgba(79, 124, 255, 0.9);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -12px rgba(139, 92, 246, 0.95);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  color: var(--text);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}

figure {
  margin: 1.6rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

figure:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
}

figure svg {
  width: 100%;
  height: auto;
}

figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ============ Breadcrumb ============ */
main > nav[aria-label="面包屑导航"] {
  margin: 0 0 1.8rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.85rem;
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--text-mute);
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-mute);
}

main > nav[aria-label="面包屑导航"] li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ============ Cards ============ */
#brand,
#products,
#solutions,
#applications,
#cases,
#news,
#articles,
#howto,
#knowledge,
#faq,
#contact,
#sitemap,
#links {
  padding: clamp(1.3rem, 3vw, 2.2rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#brand:hover,
#products:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#news:hover,
#articles:hover,
#howto:hover,
#knowledge:hover,
#faq:hover,
#contact:hover {
  border-color: rgba(79, 124, 255, 0.4);
  box-shadow: 0 28px 60px -30px rgba(79, 124, 255, 0.45);
}

#products ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
}

#products ul li {
  position: relative;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products ul li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.16);
}

#products ul li:hover {
  transform: translateY(-4px);
  background: rgba(79, 124, 255, 0.14);
  border-color: rgba(79, 124, 255, 0.4);
  color: var(--text);
}

/* ============ Articles ============ */
#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#articles > h2,
#articles > p {
  grid-column: 1 / -1;
}

#articles article {
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

#articles article h3 a,
#articles article > a {
  color: var(--primary);
}

#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.14);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#articles article > a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article > a:hover {
  background: rgba(79, 124, 255, 0.28);
  transform: translateX(3px);
}

#articles article > a:hover::after {
  transform: translateX(4px);
}

#articles article:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 22px 44px -26px rgba(139, 92, 246, 0.7);
}

/* ============ Cases ============ */
#cases blockquote {
  display: grid;
  gap: 0.2rem;
  border-left: 0;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.12), rgba(34, 211, 238, 0.08));
}

#cases blockquote p {
  position: relative;
  padding-left: 1.4rem;
}

#cases blockquote p::before {
  content: "“";
  position: absolute;
  left: 0;
  top: -0.15em;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.8;
}

/* ============ News ============ */
#news h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

#news h3 + p {
  margin-top: -0.4em;
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 14px -6px rgba(79, 124, 255, 0.9);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(79, 124, 255, 0.4);
}

/* ============ FAQ ============ */
#faq h3 {
  padding: 0.85rem 1rem;
  margin: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-bottom: 0;
  font-size: 1rem;
  cursor: default;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

#faq h3 + p {
  margin: 0 0 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(79, 124, 255, 0.06);
  border: 1px solid var(--border);
  border-top: 0;
  font-size: 0.94rem;
  transition: background 0.3s var(--ease);
}

#faq h3:hover {
  color: var(--primary);
}

#faq h3:hover + p {
  background: rgba(79, 124, 255, 0.12);
}

/* ============ Contact ============ */
#contact ul,
#sitemap ul,
#links ul,
footer ul {
  list-style: none;
  padding: 0;
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
}

#contact ul li {
  margin: 0;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#sitemap ul li,
#links ul li {
  margin: 0;
}

#sitemap ul a,
#links ul a {
  display: inline-block;
  padding: 0.42rem 0.95rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#sitemap ul a:hover,
#links ul a:hover {
  color: #fff;
  transform: translateY(-3px);
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

/* ============ Footer ============ */
footer {
  margin-top: 2rem;
  padding: 2.2rem 1.25rem 2.6rem;
  background: linear-gradient(180deg, transparent, rgba(79, 124, 255, 0.08));
  border-top: 1px solid var(--border);
}

footer > section {
  max-width: var(--max);
  margin: 0 auto 1.6rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: none;
}

footer h2 {
  font-size: 1.05rem;
  padding-bottom: 0.4em;
}

footer h2::after {
  width: 36px;
  height: 3px;
}

footer p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

footer ul li {
  font-size: 0.9rem;
  color: var(--text-soft);
  padding: 0.2rem 0;
}

footer ul li::marker {
  color: var(--accent);
}

/* ============ Responsive ============ */
@media (min-width: 760px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }

  footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.4rem;
  }

  footer > section {
    margin: 0 0 1.4rem;
    width: 100%;
  }
}

@media (min-width: 1080px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }

  footer {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  #site-header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #site-header nav::-webkit-scrollbar {
    display: none;
  }

  #site-header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  #site-header nav a {
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  main {
    padding: 1rem 0.9rem 2rem;
  }

  #hero {
    padding: 1.4rem 1.1rem;
    border-radius: var(--radius);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  #products ul {
    grid-template-columns: 1fr;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 1.6rem 0.9rem 2rem;
  }
}

/* ============ Motion & A11y ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(79, 124, 255, 0.4);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
  background-clip: content-box;
}