:root {
  --primary: #c0392b;
  --primary-dark: #96281b;
  --primary-light: #e74c3c;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --bg: #faf8f6;
  --bg-alt: #f0ece8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.45);
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 8px 32px rgba(192, 57, 43, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121014;
    --bg-alt: #1a171c;
    --surface: #1e1b21;
    --surface-glass: rgba(30, 27, 33, 0.78);
    --surface-glass-border: rgba(255, 255, 255, 0.08);
    --text: #ece8ee;
    --text-secondary: #b8b2ba;
    --text-muted: #8a8490;
    --border: rgba(255, 255, 255, 0.08);
    --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);
    --shadow-glow: 0 8px 32px rgba(192, 57, 43, 0.25);
  }
}

*,
*::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);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img {
  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);
  opacity: 0.9;
}

ul, ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  position: relative;
  padding-bottom: 0.6em;
  margin-bottom: 0.8em;
}

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

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--text);
}

h4 {
  font-size: 1.08rem;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  color: var(--primary);
}

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

::selection {
  background: var(--primary);
  color: #fff;
}

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

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

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header nav > a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  position: relative;
  transition: transform var(--transition);
}

header nav > a:hover {
  transform: scale(1.04);
  opacity: 1;
}

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

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

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

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(192, 57, 43, 0.07);
  transform: translateY(-1px);
}

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

/* ========== Main Layout ========== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section {
  padding: 3rem 0;
  animation: fadeInUp 0.7s ease both;
}

section:nth-child(odd) {
  animation-delay: 0.05s;
}

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

/* ========== Breadcrumb ========== */
nav[aria-label="面包屑"] {
  padding: 1rem 0 0.5rem;
  animation: fadeInUp 0.6s ease both;
}

nav[aria-label="面包屑"] ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

nav[aria-label="面包屑"] ol li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav[aria-label="面包屑"] ol li + li::before {
  content: "›";
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
}

nav[aria-label="面包屑"] ol li a {
  color: var(--text-muted);
  font-weight: 500;
}

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

/* ========== Banner ========== */
#banner {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 30%, #e67e22 65%, #f39c12 100%);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite, fadeInUp 0.8s ease both;
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

#banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

#banner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

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

#banner h1 {
  color: #fff;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  animation: fadeInUp 0.8s 0.1s ease both;
}

#banner p {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  max-width: 820px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.8s 0.2s ease both;
}

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

/* ========== Cards (generic section styling) ========== */
#brand,
#products,
#solutions,
#applications,
#cases,
#testimonials,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#copyright,
#privacy,
#disclaimer,
#editorial {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

#brand:hover,
#products:hover,
#solutions:hover,
#applications:hover,
#cases:hover,
#testimonials:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(192, 57, 43, 0.15);
}

/* ========== Brand Section ========== */
#brand h3 {
  padding-left: 0.85rem;
  border-left: 4px solid var(--primary);
  border-radius: 2px;
}

/* ========== Products ========== */
#products h4 {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.1), rgba(230, 126, 34, 0.1));
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ========== Cases ========== */
#cases h3 {
  padding-bottom: 0.4em;
  border-bottom: 1px dashed var(--border);
}

/* ========== Testimonials ========== */
#testimonials blockquote {
  position: relative;
  margin: 1.25rem 0;
  padding: 1.5rem 1.75rem 1.5rem 3.25rem;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  left: 1rem;
  top: 0.6rem;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--accent);
  opacity: 0.55;
}

#testimonials blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

#testimonials blockquote p {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

#testimonials blockquote footer {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  font-style: normal;
}

/* ========== News ========== */
#news h3 {
  margin-top: 1.4em;
}

#news h3 + p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#news h3 + p::before {
  content: "🕐";
  font-size: 0.75rem;
}

/* ========== Articles ========== */
#articles article {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 1.1rem 0;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(192, 57, 43, 0.15);
  background: var(--surface);
}

#articles article:hover::before {
  transform: scaleY(1);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.12rem;
  transition: color var(--transition);
}

#articles article:hover h3 {
  color: var(--primary);
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.4rem;
  transition: gap var(--transition), color var(--transition);
}

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

#articles article a:hover {
  gap: 0.6rem;
}

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

/* ========== FAQ (details/summary) ========== */
#faq details {
  margin: 0.75rem 0;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

#faq details[open] {
  background: var(--surface);
  border-color: rgba(192, 57, 43, 0.2);
  box-shadow: var(--shadow-sm);
}

#faq details:hover {
  border-color: rgba(192, 57, 43, 0.25);
}

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

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

#faq summary::before {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition), background var(--transition);
}

#faq details[open] summary::before {
  content: "−";
  transform: rotate(180deg);
}

#faq summary:hover {
  color: var(--primary);
  background: rgba(192, 57, 43, 0.04);
}

#faq details p {
  padding: 0 1.25rem 1.25rem 3.5rem;
  margin: 0;
  font-size: 0.95rem;
  animation: fadeInUp 0.35s ease both;
}

/* ========== HowTo ========== */
#howto ol {
  counter-reset: howto-step;
  margin: 1rem 0;
  padding: 0;
}

#howto ol li {
  counter-increment: howto-step;
  position: relative;
  padding: 0.75rem 0.75rem 0.75rem 3.25rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--transition), transform var(--transition);
}

#howto ol li::before {
  content: counter(howto-step);
  position: absolute;
  left: 0.5rem;
  top: 0.75rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

#howto ol li:hover {
  background: var(--bg-alt);
  transform: translateX(4px);
}

/* ========== Contact ========== */
#contact p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 0;
}

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

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
  opacity: 1;
}

/* ========== Footer ========== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
  transition: background var(--transition);
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

footer a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}

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

/* ========== Responsive: Tablet ========== */
@media (max-width: 900px) {
  header nav {
    padding: 0.65rem 1rem;
  }

  header nav ul {
    gap: 0.1rem;
  }

  header nav ul li a {
    padding: 0.4rem 0.6rem;
    font-size: 0.84rem;
  }

  main {
    padding: 0 1rem 3rem;
  }

  section {
    padding: 2rem 0;
  }
}

/* ========== Responsive: Mobile ========== */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

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

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

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

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

  header nav ul li {
    flex-shrink: 0;
  }

  header nav ul li a {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  #banner {
    margin: 1rem 0 1.5rem;
    padding: 2rem 1.25rem;
    border-radius: var(--radius-lg);
  }

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

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

  main {
    padding: 0 0.85rem 2.5rem;
  }

  section {
    padding: 1.5rem 0;
  }

  #brand,
  #products,
  #solutions,
  #applications,
  #cases,
  #testimonials,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #copyright,
  #privacy,
  #disclaimer,
  #editorial {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    margin: 0.85rem 0;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  #testimonials blockquote {
    padding: 1.25rem 1.25rem 1.25rem 2.75rem;
  }

  #testimonials blockquote::before {
    font-size: 2.4rem;
    left: 0.75rem;
  }

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

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

  #faq details p {
    padding: 0 1rem 1rem 3rem;
    font-size: 0.9rem;
  }

  #howto ol li {
    padding: 0.65rem 0.5rem 0.65rem 2.75rem;
  }

  #howto ol li::before {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    left: 0.35rem;
  }

  footer {
    padding: 2rem 1rem;
  }
}

/* ========== Responsive: Small Mobile ========== */
@media (max-width: 380px) {
  header nav > a {
    font-size: 1.05rem;
  }

  #banner h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}

/* ========== Reduced Motion ========== */
@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;
  }
}

/* ========== Print ========== */
@media print {
  header,
  #banner,
  footer,
  #howto {
    display: none;
  }

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

  section {
    box-shadow: none;
    border: none;
    padding: 1rem 0;
  }
}