:root {
  --bg: #f4f5fa;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1a1a2e;
  --text-soft: #555a72;
  --text-mute: #8a8fa6;
  --border: rgba(26, 26, 46, 0.08);
  --primary: #e94560;
  --primary-soft: rgba(233, 69, 96, 0.12);
  --accent: #0f3460;
  --accent-2: #533483;
  --grad-1: linear-gradient(135deg, #e94560 0%, #533483 55%, #0f3460 100%);
  --grad-2: linear-gradient(120deg, rgba(233, 69, 96, 0.9), rgba(83, 52, 131, 0.85));
  --shadow-sm: 0 2px 10px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 20px 50px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --blur: 16px;
  --header-h: 68px;
  --maxw: 1180px;
  --t: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"],
body.dark-mode {
  --bg: #0d0f1c;
  --bg-alt: #12152a;
  --surface: rgba(30, 34, 58, 0.6);
  --surface-solid: #171b32;
  --text: #eef0f8;
  --text-soft: #b6bbd4;
  --text-mute: #838aa8;
  --border: rgba(255, 255, 255, 0.1);
  --primary: #ff5c78;
  --primary-soft: rgba(255, 92, 120, 0.16);
  --accent: #1a4a8a;
  --accent-2: #7a4fc0;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
}

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

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

body {
  margin: 0;
  font-family: "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(circle at 12% 8%, rgba(233, 69, 96, 0.1), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(83, 52, 131, 0.12), transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(15, 52, 96, 0.08), transparent 55%);
  background-attachment: fixed;
  transition: background-color var(--t), color var(--t);
  overflow-x: hidden;
}

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

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

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

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

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
}

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

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

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

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

ul, ol {
  margin: 0;
  padding: 0;
}

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

::selection {
  background: var(--primary);
  color: #fff;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--t), box-shadow var(--t);
}

.header-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform var(--t);
}

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

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

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

#site-header nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

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

#site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color var(--t), background-color var(--t), transform var(--t);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-actions form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-actions input[type="search"] {
  width: 150px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: width var(--t), border-color var(--t), box-shadow var(--t);
}

.header-actions input[type="search"]:focus {
  width: 190px;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

.header-actions button {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t), background-color var(--t), color var(--t), box-shadow var(--t);
}

.header-actions form button[type="submit"] {
  background: var(--grad-1);
  color: #fff;
  border-color: transparent;
}

.header-actions button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#theme-toggle:hover {
  background: var(--primary);
  color: #fff;
}

#menu-toggle {
  display: none;
}

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

main > section,
main > nav {
  margin-top: 56px;
  animation: fadeUp 0.7s var(--t) both;
}

main > section:nth-of-type(1) {
  margin-top: 28px;
}

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

main > section > article,
main > section > .article-list,
main > section > .faq-list,
main > section > .hero-stats,
main > section > p {
  animation: fadeUp 0.7s var(--t) both;
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--grad-1);
  background-size: 180% 180%;
  animation: gradShift 14s ease infinite, fadeUp 0.7s var(--t) both;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.28), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.16), transparent 40%);
  z-index: -1;
}

#hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(10px);
  z-index: -1;
  animation: floaty 9s ease-in-out infinite;
}

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

@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(24px) scale(1.06); }
}

#hero h1 {
  color: #fff;
  max-width: 900px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

#hero > p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 8px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform var(--t), box-shadow var(--t), background-color var(--t), color var(--t);
}

.btn-primary {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  color: var(--primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  color: #fff;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 26px;
  max-width: 760px;
}

.stat {
  padding: 18px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: transform var(--t), background-color var(--t);
}

.stat:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.22);
}

.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-banner .slide {
  display: none;
  animation: fadeSlide 0.6s var(--t) both;
}

.hero-banner .slide.active {
  display: block;
}

.hero-banner svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-mute);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-mute);
}

.breadcrumb a {
  color: var(--text-soft);
}

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

/* ============ Content cards ============ */
main > section > article {
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 40px);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--t), transform var(--t);
}

main > section > article:hover {
  box-shadow: var(--shadow-lg);
}

main > section > article h3 {
  margin-top: 1.4em;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

main > section > article h3:first-child {
  margin-top: 0;
}

main > section > article p {
  color: var(--text-soft);
}

#about article h3 {
  color: var(--accent-2);
}

#products article h3 {
  color: var(--primary);
}

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

blockquote {
  margin: 18px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-soft);
  color: var(--text);
  font-style: italic;
  transition: transform var(--t), background-color var(--t);
}

blockquote:hover {
  transform: translateX(6px);
}

/* ============ News / article list ============ */
#news > p {
  max-width: 820px;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.article-list article {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}

.article-list article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 0;
  background: var(--grad-1);
  transition: width var(--t);
}

.article-list article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.article-list article:hover::after {
  width: 100%;
}

.article-list h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.article-list h3 a {
  color: var(--text);
}

.article-list h3 a:hover {
  color: var(--primary);
}

.article-list .meta {
  font-size: 0.8rem;
  color: var(--text-mute);
  margin-bottom: 10px;
}

.article-list article > p:not(.meta) {
  flex: 1;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.article-list article > a:last-child {
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  transition: background-color var(--t), color var(--t), transform var(--t);
}

.article-list article > a:last-child:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(4px);
}

/* ============ HowTo ============ */
#howto article {
  border-top: 4px solid var(--primary);
}

#howto article h3 {
  color: var(--accent-2);
}

/* ============ FAQ ============ */
.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin-top: 20px;
  align-items: start;
}

.faq-list details {
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}

.faq-list details:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-list details[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 44px 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  transition: color var(--t), background-color var(--t);
}

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

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform var(--t);
}

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

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

.faq-list details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
  animation: fadeUp 0.4s var(--t) both;
}

/* ============ Contact ============ */
#contact address {
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

#contact address p {
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

#contact address p:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ============ Footer ============ */
footer {
  margin-top: 60px;
  padding: 48px 20px 30px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

footer > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

footer nav a {
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: color var(--t);
}

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

footer section {
  margin-bottom: 26px;
}

footer h2 {
  font-size: 1.05rem;
  padding-left: 14px;
  margin-bottom: 12px;
}

footer h2::before {
  width: 4px;
}

footer section ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

footer section ul a {
  font-size: 0.88rem;
  color: var(--text-soft);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  transition: background-color var(--t), color var(--t), transform var(--t);
}

footer section ul a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

footer section p {
  font-size: 0.88rem;
  color: var(--text-mute);
  max-width: 900px;
}

footer .copyright,
footer .security {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-mute);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

footer .security {
  border-top: none;
  padding-top: 6px;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-1);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--t), visibility var(--t), transform var(--t), box-shadow var(--t);
}

#back-to-top.visible,
#back-to-top:focus-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  #site-header nav > ul {
    gap: 0;
  }
  #site-header nav a {
    padding: 8px 9px;
    font-size: 0.86rem;
  }
  .header-actions input[type="search"] {
    width: 120px;
  }
}

@media (max-width: 880px) {
  :root {
    --header-h: 60px;
  }
  .header-inner {
    gap: 12px;
  }
  #site-header nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 12px 16px 18px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  #site-header.nav-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  #site-header nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  #site-header nav a {
    display: block;
    padding: 12px 14px;
    font-size: 0.98rem;
    border-radius: 12px;
  }
  #menu-toggle {
    display: inline-block;
  }
  .header-actions form {
    display: none;
  }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat-label {
    font-size: 0.74rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 0 14px 30px;
  }
  main > section,
  main > nav {
    margin-top: 40px;
  }
  #hero {
    padding: 26px 20px;
    border-radius: var(--radius);
  }
  #hero h1 {
    font-size: 1.5rem;
  }
  #hero > p {
    font-size: 0.92rem;
  }
  .hero-actions {
    gap: 10px;
  }
  .btn-primary,
  .btn-secondary {
    flex: 1 1 100%;
    padding: 12px 20px;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 14px 18px;
  }
  .stat-num {
    font-size: 1.5rem;
  }
  .stat-label {
    margin-top: 0;
  }
  main > section > article {
    padding: 22px 18px;
    border-radius: var(--radius);
  }
  .article-list,
  .faq-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .brand-name {
    font-size: 0.98rem;
  }
  footer {
    padding: 36px 16px 26px;
  }
  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 0.76rem;
  }
}

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