:root {
  --primary: #1e6fd9;
  --primary-dark: #1557b0;
  --primary-light: #4a90e2;
  --accent: #00c2ff;
  --accent-2: #7b5cff;
  --bg: #f5f8ff;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #16233a;
  --text-soft: #4a5a75;
  --text-muted: #7a89a3;
  --border: rgba(30, 111, 217, 0.14);
  --shadow-sm: 0 2px 8px rgba(22, 35, 58, 0.06);
  --shadow-md: 0 8px 28px rgba(22, 35, 58, 0.1);
  --shadow-lg: 0 20px 60px rgba(22, 35, 58, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --grad-hero: linear-gradient(135deg, #1e6fd9 0%, #4a90e2 45%, #00c2ff 100%);
  --grad-accent: linear-gradient(135deg, #7b5cff 0%, #00c2ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(30, 111, 217, 0.08), rgba(0, 194, 255, 0.08));
  --glass-blur: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4a90e2;
    --primary-dark: #1e6fd9;
    --primary-light: #6aa9f0;
    --accent: #35d4ff;
    --accent-2: #9b82ff;
    --bg: #0b1220;
    --bg-alt: #101a2c;
    --surface: rgba(22, 34, 56, 0.66);
    --surface-solid: #14203a;
    --text: #eaf1ff;
    --text-soft: #b8c6de;
    --text-muted: #8595b3;
    --border: rgba(120, 160, 230, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --grad-hero: linear-gradient(135deg, #123a73 0%, #1e6fd9 50%, #0a5a8c 100%);
    --grad-soft: linear-gradient(135deg, rgba(74, 144, 226, 0.14), rgba(53, 212, 255, 0.1));
  }
}

*,
*::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(circle at 12% 8%, rgba(30, 111, 217, 0.1), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(0, 194, 255, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(123, 92, 255, 0.06), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 1.2rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 1.4rem;
  position: relative;
  padding-bottom: 0.7rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin: 1.8rem 0 0.7rem;
}

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

ul, ol {
  padding-left: 1.3rem;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.4rem;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(30, 111, 217, 0.4);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.28s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: #fff;
  background: var(--grad-hero);
  box-shadow: 0 6px 18px rgba(30, 111, 217, 0.35);
  transform: translateY(-2px);
}

/* ===== Breadcrumb ===== */
body > nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 1rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

body > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

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

/* ===== Main layout ===== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 3rem;
}

main > section {
  margin-top: 2.4rem;
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.7s var(--ease) both;
}

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

/* ===== Hero ===== */
#hero {
  position: relative;
  overflow: hidden;
  margin-top: 1.6rem;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.4rem, 4vw, 3.5rem);
  background: var(--grad-hero);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(30, 111, 217, 0.35);
  color: #fff;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
  filter: blur(10px);
  z-index: -1;
  animation: floatOrb 9s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.4), transparent 70%);
  filter: blur(14px);
  z-index: -1;
  animation: floatOrb 11s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 26px) scale(1.08); }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  max-width: 22ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 68ch;
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
}

#hero a {
  display: inline-block;
  margin: 0.6rem 0.7rem 0 0;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
}

#hero a:first-of-type {
  background: #fff;
  color: var(--primary-dark);
  border-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

#hero a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  background: #fff;
  color: var(--primary-dark);
}

/* ===== Cards / subsections ===== */
#about, #products, #solutions, #cases, #articles, #knowledge, #faq, #howto, #notice, #contact, #sitemap {
  scroll-margin-top: 90px;
}

#products h3,
#solutions h3,
#cases h3,
#knowledge h3,
#notice h3 {
  position: relative;
  padding-left: 1rem;
}

#products h3::before,
#solutions h3::before,
#cases h3::before,
#knowledge h3::before,
#notice h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: var(--grad-accent);
}

/* ===== Articles ===== */
#articles article {
  position: relative;
  margin: 1.1rem 0;
  padding: 1.3rem 1.5rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 111, 217, 0.4);
}

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

#articles article h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

#articles article h3 a {
  color: var(--text);
}

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

#articles time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--grad-soft);
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

#articles article > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.3s var(--ease);
}

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

#articles article > a:last-child:hover {
  gap: 0.55rem;
  color: var(--accent);
}

/* ===== FAQ ===== */
#faq details {
  margin: 0.8rem 0;
  padding: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 111, 217, 0.35);
}

#faq details[open] {
  border-color: rgba(30, 111, 217, 0.45);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1rem 3rem 1rem 1.4rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  user-select: none;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.35s var(--ease);
}

#faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

#faq summary:hover {
  color: var(--primary);
  background: var(--grad-soft);
}

#faq details p {
  margin: 0;
  padding: 0 1.4rem 1.2rem;
  animation: fadeIn 0.4s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

#howto ol li {
  position: relative;
  counter-increment: step;
  padding: 0.95rem 1.2rem 0.95rem 3.4rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-hero);
  box-shadow: 0 4px 12px rgba(30, 111, 217, 0.4);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

/* ===== Contact ===== */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 1.2rem 0;
}

#contact ul li {
  padding: 0.9rem 1.2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ===== Sitemap ===== */
#sitemap > ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.6rem;
}

#sitemap > ul li {
  margin: 0;
}

#sitemap > ul a {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.28s var(--ease);
}

#sitemap > ul a:hover {
  color: #fff;
  background: var(--grad-hero);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(30, 111, 217, 0.35);
  transform: translateY(-2px);
}

#sitemap h3 + ul a {
  background: transparent;
}

/* ===== Footer ===== */
footer {
  margin-top: 3rem;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem) 1.5rem;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

footer {
  max-width: 100%;
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 2rem;
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
}

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

footer h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
  color: var(--text);
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 70ch;
}

footer > p:last-child {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Focus & accessibility ===== */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header {
    padding: 0.7rem 1rem;
  }

  header nav ul {
    gap: 0.25rem;
  }

  header nav a {
    padding: 0.35rem 0.65rem;
    font-size: 0.84rem;
  }
}

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

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
  }

  header nav a {
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    background: var(--grad-soft);
    border: 1px solid var(--border);
  }

  main > section {
    border-radius: var(--radius);
    margin-top: 1.6rem;
  }

  #hero {
    border-radius: var(--radius);
    padding: 2rem 1.3rem;
  }

  #hero a {
    display: block;
    text-align: center;
    margin: 0.6rem 0 0;
  }

  #articles article {
    padding: 1rem 1.1rem;
  }

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

  #howto ol li {
    padding-left: 3rem;
  }
}

@media (max-width: 400px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

/* ===== Reduced motion ===== */
@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;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #hero::before,
  #hero::after {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
  }
}