:root {
  --primary: #2e7d32;
  --primary-light: #4caf50;
  --primary-dark: #1b5e20;
  --accent: #ff6f61;
  --accent-light: #ff9a8b;
  --bg: #f5f7f6;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(46, 125, 50, 0.14);
  --text: #1d2a22;
  --text-soft: #4a5a50;
  --text-muted: #6f8078;
  --shadow-sm: 0 2px 8px rgba(27, 94, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 94, 32, 0.1);
  --shadow-lg: 0 16px 48px rgba(27, 94, 32, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gradient-hero: linear-gradient(135deg, #2e7d32 0%, #4caf50 42%, #a5d6a7 78%, #ff9a8b 100%);
  --gradient-accent: linear-gradient(135deg, #ff6f61 0%, #ff9a8b 100%);
  --gradient-soft: linear-gradient(135deg, rgba(46, 125, 50, 0.08), rgba(255, 111, 97, 0.08));
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1512;
    --bg-alt: #121b17;
    --surface: #16211c;
    --surface-glass: rgba(22, 33, 28, 0.72);
    --border: rgba(129, 199, 132, 0.16);
    --text: #e6f0ea;
    --text-soft: #b9ccc2;
    --text-muted: #8ba397;
    --primary: #66bb6a;
    --primary-light: #81c784;
    --primary-dark: #43a047;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --gradient-hero: linear-gradient(135deg, #0f3d1a 0%, #1b5e20 40%, #2e7d32 72%, #8d4a44 100%);
    --gradient-soft: linear-gradient(135deg, rgba(102, 187, 106, 0.12), rgba(255, 111, 97, 0.12));
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-soft);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(76, 175, 80, 0.1), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(255, 111, 97, 0.08), transparent 38%);
  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), opacity var(--transition);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(255, 111, 97, 0.6);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient-accent);
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin-top: 1.4em;
}

h4 {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--primary);
  margin-top: 1.2em;
}

p {
  margin: 0 0 1em;
}

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

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}

header nav > a {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), color var(--transition);
}

header nav > a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}

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

header nav ul li a {
  display: inline-block;
  padding: 7px 13px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

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

header nav ul li a:hover {
  color: var(--primary);
  background: var(--gradient-soft);
  transform: translateY(-1px);
}

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

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

/* ===== Hero / H1 ===== */
main > h1 {
  position: relative;
  margin: 28px 0 0;
  padding: clamp(32px, 6vw, 64px) clamp(22px, 5vw, 56px);
  color: #fff;
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroShift 14s ease-in-out infinite;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

main > h1::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.3), transparent 46%),
    radial-gradient(circle at 8% 92%, rgba(255, 255, 255, 0.16), transparent 40%);
  z-index: -1;
}

main > h1::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 60%;
  height: 180%;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: rotate(12deg);
  animation: heroSheen 7s ease-in-out infinite;
  z-index: -1;
}

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

@keyframes heroSheen {
  0%, 100% { transform: translateX(-30%) rotate(12deg); opacity: 0; }
  45% { opacity: 0.9; }
  60% { transform: translateX(220%) rotate(12deg); opacity: 0; }
}

/* ===== Sections ===== */
main > section {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

main > section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.04), transparent 40%, rgba(255, 111, 97, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(76, 175, 80, 0.3);
}

main > section:hover::after {
  opacity: 1;
}

/* ===== Intro ===== */
#intro {
  background: var(--gradient-soft), var(--surface);
  border-left: 4px solid var(--primary-light);
}

#intro p {
  font-size: 1.04rem;
  color: var(--text-soft);
}

/* ===== Anchor Nav ===== */
main > nav[aria-label="页面锚点导航"] {
  margin-top: 34px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

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

main > nav[aria-label="页面锚点导航"] ul li a:hover {
  color: #fff;
  background: var(--gradient-accent);
  border-color: transparent;
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ===== Cards for sub-items (history, culture, products, etc.) ===== */
#history h3,
#culture h3,
#products h3,
#products h4,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#reviews h3,
#news h3,
#knowledge h3,
#contact h3,
#author-info h3 {
  padding: 10px 16px;
  margin: 18px 0 10px;
  background: var(--gradient-soft);
  border-left: 3px solid var(--primary-light);
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

#history h3:hover,
#culture h3:hover,
#products h3:hover,
#advantages h3:hover,
#solutions h3:hover,
#applications h3:hover,
#cases h3:hover,
#reviews h3:hover,
#news h3:hover,
#knowledge h3:hover,
#contact h3:hover,
#author-info h3:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ===== Articles ===== */
#articles article {
  margin: 18px 0;
  padding: 20px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-accent);
  opacity: 0.7;
  transition: opacity var(--transition), width var(--transition);
}

#articles article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 111, 97, 0.35);
}

#articles article:hover::before {
  opacity: 1;
  width: 6px;
}

#articles article h3 {
  margin-top: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

#articles article h3:hover {
  transform: none;
  box-shadow: none;
}

#articles article p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

#articles article p a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

#articles article p a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 111, 97, 0.4);
  filter: brightness(1.05);
  color: #fff;
}

/* Article full text sections */
#article-1, #article-2, #article-3, #article-4, #article-5,
#article-6, #article-7, #article-8, #article-9, #article-10 {
  background: var(--gradient-soft), var(--surface);
  border-style: dashed;
}

/* ===== FAQ ===== */
#faq h3 {
  margin: 22px 0 8px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1.02rem;
  color: var(--text);
  cursor: default;
  transition: all var(--transition);
  position: relative;
}

#faq h3::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 8px;
  vertical-align: middle;
}

#faq h3:hover {
  border-color: rgba(76, 175, 80, 0.4);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

#faq h3 + p {
  margin: -2px 0 18px;
  padding: 0 18px 0 52px;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  transition: border-color var(--transition);
}

#faq h3:hover + p {
  border-left-color: var(--primary-light);
}

/* ===== HowTo ===== */
#howto h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 16px 0 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: all var(--transition);
}

#howto h4::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 0 4px rgba(255, 111, 97, 0.18);
}

#howto h4:hover {
  border-color: rgba(76, 175, 80, 0.4);
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}

/* ===== Contact / Info blocks ===== */
#contact p {
  padding: 8px 14px;
  margin: 0 0 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

#contact p:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  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: var(--gradient-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
footer {
  margin-top: 40px;
  padding: 40px 20px 32px;
  text-align: center;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0 0 10px;
}

footer p:first-child {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

footer a {
  color: var(--primary);
  font-weight: 500;
  padding: 0 4px;
}

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

/* ===== Scroll animation (progressive enhancement) ===== */
@supports (animation-timeline: view()) {
  main > section,
  #articles article {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }

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

/* Fallback entrance animation */
@media (prefers-reduced-motion: no-preference) {
  @supports not (animation-timeline: view()) {
    main > section {
      animation: fadeInUp 0.7s ease both;
    }
  }
}

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

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

  header nav ul {
    gap: 2px 4px;
  }

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

  main {
    padding: 0 16px 48px;
  }

  main > h1 {
    margin-top: 20px;
    border-radius: var(--radius-lg);
  }
}

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

  header nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  header nav > a {
    text-align: center;
  }

  header nav ul {
    justify-content: center;
  }

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

  main {
    padding: 0 12px 40px;
  }

  main > h1 {
    padding: 30px 20px;
    border-radius: var(--radius-md);
  }

  main > section {
    padding: 18px 16px;
    border-radius: var(--radius-md);
    margin-top: 24px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #articles article {
    padding: 16px;
  }

  #articles article p a {
    width: 100%;
    text-align: center;
  }

  #faq h3 + p {
    padding-left: 18px;
  }

  #sitemap ul,
  #links ul {
    gap: 6px;
  }

  footer {
    padding: 30px 14px 26px;
  }
}

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

  main > h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}

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

  main > h1 {
    animation: none;
  }
}

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

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

  main > h1 {
    background: none;
    color: #000;
    box-shadow: none;
  }

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