:root {
  --primary: #1a3c5e;
  --primary-light: #2a5a8a;
  --primary-dark: #0f2440;
  --accent: #e8a838;
  --accent-light: #f0c060;
  --accent-dark: #c08820;
  --bg: #f5f7fa;
  --bg-alt: #eef1f6;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.35);
  --text: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #8896a6;
  --border: #dde3ec;
  --shadow-sm: 0 1px 3px rgba(26, 60, 94, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 60, 94, 0.1);
  --shadow-lg: 0 12px 40px rgba(26, 60, 94, 0.14);
  --shadow-xl: 0 20px 60px rgba(26, 60, 94, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --header-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --surface: #1c2333;
    --surface-glass: rgba(28, 35, 51, 0.78);
    --surface-glass-border: rgba(255, 255, 255, 0.08);
    --text: #e6edf3;
    --text-secondary: #a0aec0;
    --text-muted: #6b7a8d;
    --border: #2d3748;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
    --primary: #4a8ec9;
    --primary-light: #6aaee0;
    --primary-dark: #2a6a9e;
  }
}

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

::selection {
  background: var(--accent);
  color: var(--primary-dark);
}

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

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

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

ul, ol {
  list-style: none;
}

/* ===== Header & Nav ===== */
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(--surface-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

header nav > a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition);
}

header nav > a:hover {
  transform: scale(1.03);
  color: var(--accent-dark);
}

header nav > a::before {
  content: "📖";
  font-size: 1.4rem;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

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

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

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

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(26, 60, 94, 0.06);
}

header nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

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

article {
  padding: 0 0 60px;
}

/* ===== Hero / H1 Header ===== */
article > header {
  position: relative;
  margin: 24px -24px 48px;
  padding: 72px 48px 64px;
  background: linear-gradient(135deg, #1a3c5e 0%, #2a5a8a 40%, #1e4d7a 70%, #0f2440 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

article > header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(232, 168, 56, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(232, 168, 56, 0.1) 0%, transparent 40%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
  100% { transform: translate(2%, -2%) rotate(3deg); opacity: 1; }
}

article > header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
  opacity: 0.3;
}

article > header h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out both;
}

article > header p {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

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

/* ===== Sections ===== */
section {
  margin-bottom: 44px;
  animation: fadeInUp 0.6s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

@supports not (animation-timeline: view()) {
  section {
    animation: none;
    opacity: 1;
  }
}

section h2 {
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  letter-spacing: -0.01em;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 40%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

section h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: var(--primary-light);
  margin: 28px 0 12px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
}

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

section h4::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.85rem;
}

section p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.85;
  text-align: justify;
}

section ul {
  margin: 12px 0 20px;
  padding-left: 0;
  display: grid;
  gap: 8px;
}

section ul li {
  position: relative;
  padding: 10px 16px 10px 44px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.925rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

section ul li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

section ul li:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

/* ===== Cards (Sections with content) ===== */
#brand-intro,
#company-profile,
#brand-history,
#culture,
#products,
#advantages,
#solutions,
#industry-app,
#cases,
#testimonials,
#news,
#articles,
#industry-knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#copyright,
#privacy,
#disclaimer {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

#brand-intro:hover,
#company-profile:hover,
#products:hover,
#advantages:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(232, 168, 56, 0.3);
}

/* ===== Blockquote (Testimonials) ===== */
blockquote {
  position: relative;
  margin: 16px 0;
  padding: 20px 24px 20px 56px;
  background: linear-gradient(135deg, rgba(26, 60, 94, 0.04), rgba(232, 168, 56, 0.04));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: all var(--transition);
}

blockquote::before {
  content: "“";
  position: absolute;
  left: 16px;
  top: 8px;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.5;
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote:hover {
  background: linear-gradient(135deg, rgba(26, 60, 94, 0.07), rgba(232, 168, 56, 0.07));
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== News & Article Cards ===== */
#news article,
#articles article {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

#news article:last-child,
#articles article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#news article:first-of-type,
#articles article:first-of-type {
  padding-top: 8px;
}

#news article:hover,
#articles article:hover {
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(232, 168, 56, 0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

#news article h3,
#articles article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 6px;
  padding-left: 0;
  border-left: none;
  line-height: 1.5;
}

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: 8px;
  transition: all var(--transition);
}

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

#articles article a:hover {
  color: var(--primary);
  gap: 8px;
}

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

/* ===== FAQ Details ===== */
#faq details {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  overflow: hidden;
  transition: all var(--transition);
}

#faq details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

#faq details:hover {
  border-color: rgba(232, 168, 56, 0.5);
}

#faq summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(232, 168, 56, 0.1);
  transition: all var(--transition);
}

#faq details[open] summary::after {
  content: "−";
  background: var(--accent);
  color: #fff;
  transform: rotate(180deg);
}

#faq summary:hover {
  color: var(--primary);
  background: rgba(26, 60, 94, 0.03);
}

#faq details[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

#faq details > p {
  padding: 16px 20px;
  margin: 0;
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.8;
  animation: fadeInUp 0.3s ease-out both;
}

/* ===== HowTo Steps ===== */
#howto h4 {
  background: linear-gradient(135deg, rgba(26, 60, 94, 0.05), rgba(232, 168, 56, 0.05));
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  margin: 24px 0 12px;
}

#howto h4::before {
  content: none;
}

#howto ul li::before {
  content: "•";
  color: var(--accent);
  font-size: 1.2rem;
}

/* ===== Contact Info ===== */
#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin: 0;
}

#sitemap ul li,
#links ul li {
  padding: 8px 12px 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-align: center;
  transition: all var(--transition);
}

#sitemap ul li::before,
#links ul li::before {
  content: none;
}

#sitemap ul li:hover,
#links ul li:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#sitemap ul li:hover a,
#links ul li:hover a {
  color: #fff;
}

#sitemap ul li a,
#links ul li a {
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
}

/* ===== Footer ===== */
footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-dark));
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 24px;
  margin-top: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

footer p {
  max-width: var(--max-width);
  margin: 0 auto 8px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

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

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

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

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

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  header nav {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

  header nav ul {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 6px;
  }

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

  article > header {
    margin: 16px -16px 36px;
    padding: 52px 28px 48px;
    border-radius: var(--radius-lg);
  }

  main {
    padding: 0 16px;
  }

  section {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

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

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

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

  header nav ul {
    gap: 2px;
  }

  header nav ul li a {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  article > header {
    margin: 12px -12px 28px;
    padding: 40px 20px 36px;
    border-radius: var(--radius-md);
  }

  article > header h1 {
    font-size: 1.3rem;
    margin-bottom: 14px;
  }

  article > header p {
    font-size: 0.8rem;
  }

  main {
    padding: 0 12px;
  }

  section {
    padding: 20px 16px;
    margin-bottom: 28px;
    border-radius: var(--radius-md);
  }

  section h2 {
    font-size: 1.15rem;
    margin-bottom: 16px;
  }

  section h3 {
    font-size: 1rem;
    margin: 22px 0 10px;
  }

  section p {
    font-size: 0.9rem;
    line-height: 1.75;
    text-align: left;
  }

  section ul li {
    padding: 8px 12px 8px 36px;
    font-size: 0.85rem;
  }

  section ul li::before {
    left: 12px;
  }

  #faq summary {
    padding: 14px 16px;
    font-size: 0.875rem;
  }

  #faq details > p {
    padding: 14px 16px;
    font-size: 0.85rem;
  }

  blockquote {
    padding: 16px 18px 16px 44px;
  }

  blockquote::before {
    left: 12px;
    font-size: 2.4rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  #sitemap ul li,
  #links ul li {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  footer {
    padding: 36px 16px;
  }

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

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

  section {
    animation: none;
    opacity: 1;
  }
}

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

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

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