:root {
  --primary: #6d28d9;
  --primary-light: #8b5cf6;
  --primary-dark: #4c1d95;
  --accent: #fbbf24;
  --accent-pink: #f472b6;
  --accent-cyan: #22d3ee;
  --bg: #f8f7fc;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
  --text: #1e1b2e;
  --text-secondary: #4b4866;
  --text-muted: #7c7a92;
  --border: rgba(109, 40, 217, 0.12);
  --shadow-sm: 0 2px 8px rgba(76, 29, 149, 0.06);
  --shadow-md: 0 8px 24px rgba(76, 29, 149, 0.1);
  --shadow-lg: 0 16px 48px rgba(76, 29, 149, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #6d28d9;
  --bg: #0f0d1a;
  --bg-alt: #1a1728;
  --bg-glass: rgba(26, 23, 40, 0.65);
  --bg-glass-strong: rgba(26, 23, 40, 0.88);
  --text: #ece9f6;
  --text-secondary: #b8b4d0;
  --text-muted: #8a86a3;
  --border: rgba(139, 92, 246, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(244, 114, 182, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

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

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

ul,
ol {
  list-style: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header ===== */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 24px;
  font-size: 12.5px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
  letter-spacing: 0.02em;
}

nav[aria-label="主导航"] {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  max-width: 1320px;
  margin: 0 auto;
  flex-wrap: wrap;
}

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

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

.logo svg {
  transition: transform var(--transition);
  filter: drop-shadow(0 2px 6px rgba(109, 40, 217, 0.35));
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.nav-links a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 14.5px;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(139, 92, 246, 0.08);
}

.nav-links a:hover::after {
  width: 60%;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition: box-shadow var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.site-search:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.site-search input {
  border: none;
  outline: none;
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  width: 170px;
}

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

.site-search button {
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  transition: opacity var(--transition);
}

.site-search button:hover {
  opacity: 0.88;
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.menu-toggle {
  display: none;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--text-muted);
}

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

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

.breadcrumb [aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Main layout ===== */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

section {
  margin-top: 56px;
  scroll-margin-top: 90px;
}

section > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  padding-left: 18px;
  letter-spacing: -0.01em;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--primary), var(--accent-pink), var(--accent));
}

section > h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
  line-height: 1.4;
}

section > p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  max-width: 900px;
}

section > p + p {
  margin-top: 0;
}

/* ===== Hero ===== */
.hero {
  margin-top: 28px;
  padding: 0;
}

.hero-carousel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.hero-carousel .slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.hero-carousel .slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.hero-carousel .slide:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

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

#hero-title {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 8px 0 18px;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary), var(--accent-pink), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}

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

.hero-lead {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 880px;
  margin-bottom: 24px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  font-size: 15.5px;
  font-weight: 700;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.35);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-pink));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}

.btn-primary span,
.btn-primary {
  position: relative;
  z-index: 1;
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(109, 40, 217, 0.45);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  color: var(--primary);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--primary-light);
}

.btn-secondary:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hero-stats > div {
  text-align: center;
  padding: 8px;
  transition: transform var(--transition);
}

.hero-stats > div:hover {
  transform: translateY(-4px);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stats span {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Anchor nav ===== */
.anchor-nav {
  margin-top: 40px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.anchor-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.anchor-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

/* ===== Cards / content blocks ===== */
#brand,
#history,
#culture,
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

#brand:hover,
#history:hover,
#culture:hover,
#products:hover,
#advantages:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#reviews:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.25);
}

/* ===== News & articles ===== */
#news article,
#articles article {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent-pink));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

#news article:hover,
#articles article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.3);
}

#news article:hover::before,
#articles article:hover::before {
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.45;
}

#news article h3 a,
#articles article h3 a {
  color: var(--text);
  transition: color var(--transition);
}

#news article h3 a:hover,
#articles article h3 a:hover {
  color: var(--primary);
}

#news article time,
#articles article time {
  display: inline-block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.08);
}

#news article p,
#articles article p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-bottom: 8px;
}

#articles article > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 0;
}

#articles article > a:last-child::after {
  content: "→";
  transition: transform var(--transition);
}

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

/* ===== Reviews ===== */
#reviews blockquote {
  position: relative;
  padding: 22px 24px 22px 56px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#reviews blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 6px;
  font-size: 3.5rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--primary-light);
  opacity: 0.5;
}

#reviews blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(139, 92, 246, 0.3);
}

#reviews blockquote p {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 10px;
}

#reviews blockquote footer {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}

/* ===== FAQ details ===== */
#faq details {
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition);
}

#faq details:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: var(--shadow-md);
}

#faq summary {
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: color var(--transition), background var(--transition);
  user-select: none;
}

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

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

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

#faq summary:hover {
  color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
}

#faq details p {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.8;
  animation: fadeIn 0.35s ease;
}

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

/* ===== HowTo lists ===== */
#howto ul,
#howto ol {
  margin: 0 0 16px 0;
  padding-left: 0;
}

#howto ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

#howto ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 14.5px;
  counter-increment: step;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.3);
}

/* ===== Contact & footer info lists ===== */
#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

#contact ul li {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#contact ul li:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ===== Sitemap & links ===== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

#sitemap a,
#links a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

/* ===== Legal ===== */
#legal h3 {
  color: var(--primary);
}

#legal p {
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* ===== Footer ===== */
footer[role="contentinfo"] {
  margin-top: 60px;
  padding: 48px 24px 28px;
  background: linear-gradient(160deg, var(--primary-dark), #1e1b4b 60%, #0f0d1a);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  pointer-events: none;
}

footer[role="contentinfo"]::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18), transparent 70%);
  pointer-events: none;
}

.footer-info {
  max-width: 1320px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}

.footer-info p {
  font-size: 14px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-info strong {
  color: #fff;
  font-size: 16px;
}

.footer-links {
  max-width: 1320px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.copyright {
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
}

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

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 28px rgba(109, 40, 217, 0.6);
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  nav[aria-label="主导航"] {
    gap: 10px;
  }

  .nav-links a {
    padding: 6px 9px;
    font-size: 13.5px;
  }

  .site-search input {
    width: 130px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    order: 10;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }

  .nav-links.open {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

  .nav-links a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }

  .nav-links a::after {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-search {
    order: 9;
    flex-basis: 100%;
    margin-top: 6px;
  }

  .site-search input {
    width: 100%;
    flex: 1;
  }

  .site-search {
    display: none;
  }

  .site-search.open {
    display: flex;
  }

  #brand,
  #history,
  #culture,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #reviews,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 24px 20px;
  }

  .hero-carousel {
    grid-template-columns: 1fr;
  }

  .hero-carousel .slide:hover {
    transform: translateY(-4px);
  }
}

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

  .top-bar {
    padding: 6px 16px;
    font-size: 11.5px;
    justify-content: center;
    text-align: center;
  }

  nav[aria-label="主导航"] {
    padding: 10px 16px;
  }

  .logo {
    font-size: 18px;
  }

  .logo svg {
    width: 30px;
    height: 30px;
  }

  .breadcrumb,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    margin-top: 40px;
  }

  section > h2 {
    font-size: 1.35rem;
    padding-left: 14px;
  }

  section > h2::before {
    width: 5px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 13px 20px;
  }

  .hero-stats {
    padding: 18px 14px;
    gap: 10px;
  }

  .hero-stats strong {
    font-size: 1.5rem;
  }

  .anchor-nav {
    padding: 14px 16px;
  }

  #brand,
  #history,
  #culture,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #reviews,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  #news article,
  #articles article {
    padding: 16px;
  }

  #reviews blockquote {
    padding: 18px 18px 18px 46px;
  }

  #reviews blockquote::before {
    font-size: 2.8rem;
    left: 12px;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #sitemap a,
  #links a {
    padding: 9px 12px;
    font-size: 13px;
  }

  .back-to-top {
    right: 16px;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }

  footer[role="contentinfo"] {
    padding: 36px 16px 24px;
  }

  .footer-links {
    gap: 6px;
  }

  .footer-links a {
    font-size: 13px;
    padding: 5px 10px;
  }
}

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

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #hero-title {
    animation: none;
  }
}

/* ===== Print ===== */
@media print {
  header[role="banner"],
  .back-to-top,
  .anchor-nav,
  .hero-carousel,
  .hero-actions,
  .theme-toggle,
  .menu-toggle,
  .site-search {
    display: none !important;
  }

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}