:root {
  --primary: #c0392b;
  --primary-dark: #962d22;
  --primary-light: #e74c3c;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --gradient-start: #c0392b;
  --gradient-mid: #e74c3c;
  --gradient-end: #e67e22;
  --bg: #fdf6f4;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --border-glass: rgba(255, 255, 255, 0.6);
  --text: #2c2422;
  --text-soft: #5a4e4b;
  --text-muted: #8a7d79;
  --shadow-sm: 0 2px 8px rgba(192, 57, 43, 0.08);
  --shadow-md: 0 8px 28px rgba(192, 57, 43, 0.12);
  --shadow-lg: 0 16px 48px rgba(192, 57, 43, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 68px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100f;
    --bg-alt: #1c1716;
    --bg-card: rgba(36, 29, 27, 0.72);
    --bg-glass: rgba(30, 24, 22, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text: #f2e9e6;
    --text-soft: #cbbdb8;
    --text-muted: #9a8b86;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --primary: #e05a4b;
    --primary-dark: #c0392b;
    --primary-light: #f0715f;
    --gradient-start: #a93226;
    --gradient-mid: #c0392b;
    --gradient-end: #d35400;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(231, 76, 60, 0.10), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(230, 126, 34, 0.10), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(192, 57, 43, 0.08), transparent 50%);
  pointer-events: none;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid) 50%, var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  position: relative;
  padding-left: 18px;
  margin-bottom: 1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.1em;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  margin: 1.4rem 0 0.6rem;
  color: var(--primary);
}

h4 {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
  color: var(--text-soft);
}

p {
  margin-bottom: 0.9rem;
  color: var(--text-soft);
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text);
  white-space: nowrap;
}

.site-brand a:hover {
  color: var(--primary);
}

.site-brand svg {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.site-brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

header nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

header nav a:hover {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  transform: translateY(-2px);
}

/* ============ Breadcrumb ============ */
body > nav[aria-label="面包屑导航"] {
  padding: 12px clamp(16px, 4vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
}

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

body > nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--text-muted);
}

body > nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
}

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

/* ============ Main Layout ============ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 60px;
}

main > section {
  margin-bottom: clamp(28px, 5vw, 56px);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

main > section > h2 {
  margin-top: 0.4rem;
}

/* ============ Glass Card Base ============ */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
footer > section {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
}

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

/* ============ Hero ============ */
#hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(192, 57, 43, 0.92), rgba(231, 76, 60, 0.85) 48%, rgba(230, 126, 34, 0.88));
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.22), transparent 40%),
    radial-gradient(circle at 82% 80%, rgba(255, 255, 255, 0.14), transparent 45%);
}

#hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  z-index: -1;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 24px) scale(1.08); }
}

#hero h1 {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  margin-bottom: 1rem;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.92rem, 1.6vw, 1.02rem);
  max-width: 900px;
}

#hero figure {
  margin-top: 1.6rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition);
}

#hero figure:hover {
  transform: translateY(-4px);
}

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

#hero figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 4px 2px;
}

/* ============ Articles / News / FAQ Cards ============ */
#news article,
#articles article,
#faq article {
  background: var(--bg-alt);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 24px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before,
#faq article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity var(--transition);
}

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

#news article:hover::before,
#articles article:hover::before,
#faq article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3,
#faq article h3 {
  margin-top: 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

#news article p,
#articles article p,
#faq article p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

#articles article a {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

#articles article a:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.35);
  filter: brightness(1.08);
  color: #fff;
}

/* ============ Contact ============ */
#contact p {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border-glass);
  margin-bottom: 10px;
  font-size: 0.92rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

#contact p:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

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

#sitemap li a,
#links li a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border-glass);
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: transform var(--transition), box-shadow var(--transition), color var(--transition), border-color var(--transition);
}

#sitemap li a:hover,
#links li a:hover {
  transform: translateY(-3px);
  color: var(--primary);
  border-color: rgba(192, 57, 43, 0.3);
  box-shadow: var(--shadow-sm);
}

/* ============ Footer ============ */
footer {
  background: linear-gradient(180deg, transparent, rgba(192, 57, 43, 0.06));
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px);
  margin-top: 20px;
  border-top: 1px solid var(--border-glass);
}

footer > section {
  max-width: 1200px;
  margin: 0 auto 16px;
}

footer > section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

footer > section p {
  font-size: 0.88rem;
}

footer > p {
  max-width: 1200px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
}

/* ============ Scroll Reveal Animation ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > section,
footer > section {
  animation: fadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

main > section:nth-of-type(1) { animation-delay: 0.05s; }
main > section:nth-of-type(2) { animation-delay: 0.1s; }
main > section:nth-of-type(3) { animation-delay: 0.15s; }
main > section:nth-of-type(4) { animation-delay: 0.2s; }
main > section:nth-of-type(5) { animation-delay: 0.25s; }
main > section:nth-of-type(6) { animation-delay: 0.3s; }
main > section:nth-of-type(7) { animation-delay: 0.35s; }
main > section:nth-of-type(8) { animation-delay: 0.4s; }
main > section:nth-of-type(9) { animation-delay: 0.45s; }
main > section:nth-of-type(10) { animation-delay: 0.5s; }

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header[role="banner"] {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 16px;
  }

  header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    gap: 2px;
    padding-bottom: 2px;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 5px 10px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  :root {
    --header-h: 60px;
    --radius-lg: 18px;
    --radius-md: 12px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #hero {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

  #hero figure {
    padding: 6px;
  }

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

  #sitemap li a,
  #links li a {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  #contact p {
    font-size: 0.86rem;
    padding: 8px 10px;
  }

  footer {
    padding: 24px 16px;
  }
}

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

/* ============ Print ============ */
@media print {
  header[role="banner"],
  body > nav[aria-label="面包屑导航"],
  #hero::after {
    display: none;
  }

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

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