:root {
  --bg-primary: #f7f4ef;
  --bg-secondary: #ffffff;
  --bg-tertiary: #efe9e0;
  --text-primary: #2c2419;
  --text-secondary: #5b4a3a;
  --text-muted: #8a7a6a;
  --brand-primary: #5b3a29;
  --brand-secondary: #8b5e3c;
  --brand-accent: #c9a87c;
  --brand-light: #e8d9c5;
  --border-color: rgba(91, 58, 41, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 2px 8px rgba(91, 58, 41, 0.06);
  --shadow-md: 0 8px 24px rgba(91, 58, 41, 0.1);
  --shadow-lg: 0 16px 48px rgba(91, 58, 41, 0.14);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1612;
    --bg-secondary: #241f19;
    --bg-tertiary: #2e2820;
    --text-primary: #f0e8dc;
    --text-secondary: #c4b5a2;
    --text-muted: #8a7a6a;
    --brand-primary: #c9a87c;
    --brand-secondary: #d4b88e;
    --brand-accent: #e8d9c5;
    --brand-light: #3a3028;
    --border-color: rgba(201, 168, 124, 0.15);
    --glass-bg: rgba(36, 31, 25, 0.7);
    --glass-border: rgba(201, 168, 124, 0.12);
    --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 {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

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

a:hover {
  color: var(--brand-secondary);
  opacity: 0.85;
}

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

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

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
  margin-top: 1.5rem;
}

h3:first-child {
  margin-top: 0;
}

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

p:last-child {
  margin-bottom: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

header > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

header > div > a {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.08em;
  white-space: nowrap;
  position: relative;
}

header > div > a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

header > div > a:hover::after {
  transform: scaleX(1);
}

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

header nav ul li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

header nav ul li a:hover {
  color: var(--brand-primary);
  background: var(--brand-light);
  opacity: 1;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
  animation: fadeInUp 0.8s ease-out both;
}

section:nth-child(even) {
  animation-delay: 0.1s;
}

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

#hero {
  position: relative;
  margin: 32px 0;
  padding: 80px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #5b3a29 0%, #8b5e3c 35%, #c9a87c 70%, #e8d9c5 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 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.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

#hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

#hero nav[aria-label="面包屑导航"] {
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

#hero nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
}

#hero nav[aria-label="面包屑导航"] ol li {
  color: rgba(255, 255, 255, 0.8);
}

#hero nav[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.5);
}

#hero nav[aria-label="面包屑导航"] ol li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#hero nav[aria-label="面包屑导航"] ol li a:hover {
  color: #fff;
  opacity: 1;
}

#brand,
#culture,
#products,
#services,
#scenarios,
#cases,
#news,
#howto,
#faq,
#knowledge,
#contact,
#sitemap,
#links,
#legal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow var(--transition), transform var(--transition);
}

#brand:hover,
#culture:hover,
#products:hover,
#services:hover,
#scenarios:hover,
#cases:hover,
#news:hover,
#howto:hover,
#faq:hover,
#knowledge:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
}

#news article {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
  opacity: 0;
  transition: opacity var(--transition);
}

#news article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

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

#news article h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

#news article h3 a {
  color: var(--text-primary);
}

#news article h3 a:hover {
  color: var(--brand-primary);
}

#news article p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#news article p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}

#news article a[href^="#article"] {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-primary);
  position: relative;
  padding-right: 20px;
}

#news article a[href^="#article"]::after {
  content: "→";
  position: absolute;
  right: 0;
  transition: transform var(--transition);
}

#news article a[href^="#article"]:hover::after {
  transform: translateX(4px);
}

#howto ol {
  counter-reset: step-counter;
  margin: 16px 0;
}

#howto ol li {
  counter-increment: step-counter;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

#howto ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

#faq h3 {
  cursor: default;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin-top: 16px;
  margin-bottom: 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
  font-size: 1.1rem;
  transition: background var(--transition), color var(--transition);
  position: relative;
  padding-left: 44px;
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  font-family: var(--font-sans);
}

#faq h3:hover {
  background: var(--brand-light);
}

#faq h3 + p {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-bottom: 0;
  font-size: 0.95rem;
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
  text-align: center;
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  opacity: 1;
}

#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

#contact p:last-of-type {
  border-bottom: none;
}

#contact h3 {
  margin-top: 24px;
}

#contact h3:first-of-type {
  margin-top: 0;
}

#legal h3 {
  margin-top: 24px;
}

#legal h3:first-of-type {
  margin-top: 0;
}

footer {
  background: linear-gradient(135deg, #2c2419 0%, #3a3028 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 24px 32px;
  margin-top: 64px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent), var(--brand-primary));
}

footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 8px;
}

footer p:first-of-type {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 12px;
}

footer nav {
  margin-top: 24px;
}

footer nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

footer nav ul li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  transition: color var(--transition);
}

footer nav ul li a:hover {
  color: var(--brand-accent);
  opacity: 1;
}

@media (max-width: 1024px) {
  h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  #hero {
    padding: 64px 36px;
  }

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

  #brand,
  #culture,
  #products,
  #services,
  #scenarios,
  #cases,
  #news,
  #howto,
  #faq,
  #knowledge,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 36px;
  }
}

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

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  header > div {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

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

  main {
    padding: 0 16px;
  }

  #hero {
    padding: 48px 24px;
    margin: 16px 0;
    border-radius: var(--radius-lg);
  }

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

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

  #brand,
  #culture,
  #products,
  #services,
  #scenarios,
  #cases,
  #news,
  #howto,
  #faq,
  #knowledge,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 24px 20px;
    border-radius: var(--radius-md);
    margin: 16px 0;
  }

  section {
    padding: 32px 0;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  #howto ol li {
    padding: 14px 14px 14px 48px;
  }

  #faq h3 {
    font-size: 1rem;
    padding: 14px 16px 14px 40px;
  }

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

  footer {
    padding: 32px 16px 24px;
  }

  footer nav ul {
    gap: 6px 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  #hero {
    padding: 36px 18px;
  }

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

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

  #brand,
  #culture,
  #products,
  #services,
  #scenarios,
  #cases,
  #news,
  #howto,
  #faq,
  #knowledge,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 20px 16px;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }
}

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

::selection {
  background: var(--brand-accent);
  color: #2c2419;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--brand-accent);
  border-radius: 5px;
  border: 2px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-secondary);
}

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