:root {
  --bg: #0f1020;
  --bg-soft: #171933;
  --bg-card: rgba(30, 33, 63, 0.55);
  --bg-card-solid: #1c1f3d;
  --border: rgba(140, 150, 255, 0.18);
  --border-strong: rgba(140, 150, 255, 0.35);
  --text: #e8eaf6;
  --text-soft: #b6bce0;
  --text-dim: #8890b8;
  --primary: #6c5ce7;
  --primary-2: #00d2ff;
  --accent: #ff6b9d;
  --accent-2: #ffb86b;
  --grad-banner: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 35%, #0f3460 70%, #16213e 100%);
  --grad-primary: linear-gradient(135deg, #6c5ce7 0%, #00d2ff 100%);
  --grad-accent: linear-gradient(135deg, #ff6b9d 0%, #ffb86b 100%);
  --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 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(108, 92, 231, 0.35), 0 8px 32px rgba(108, 92, 231, 0.25);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --blur: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.62);
    --bg-card-solid: #ffffff;
    --border: rgba(80, 90, 160, 0.14);
    --border-strong: rgba(80, 90, 160, 0.28);
    --text: #1a1c2e;
    --text-soft: #3d4262;
    --text-dim: #6b7192;
    --grad-banner: linear-gradient(135deg, #eef1ff 0%, #e3dcff 35%, #d8f0ff 70%, #eef1ff 100%);
    --shadow-sm: 0 2px 8px rgba(60, 70, 140, 0.10);
    --shadow-md: 0 8px 28px rgba(60, 70, 140, 0.14);
    --shadow-lg: 0 18px 50px rgba(60, 70, 140, 0.20);
    --glow: 0 0 0 1px rgba(108, 92, 231, 0.25), 0 8px 32px rgba(108, 92, 231, 0.18);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(108, 92, 231, 0.22), transparent 60%),
    radial-gradient(800px 480px at 88% 4%, rgba(0, 210, 255, 0.16), transparent 62%),
    radial-gradient(700px 600px at 50% 120%, rgba(255, 107, 157, 0.10), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  scroll-margin-top: 90px;
}

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

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  position: relative;
  padding-left: 18px;
}
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-primary);
  box-shadow: 0 0 18px rgba(108, 92, 231, 0.6);
}

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  color: var(--text-soft);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
  font-size: clamp(0.94rem, 1.4vw, 1.02rem);
}

ul { margin: 0; padding: 0; list-style: none; }

strong { color: var(--text); }

::selection {
  background: rgba(108, 92, 231, 0.45);
  color: #fff;
}

/* ============ HEADER / NAV ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 16, 32, 0.62);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

nav[aria-label="主导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

nav[aria-label="主导航"] > a {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding: 0.15rem 0;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
nav[aria-label="主导航"] > a:hover {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.55));
}

nav[aria-label="主导航"] ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

nav[aria-label="主导航"] ul li a {
  display: inline-block;
  padding: 0.42rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}
nav[aria-label="主导航"] ul li a:hover,
nav[aria-label="主导航"] ul li a:focus-visible {
  color: var(--text);
  background: rgba(108, 92, 231, 0.16);
  border-color: var(--border-strong);
  box-shadow: 0 0 18px rgba(108, 92, 231, 0.28);
  transform: translateY(-1px);
  outline: none;
}

/* ============ MAIN LAYOUT ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.2rem 4rem;
}

main > section {
  position: relative;
  margin: 0 0 2.4rem;
  padding: clamp(1.4rem, 3.2vw, 2.6rem);
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  opacity: 0;
  transform: translateY(38px);
  animation: rise 0.85s var(--ease) forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

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

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

main > section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(108, 92, 231, 0.5), transparent 35%, transparent 65%, rgba(0, 210, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

main > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--glow);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* ============ HERO ============ */
#hero {
  background: var(--grad-banner);
  background-size: 220% 220%;
  animation: rise 0.85s var(--ease) forwards, bannerShift 18s ease-in-out infinite alternate;
  border: 1px solid rgba(108, 92, 231, 0.35);
  padding: clamp(1.8rem, 4.5vw, 3.6rem);
  text-align: left;
}

@keyframes bannerShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -12%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.35), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

#hero::after {
  background: linear-gradient(140deg, rgba(255, 107, 157, 0.55), transparent 40%, transparent 60%, rgba(0, 210, 255, 0.5));
}

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

#hero h1 {
  position: relative;
  z-index: 1;
  background: linear-gradient(120deg, #ffffff 10%, #a8b8ff 45%, #7ce7ff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 6px 40px rgba(0, 210, 255, 0.25);
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: light) {
  #hero h1 {
    background: linear-gradient(120deg, #2a2d5e 10%, #6c5ce7 50%, #0f9fd6 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
  }
}

#hero p {
  position: relative;
  z-index: 1;
  max-width: 78ch;
  font-size: clamp(0.94rem, 1.45vw, 1.05rem);
  color: var(--text-soft);
}

@media (prefers-color-scheme: light) {
  #hero p { color: #3d4262; }
}

/* ============ ABOUT ============ */
#about h3 {
  margin-top: 1.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-strong);
}
#about h3:first-of-type { margin-top: 0.4rem; }

/* ============ PRODUCTS ============ */
#products h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
#products h3::before {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 3px;
  background: var(--grad-accent);
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.6);
  transform: rotate(45deg);
}

/* ============ SOLUTIONS ============ */
#solutions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

#solutions h2 { grid-column: 1 / -1; }

#solutions h3 {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  background: rgba(108, 92, 231, 0.10);
  border-left: 3px solid var(--primary-2);
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
#solutions h3:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateX(4px);
}

/* ============ CASES ============ */
#cases h3 {
  margin-top: 1.5rem;
  color: var(--accent-2);
}

#cases p {
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
#cases p:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* ============ NEWS ============ */
#news h3 {
  position: relative;
  padding-left: 1.1rem;
  margin-top: 1.6rem;
  color: var(--primary-2);
}
#news h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.18);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(0, 210, 255, 0.05); }
}

#news p {
  padding-left: 1.1rem;
  border-left: 1px solid var(--border);
}

/* ============ ARTICLES ============ */
#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
#articles h2 { grid-column: 1 / -1; }

#articles article {
  position: relative;
  margin-top: 1.2rem;
  padding: 1.2rem 1.3rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.38s var(--ease), box-shadow 0.38s var(--ease), border-color 0.38s var(--ease), background 0.38s var(--ease);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity 0.38s var(--ease);
}

#articles article:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: rgba(108, 92, 231, 0.10);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(108, 92, 231, 0.2);
}
#articles article:hover::before { opacity: 1; }

#articles article h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  transition: color 0.3s var(--ease);
}
#articles article:hover h3 { color: var(--primary-2); }

#articles article p {
  font-size: 0.94rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-2);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  transition: all 0.3s var(--ease);
}
#articles article a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}
#articles article a:hover {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
}
#articles article a:hover::after { transform: translateX(4px); }

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin-top: 1.1rem;
  padding: 0.95rem 1.1rem 0.95rem 2.6rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  color: var(--text);
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: #fff;
  border-radius: 8px;
  background: var(--grad-primary);
  box-shadow: 0 0 14px rgba(108, 92, 231, 0.5);
}

#faq h3 + p {
  margin-top: 0;
  padding: 1rem 1.2rem 1.1rem 2.6rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: background 0.3s var(--ease);
}

#faq h3:hover {
  background: rgba(108, 92, 231, 0.14);
  color: var(--primary-2);
}
#faq h3:hover + p {
  background: rgba(108, 92, 231, 0.06);
  border-color: var(--border-strong);
}

/* ============ HOWTO ============ */
#howto h3 {
  margin-top: 1.6rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--accent-2);
}

#howto p {
  padding-left: 1rem;
}

#howto h3:first-of-type { margin-top: 0.4rem; }

/* ============ CONTACT ============ */
#contact {
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.16), rgba(0, 210, 255, 0.10)),
    var(--bg-card);
}

#contact h3 {
  margin-top: 1.5rem;
  color: var(--primary-2);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-strong);
  display: inline-block;
}

#contact p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
#contact p:hover {
  background: rgba(108, 92, 231, 0.14);
  transform: translateX(4px);
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.4);
}

/* ============ LEGAL ============ */
#legal h2 { margin-top: 1.6rem; }
#legal h2:first-of-type { margin-top: 0.4rem; }

#legal p {
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ============ FOOTER ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 2.4rem 1.2rem 2.8rem;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  border-top: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  footer { background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.06)); }
}

footer p {
  margin: 0.35rem 0;
  font-size: 0.86rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

footer p:first-child {
  font-weight: 700;
  color: var(--text-soft);
}

/* ============ RESPONSIVE ============ */
@media (min-width: 720px) {
  #articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }
  #articles h2 { margin-bottom: 0.4rem; }
  #articles article { margin-top: 0; }
}

@media (min-width: 1024px) {
  #articles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding-top: 2.2rem; }
}

@media (max-width: 860px) {
  nav[aria-label="主导航"] {
    gap: 0.6rem;
    padding: 0.6rem 1rem;
  }
  nav[aria-label="主导航"] ul {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }
  nav[aria-label="主导航"] ul::-webkit-scrollbar { display: none; }
  nav[aria-label="主导航"] ul li a {
    white-space: nowrap;
    padding: 0.38rem 0.75rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  main { padding: 1rem 0.8rem 2.6rem; }
  main > section {
    padding: 1.2rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.4rem;
  }
  #hero {
    padding: 1.5rem 1.1rem;
    border-radius: var(--radius-md);
  }
  h2 { padding-left: 14px; }
  h2::before { width: 5px; }
  #faq h3 {
    padding: 0.85rem 0.9rem 0.85rem 2.4rem;
    font-size: 1rem;
  }
  #faq h3::before {
    left: 0.7rem;
    width: 21px;
    height: 21px;
    font-size: 0.72rem;
  }
  #faq h3 + p { padding: 0.9rem 1rem 1rem 2.4rem; }
  #sitemap ul li a,
  #links ul li a { padding: 0.42rem 0.85rem; font-size: 0.84rem; }
  footer { padding: 1.8rem 0.9rem 2.2rem; }
}

/* ============ ACCESSIBILITY / MOTION ============ */
@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;
  }
  main > section { opacity: 1; transform: none; }
}

:focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ PRINT ============ */
@media print {
  header, footer, #sitemap, #links { display: none; }
  body {
    background: #fff;
    color: #000;
    background-image: none;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
    transform: none;
    animation: none;
    page-break-inside: avoid;
  }
  h1, h2, h3, p, a { color: #000 !important; -webkit-text-fill-color: #000; }
  a { text-decoration: underline; }
}