:root {
  --bg: #0f1020;
  --bg-alt: #171833;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-solid: #1d1e3a;
  --border: rgba(255, 255, 255, 0.12);
  --text: #eef0ff;
  --text-soft: #b6b9d8;
  --text-mute: #8a8db0;
  --brand: #7c5cff;
  --brand-2: #ff5c8a;
  --brand-3: #38d9c4;
  --accent: #ffc857;
  --gradient: linear-gradient(135deg, #7c5cff 0%, #ff5c8a 55%, #ffc857 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(255, 92, 138, 0.18));
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  --shadow-hover: 0 26px 70px -18px rgba(124, 92, 255, 0.55);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --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, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fc;
    --bg-alt: #ffffff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-solid: #ffffff;
    --border: rgba(20, 22, 50, 0.1);
    --text: #1a1c33;
    --text-soft: #4a4d6b;
    --text-mute: #767a99;
    --gradient-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(255, 92, 138, 0.1));
    --shadow: 0 18px 44px -20px rgba(28, 30, 70, 0.28);
    --shadow-hover: 0 26px 60px -20px rgba(124, 92, 255, 0.4);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 8% -8%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(900px 520px at 96% 4%, rgba(255, 92, 138, 0.22), transparent 62%),
    radial-gradient(800px 500px at 50% 108%, rgba(56, 217, 196, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-3);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

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

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

h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.15em;
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient);
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text);
}

h4 {
  font-size: 1rem;
  color: var(--text-soft);
}

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

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

ul, ol {
  color: var(--text-soft);
  padding-left: 1.4em;
  margin: 0 0 1em;
}

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--brand-2);
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: linear-gradient(180deg, rgba(15, 16, 32, 0.82), rgba(15, 16, 32, 0.55));
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.6));
  }
}

.brand-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.brand-bar a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.brand-bar a:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.15);
}

.brand-bar span {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 12px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

nav ul::-webkit-scrollbar {
  height: 4px;
}

nav ul::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 4px;
}

nav li {
  margin: 0;
  flex: 0 0 auto;
}

nav a {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(124, 92, 255, 0.8);
}

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

main > h1 {
  margin-bottom: 1.2em;
  text-align: center;
  line-height: 1.4;
}

section {
  margin-bottom: 40px;
  padding: 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise-in 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}

@supports (animation-timeline: view()) {
  section {
    animation: rise-in 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 20%;
  }
}

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

section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.5), transparent 40%, rgba(255, 92, 138, 0.4));
  -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.6;
}

section:hover {
  box-shadow: var(--shadow-hover);
  transition: box-shadow 0.45s var(--ease);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hero */
#hero {
  background: var(--gradient-soft), var(--surface);
  text-align: center;
  padding: 44px 32px;
}

#hero p {
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  max-width: 860px;
  margin: 0 auto;
  color: var(--text-soft);
}

#hero strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards grid for products / solutions / cases / news / articles */
#products,
#solutions,
#cases,
#news,
#articles {
  display: block;
}

#products h3,
#solutions h3,
#cases h3 {
  margin-top: 1.4em;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#products h3:first-of-type,
#solutions h3:first-of-type,
#cases h3:first-of-type {
  margin-top: 0.6em;
}

#products h3:hover,
#solutions h3:hover,
#cases h3:hover {
  transform: translateX(6px);
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 12px 30px -16px rgba(124, 92, 255, 0.7);
}

/* News & articles cards */
#news article,
#articles > article {
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#news article:last-child,
#articles > article:last-of-type {
  margin-bottom: 0;
}

#news article:hover,
#articles > article:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 92, 138, 0.55);
  box-shadow: 0 22px 46px -22px rgba(255, 92, 138, 0.55);
}

#news article h3,
#articles > article h3 {
  margin-bottom: 0.35em;
  color: var(--text);
}

#news article p:first-of-type,
#articles > article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 8px 20px -10px rgba(124, 92, 255, 0.9);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

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

#articles > article a:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 14px 28px -10px rgba(255, 92, 138, 0.9);
}

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

/* Article full sections */
#articles section[id^="article-"] {
  padding: 18px 20px;
  margin: 14px 0 0;
  border-radius: var(--radius-md);
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  box-shadow: none;
  animation: none;
}

#articles section[id^="article-"]::after {
  display: none;
}

#articles section[id^="article-"] h4 {
  color: var(--text);
  margin-bottom: 0.5em;
}

/* Blockquote */
blockquote {
  margin: 1.2em 0 0;
  padding: 18px 22px 18px 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border-left: 4px solid transparent;
  border-image: var(--gradient) 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 36px -20px rgba(124, 92, 255, 0.7);
}

blockquote p {
  margin: 0 0 0.8em;
  font-style: italic;
  color: var(--text-soft);
}

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

/* FAQ */
#faq dl {
  margin: 0;
}

#faq dt {
  font-weight: 700;
  color: var(--text);
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  position: relative;
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq dt::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  vertical-align: middle;
}

#faq dt:hover {
  background: var(--gradient-soft);
}

#faq dd {
  margin: 0 0 12px;
  padding: 14px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: none;
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: background 0.3s var(--ease);
}

@media (prefers-color-scheme: light) {
  #faq dd {
    background: rgba(124, 92, 255, 0.04);
  }
}

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

/* HowTo */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 54px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 16px -6px rgba(124, 92, 255, 0.9);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(56, 217, 196, 0.6);
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(124, 92, 255, 0.85);
}

/* Contact */
#contact p {
  padding: 10px 16px;
  margin: 0 0 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(5px);
  border-color: rgba(124, 92, 255, 0.55);
}

/* Privacy / disclaimer / copyright */
#privacy,
#disclaimer,
#copyright {
  background: var(--surface);
}

#copyright p:last-child {
  font-size: 0.85rem;
  color: var(--text-mute);
}

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.08));
  padding: 30px 24px 40px;
  text-align: center;
}

footer p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .brand-bar {
    padding: 14px 18px 8px;
  }

  nav {
    padding: 0 18px;
  }

  main {
    padding: 24px 18px 48px;
  }

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

  #hero {
    padding: 32px 22px;
  }
}

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

  .brand-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px 6px;
  }

  .brand-bar a {
    font-size: 1.2rem;
  }

  .brand-bar span {
    font-size: 0.75rem;
  }

  nav {
    padding: 0 16px;
  }

  nav ul {
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  nav a {
    padding: 6px 13px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

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

  main > h1 {
    font-size: 1.4rem;
    padding: 0 4px;
  }

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

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #hero {
    padding: 26px 18px;
  }

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

  #news article,
  #articles > article {
    padding: 16px;
  }

  #faq dt {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  #faq dd {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  #howto ol li {
    padding: 10px 12px 10px 48px;
  }

  #howto ol li::before {
    left: 12px;
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  #contact p {
    padding: 9px 13px;
    font-size: 0.9rem;
  }

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

@media (max-width: 380px) {
  main {
    padding: 16px 10px 32px;
  }

  section {
    padding: 16px 13px;
  }

  nav a {
    padding: 6px 11px;
    font-size: 0.8rem;
  }
}

/* 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 {
  body {
    background: #fff;
    color: #000;
  }

  header,
  footer,
  nav {
    display: none;
  }

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