:root {
  --bg: #0f1020;
  --bg-soft: #171a33;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.09);
  --glass: rgba(20, 22, 45, 0.55);
  --text: #eef1ff;
  --text-dim: #a7adcf;
  --text-mute: #7a81a8;
  --accent: #ff5c8a;
  --accent-2: #7c5cff;
  --accent-3: #22d3ee;
  --grad: linear-gradient(135deg, #7c5cff 0%, #ff5c8a 55%, #ffa14a 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(255, 92, 138, 0.18));
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6ff;
    --bg-soft: #ffffff;
    --card: rgba(255, 255, 255, 0.75);
    --card-strong: rgba(255, 255, 255, 0.92);
    --glass: rgba(255, 255, 255, 0.6);
    --text: #1b1e33;
    --text-dim: #4c5270;
    --text-mute: #6d7392;
    --border: rgba(20, 24, 60, 0.1);
    --shadow: 0 18px 45px rgba(60, 70, 140, 0.16);
    --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(255, 92, 138, 0.12));
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(800px 480px at 92% 4%, rgba(255, 92, 138, 0.22), transparent 62%),
    radial-gradient(700px 520px at 50% 100%, rgba(34, 211, 238, 0.12), transparent 65%);
  background-attachment: fixed;
}

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

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

a:hover, a:focus {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul, ol {
  padding-left: 1.35em;
}

li {
  margin: 0.3em 0;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.12rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

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

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

time {
  color: var(--text-mute);
  font-size: 0.85rem;
}

blockquote {
  margin: 1em 0;
  padding: 1em 1.2em;
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

/* ---------- Header / Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a[aria-label] {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  position: relative;
  padding-right: 0.4rem;
}

header nav > a[aria-label]:hover {
  text-decoration: none;
  filter: brightness(1.12);
}

header nav > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  flex: 1 1 auto;
}

header nav > ul li { margin: 0; }

header nav > ul a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: all 0.25s var(--ease);
}

header nav > ul a:hover,
header nav > ul a:focus {
  color: var(--text);
  background: var(--card-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.3rem 0.25rem 0.9rem;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

header form[role="search"]:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 92, 138, 0.18);
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

header form[role="search"] input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.4rem 0;
  width: 170px;
  font-family: inherit;
}

header form[role="search"] input::placeholder {
  color: var(--text-mute);
}

header form[role="search"] button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ---------- Main layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  margin-bottom: 1.25rem;
}

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

main > nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-mute);
  opacity: 0.6;
}

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

/* ---------- Sections ---------- */
section {
  margin: 2.5rem 0;
  animation: fadeUp 0.7s var(--ease) both;
}

section > h2 {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 1.1rem;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 5px;
  border-radius: 6px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(255, 92, 138, 0.55);
}

section > h3 {
  margin: 1.6rem 0 0.5rem;
  color: var(--text);
}

section > h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0.75;
}

section ul,
section ol {
  color: var(--text-dim);
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: calc(var(--radius) + 10px);
  background: var(--grad-soft), var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  overflow: hidden;
  margin-top: 0.5rem;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 92, 138, 0.35), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  animation: float 11s ease-in-out infinite reverse;
}

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

#hero h1 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.6rem;
}

#hero > div[role="img"] {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero > div[role="img"]:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 26px 60px rgba(124, 92, 255, 0.35);
}

#hero > ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

#hero > ul li {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#hero > ul li:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 92, 138, 0.5);
  background: rgba(255, 92, 138, 0.12);
}

#hero > p:last-child a {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.3s var(--ease);
}

#hero > p:last-child a:hover {
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 92, 138, 0.35);
}

/* ---------- Generic cards for content sections ---------- */
#brand,
#products,
#solutions,
#scenarios,
#cases,
#howto,
#knowledge,
#contact {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

#brand:hover,
#products:hover,
#solutions:hover,
#scenarios:hover,
#cases:hover,
#howto:hover,
#knowledge:hover,
#contact:hover {
  border-color: rgba(124, 92, 255, 0.4);
}

#brand ul li,
#products ul li,
#solutions ul li,
#scenarios ul li,
#howto ul li,
#knowledge ul li {
  padding-left: 0.2rem;
}

/* ---------- News ---------- */
#news {
  display: grid;
  gap: 1rem;
}

#news > h2 { grid-column: 1 / -1; }

#news article {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#news article:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 22px 48px rgba(34, 211, 238, 0.18);
}

#news article h3 {
  margin-bottom: 0.3rem;
  color: var(--text);
}

#news article h3::after { display: none; }

/* ---------- Articles ---------- */
#articles {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

#articles > h2 { grid-column: 1 / -1; }

#articles article {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#articles article:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 92, 138, 0.45);
  box-shadow: 0 24px 55px rgba(255, 92, 138, 0.22);
}

#articles article h3 {
  margin-bottom: 0.35rem;
  color: var(--text);
}

#articles article h3::after { display: none; }

#articles article p { flex: 1 1 auto; }

#articles article p:last-child { margin-top: 0.9rem; }

#articles article p:last-child a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.3s var(--ease);
}

#articles article p:last-child a:hover {
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  transform: translateX(3px);
}

/* ---------- FAQ ---------- */
#faq details {
  margin: 0.7rem 0;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details[open] {
  border-color: rgba(124, 92, 255, 0.5);
  background: var(--card-strong);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding-right: 2.6rem;
  transition: color 0.25s var(--ease);
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover { color: var(--accent); }

#faq details p {
  padding: 0 1.2rem 1.1rem;
  margin: 0;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ---------- Contact ---------- */
#contact address {
  font-style: normal;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid var(--border);
  margin: 1rem 0;
}

#contact address p {
  margin: 0.35rem 0;
  color: var(--text-dim);
}

#contact address a { color: var(--accent-3); }

/* ---------- Sitemap / Links ---------- */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  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(--grad);
  border-color: transparent;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(124, 92, 255, 0.35);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 3rem;
  padding: 2.5rem 1.25rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

footer section {
  max-width: var(--maxw);
  margin: 0 auto 1.75rem;
  animation: none;
}

footer h2 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

footer h2::before,
footer h3::after { display: none; }

footer h3 {
  font-size: 1rem;
  margin: 1rem 0 0.35rem;
  color: var(--text);
}

footer p {
  color: var(--text-mute);
  font-size: 0.9rem;
}

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

footer section[aria-labelledby="footer-copy"] {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
  margin-bottom: 0;
}

footer section[aria-labelledby="footer-copy"] p {
  margin: 0.25rem 0;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-18px, 22px, 0) scale(1.06); }
}

section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
section:nth-of-type(5) { animation-delay: 0.2s; }
section:nth-of-type(6) { animation-delay: 0.25s; }

@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;
  }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  header nav {
    gap: 0.6rem;
  }

  header nav > ul {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

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

  header nav > ul a {
    white-space: nowrap;
  }

  header form[role="search"] {
    margin-left: auto;
  }

  header form[role="search"] input {
    width: 130px;
  }
}

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

  main { padding: 1rem 0.9rem 2.5rem; }

  header nav { padding: 0.6rem 0.9rem; }

  header nav > a[aria-label] { font-size: 1.1rem; }

  header form[role="search"] {
    flex: 1 1 100%;
    order: 2;
  }

  header form[role="search"] input {
    width: 100%;
    flex: 1 1 auto;
  }

  #hero {
    padding: 1.25rem 1rem;
  }

  #hero > ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  #hero > ul li {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
  }

  #articles {
    grid-template-columns: 1fr;
  }

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

  #brand,
  #products,
  #solutions,
  #scenarios,
  #cases,
  #howto,
  #knowledge,
  #contact {
    padding: 1.15rem 1rem;
  }

  section { margin: 1.9rem 0; }

  blockquote { padding: 0.85rem 1rem; }
}

@media (max-width: 380px) {
  #hero > ul { grid-template-columns: 1fr; }
  #sitemap ul, #links ul { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  header, footer, #sitemap, #links { display: none; }
  body {
    background: #fff;
    color: #000;
  }
  section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    animation: none;
  }
  a { color: #000; text-decoration: underline; }
}