:root {
  --bg-primary: #0d1b2a;
  --bg-secondary: #1b263b;
  --bg-tertiary: #243b53;
  --surface: rgba(27, 38, 59, 0.72);
  --surface-solid: #1b263b;
  --surface-hover: rgba(65, 90, 119, 0.35);
  --text-primary: #e0e1dd;
  --text-secondary: #a9b4c2;
  --text-muted: #778da9;
  --accent: #4cc9f0;
  --accent-2: #7b61ff;
  --accent-3: #f72585;
  --border: rgba(119, 141, 169, 0.28);
  --border-strong: rgba(76, 201, 240, 0.45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --glow: 0 0 24px rgba(76, 201, 240, 0.35);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --transition: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #eef2f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #dde5ef;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --surface-hover: rgba(76, 201, 240, 0.12);
    --text-primary: #10233a;
    --text-secondary: #3a4c63;
    --text-muted: #5f7488;
    --accent: #0a7ea4;
    --accent-2: #5b41e0;
    --accent-3: #c2185b;
    --border: rgba(16, 35, 58, 0.14);
    --border-strong: rgba(10, 126, 164, 0.45);
    --shadow-sm: 0 2px 8px rgba(16, 35, 58, 0.08);
    --shadow-md: 0 8px 24px rgba(16, 35, 58, 0.12);
    --shadow-lg: 0 16px 48px rgba(16, 35, 58, 0.16);
    --glow: 0 0 24px rgba(10, 126, 164, 0.22);
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(123, 97, 255, 0.18), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(76, 201, 240, 0.16), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(247, 37, 133, 0.1), transparent 48%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--text-primary);
}

h4 {
  font-size: 1.05rem;
  color: var(--accent);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--accent-2);
}

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

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

li {
  color: var(--text-secondary);
  margin-bottom: 0.4em;
}

figure {
  margin: 0;
}

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

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: fadeDown 0.6s ease both;
}

header nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

header nav[aria-label="主导航"] > a {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

header nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

header nav[aria-label="主导航"] ul li {
  margin: 0;
}

header nav[aria-label="主导航"] ul a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

header nav[aria-label="主导航"] ul a:hover,
header nav[aria-label="主导航"] ul a:focus-visible {
  color: var(--text-primary);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* Breadcrumb */
header nav[aria-label="面包屑"] {
  max-width: var(--max-width);
  margin: 10px auto 0;
}

header nav[aria-label="面包屑"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

header nav[aria-label="面包屑"] li {
  margin: 0;
  color: var(--text-muted);
}

header nav[aria-label="面包屑"] li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--text-muted);
}

header nav[aria-label="面包屑"] a {
  color: var(--text-muted);
}

header nav[aria-label="面包屑"] a:hover {
  color: var(--accent);
}

header nav[aria-label="面包屑"] [aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Main layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px) 60px;
}

section {
  margin-bottom: clamp(32px, 5vw, 64px);
  padding: clamp(20px, 3.5vw, 40px);
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: riseIn 0.7s ease both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

@supports not (animation-timeline: view()) {
  section {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* ===== Hero ===== */
#hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(13, 27, 42, 0.92) 0%, rgba(27, 38, 59, 0.85) 45%, rgba(123, 97, 255, 0.28) 100%),
    radial-gradient(circle at 80% 20%, rgba(76, 201, 240, 0.35), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(247, 37, 133, 0.22), transparent 50%);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  padding: clamp(28px, 5vw, 64px);
  text-align: left;
}

#hero::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  background: conic-gradient(from 0deg, transparent, rgba(76, 201, 240, 0.35), transparent 60%);
  border-radius: 50%;
  filter: blur(40px);
  animation: spinGlow 18s linear infinite;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  max-width: 22ch;
  margin-bottom: 0.5em;
}

#hero p {
  position: relative;
  z-index: 1;
  max-width: 68ch;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--text-secondary);
}

#hero figure {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-lg), var(--glow);
}

#hero figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#hero figcaption {
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-solid);
  border-top: 1px solid var(--border);
}

/* ===== Cards / inner blocks ===== */
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto {
  position: relative;
}

#products h3,
#solutions h3,
#cases h3,
#news h3,
#howto h3 {
  margin-top: 1.4em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--border);
}

#products h4 {
  margin-top: 1.6em;
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(76, 201, 240, 0.16), rgba(123, 97, 255, 0.16));
  border: 1px solid var(--border-strong);
  font-size: 0.95rem;
}

/* ===== Articles ===== */
#articles {
  display: block;
}

#articles > p {
  margin-bottom: 1.6em;
}

#articles article {
  position: relative;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md), var(--glow);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-bottom: 0.3em;
  font-size: 1.12rem;
  transition: color var(--transition);
}

#articles article:hover h3 {
  color: var(--accent);
}

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6em;
}

#articles article p {
  font-size: 0.95rem;
  margin-bottom: 0.8em;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(76, 201, 240, 0.08);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

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

#articles article a:hover {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

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

/* ===== FAQ ===== */
#faq dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

#faq dt {
  position: relative;
  padding: 14px 18px 14px 44px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: default;
  transition: background var(--transition), border-color var(--transition);
}

#faq dt::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

#faq dt:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

#faq dd {
  margin: 0 0 6px;
  padding: 14px 18px 14px 44px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: rgba(119, 141, 169, 0.06);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: background var(--transition);
}

#faq dd::before {
  content: "A";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}

#faq dd:hover {
  background: var(--surface-hover);
}

/* ===== HowTo ===== */
#howto h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

#howto h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow);
  flex-shrink: 0;
}

/* ===== Knowledge ===== */
#knowledge {
  background:
    linear-gradient(135deg, rgba(76, 201, 240, 0.08), rgba(123, 97, 255, 0.08)),
    var(--surface);
  border-left: 4px solid var(--accent);
}

/* ===== Contact ===== */
#contact p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

#contact p:hover {
  transform: translateX(6px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

#contact a {
  font-weight: 600;
}

/* ===== Sitemap / Links ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

/* ===== Team ===== */
#team p {
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
footer {
  position: relative;
  margin-top: 20px;
  padding: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 48px) 40px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28)), var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 100%;
}

footer section {
  margin: 0;
  padding: 20px 22px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: none;
  transition: transform var(--transition), border-color var(--transition);
}

footer section:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

footer h2 {
  font-size: 1rem;
  padding-left: 14px;
  margin-bottom: 0.6em;
}

footer h2::before {
  width: 4px;
}

footer p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

/* ===== Animations ===== */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes spinGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header nav[aria-label="主导航"] {
    gap: 10px;
  }

  header nav[aria-label="主导航"] ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  header nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  header nav[aria-label="主导航"] ul a {
    white-space: nowrap;
  }

  #hero {
    text-align: left;
  }

  #hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    background-attachment: scroll;
  }

  header {
    padding: 12px 16px;
  }

  header nav[aria-label="主导航"] > a {
    font-size: 1.05rem;
  }

  main {
    padding: 20px 14px 44px;
  }

  section {
    padding: 20px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
  }

  #hero {
    padding: 24px 18px;
  }

  #hero::after {
    width: 280px;
    height: 280px;
  }

  #faq dt,
  #faq dd {
    padding-left: 40px;
    font-size: 0.92rem;
  }

  #articles article {
    padding: 16px;
  }

  #articles article a {
    width: 100%;
    justify-content: center;
  }

  #contact p {
    font-size: 0.9rem;
    flex-wrap: wrap;
  }

  footer {
    padding: 24px 14px 32px;
    gap: 16px;
  }

  footer section {
    padding: 16px;
  }
}

/* ===== Motion & contrast preferences ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  section {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(224, 225, 221, 0.5);
    --text-secondary: #d6dae0;
    --text-muted: #b9c2cd;
  }
}

/* ===== Print ===== */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  header,
  footer {
    position: static;
    background: none;
    box-shadow: none;
  }

  section {
    background: none;
    box-shadow: none;
    border: 1px solid #cccccc;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}