:root {
  --brand: #e8453c;
  --brand-dark: #c23129;
  --brand-light: #ff6f5e;
  --accent: #ffb347;
  --accent-2: #ff7a59;
  --ink: #1c1a22;
  --ink-soft: #4a4652;
  --muted: #7a7584;
  --line: rgba(28, 26, 34, 0.1);
  --bg: #fdfbf9;
  --bg-soft: #f6f1ec;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 2px 10px rgba(28, 26, 34, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 26, 34, 0.09);
  --shadow-lg: 0 22px 60px rgba(232, 69, 60, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 68px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f0ee;
    --ink-soft: #c9c4cf;
    --muted: #9a95a4;
    --line: rgba(255, 255, 255, 0.12);
    --bg: #121016;
    --bg-soft: #1a1720;
    --card: #1e1b24;
    --card-glass: rgba(30, 27, 36, 0.66);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 22px 60px rgba(232, 69, 60, 0.28);
  }
}

*, *::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);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(232, 69, 60, 0.1), transparent 60%),
    radial-gradient(700px 420px at -10% 10%, rgba(255, 179, 71, 0.1), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

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

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--ink);
}

h4 {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

::selection {
  background: rgba(232, 69, 60, 0.22);
  color: var(--ink);
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

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

header nav > a[href="/"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 8px 0;
  white-space: nowrap;
}

header nav > a[href="/"]::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 6px 16px rgba(232, 69, 60, 0.35);
  flex: none;
}

header nav > a[href="/"]:hover {
  color: var(--brand);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--brand);
  background: rgba(232, 69, 60, 0.09);
  transform: translateY(-1px);
}

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

main > section {
  margin: 28px 0;
  padding: clamp(22px, 3vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), transparent 85%);
  opacity: 0.85;
  pointer-events: none;
}

main > section:hover {
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease);
}

/* ---------- Hero ---------- */
#hero {
  margin-top: 28px;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(255, 179, 71, 0.55), transparent 65%),
    radial-gradient(500px 320px at 10% 100%, rgba(255, 122, 89, 0.5), transparent 70%),
    linear-gradient(135deg, #e8453c 0%, #d2382f 45%, #a8281f 100%);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -8%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
  animation: floaty 11s ease-in-out infinite reverse;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 62ch;
  font-size: clamp(0.98rem, 0.95rem + 0.3vw, 1.1rem);
  position: relative;
  z-index: 1;
}

#hero p:last-child {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

/* ---------- Anchor nav (page nav) ---------- */
nav[aria-label="页面锚点导航"] {
  margin: 28px 0;
  padding: clamp(18px, 2.5vw, 28px);
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

nav[aria-label="页面锚点导航"] h2 {
  font-size: 1.15rem;
  margin-bottom: 0.9em;
}

nav[aria-label="页面锚点导航"] h2::after {
  width: 40px;
  height: 4px;
}

nav[aria-label="页面锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

nav[aria-label="页面锚点导航"] ul li a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

nav[aria-label="页面锚点导航"] ul li a:hover,
nav[aria-label="页面锚点导航"] ul li a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent-2));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 69, 60, 0.3);
}

/* ---------- Section content elements ---------- */
section > h3 {
  margin-top: 1.6em;
}

section > h3:first-of-type {
  margin-top: 0.6em;
}

section > h4 {
  margin-top: 1.2em;
  padding-left: 14px;
  position: relative;
}

section > h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

/* ---------- Cards: products / advantages / solutions / applications / cases / reviews / news / knowledge / faq / howto ---------- */
#products, #advantages, #solutions, #applications, #cases, #reviews, #news, #knowledge, #faq, #howto, #articles {
  display: block;
}

#products > h3,
#advantages > h3,
#solutions > h3,
#applications > h3,
#cases > h3,
#reviews > h3,
#news > h3,
#knowledge > h3,
#faq > h3,
#howto > h4,
#howto > h3 {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0 10px;
  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,
#reviews > h3:hover,
#news > h3:hover,
#knowledge > h3:hover,
#faq > h3:hover,
#howto > h4:hover,
#howto > h3:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-left-color: var(--accent);
}

#products > h3 + p,
#advantages > h3 + p,
#solutions > h3 + p,
#applications > h3 + p,
#cases > h3 + p,
#reviews > h3 + p,
#news > h3 + p,
#knowledge > h3 + p,
#faq > h3 + p,
#howto > h4 + p,
#howto > h3 + p {
  padding: 0 6px 4px;
  margin-bottom: 1.2em;
}

/* Reviews styling */
#reviews > h3 {
  font-style: italic;
}

#reviews > h3 + p {
  position: relative;
  padding-left: 22px;
}

#reviews > h3 + p::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -6px;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.5;
  font-family: Georgia, serif;
}

/* News dates */
#news > h3 + p {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: rgba(232, 69, 60, 0.1);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
}

/* ---------- Articles ---------- */
#articles article {
  padding: 22px 24px;
  margin: 16px 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(232, 69, 60, 0.25);
}

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

#articles article h3 {
  margin-bottom: 0.35em;
  font-size: 1.18rem;
}

#articles article h3 + p {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.7em;
}

#articles article p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 69, 60, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

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

#articles article p a:hover,
#articles article p a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 24px rgba(232, 69, 60, 0.38);
}

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

/* ---------- FAQ ---------- */
#faq > h3 {
  cursor: default;
  position: relative;
  padding-right: 48px;
}

#faq > h3::after {
  content: "?";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(232, 69, 60, 0.3);
}

/* ---------- HowTo steps ---------- */
#howto > h4 {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.14), var(--bg-soft) 60%);
}

#howto > h4 + p {
  padding-left: 20px;
}

/* ---------- Contact ---------- */
#contact {
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 179, 71, 0.18), transparent 70%),
    var(--card);
}

#contact > h3 {
  margin-top: 1.4em;
}

#contact > h3 + p {
  padding: 10px 16px;
  margin: 6px 0;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#contact > h3 + p:hover {
  transform: translateX(4px);
  border-color: rgba(232, 69, 60, 0.3);
}

/* ---------- Sitemap & links ---------- */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover,
#sitemap ul li a:focus-visible,
#links ul li a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent-2));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 69, 60, 0.28);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 40px;
  padding: clamp(32px, 4vw, 56px) 20px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(232, 69, 60, 0.14), transparent 70%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
}

footer section {
  max-width: var(--maxw);
  margin: 0 auto;
}

footer h2 {
  font-size: 1.1rem;
  margin-top: 1.4em;
}

footer h2:first-of-type {
  margin-top: 0;
}

footer h2::after {
  width: 36px;
  height: 4px;
}

footer p {
  font-size: 0.9rem;
  color: var(--muted);
}

footer p:last-child {
  margin-top: 2em;
  padding-top: 1.4em;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

/* Staggered fade-in for sections (scroll reveal fallback) */
main > section:nth-of-type(1) { animation-delay: 0.02s; }
main > section:nth-of-type(2) { animation-delay: 0.06s; }
main > section:nth-of-type(3) { animation-delay: 0.1s; }
main > section:nth-of-type(4) { animation-delay: 0.14s; }
main > section:nth-of-type(5) { animation-delay: 0.18s; }
main > section:nth-of-type(6) { animation-delay: 0.22s; }
main > section:nth-of-type(7) { animation-delay: 0.26s; }
main > section:nth-of-type(8) { animation-delay: 0.3s; }
main > section:nth-of-type(9) { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }
main > section:nth-of-type(11) { animation-delay: 0.42s; }
main > section:nth-of-type(12) { animation-delay: 0.46s; }
main > section:nth-of-type(13) { animation-delay: 0.5s; }
main > section:nth-of-type(14) { animation-delay: 0.54s; }
main > section:nth-of-type(15) { animation-delay: 0.58s; }
main > section:nth-of-type(16) { animation-delay: 0.62s; }
main > section:nth-of-type(17) { animation-delay: 0.66s; }
main > section:nth-of-type(18) { animation-delay: 0.7s; }

/* Scroll-driven animation enhancement */
@supports (animation-timeline: view()) {
  main > section {
    animation: fadeUp 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  header nav {
    gap: 10px;
    padding: 10px 16px;
  }
  header nav ul {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  header nav ul::-webkit-scrollbar {
    display: none;
  }
  header nav ul li a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 7px 12px;
  }
  main {
    padding: 0 16px 32px;
  }
  main > section {
    border-radius: var(--radius);
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 22px;
    --radius: 16px;
  }
  body {
    font-size: 15px;
  }
  header nav > a[href="/"] {
    font-size: 1.08rem;
  }
  header nav > a[href="/"]::before {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  main > section {
    padding: 20px 16px;
    margin: 18px 0;
  }
  #hero {
    padding: 30px 20px;
  }
  h2::after {
    width: 42px;
    height: 4px;
  }
  nav[aria-label="页面锚点导航"] {
    padding: 16px;
  }
  nav[aria-label="页面锚点导航"] ul {
    gap: 8px;
  }
  nav[aria-label="页面锚点导航"] ul li a {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
  #products > h3,
  #advantages > h3,
  #solutions > h3,
  #applications > h3,
  #cases > h3,
  #reviews > h3,
  #news > h3,
  #knowledge > h3,
  #faq > h3,
  #howto > h4,
  #howto > h3 {
    padding: 13px 15px;
    font-size: 1rem;
  }
  #articles article {
    padding: 18px;
  }
  #faq > h3 {
    padding-right: 44px;
  }
  #sitemap ul,
  #links ul {
    gap: 8px;
  }
  #sitemap ul li a,
  #links ul li a {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
  footer {
    padding: 28px 16px;
  }
}

@media (max-width: 380px) {
  header nav ul li a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  main > section {
    padding: 16px 13px;
  }
}

/* ---------- Print ---------- */
@media print {
  header, footer, nav[aria-label="页面锚点导航"], #sitemap, #links {
    display: none;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  body {
    background: #fff;
    color: #000;
  }
}