:root {
  --bg: #0f0f1a;
  --bg-alt: #16162a;
  --bg-card: rgba(30, 30, 52, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8f0;
  --text-dim: #a0a0b8;
  --text-muted: #6c6c85;
  --accent: #e94560;
  --accent-2: #7b5cff;
  --accent-3: #00d4aa;
  --gradient: linear-gradient(135deg, #e94560 0%, #7b5cff 55%, #00d4aa 100%);
  --gradient-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.18) 0%, rgba(123, 92, 255, 0.18) 55%, rgba(0, 212, 170, 0.14) 100%);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 60px rgba(123, 92, 255, 0.28);
  --blur: blur(18px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 68px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5fa;
    --bg-alt: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --border: rgba(20, 20, 50, 0.09);
    --text: #1a1a2e;
    --text-dim: #4a4a68;
    --text-muted: #83839c;
    --shadow: 0 10px 40px rgba(30, 30, 70, 0.1);
    --shadow-hover: 0 18px 60px rgba(123, 92, 255, 0.2);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      ellipse 80% 50% at 10% -10%,
      rgba(233, 69, 96, 0.12),
      transparent 60%
    ),
    radial-gradient(
      ellipse 70% 50% at 95% 0%,
      rgba(123, 92, 255, 0.14),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 50% 110%,
      rgba(0, 212, 170, 0.1),
      transparent 60%
    );
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

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

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

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

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  position: relative;
  padding-left: 18px;
  margin-top: 0.4em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(233, 69, 96, 0.5);
}

h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  color: var(--text);
}

h4 {
  font-size: 1.02rem;
  color: var(--accent-3);
}

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

ul,
ol {
  padding-left: 1.35em;
  color: var(--text-dim);
}

li {
  margin-bottom: 0.4em;
}

li::marker {
  color: var(--accent);
}

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

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(16px, 4vw, 40px);
  height: var(--header-h);
  background: rgba(15, 15, 26, 0.62);
  -webkit-backdrop-filter: var(--blur) saturate(160%);
  backdrop-filter: var(--blur) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.18);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text);
}

.brand svg {
  border-radius: 9px;
  box-shadow: 0 4px 18px rgba(233, 69, 96, 0.35);
  transition: transform 0.4s var(--ease);
  flex-shrink: 0;
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

header nav ul::-webkit-scrollbar {
  display: none;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: background 0.28s var(--ease), color 0.28s var(--ease),
    transform 0.28s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--text);
  background: var(--gradient-soft);
  transform: translateY(-1px);
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 60px;
}

section {
  position: relative;
  margin: 34px 0;
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--blur) saturate(150%);
  backdrop-filter: var(--blur) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.5s var(--ease);
  animation: rise 0.7s var(--ease) both;
}

section:hover {
  border-color: rgba(123, 92, 255, 0.32);
  box-shadow: var(--shadow-hover);
}

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

@supports (animation-timeline: view()) {
  section {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

section > h2:first-child {
  margin-top: 0;
}

/* ============ Hero ============ */
#hero {
  margin-top: 30px;
  padding: clamp(28px, 5vw, 64px) clamp(22px, 4vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--gradient);
  background-size: 220% 220%;
  border: none;
  box-shadow: 0 24px 70px rgba(123, 92, 255, 0.35);
  overflow: hidden;
  animation: rise 0.7s var(--ease) both, flow 14s ease infinite;
  position: relative;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 18% 20%,
      rgba(255, 255, 255, 0.28),
      transparent 45%
    ),
    radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.22), transparent 50%);
  z-index: -1;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

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

#hero h1 {
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.28);
  margin-bottom: 0.5em;
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
}

#hero p:last-child {
  display: inline-block;
  margin-bottom: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑导航"] {
  margin: 20px 0 0;
}

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

nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  color: var(--text-muted);
  opacity: 0.7;
}

nav[aria-label="面包屑导航"] a {
  color: var(--text-dim);
}

nav[aria-label="面包屑导航"] a:hover {
  color: var(--accent);
}

/* ============ Cards / grid inside sections ============ */
#products,
#services,
#scenarios,
#solutions,
#cases,
#news,
#articles,
#notes,
#faq,
#howto {
  display: block;
}

#articles article {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  overflow: hidden;
}

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

#articles article:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: var(--shadow-hover);
}

#articles article:hover::before {
  width: 7px;
}

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

#articles article h3 {
  margin-bottom: 0.35em;
  transition: color 0.3s var(--ease);
}

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

#articles article p {
  margin-bottom: 0.5em;
  font-size: 0.94rem;
}

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

#articles article a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article a:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.28);
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin-top: 1.4em;
  padding: 14px 18px 14px 46px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
  overflow: hidden;
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 3px 12px rgba(233, 69, 96, 0.4);
}

#faq h3:hover {
  border-color: rgba(123, 92, 255, 0.4);
  transform: translateX(4px);
}

#faq h3 + p {
  margin: -2px 0 0;
  padding: 12px 18px 16px 46px;
  font-size: 0.94rem;
  border-left: 2px solid rgba(123, 92, 255, 0.25);
  margin-left: 20px;
}

/* ============ 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;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 3px 14px rgba(123, 92, 255, 0.4);
}

#howto ol li:hover {
  transform: translateX(5px);
  border-color: rgba(0, 212, 170, 0.4);
}

/* ============ Contact ============ */
#contact p {
  font-size: 0.95rem;
}

#contact h3 {
  margin-top: 1.4em;
}

#contact h3:first-of-type {
  margin-top: 0;
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  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 8px 24px rgba(123, 92, 255, 0.35);
}

/* ============ Footer ============ */
footer {
  margin-top: 40px;
  padding: 44px clamp(16px, 4vw, 40px) 52px;
  text-align: center;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 80%);
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  box-shadow: 0 0 22px rgba(233, 69, 96, 0.6);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

footer p:first-child {
  font-size: 0.94rem;
  color: var(--text-dim);
  font-weight: 600;
}

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e94560, #7b5cff);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff5f7a, #9b80ff);
  background-clip: padding-box;
}

/* ============ Selection ============ */
::selection {
  background: rgba(233, 69, 96, 0.35);
  color: #fff;
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  header nav {
    width: 100%;
  }

  header nav ul {
    padding-bottom: 4px;
  }

  :root {
    --header-h: 108px;
  }

  section {
    margin: 24px 0;
  }
}

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

  main {
    padding-bottom: 40px;
  }

  section {
    padding: 18px 16px;
    border-radius: var(--radius);
  }

  #hero {
    padding: 26px 20px;
    border-radius: var(--radius);
  }

  #hero p:last-child {
    display: block;
    font-size: 0.8rem;
    line-height: 1.6;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #articles article {
    padding: 16px;
  }

  #faq h3 {
    padding: 12px 14px 12px 42px;
  }

  #faq h3 + p {
    padding-left: 30px;
    margin-left: 14px;
  }

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

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

/* ============ Motion preferences ============ */
@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;
  }
}

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

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

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