:root {
  --primary: #e94560;
  --primary-dark: #c73550;
  --primary-light: #ff6b82;
  --secondary: #0f3460;
  --accent: #f5a623;
  --bg: #f7f8fc;
  --bg-alt: #ffffff;
  --bg-deep: #1a1a2e;
  --text: #1f2430;
  --text-muted: #5a6172;
  --text-invert: #ffffff;
  --border: rgba(26, 26, 46, 0.08);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1180px;
  --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10121c;
    --bg-alt: #181b2a;
    --bg-deep: #0b0d16;
    --text: #e8eaf2;
    --text-muted: #9aa1b5;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(24, 27, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --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;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

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

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

a:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

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

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

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

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: 1.5rem 0 0.6rem;
  color: var(--secondary);
}

@media (prefers-color-scheme: dark) {
  h3 {
    color: var(--primary-light);
  }
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

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

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform var(--transition);
}

header nav > a:hover {
  transform: scale(1.04);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

header nav ul li a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition),
    transform var(--transition);
}

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

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.08);
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ============ Main ============ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

section {
  margin: 2.5rem 0;
  scroll-margin-top: 90px;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  margin: 2rem 0 3rem;
  padding: 3rem 2rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 45%, #e94560 100%);
  background-size: 200% 200%;
  animation: gradientShift 14s ease infinite, fadeUp 0.8s ease both;
  box-shadow: var(--shadow-lg);
  color: var(--text-invert);
}

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

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(
    circle,
    rgba(245, 166, 35, 0.5) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -8%;
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(233, 69, 96, 0.55) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

#hero h1,
#hero p,
#hero figure {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  animation: fadeUp 0.8s 0.1s ease both;
}

#hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 780px;
  font-size: 1.02rem;
  animation: fadeUp 0.8s 0.2s ease both;
}

#hero figure {
  margin-top: 2rem;
  animation: fadeUp 0.8s 0.3s ease both;
}

#hero figure svg {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition);
}

#hero figure:hover svg {
  transform: scale(1.015) rotate(-0.4deg);
}

#hero figcaption {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============ Anchor Nav (page nav) ============ */
main > nav[aria-label="页面锚点导航"] {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

main > nav[aria-label="页面锚点导航"] h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

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

main > nav[aria-label="页面锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

main > nav[aria-label="页面锚点导航"] ul li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

main > nav[aria-label="页面锚点导航"] ul li a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.35);
}

/* ============ Generic section cards ============ */
#brand,
#history,
#culture,
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#author,
#sitemap,
#links,
#copyright,
#privacy,
#disclaimer,
#security {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform 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);
}

/* ============ Products / columns grid ============ */
#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#reviews h3,
#news h3,
#knowledge h3,
#howto h3 {
  position: relative;
  padding-left: 1rem;
}

#products h3::before,
#advantages h3::before,
#solutions h3::before,
#applications h3::before,
#cases h3::before,
#reviews h3::before,
#news h3::before,
#knowledge h3::before,
#howto h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* ============ Reviews blockquote-like ============ */
#reviews h3 + p {
  background: linear-gradient(
    135deg,
    rgba(233, 69, 96, 0.06),
    rgba(15, 52, 96, 0.06)
  );
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  font-style: italic;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition);
}

#reviews h3 + p:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ============ Articles ============ */
#articles {
  display: grid;
  gap: 1.25rem;
}

#articles > h2 {
  grid-column: 1 / -1;
}

#articles > p {
  grid-column: 1 / -1;
}

#articles article {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(233, 69, 96, 0.08),
    rgba(245, 166, 35, 0.08)
  );
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.3);
}

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

#articles article h3 {
  margin-top: 0;
  position: relative;
  z-index: 1;
}

#articles article p {
  position: relative;
  z-index: 1;
}

#articles article a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  position: relative;
  z-index: 1;
  transition: transform var(--transition), box-shadow var(--transition);
}

#articles article a:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
  color: #fff;
}

@media (min-width: 760px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============ FAQ ============ */
#faq h3 {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin: 1rem 0 0.5rem;
  cursor: default;
  transition: all var(--transition);
}

#faq h3:hover {
  border-color: var(--primary);
  background: rgba(233, 69, 96, 0.06);
  transform: translateX(4px);
}

#faq h3 + p {
  padding: 0 0.5rem;
  animation: fadeUp 0.6s ease both;
}

/* ============ HowTo steps ============ */
#howto h3 {
  color: var(--primary);
}

#howto p {
  padding-left: 1rem;
}

/* ============ Contact ============ */
#contact h3 {
  color: var(--primary);
}

#contact p {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--accent);
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 52, 96, 0.3);
}

/* ============ Footer ============ */
footer {
  background: linear-gradient(160deg, #1a1a2e 0%, #0f3460 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.5rem 1.25rem 2rem;
  margin-top: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(233, 69, 96, 0.25) 0%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

footer p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

footer p:first-child {
  font-weight: 600;
  color: #fff;
}

footer nav {
  margin-top: 1.25rem;
  position: relative;
  z-index: 1;
}

footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

footer nav ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  position: relative;
  transition: color var(--transition);
}

footer nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}

footer nav ul li a:hover {
  color: #fff;
}

footer nav ul li a:hover::after {
  width: 100%;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header nav {
    padding: 0.65rem 1rem;
  }

  header nav ul {
    gap: 0.1rem;
  }

  header nav ul li a {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }

  main {
    padding: 0 1rem 2.5rem;
  }

  #hero {
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-lg);
  }

  #brand,
  #history,
  #culture,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #reviews,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #author,
  #sitemap,
  #links,
  #copyright,
  #privacy,
  #disclaimer,
  #security {
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: var(--radius-md);
  }

  section {
    margin: 1.75rem 0;
  }
}

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

  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul li a {
    white-space: nowrap;
  }

  #hero {
    padding: 1.75rem 1.15rem;
    border-radius: var(--radius-md);
  }

  #hero p {
    font-size: 0.95rem;
  }

  main > nav[aria-label="页面锚点导航"] {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-md);
  }

  main > nav[aria-label="页面锚点导航"] ul li a {
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
  }

  h2::after {
    width: 40px;
    height: 3px;
  }

  #faq h3 {
    font-size: 1rem;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }
}

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

/* ============ Print ============ */
@media print {
  header,
  footer,
  main > nav[aria-label="页面锚点导航"] {
    display: none;
  }

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

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

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