:root {
  --primary: #1a6b8c;
  --primary-light: #2b8fb5;
  --primary-dark: #114a63;
  --accent: #e8873a;
  --accent-light: #f0a565;
  --bg: #f5f9fb;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
  --text: #1d2b33;
  --text-soft: #4a5c66;
  --text-muted: #6b7d87;
  --border: rgba(26, 107, 140, 0.14);
  --shadow-sm: 0 2px 8px rgba(17, 74, 99, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 74, 99, 0.10);
  --shadow-lg: 0 16px 48px rgba(17, 74, 99, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1180px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4aa8cc;
    --primary-light: #6fc0e0;
    --primary-dark: #2b8fb5;
    --accent: #f0a565;
    --accent-light: #f5c08a;
    --bg: #0e1a20;
    --bg-alt: #13232b;
    --bg-glass: rgba(19, 35, 43, 0.6);
    --bg-glass-strong: rgba(19, 35, 43, 0.88);
    --text: #e6f0f5;
    --text-soft: #b3c7d1;
    --text-muted: #8aa3b0;
    --border: rgba(74, 168, 204, 0.18);
    --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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(26, 107, 140, 0.07), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(232, 135, 58, 0.06), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(26, 107, 140, 0.05), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

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

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
h4 { font-size: clamp(1rem, 2vw, 1.1rem); }

p {
  color: var(--text-soft);
}

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

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
}

header nav ul li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--primary);
  background: rgba(26, 107, 140, 0.10);
  transform: translateY(-1px);
  outline: none;
}

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

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

section > h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

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

section h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

section h4 {
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--text);
}

section p {
  margin-bottom: 10px;
}

/* ============ Hero Banner ============ */
#hero {
  position: relative;
  margin-top: 32px;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, #1a6b8c 0%, #2b8fb5 45%, #e8873a 100%);
  background-size: 200% 200%;
  animation: heroShift 14s ease infinite;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.22), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.14), transparent 42%);
  pointer-events: none;
  z-index: -1;
}

#hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: -1;
}

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

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  margin-bottom: 18px;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  max-width: 760px;
  line-height: 1.85;
}

/* ============ Cards (glass) ============ */
#brand,
#about,
#history,
#culture,
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#news,
#knowledge,
#faq,
#howto,
#contact {
  background: var(--bg-glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

#brand:hover,
#about:hover,
#history:hover,
#culture:hover,
#products:hover,
#advantages:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#reviews:hover,
#news:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-lg);
}

/* ============ Articles ============ */
#articles {
  margin-top: 48px;
}

#articles > h2 {
  margin-bottom: 24px;
}

#articles article {
  background: var(--bg-glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 107, 140, 0.32);
}

#articles article h3 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--primary);
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

#articles article p:nth-of-type(2) {
  font-weight: 500;
  color: var(--text-soft);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0;
}

#articles article a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

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

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 12px 16px 12px 40px;
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(26, 107, 140, 0.06);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: default;
  transition: background var(--transition);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
}

#faq h3:hover {
  background: rgba(26, 107, 140, 0.10);
}

#faq h3 + p {
  padding: 12px 16px 14px 40px;
  margin-bottom: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.94rem;
}

/* ============ HowTo steps ============ */
#howto h4 {
  position: relative;
  padding-left: 34px;
  margin-top: 16px;
  color: var(--primary);
}

#howto h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(26, 107, 140, 0.12);
}

#howto h4 + p {
  padding-left: 34px;
  margin-bottom: 6px;
}

/* ============ Reviews ============ */
#reviews p {
  position: relative;
  padding: 14px 18px 14px 44px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

#reviews p::before {
  content: "\201C";
  position: absolute;
  left: 14px;
  top: 6px;
  font-size: 2.2rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--accent);
  opacity: 0.7;
}

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

/* ============ Contact & Footer lists ============ */
#contact ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

#contact ul li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.86rem;
  color: var(--text-soft);
  background: rgba(26, 107, 140, 0.07);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

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

footer {
  margin-top: 40px;
  background: linear-gradient(160deg, var(--primary-dark), #0c3546);
  color: rgba(255, 255, 255, 0.85);
}

footer #legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) 20px;
}

footer h2 {
  font-size: 1.05rem;
  color: #fff;
  margin-top: 22px;
  margin-bottom: 6px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

footer h2:first-child {
  margin-top: 0;
}

footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

footer a {
  color: var(--accent-light);
}

footer a:hover {
  color: #fff;
}

footer p:last-child,
footer p:nth-last-child(2) {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ============ Scroll reveal animation ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > section,
#articles article {
  animation: fadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

main > section:nth-of-type(1) { animation-delay: 0.05s; }
main > section:nth-of-type(2) { animation-delay: 0.10s; }
main > section:nth-of-type(3) { animation-delay: 0.15s; }
main > section:nth-of-type(4) { animation-delay: 0.20s; }
main > section:nth-of-type(5) { animation-delay: 0.25s; }
main > section:nth-of-type(6) { animation-delay: 0.30s; }
main > section:nth-of-type(7) { animation-delay: 0.35s; }
main > section:nth-of-type(8) { animation-delay: 0.40s; }
main > section:nth-of-type(9) { animation-delay: 0.45s; }
main > section:nth-of-type(10) { animation-delay: 0.50s; }
main > section:nth-of-type(11) { animation-delay: 0.55s; }
main > section:nth-of-type(12) { animation-delay: 0.60s; }

#articles article:nth-child(2) { animation-delay: 0.05s; }
#articles article:nth-child(3) { animation-delay: 0.10s; }
#articles article:nth-child(4) { animation-delay: 0.15s; }
#articles article:nth-child(5) { animation-delay: 0.20s; }
#articles article:nth-child(6) { animation-delay: 0.25s; }
#articles article:nth-child(7) { animation-delay: 0.30s; }
#articles article:nth-child(8) { animation-delay: 0.35s; }
#articles article:nth-child(9) { animation-delay: 0.40s; }
#articles article:nth-child(10) { animation-delay: 0.45s; }

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

/* ============ Focus states ============ */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header nav ul {
    gap: 2px;
    padding: 8px 0;
  }

  header nav ul li a {
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  #hero {
    margin-top: 24px;
  }
}

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

  main {
    padding: 0 14px 40px;
  }

  header nav {
    padding: 0 8px;
  }

  header nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 4px;
  }

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

  header nav ul li {
    flex: 0 0 auto;
  }

  section {
    margin-top: 32px;
  }

  #hero {
    padding: 32px 22px;
    border-radius: var(--radius-lg);
  }

  #hero::after {
    width: 220px;
    height: 220px;
    top: -30%;
    right: -20%;
  }

  #brand,
  #about,
  #history,
  #culture,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #reviews,
  #news,
  #knowledge,
  #faq,
  #howto,
  #contact {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  #articles article {
    padding: 18px 16px;
  }

  #faq h3 {
    padding-left: 36px;
    font-size: 0.94rem;
  }

  #faq h3 + p {
    padding-left: 36px;
    font-size: 0.9rem;
  }

  #reviews p {
    padding-left: 38px;
    font-size: 0.9rem;
  }

  #howto h4 {
    padding-left: 30px;
  }

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

@media (max-width: 380px) {
  header nav ul li a {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  #hero {
    padding: 26px 18px;
  }
}