:root {
  --primary: #8B4513;
  --primary-light: #A0522D;
  --primary-dark: #5A3A1A;
  --accent: #C19A6B;
  --accent-light: #D2B48C;
  --bg: #FDFBF7;
  --bg-alt: #F5EFE6;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(139, 69, 19, 0.12);
  --text: #2C2416;
  --text-secondary: #5A4A3A;
  --text-muted: #8A7A6A;
  --shadow: 0 4px 24px rgba(139, 69, 19, 0.08);
  --shadow-hover: 0 12px 40px rgba(139, 69, 19, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gradient-banner: linear-gradient(135deg, #8B4513 0%, #A0522D 30%, #C19A6B 70%, #D2B48C 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139,69,19,0.06), rgba(193,154,107,0.10));
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-blur: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #D2A679;
    --primary-light: #E0B88A;
    --primary-dark: #B8895A;
    --accent: #C19A6B;
    --accent-light: #A0522D;
    --bg: #1A1510;
    --bg-alt: #231C14;
    --card-bg: rgba(40, 32, 24, 0.72);
    --card-border: rgba(210, 166, 121, 0.12);
    --text: #E8DDD0;
    --text-secondary: #C4B5A3;
    --text-muted: #9A8A7A;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
    --gradient-banner: linear-gradient(135deg, #2A1F14 0%, #3D2B1A 30%, #5A3A1A 70%, #8B4513 100%);
    --gradient-soft: linear-gradient(135deg, rgba(210,166,121,0.06), rgba(139,69,19,0.10));
    --glass-bg: rgba(40, 32, 24, 0.55);
    --glass-border: rgba(210, 166, 121, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  transition: color 0.4s ease;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); margin-bottom: 0.6rem; }

p {
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.4s ease;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(139, 69, 19, 0.06);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header nav > a {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  position: relative;
}

header nav > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-banner);
  border-radius: 2px;
  transition: width var(--transition);
}

header nav > a:hover::after {
  width: 100%;
}

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

header nav ul li a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

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

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

main > nav[aria-label="面包屑导航"] {
  padding: 1rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

main > nav[aria-label="面包屑导航"] ol li + li::before {
  content: '/';
  margin-right: 0.35rem;
  color: var(--text-muted);
  opacity: 0.5;
}

main > nav[aria-label="面包屑导航"] ol li a {
  color: var(--text-muted);
  font-size: 0.82rem;
}

main > nav[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary);
}

section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 80px;
}

#hero {
  background: var(--gradient-banner);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(139, 69, 19, 0.25);
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero h1 {
  color: #fff;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

#hero > p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 780px;
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1.85;
}

#hero figure {
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem;
}

#hero figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

#hero figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.6rem 0 0.2rem;
  font-style: italic;
}

#hero figure svg text {
  fill: #fff !important;
}

#about,
#products,
#solutions,
#cases,
#articles,
#faq,
#howto,
#news,
#contact,
#sitemap,
#links {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow var(--transition), transform var(--transition);
  animation: fadeInUp 0.7s ease both;
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#news:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-hover);
}

#about h3,
#products h3,
#solutions h3,
#cases h3,
#howto h3 {
  margin-top: 1.5rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--primary);
  border-radius: 2px;
  color: var(--primary-dark);
}

#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 {
  margin-top: 0.5rem;
}

#articles > p {
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

#articles article {
  background: var(--gradient-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-banner);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity var(--transition);
}

#articles article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
  border-color: rgba(139, 69, 19, 0.2);
}

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

#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  color: var(--primary-dark);
  border-left: none;
  padding-left: 0;
}

#articles article p:nth-of-type(1) {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

#articles article p:nth-of-type(2) {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.25rem 0.7rem;
  background: rgba(139, 69, 19, 0.08);
  border-radius: 20px;
  transition: all var(--transition);
}

#articles article a::after {
  content: '→';
  transition: transform var(--transition);
}

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

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

#faq details {
  background: var(--gradient-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all var(--transition);
}

#faq details:hover {
  border-color: rgba(139, 69, 19, 0.22);
  box-shadow: 0 2px 12px rgba(139, 69, 19, 0.06);
}

#faq details[open] {
  border-color: rgba(139, 69, 19, 0.25);
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
}

#faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color var(--transition), background var(--transition);
  position: relative;
  user-select: none;
}

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

#faq summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  line-height: 1;
}

#faq details[open] summary::before {
  content: '−';
  background: var(--primary-dark);
  transform: rotate(180deg);
}

#faq summary:hover {
  color: var(--primary);
}

#faq details p {
  padding: 0 1.25rem 1.25rem 3.1rem;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0;
  animation: fadeIn 0.35s ease both;
}

#howto h3 {
  color: var(--primary-dark);
}

#howto > p {
  font-size: 0.92rem;
  line-height: 1.85;
}

#news ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#news ul li {
  padding: 0.75rem 1rem 0.75rem 2.2rem;
  background: var(--gradient-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  transition: all var(--transition);
  line-height: 1.6;
}

#news ul li::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

#news ul li:hover {
  transform: translateX(5px);
  border-color: rgba(139, 69, 19, 0.2);
  box-shadow: 0 2px 12px rgba(139, 69, 19, 0.06);
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

#contact ul li {
  padding: 0.65rem 1rem;
  background: var(--gradient-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#contact ul li:hover {
  border-color: rgba(139, 69, 19, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.08);
}

#contact > p:last-child {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(139, 69, 19, 0.06);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 3px solid var(--primary);
}

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  background: var(--gradient-soft);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 69, 19, 0.2);
}

footer {
  background: var(--gradient-banner);
  color: rgba(255, 255, 255, 0.9);
  padding: 2.5rem 1.25rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

footer section {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

footer h2 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

footer p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 0.6rem;
}

footer p:last-child {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#about { animation-delay: 0.05s; }
#products { animation-delay: 0.1s; }
#solutions { animation-delay: 0.15s; }
#cases { animation-delay: 0.2s; }
#articles { animation-delay: 0.25s; }
#faq { animation-delay: 0.3s; }
#howto { animation-delay: 0.35s; }
#news { animation-delay: 0.4s; }
#contact { 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;
  }
  html { scroll-behavior: auto; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }

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

  header nav > a {
    font-size: 1.05rem;
  }

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

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

  header nav ul li a {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
  }

  main {
    padding: 0 0.9rem 2rem;
  }

  #hero {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius);
    margin-top: 0.75rem;
    margin-bottom: 2rem;
  }

  #hero h1 {
    font-size: 1.35rem;
  }

  #hero > p {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  #hero figure {
    padding: 0.35rem;
  }

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

  section {
    margin-bottom: 1.75rem;
    scroll-margin-top: 70px;
  }

  #about h3,
  #products h3,
  #solutions h3,
  #cases h3,
  #howto h3 {
    font-size: 1.05rem;
    margin-top: 1.2rem;
  }

  #articles article {
    padding: 1rem 1.1rem;
  }

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

  #faq summary {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }

  #faq details p {
    padding: 0 1rem 1rem 2.8rem;
    font-size: 0.85rem;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  #news ul li {
    padding: 0.6rem 0.85rem 0.6rem 1.9rem;
    font-size: 0.84rem;
  }

  footer {
    padding: 2rem 0.9rem;
  }

  footer h2 {
    font-size: 1rem;
  }

  footer p {
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  html { font-size: 14px; }

  header nav > a {
    font-size: 0.98rem;
  }

  header nav ul li a {
    font-size: 0.73rem;
    padding: 0.25rem 0.45rem;
  }

  #hero {
    padding: 1.4rem 1rem;
  }

  #hero h1 {
    font-size: 1.2rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #articles,
  #faq,
  #howto,
  #news,
  #contact,
  #sitemap,
  #links {
    padding: 1.1rem 0.9rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  main {
    padding: 0 1.5rem 2.5rem;
  }

  #hero {
    padding: 2.2rem 1.75rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #articles,
  #faq,
  #howto,
  #news,
  #contact,
  #sitemap,
  #links {
    padding: 1.75rem 1.5rem;
  }
}

@media print {
  header,
  footer,
  #hero figure,
  #faq details::before {
    display: none;
  }

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

  #about,
  #products,
  #solutions,
  #cases,
  #articles,
  #faq,
  #howto,
  #news,
  #contact,
  #sitemap,
  #links {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  #faq details {
    break-inside: avoid;
  }

  #faq details p {
    display: block !important;
  }
}