:root {
  --c-primary: #e63946;
  --c-primary-dark: #c1121f;
  --c-primary-light: #ff6b6b;
  --c-accent: #f4a261;
  --c-accent-2: #2a9d8f;
  --c-blue: #1d3557;
  --c-blue-light: #457b9d;
  --c-bg: #fdf9f9;
  --c-bg-alt: #fff5f5;
  --c-surface: #ffffff;
  --c-surface-glass: rgba(255, 255, 255, 0.72);
  --c-text: #1a1a2e;
  --c-text-soft: #4a4a5e;
  --c-text-muted: #7a7a8c;
  --c-border: #f0e2e4;
  --c-shadow: rgba(230, 57, 70, 0.12);
  --c-shadow-strong: rgba(29, 53, 87, 0.16);
  --grad-hero: linear-gradient(135deg, #e63946 0%, #f4a261 60%, #ffb703 100%);
  --grad-brand: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
  --grad-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,245,245,0.85));
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-w: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.2s var(--ease);
  --t-mid: 0.35s var(--ease);
  --t-slow: 0.6s var(--ease);
  --space: clamp(16px, 3vw, 32px);
}

[data-theme="dark"] {
  --c-primary: #ff5c69;
  --c-primary-dark: #ff8a94;
  --c-primary-light: #ff8a94;
  --c-accent: #f4a261;
  --c-accent-2: #4ecdc4;
  --c-blue: #a8dadc;
  --c-blue-light: #a8dadc;
  --c-bg: #0f1117;
  --c-bg-alt: #151823;
  --c-surface: #1a1e2a;
  --c-surface-glass: rgba(26, 30, 42, 0.72);
  --c-text: #eef0f6;
  --c-text-soft: #c3c7d4;
  --c-text-muted: #8b91a3;
  --c-border: #2a2f3d;
  --c-shadow: rgba(0, 0, 0, 0.4);
  --c-shadow-strong: rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #7a1220 0%, #a8562b 60%, #6b4c0f 100%);
  --grad-brand: linear-gradient(135deg, #ff5c69 0%, #ff8a94 100%);
  --grad-card: linear-gradient(145deg, rgba(30,35,48,0.92), rgba(22,26,38,0.88));
}

*,
*::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: var(--font-sans);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(230, 57, 70, 0.07), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(244, 162, 97, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(42, 157, 143, 0.05), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-mid), color var(--t-mid);
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--c-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

h1 { font-size: clamp(1.7rem, 4.2vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }

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

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

li {
  margin-bottom: 0.45em;
}

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

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

time {
  color: var(--c-text-muted);
  font-size: 0.88em;
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--c-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px var(--c-shadow);
  color: var(--c-text-soft);
  font-style: normal;
}

blockquote p:last-child { margin-bottom: 0; }

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

/* ===== Header ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 4px 24px var(--c-shadow);
  transition: background var(--t-mid), box-shadow var(--t-mid);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  flex-wrap: wrap;
}

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

.brand:hover { text-decoration: none; }

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 16px var(--c-shadow);
  transition: transform var(--t-mid);
}

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

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

nav[aria-label="主导航"] {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 14px);
  flex-wrap: wrap;
}

.nav-list li { margin: 0; }

.nav-list a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-text-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--c-primary);
  background: rgba(230, 57, 70, 0.09);
  text-decoration: none;
  transform: translateY(-1px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 1 260px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.site-search:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.16);
}

.site-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--c-text);
}

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

.site-search button {
  border: none;
  background: var(--grad-brand);
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: filter var(--t-fast), transform var(--t-fast);
}

.site-search button:hover { filter: brightness(1.08); }
.site-search button:active { transform: scale(0.97); }

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px) rotate(8deg);
  box-shadow: 0 8px 20px var(--c-shadow);
}

#menu-toggle { display: none; }

/* ===== Main / Sections ===== */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space) clamp(40px, 6vw, 80px);
}

section {
  margin: clamp(36px, 5vw, 64px) 0;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1em;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  box-shadow: 0 0 14px var(--c-shadow);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 0.88rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--c-text-muted);
}

.breadcrumb li { margin: 0; }

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--c-text-muted);
}

.breadcrumb a {
  color: var(--c-text-soft);
  font-weight: 600;
}

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

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(20px, 3vw, 36px);
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--grad-hero);
  box-shadow: 0 24px 60px -18px var(--c-shadow-strong);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -15%;
  width: 55%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%);
  filter: blur(24px);
  z-index: -1;
  animation: floatBlob 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-24px, 18px, 0) scale(1.12); }
}

.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.12);
  min-height: 200px;
}

.hero-slider .slide {
  display: none;
  margin: 0;
}

.hero-slider .slide.active {
  display: block;
  animation: slideFade 0.7s var(--ease);
}

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

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

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all var(--t-fast);
}

.slider-dots button:hover { background: #fff; }

.slider-dots button[aria-selected="true"] {
  width: 26px;
  border-radius: var(--radius-pill);
  background: #fff;
}

.hero-text { color: #fff; }

.hero-text h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
  margin-bottom: 0.5em;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  line-height: 1.8;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.18);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 1.2em 0 1.4em;
  padding: 0;
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--t-fast), background var(--t-fast);
}

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

.stat strong {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
}

.cta,
.cta-secondary {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  margin: 4px 10px 4px 0;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.cta {
  background: #fff;
  color: var(--c-primary-dark);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
}

.cta:hover {
  color: var(--c-primary-dark);
  text-decoration: none;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.45);
}

.cta-secondary {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta-secondary:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* ===== Generic content cards ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links {
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--grad-card);
  border: 1px solid var(--c-border);
  box-shadow: 0 14px 40px -22px var(--c-shadow-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--t-mid), transform var(--t-mid);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: 0 22px 54px -24px var(--c-shadow-strong);
}

#about h3,
#products h3,
#solutions h3,
#cases h3,
#news h3,
#articles h3,
#howto h3,
#contact h3 {
  margin-top: 1.4em;
  padding-bottom: 0.35em;
  border-bottom: 2px dashed var(--c-border);
}

#about h3:first-of-type,
#products h3:first-of-type,
#solutions h3:first-of-type,
#cases h3:first-of-type,
#howto h3:first-of-type,
#contact h3:first-of-type {
  margin-top: 0.6em;
}

#products ul,
#solutions ul,
#howto ul {
  list-style: none;
  padding-left: 0;
}

#products ul li,
#solutions ul li,
#howto ul li {
  position: relative;
  padding-left: 26px;
}

#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--grad-brand);
  transform: rotate(45deg);
  transition: transform var(--t-fast);
}

#products ul li:hover::before,
#solutions ul li:hover::before,
#howto ul li:hover::before {
  transform: rotate(135deg) scale(1.2);
}

/* ===== News list ===== */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.news-list li {
  margin: 0;
  padding: clamp(14px, 2vw, 22px);
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 22px -14px var(--c-shadow-strong);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}

.news-list li:hover {
  transform: translateY(-4px);
  border-color: var(--c-primary-light);
  box-shadow: 0 18px 40px -18px var(--c-shadow-strong);
}

.news-list h3 {
  margin: 0 0 0.4em;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.08rem;
}

.news-list h3 a {
  color: var(--c-text);
  text-decoration: none;
}

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

.news-list p {
  margin: 0;
  font-size: 0.94rem;
}

/* ===== Articles ===== */
#articles > p {
  font-size: 0.96rem;
}

#articles article {
  margin: 18px 0;
  padding: clamp(16px, 2.4vw, 26px);
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 10px 26px -18px var(--c-shadow-strong);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--t-mid);
}

#articles article:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary-light);
  box-shadow: 0 20px 46px -20px var(--c-shadow-strong);
}

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

#articles article h3 {
  margin: 0 0 0.4em;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.12rem;
}

#articles article > p:first-of-type {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 0.8em;
}

#articles article > p:last-child { margin-bottom: 0; }

#articles article a {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(230, 57, 70, 0.09);
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
}

#articles article a:hover {
  background: var(--c-primary);
  color: #fff;
  text-decoration: none;
  transform: translateX(3px);
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 22px -16px var(--c-shadow-strong);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.faq-list details:hover {
  border-color: var(--c-primary-light);
  box-shadow: 0 14px 32px -16px var(--c-shadow-strong);
}

.faq-list details[open] {
  border-color: var(--c-primary);
  box-shadow: 0 16px 40px -18px var(--c-shadow-strong);
}

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

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

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.1);
  color: var(--c-primary);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  transition: transform var(--t-mid), background var(--t-mid), color var(--t-mid);
}

.faq-list details[open] summary {
  color: var(--c-primary);
  background: rgba(230, 57, 70, 0.04);
}

.faq-list details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--c-primary);
  color: #fff;
}

.faq-list details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.95rem;
  animation: fadeInDown 0.4s var(--ease);
}

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

/* ===== HowTo ordered list ===== */
#howto ol {
  counter-reset: howto;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  counter-increment: howto;
  position: relative;
  padding-left: 44px;
  margin-bottom: 0.8em;
  min-height: 32px;
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 6px 14px -4px var(--c-shadow);
  transition: transform var(--t-fast);
}

#howto ol li:hover::before { transform: scale(1.12) rotate(8deg); }

/* ===== Contact ===== */
address {
  font-style: normal;
  margin: 1em 0;
}

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

address ul li {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  font-size: 0.94rem;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

address ul li:hover {
  transform: translateY(-2px);
  border-color: var(--c-primary-light);
  box-shadow: 0 10px 24px -14px var(--c-shadow-strong);
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-soft);
  transition: all var(--t-fast);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px var(--c-shadow-strong);
}

/* ===== Footer ===== */
#site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  position: relative;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-brand);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--space) 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-inner section h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7em;
  padding-left: 14px;
  position: relative;
}

.footer-inner section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
}

.footer-inner section h3 {
  font-size: 0.92rem;
  color: var(--c-text);
  margin: 1em 0 0.3em;
}

.footer-inner p {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.75;
}

.copyright {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  text-align: center;
  font-size: 0.84rem;
  color: var(--c-text-muted);
}

/* ===== Back to top ===== */
#back-to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--grad-brand);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 32px -8px var(--c-shadow-strong);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity var(--t-mid), transform var(--t-mid), visibility var(--t-mid), filter var(--t-fast);
}

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

#back-to-top:hover {
  filter: brightness(1.1);
  transform: translateY(-4px) scale(1.06);
}

#back-to-top:active { transform: scale(0.94); }

/* ===== 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; }
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-slider { order: -1; }
  .site-search { flex: 1 1 180px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .header-inner {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

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

  nav[aria-label="主导航"] {
    order: 10;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--t-mid), opacity var(--t-mid);
  }

  nav[aria-label="主导航"].open {
    max-height: 560px;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
  }

  .nav-list a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }

  .site-search {
    order: 11;
    flex-basis: 100%;
  }

  .hero {
    padding: 18px;
    border-radius: var(--radius);
  }

  .stat { font-size: 0.82rem; padding: 5px 12px; }
  .stat strong { font-size: 1rem; }

  .cta,
  .cta-secondary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 18px;
    border-radius: var(--radius);
  }

  blockquote { padding: 0.9em 1.1em; }
}

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

  .brand-name { font-size: 1.05rem; }

  .hero-stats { gap: 8px 10px; }

  .hero-text h1 { font-size: 1.5rem; }

  .hero-lead { font-size: 0.92rem; }

  .slider-dots { bottom: 8px; padding: 4px 10px; }

  .footer-inner { grid-template-columns: 1fr; }

  #howto ol li { padding-left: 38px; }

  #howto ol li::before { width: 26px; height: 26px; font-size: 0.78rem; }

  address ul { grid-template-columns: 1fr; }

  #back-to-top { width: 42px; height: 42px; font-size: 1.15rem; }
}

/* ===== Print ===== */
@media print {
  #site-header,
  #back-to-top,
  .site-search,
  #theme-toggle,
  #menu-toggle,
  .hero-slider,
  .slider-dots {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  section,
  .hero {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
}
</html>