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

:root {
  --bg-primary: #0b1220;
  --bg-secondary: #111c30;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --bg-glass: rgba(17, 28, 48, 0.72);
  --text-primary: #eef3fb;
  --text-secondary: #a9b8d0;
  --text-muted: #6f809c;
  --accent-1: #4f8cff;
  --accent-2: #7b5cff;
  --accent-3: #22d3ee;
  --accent-grad: linear-gradient(135deg, #4f8cff 0%, #7b5cff 50%, #22d3ee 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(123, 92, 255, 0.18));
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(79, 140, 255, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f4f7fc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --bg-glass: rgba(255, 255, 255, 0.78);
    --text-primary: #0d1a2e;
    --text-secondary: #3d5068;
    --text-muted: #7a8ba3;
    --border-color: rgba(13, 26, 46, 0.1);
    --border-glow: rgba(79, 140, 255, 0.4);
    --shadow-sm: 0 2px 8px rgba(13, 26, 46, 0.08);
    --shadow-md: 0 8px 28px rgba(13, 26, 46, 0.12);
    --shadow-lg: 0 20px 50px rgba(13, 26, 46, 0.16);
  }
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(79, 140, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(123, 92, 255, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(34, 211, 238, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

ul {
  list-style: none;
}

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

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

header > div {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  flex-wrap: wrap;
}

header > div > a {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

header > div > a:hover {
  transform: scale(1.04);
  filter: brightness(1.15);
}

nav[aria-label="主导航"] ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav[aria-label="主导航"] ul li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

nav[aria-label="主导航"] ul li a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-grad);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

nav[aria-label="主导航"] ul li a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] ul li a:hover::after {
  width: 60%;
}

/* ===== Main ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ===== Hero ===== */
#hero {
  margin: 40px 0 64px;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: var(--accent-grad-soft), var(--bg-card);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.25), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.2), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatOrb 15s ease-in-out infinite reverse;
}

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

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

#hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  z-index: 1;
}

#hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

#hero p:last-child {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ===== Section base ===== */
main > section:not(#hero) {
  margin-bottom: 56px;
  animation: sectionReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

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

main > section:not(#hero) > h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  padding-left: 18px;
  position: relative;
  color: var(--text-primary);
}

main > section:not(#hero) > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 70%;
  border-radius: 4px;
  background: var(--accent-grad);
  box-shadow: 0 0 16px var(--border-glow);
}

main > section:not(#hero) > h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
  transition: color var(--transition-fast);
}

main > section:not(#hero) > h3:hover {
  color: var(--accent-3);
}

main > section:not(#hero) > p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9688rem;
}

/* ===== Card-like sections ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links {
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

/* ===== Article cards ===== */
#articles article {
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 3px solid transparent;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-grad-soft);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

#articles article:hover {
  transform: translateX(6px);
  border-left-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

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

#articles article h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: color var(--transition-fast);
}

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

#articles article p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

#articles article p a {
  font-weight: 600;
  white-space: nowrap;
}

/* ===== News items ===== */
#news h3 {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

#news h3:first-of-type {
  border-top: none;
  padding-top: 0;
}

#news p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ===== FAQ ===== */
#faq h3 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  margin: 12px 0 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

#faq h3::before {
  content: "Q";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

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

#faq p {
  padding-left: 52px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* ===== HowTo ===== */
#howto h3 {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-grad-soft);
  border: 1px solid var(--border-color);
  font-size: 0.9375rem;
  margin-top: 20px;
}

#howto p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

#sitemap ul li a,
#links ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

#sitemap ul li a::before,
#links ul li a::before {
  content: "→";
  color: var(--accent-1);
  font-weight: 700;
  transition: transform var(--transition-fast);
}

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

#sitemap ul li a:hover::before,
#links ul li a:hover::before {
  transform: translateX(4px);
}

/* ===== Contact ===== */
#contact p {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

#contact p:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

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

/* ===== Footer ===== */
footer {
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--border-color);
  padding: 56px 24px 32px;
  margin-top: 40px;
}

footer > section {
  max-width: var(--max-width);
  margin: 0 auto 28px;
}

footer > section h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  position: relative;
  padding-left: 14px;
}

footer > section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  border-radius: 3px;
  background: var(--accent-grad);
}

footer > section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
}

footer > p {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-3), var(--accent-1));
}

/* ===== Selection ===== */
::selection {
  background: rgba(79, 140, 255, 0.35);
  color: var(--text-primary);
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header > div {
    padding: 12px 20px;
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  nav[aria-label="主导航"] ul {
    gap: 2px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }

  main {
    padding: 0 16px 60px;
  }

  #hero {
    margin: 24px 0 40px;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  main > section:not(#hero) {
    margin-bottom: 36px;
  }

  #faq p {
    padding-left: 0;
  }

  #articles article {
    padding: 18px 18px;
  }

  #articles article:hover {
    transform: translateY(-3px);
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 40px 16px 24px;
  }
}

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

  header > div > a {
    font-size: 1.25rem;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  #hero {
    padding: 32px 18px;
  }

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

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 22px 16px;
  }

  main > section:not(#hero) > h2 {
    font-size: 1.25rem;
    padding-left: 14px;
  }

  #faq h3 {
    font-size: 0.9375rem;
    padding: 12px 14px;
  }
}

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

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

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

  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}