:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 50, 0.55);
  --bg-card-hover: rgba(40, 40, 65, 0.75);
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8c8;
  --text-muted: #8888a0;
  --accent: #e94560;
  --accent-2: #533483;
  --accent-3: #0f3460;
  --accent-glow: rgba(233, 69, 96, 0.35);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(233, 69, 96, 0.4);
  --glass-bg: rgba(26, 26, 46, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --nav-height: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5e;
    --text-muted: #7a7a90;
    --accent: #d6304a;
    --accent-2: #6a4c93;
    --accent-3: #1a4a7a;
    --accent-glow: rgba(214, 48, 74, 0.2);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(214, 48, 74, 0.35);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 24px rgba(214, 48, 74, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(83, 52, 131, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(233, 69, 96, 0.1), transparent),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(15, 52, 96, 0.15), transparent);
  pointer-events: none;
  transition: opacity var(--transition);
}

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

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

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

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

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientShift 6s ease infinite;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
}

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

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: 0.6rem;
  margin-top: 0.5rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

address {
  font-style: normal;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-2);
}

blockquote footer {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============ Header / Nav ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

header[role="banner"] nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header[role="banner"] nav > a[aria-label] {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity var(--transition);
}

header[role="banner"] nav > a[aria-label]:hover {
  opacity: 0.8;
}

header[role="banner"] nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

header[role="banner"] nav ul::-webkit-scrollbar {
  display: none;
}

header[role="banner"] nav ul li a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

header[role="banner"] nav ul li a:hover {
  color: var(--text-primary);
  background: rgba(233, 69, 96, 0.12);
  transform: translateY(-1px);
  opacity: 1;
}

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

main > section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

main > section:last-of-type {
  border-bottom: none;
}

main > nav[aria-label="页面内锚点导航"] {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

main > nav[aria-label="页面内锚点导航"] h2 {
  font-size: 1rem;
  color: var(--text-muted);
  padding-left: 0;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

main > nav[aria-label="页面内锚点导航"] h2::before {
  display: none;
}

main > nav[aria-label="页面内锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

main > nav[aria-label="页面内锚点导航"] ul li a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition);
}

main > nav[aria-label="页面内锚点导航"] ul li a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  opacity: 1;
}

/* ============ Hero Banner ============ */
#hero {
  position: relative;
  padding: 3rem 2rem;
  margin: 2rem 0;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(83, 52, 131, 0.85) 0%, rgba(15, 52, 96, 0.85) 50%, rgba(233, 69, 96, 0.7) 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-bottom: none;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(233, 69, 96, 0.2), transparent 50%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: rotate(15deg);
  pointer-events: none;
  animation: shimmer 8s ease-in-out infinite;
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: none;
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.8;
}

#hero figure {
  position: relative;
  z-index: 1;
  margin-top: 1.75rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

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

#hero figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ============ Cards / Sections ============ */
#about,
#history,
#culture,
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#privacy,
#disclaimer,
#copyright {
  animation: fadeUp 0.7s ease both;
}

#about h3,
#history h3,
#culture h3,
#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#news h3,
#knowledge h3,
#howto h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#about h3::before,
#history h3::before,
#culture h3::before,
#products h3::before,
#advantages h3::before,
#solutions h3::before,
#applications h3::before,
#cases h3::before,
#news h3::before,
#knowledge h3::before,
#howto h3::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Products / Advantages grid feel */
#products p,
#advantages p,
#solutions p {
  max-width: 72ch;
}

/* ============ Articles ============ */
#articles article {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

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

#articles article h3 {
  margin-top: 0;
  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.5rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid var(--border-hover);
  transition: all var(--transition);
}

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

#articles article a:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
  box-shadow: var(--shadow-glow);
}

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

/* ============ FAQ ============ */
#faq h3 {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0;
  cursor: default;
  transition: all var(--transition);
  position: relative;
  padding-left: 2.75rem;
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-glow);
}

#faq h3:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

#faq h3 + p {
  padding: 0.75rem 1.25rem 0.5rem 2.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-left: 2px solid var(--border-color);
  margin-left: 1rem;
  transition: border-color var(--transition);
}

#faq h3:hover + p {
  border-left-color: var(--accent);
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.25rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ============ Contact ============ */
#contact address {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  display: grid;
  gap: 0.6rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#contact address:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

#contact address p {
  margin: 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
}

#contact address p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

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

#sitemap ul li a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

#sitemap ul li a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  opacity: 1;
}

/* ============ Footer ============ */
footer {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--text-secondary);
  padding: 0 0.15rem;
  transition: color var(--transition);
}

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

/* ============ Animations ============ */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes shimmer {
  0%, 100% { transform: translateX(-30%) rotate(15deg); }
  50% { transform: translateX(30%) rotate(15deg); }
}

/* Scroll reveal via animation-timeline fallback */
@media (prefers-reduced-motion: no-preference) {
  main > section {
    animation: fadeUp 0.7s ease both;
  }
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header[role="banner"] nav {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  header[role="banner"] nav ul {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 0.25rem;
  }

  html {
    scroll-padding-top: 110px;
  }

  #hero {
    padding: 2rem 1.25rem;
    margin: 1.5rem 0;
  }
}

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

  main {
    padding: 0 1rem;
  }

  main > section {
    padding: 1.75rem 0;
  }

  #hero {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
  }

  #hero p {
    font-size: 0.95rem;
  }

  h2 {
    padding-left: 0.85rem;
  }

  h2::before {
    width: 3px;
  }

  #articles article {
    padding: 1.15rem;
  }

  #faq h3 {
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    font-size: 1rem;
  }

  #faq h3::before {
    left: 0.85rem;
    width: 20px;
    height: 20px;
  }

  #faq h3 + p {
    padding-left: 2.5rem;
    margin-left: 0.5rem;
  }

  #howto ol li {
    padding: 0.75rem 0.85rem 0.75rem 2.85rem;
  }

  #howto ol li::before {
    left: 0.85rem;
    width: 24px;
    height: 24px;
  }

  #contact address {
    padding: 1.15rem;
  }

  footer {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 380px) {
  header[role="banner"] nav ul li a {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* ============ Print ============ */
@media print {
  header[role="banner"],
  main > nav,
  #hero::after,
  body::before {
    display: none;
  }

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

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