:root {
  --bg: #0f0f1a;
  --bg-soft: #1a1a2e;
  --bg-card: rgba(30, 30, 52, 0.72);
  --bg-card-solid: #1e1e34;
  --text: #eaeaf2;
  --text-soft: #a9a9c0;
  --text-mute: #7a7a95;
  --primary: #e94560;
  --primary-2: #ff6b8a;
  --accent: #533483;
  --accent-2: #0f3460;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --blur: 14px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-solid: #ffffff;
    --text: #1c1c2b;
    --text-soft: #4a4a63;
    --text-mute: #7c7c96;
    --primary: #d61f47;
    --primary-2: #e94560;
    --accent: #6c4bb5;
    --accent-2: #2a5db0;
    --border: rgba(20, 20, 50, 0.08);
    --border-strong: rgba(20, 20, 50, 0.16);
    --shadow: 0 10px 40px rgba(40, 40, 90, 0.14);
    --shadow-soft: 0 4px 20px rgba(40, 40, 90, 0.1);
  }
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(233, 69, 96, 0.16), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(83, 52, 131, 0.22), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(15, 52, 96, 0.28), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  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,
a:focus-visible {
  color: var(--primary);
}

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

h1, h2, h3, h4 {
  line-height: 1.3;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  background: linear-gradient(120deg, var(--text) 30%, var(--primary-2) 70%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

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

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

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

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

li {
  margin-bottom: 0.45em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

blockquote p {
  margin: 0.4em 0;
  font-style: italic;
}

time {
  color: var(--text-mute);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

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

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

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand a:hover {
  color: var(--primary-2);
}

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

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

#site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#site-header nav li {
  margin: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav a:hover {
  color: var(--text);
  background: rgba(233, 69, 96, 0.16);
  transform: translateY(-2px);
}

/* ===== Layout ===== */
main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 40px) clamp(16px, 4vw, 32px) 60px;
}

main > section {
  position: relative;
  margin: 0 0 clamp(28px, 5vw, 52px);
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  animation: fadeUp 0.7s var(--ease) both;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

main > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Hero ===== */
#hero {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(233, 69, 96, 0.22), rgba(83, 52, 131, 0.26) 45%, rgba(15, 52, 96, 0.3)),
    var(--bg-card);
  border: 1px solid var(--border-strong);
}

#hero::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}

#hero p {
  max-width: 76ch;
}

#hero strong {
  color: var(--primary-2);
}

.hero-banner {
  margin-top: clamp(18px, 3vw, 28px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-banner:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 18px 60px rgba(233, 69, 96, 0.28);
}

.hero-banner figure {
  margin: 0;
  position: relative;
}

.hero-banner svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner figcaption {
  padding: 10px 16px;
  font-size: 0.84rem;
  color: var(--text-mute);
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid var(--border);
}

/* ===== Breadcrumb ===== */
nav[aria-label="面包屑导航"] {
  margin: 0 0 clamp(22px, 4vw, 36px);
  animation: fadeIn 0.8s var(--ease) both;
}

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

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

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

/* ===== Cards inside sections ===== */
#products ul,
#solutions ul,
#howto ul,
#howto ol {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

#products ul li,
#solutions ul li,
#howto ul li,
#howto ol li {
  position: relative;
  margin: 0;
  padding: 12px 16px 12px 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.16);
}

#howto ol li {
  counter-increment: step;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

#products ul li:hover,
#solutions ul li:hover,
#howto ul li:hover,
#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
}

/* ===== News ===== */
#news > p {
  margin-bottom: 1.4em;
}

#news article {
  position: relative;
  margin: 0 0 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#news article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#news article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

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

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

#news article:hover h3 {
  color: var(--primary-2);
}

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

#news article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-2);
}

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

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

/* ===== Knowledge ===== */
#knowledge h3 {
  margin-top: 1.2em;
}

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

/* ===== FAQ ===== */
#faq details {
  margin: 0 0 12px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  overflow: hidden;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.14);
}

#faq summary {
  position: relative;
  cursor: pointer;
  padding: 15px 48px 15px 18px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-2);
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.14);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#faq details[open] summary {
  color: var(--primary-2);
  background: rgba(233, 69, 96, 0.08);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: rgba(233, 69, 96, 0.24);
}

#faq details p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.94rem;
  animation: fadeIn 0.4s var(--ease) both;
}

/* ===== Contact ===== */
#contact address {
  font-style: normal;
  display: grid;
  gap: 10px;
  margin-bottom: 1.4em;
}

#contact address p {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.94rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#contact address p:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

#contact address a {
  font-weight: 600;
}

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

#sitemap li {
  margin: 0;
}

#sitemap ul a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

#sitemap ul a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.3);
}

#sitemap h3 {
  margin-top: 1.6em;
}

/* ===== Footer ===== */
footer {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 40px;
}

footer > section {
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
}

footer h2 {
  font-size: 1.2rem;
}

footer h3 {
  font-size: 1rem;
  margin-top: 1em;
  color: var(--primary-2);
}

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

footer > p {
  margin-top: 22px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  #site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #site-header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #site-header nav::-webkit-scrollbar {
    display: none;
  }

  #site-header nav ul {
    flex-wrap: nowrap;
    width: max-content;
    padding-bottom: 2px;
  }

  #site-header nav a {
    white-space: nowrap;
  }
}

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

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

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #hero::after {
    width: 260px;
    height: 260px;
  }

  .hero-banner figcaption {
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  #news article {
    padding: 14px 16px;
  }

  #faq summary {
    padding: 13px 44px 13px 14px;
    font-size: 0.95rem;
  }

  #faq details p {
    padding: 0 14px 14px;
  }

  #contact address p {
    padding: 10px 14px;
  }

  footer {
    padding-bottom: 28px;
  }
}

@media (max-width: 400px) {
  .brand a span {
    font-size: 1rem;
  }

  #products ul li,
  #solutions ul li,
  #howto ul li,
  #howto ol li {
    padding: 10px 12px 10px 38px;
  }
}

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  #site-header,
  #hero::after,
  nav[aria-label="面包屑导航"] {
    display: none;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    animation: none;
  }
}