:root {
  --clay: #8B5A2B;
  --clay-light: #C08552;
  --clay-dark: #5C3A1A;
  --glaze: #6BA3A0;
  --glaze-light: #9ECFCB;
  --ember: #D4764E;
  --sand: #F5EFE6;
  --sand-deep: #E8DCC8;
  --ink: #2C2418;
  --ink-soft: #4A3F30;
  --paper: #FDFBF7;
  --glass-bg: rgba(253, 251, 247, 0.72);
  --glass-border: rgba(139, 90, 43, 0.18);
  --glass-shadow: 0 8px 32px rgba(92, 58, 26, 0.12);
  --card-bg: rgba(255, 255, 255, 0.65);
  --card-border: rgba(139, 90, 43, 0.12);
  --card-shadow: 0 4px 24px rgba(92, 58, 26, 0.08);
  --card-shadow-hover: 0 12px 40px rgba(92, 58, 26, 0.18);
  --nav-bg: rgba(253, 251, 247, 0.82);
  --text-primary: #2C2418;
  --text-secondary: #5A4E3E;
  --text-muted: #8A7E6E;
  --link: #8B5A2B;
  --link-hover: #D4764E;
  --border-soft: rgba(139, 90, 43, 0.14);
  --banner-gradient: linear-gradient(135deg, #8B5A2B 0%, #C08552 30%, #D4764E 60%, #6BA3A0 100%);
  --banner-gradient-soft: linear-gradient(160deg, rgba(139,90,43,0.92) 0%, rgba(192,133,82,0.88) 35%, rgba(212,118,78,0.85) 65%, rgba(107,163,160,0.9) 100%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1200px;
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --clay: #C08552;
    --clay-light: #D4A574;
    --clay-dark: #8B5A2B;
    --glaze: #7FB5B0;
    --glaze-light: #A8D8D3;
    --ember: #E08A62;
    --sand: #1A1510;
    --sand-deep: #241E16;
    --ink: #EDE6DA;
    --ink-soft: #D4CBB8;
    --paper: #12100D;
    --glass-bg: rgba(26, 21, 16, 0.78);
    --glass-border: rgba(192, 133, 82, 0.18);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --card-bg: rgba(36, 30, 22, 0.72);
    --card-border: rgba(192, 133, 82, 0.14);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(18, 16, 13, 0.85);
    --text-primary: #EDE6DA;
    --text-secondary: #B8AD9A;
    --text-muted: #7A7060;
    --link: #D4A574;
    --link-hover: #E08A62;
    --border-soft: rgba(192, 133, 82, 0.14);
    --banner-gradient: linear-gradient(135deg, #5C3A1A 0%, #8B5A2B 30%, #C08552 60%, #6BA3A0 100%);
    --banner-gradient-soft: linear-gradient(160deg, rgba(92,58,26,0.95) 0%, rgba(139,90,43,0.9) 35%, rgba(192,133,82,0.85) 65%, rgba(107,163,160,0.88) 100%);
  }
}

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

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

body {
  font-family: var(--font-cn);
  background-color: var(--paper);
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(192, 133, 82, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(107, 163, 160, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(212, 118, 78, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(ellipse 80% 60% at 10% 0%, rgba(192, 133, 82, 0.06) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 90% 20%, rgba(107, 163, 160, 0.05) 0%, transparent 55%),
      radial-gradient(ellipse 70% 60% at 50% 100%, rgba(212, 118, 78, 0.04) 0%, transparent 60%);
  }
}

::selection {
  background: rgba(192, 133, 82, 0.3);
  color: var(--text-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--clay-light);
  border-radius: 5px;
  border: 2px solid var(--sand);
}

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

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

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

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

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.01em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: clamp(1rem, 1.8vw, 1.15rem); }

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(92, 58, 26, 0.06);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

@media (prefers-color-scheme: dark) {
  header {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  }
}

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

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

header nav ul li {
  margin: 0;
}

header nav ul li a {
  display: inline-block;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

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

header nav ul li a:hover {
  color: var(--clay);
  background: rgba(139, 90, 43, 0.06);
  transform: translateY(-1px);
}

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

header nav ul li a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

section {
  margin-bottom: 2.5rem;
  padding: 2rem 2.25rem;
  background: var(--card-bg);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--banner-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

section:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(139, 90, 43, 0.22);
}

section:hover::before {
  opacity: 1;
}

section h2 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-soft);
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--banner-gradient);
  border-radius: 1px;
}

section h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--clay-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

section h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--banner-gradient);
  border-radius: 2px;
  flex-shrink: 0;
}

#home {
  margin-top: 2rem;
  padding: 3rem 2.5rem;
  background: var(--banner-gradient-soft);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px rgba(92, 58, 26, 0.25);
  position: relative;
  overflow: hidden;
  color: #fff;
}

#home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

#home::after {
  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%;
  animation: floatOrb 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 20px) scale(1.05); }
  66% { transform: translate(20px, -15px) scale(0.95); }
}

#home h1 {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out both;
}

#home p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 780px;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out 0.15s both;
}

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

#about, #products, #solutions, #cases, #news, #articles, #faq, #howto, #knowledge, #contact, #sitemap, #links, #legal {
  animation: fadeSlideUp 0.7s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 40%;
}

@supports not (animation-timeline: view()) {
  #about, #products, #solutions, #cases, #news, #articles, #faq, #howto, #knowledge, #contact, #sitemap, #links, #legal {
    animation: none;
  }
}

#articles article {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

#articles article:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(139, 90, 43, 0.28);
}

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

#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--clay);
  font-size: 1.15rem;
}

#articles article h3::before {
  display: none;
}

#articles article p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(139, 90, 43, 0.08);
  border: 1px solid rgba(139, 90, 43, 0.18);
  transition: all var(--transition-fast);
}

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

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

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

#faq h3 {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 90, 43, 0.05);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--clay-light);
  font-size: 1.05rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  cursor: default;
}

#faq h3::before {
  display: none;
}

#faq h3:hover {
  background: rgba(139, 90, 43, 0.1);
  border-left-color: var(--clay);
}

#faq h3 + p {
  padding: 0.5rem 1rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

#howto h3 {
  margin-top: 1.75rem;
}

#howto ol, #howto ul {
  padding-left: 1.75rem;
}

#howto li {
  margin-bottom: 0.5rem;
}

#contact p {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

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

#contact p strong {
  color: var(--clay-dark);
  font-weight: 600;
  min-width: 5em;
}

@media (prefers-color-scheme: dark) {
  #contact p strong {
    color: var(--clay-light);
  }
}

#sitemap ul, #links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

#sitemap ul li, #links ul li {
  margin: 0;
}

#sitemap ul li a, #links ul li a {
  display: block;
  padding: 0.6rem 1rem;
  background: rgba(139, 90, 43, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

#sitemap ul li a:hover, #links ul li a:hover {
  background: rgba(139, 90, 43, 0.12);
  border-color: var(--clay-light);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(139, 90, 43, 0.12);
}

#legal h3 {
  margin-top: 1.5rem;
}

#legal p {
  font-size: 0.92rem;
}

footer {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem 2rem;
  background: var(--sand-deep);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--banner-gradient);
}

footer p {
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

footer p:first-of-type {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-serif);
}

footer p:last-of-type {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  main {
    padding: 0 1rem 2rem;
  }

  section {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
  }

  #home {
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1.25rem;
  }

  header nav {
    padding: 0 0.75rem;
  }

  header nav ul {
    gap: 0;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul li a {
    padding: 0.75rem 0.75rem;
    font-size: 0.85rem;
  }

  #articles article {
    padding: 1.25rem 1.25rem;
  }

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

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

  main {
    padding: 0 0.75rem 1.5rem;
  }

  section {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
  }

  section:hover {
    transform: none;
  }

  #home {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-md);
  }

  #home h1 {
    font-size: 1.5rem;
  }

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

  header nav ul li a {
    padding: 0.65rem 0.6rem;
    font-size: 0.8rem;
  }

  header nav ul li a::after {
    display: none;
  }

  #articles article {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  #articles article:hover {
    transform: none;
  }

  #faq h3 {
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
  }

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

  #sitemap ul li a, #links ul li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }

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

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

@media (max-width: 380px) {
  #sitemap ul, #links ul {
    grid-template-columns: 1fr;
  }

  header nav ul li a {
    padding: 0.6rem 0.5rem;
    font-size: 0.75rem;
  }
}

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

@media print {
  header, footer, #home::after {
    display: none;
  }

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

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

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