:root {
  --bg: #f4f5f9;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1a1a2e;
  --text-soft: #4a4a5e;
  --text-muted: #7a7a8c;
  --primary: #e94560;
  --primary-soft: rgba(233, 69, 96, 0.12);
  --accent: #533483;
  --accent-2: #0f3460;
  --deep: #16213e;
  --border: rgba(26, 26, 46, 0.1);
  --shadow: 0 10px 30px rgba(22, 33, 62, 0.1);
  --shadow-lg: 0 20px 50px rgba(22, 33, 62, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --blur: saturate(160%) blur(14px);
  --header-h: 72px;
  --maxw: 1200px;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #533483 100%);
  --grad-accent: linear-gradient(135deg, #e94560 0%, #533483 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"],
html.dark,
body.dark {
  --bg: #0d0d17;
  --bg-alt: #12121f;
  --surface: rgba(26, 26, 46, 0.62);
  --surface-solid: #16213e;
  --text: #eef0f6;
  --text-soft: #c3c6d4;
  --text-muted: #8a8fa3;
  --primary: #ff5c78;
  --primary-soft: rgba(255, 92, 120, 0.16);
  --accent: #7b5ea7;
  --accent-2: #1c4a7e;
  --deep: #0b1220;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d17;
    --bg-alt: #12121f;
    --surface: rgba(26, 26, 46, 0.62);
    --surface-solid: #16213e;
    --text: #eef0f6;
    --text-soft: #c3c6d4;
    --text-muted: #8a8fa3;
    --primary: #ff5c78;
    --primary-soft: rgba(255, 92, 120, 0.16);
    --accent: #7b5ea7;
    --accent-2: #1c4a7e;
    --deep: #0b1220;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

*,
*::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: "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-color: var(--bg);
  background-image:
    radial-gradient(60vw 60vw at 85% -10%, rgba(233, 69, 96, 0.14), transparent 60%),
    radial-gradient(50vw 50vw at -10% 10%, rgba(83, 52, 131, 0.16), transparent 60%),
    radial-gradient(40vw 40vw at 50% 120%, rgba(15, 52, 96, 0.16), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

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

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

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

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  background: linear-gradient(100deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 5px;
  border-radius: 4px;
  background: var(--grad-accent);
}

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

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

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

li {
  margin-bottom: 0.45em;
}

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

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

blockquote {
  margin: 0;
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-height: var(--header-h);
}

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

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

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

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

.brand-name {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#site-header nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

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

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

#site-header nav a:hover,
#site-header nav a:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-2px);
}

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

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

#site-search {
  width: 200px;
  max-width: 40vw;
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

#site-search::placeholder {
  color: var(--text-muted);
}

#site-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

#site-header form[role="search"] button,
#theme-toggle {
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#theme-toggle {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
}

#site-header form[role="search"] button:hover,
#theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(233, 69, 96, 0.32);
  filter: brightness(1.05);
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section,
main > nav {
  margin-top: 32px;
}

main > section {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 40px);
  box-shadow: var(--shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 69, 96, 0.28);
}

/* ---------- Breadcrumb ---------- */
main > nav[aria-label="面包屑导航"] {
  font-size: 0.88rem;
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
}

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

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

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

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

/* ---------- Hero ---------- */
#hero {
  position: relative;
  overflow: hidden;
  color: #eef0f6;
  background: var(--grad-hero);
  border: none;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.5), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 55%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(83, 52, 131, 0.6), transparent 65%);
  filter: blur(20px);
  z-index: -1;
  animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}

#hero h1 {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

#hero p {
  color: rgba(238, 240, 246, 0.85);
  max-width: 78ch;
}

#hero a {
  color: #ffb3c1;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 179, 193, 0.5);
}

#hero a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

#hero > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 20px;
}

.hero-visual {
  margin: 24px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.hero-visual:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

/* ---------- Cards inside sections ---------- */
#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#howto h3 {
  padding: 14px 18px;
  margin: 18px 0 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(22, 33, 62, 0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products h3:hover,
#advantages h3:hover,
#solutions h3:hover,
#applications h3:hover,
#cases h3:hover,
#howto h3:hover {
  transform: translateX(4px);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.16);
  border-left-color: var(--accent);
}

#products h3 + p,
#advantages h3 + p,
#solutions h3 + p,
#applications h3 + p,
#cases h3 + p,
#howto h3 + p {
  padding: 0 4px;
}

/* ---------- Testimonials ---------- */
#testimonials blockquote {
  position: relative;
  padding: 18px 22px 18px 52px;
  margin: 0 0 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(22, 33, 62, 0.07);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  left: 14px;
  top: 2px;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  opacity: 0.55;
}

#testimonials blockquote:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(233, 69, 96, 0.16);
}

#testimonials blockquote p {
  margin: 0;
  color: var(--text-soft);
}

/* ---------- News & Articles ---------- */
#news article,
#articles article {
  position: relative;
  padding: 18px 20px;
  margin: 0 0 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(22, 33, 62, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(22, 33, 62, 0.16);
  border-color: rgba(233, 69, 96, 0.3);
}

#news article h3,
#articles article h2 {
  margin: 0 0 6px;
  padding: 0;
  font-size: 1.08rem;
  background: none;
  -webkit-text-fill-color: currentColor;
}

#articles article h2::before {
  display: none;
}

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--primary-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

#articles article a::after {
  content: "\2192";
  transition: transform 0.25s var(--ease);
}

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

/* ---------- FAQ ---------- */
#faq details {
  margin: 0 0 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

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

#faq summary {
  cursor: pointer;
  padding: 14px 44px 14px 18px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--primary);
  transition: transform 0.3s var(--ease);
}

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

#faq summary:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

#faq details p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--text-soft);
  animation: fadeSlide 0.35s var(--ease);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Contact ---------- */
#contact address {
  font-style: normal;
}

#contact address ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#contact address li {
  margin: 0;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact address li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(22, 33, 62, 0.12);
}

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

#sitemap li,
#links li,
#meta-info li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  background: var(--grad-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(233, 69, 96, 0.3);
}

#meta-info li {
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- Footer ---------- */
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-soft);
  padding: 0 4px;
}

footer a:hover {
  color: var(--primary);
}

footer p:last-child a {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

footer p:last-child a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(233, 69, 96, 0.35);
  color: #fff;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .header-inner {
    gap: 12px;
  }
  #site-search {
    width: 160px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    padding: 10px 16px;
  }
  #site-header nav {
    order: 3;
    flex-basis: 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;
    padding-bottom: 4px;
  }
  #site-header nav a {
    white-space: nowrap;
  }
  #site-header form[role="search"] {
    margin-left: auto;
  }
  #site-search {
    width: 140px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 0 14px 28px;
  }
  main > section,
  main > nav {
    margin-top: 20px;
  }
  main > section {
    border-radius: var(--radius);
    padding: 18px 16px;
  }
  .header-inner {
    gap: 10px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  #site-header form[role="search"] {
    flex: 1 1 100%;
    order: 2;
  }
  #site-search {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }
  #theme-toggle {
    order: 2;
    padding: 9px 12px;
    font-size: 0.8rem;
  }
  #hero > p:last-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #contact address ul {
    grid-template-columns: 1fr;
  }
  #testimonials blockquote {
    padding: 16px 16px 16px 44px;
  }
  footer {
    padding: 24px 14px 40px;
  }
}

@media (max-width: 380px) {
  #site-header nav a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }
  h1 {
    font-size: 1.5rem;
  }
}

/* ---------- Print ---------- */
@media print {
  #site-header,
  footer,
  #theme-toggle,
  #site-header form[role="search"] {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}