:root {
  --brand-red: #c0392b;
  --brand-red-dark: #a93226;
  --brand-gold: #f6c445;
  --brand-green: #2e7d32;
  --brand-blue: #1a5fb4;
  --bg: #f7f5f2;
  --bg-elev: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --text: #24211d;
  --text-soft: #57514a;
  --text-mute: #8a827a;
  --border: rgba(36, 33, 29, 0.1);
  --shadow-sm: 0 2px 8px rgba(36, 33, 29, 0.06);
  --shadow-md: 0 10px 30px rgba(36, 33, 29, 0.1);
  --shadow-lg: 0 20px 50px rgba(36, 33, 29, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 68px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #c0392b 0%, #8e2a6b 48%, #1a5fb4 100%);
  --grad-accent: linear-gradient(135deg, #f6c445 0%, #e8792b 100%);
}

html[data-theme="dark"] {
  --bg: #15130f;
  --bg-elev: #201d18;
  --bg-glass: rgba(32, 29, 24, 0.72);
  --text: #f2ede6;
  --text-soft: #c8c0b6;
  --text-mute: #948b80;
  --border: rgba(242, 237, 230, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #7d2419 0%, #5c1c47 48%, #123f78 100%);
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(246, 196, 69, 0.14), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(192, 57, 43, 0.12), transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(26, 95, 180, 0.1), transparent 55%);
  background-attachment: fixed;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

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

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

html[data-theme="dark"] a {
  color: #f08a7c;
}

a:hover,
a:focus-visible {
  color: var(--brand-red-dark);
  text-decoration: underline;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus-visible {
  color: #ffb3a8;
}

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

h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.95rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

strong {
  color: var(--text);
}

time {
  color: var(--text-mute);
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
}

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

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  flex: 1 1 auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #fff;
  background: var(--brand-red);
  text-decoration: none;
  transform: translateY(-2px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-search:focus-within {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.15);
}

.site-search input {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  width: 180px;
  border-radius: var(--radius-pill);
}

.site-search input::placeholder {
  color: var(--text-mute);
}

.site-search input:focus {
  outline: none;
}

.site-search button {
  border: 0;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  color: #3a2400;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}

.site-search button:hover {
  filter: brightness(1.06);
  transform: scale(1.03);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  transform: translateY(-2px);
}

#menu-toggle {
  display: none;
}

main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

section {
  margin: 0 0 40px;
  padding: 32px clamp(18px, 3vw, 40px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), background 0.35s var(--ease);
}

section:hover {
  box-shadow: var(--shadow-lg);
}

.hero {
  margin: 24px 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.hero:hover {
  box-shadow: none;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--grad-hero);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-slider .slide {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.5s var(--ease);
}

.hero-slider .slide + .slide {
  display: none;
}

.hero-slider .slide svg {
  width: 100%;
  height: auto;
  transition: transform 0.8s var(--ease);
}

.hero-slider:hover .slide svg {
  transform: scale(1.04);
}

.hero-text {
  position: relative;
  padding: clamp(22px, 3vw, 38px);
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(246, 196, 69, 0.7), rgba(192, 57, 43, 0.4), rgba(26, 95, 180, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-text h1 {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5em;
}

html[data-theme="dark"] .hero-text h1 {
  background: linear-gradient(135deg, #f6c445 0%, #f08a7c 55%, #7fb0f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-text p {
  font-size: 0.98rem;
}

.cta,
.cta-secondary {
  display: inline-block;
  margin: 6px 10px 6px 0;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.cta {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  box-shadow: 0 10px 24px rgba(192, 57, 43, 0.35);
}

.cta:hover,
.cta:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(192, 57, 43, 0.45);
}

.cta-secondary {
  color: var(--text);
  background: var(--bg-elev);
  border: 2px solid var(--brand-gold);
  box-shadow: var(--shadow-sm);
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  text-decoration: none;
  transform: translateY(-3px);
  background: var(--brand-gold);
  color: #3a2400;
  box-shadow: 0 14px 28px rgba(246, 196, 69, 0.4);
}

.breadcrumb {
  margin: 0 0 28px;
  padding: 0 4px;
  font-size: 0.88rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-mute);
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-mute);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb [aria-current="page"] {
  color: var(--brand-red);
  font-weight: 600;
}

#about,
#products,
#solutions,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal,
#author {
  position: relative;
}

#about::before,
#products::before,
#solutions::before,
#cases::before,
#news::before,
#articles::before,
#knowledge::before,
#faq::before,
#howto::before,
#contact::before,
#sitemap::before,
#links::before,
#legal::before,
#author::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(18px, 3vw, 40px);
  width: 56px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--grad-accent);
}

#articles article,
.news-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article {
  margin-bottom: 16px;
}

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

#articles article h3 {
  margin-bottom: 0.35em;
}

#articles article h3 a,
#articles article a {
  color: var(--brand-red);
  font-weight: 600;
}

#articles article a:hover {
  text-decoration: underline;
}

#articles article p {
  margin-bottom: 0.6em;
}

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

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.news-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--text-soft);
}

.news-list li:hover {
  transform: translateX(4px);
  border-color: rgba(246, 196, 69, 0.6);
  box-shadow: var(--shadow-sm);
}

.news-list time {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand-red);
  background: rgba(192, 57, 43, 0.08);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

html[data-theme="dark"] .news-list time {
  color: #f08a7c;
  background: rgba(240, 138, 124, 0.12);
}

blockquote {
  margin: 0 0 16px;
  padding: 18px 22px;
  border-left: 4px solid var(--brand-gold);
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-soft);
}

blockquote p::before {
  content: "“";
  color: var(--brand-gold);
  font-size: 1.4em;
  font-weight: 800;
  margin-right: 2px;
}

#faq details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(192, 57, 43, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: rgba(192, 57, 43, 0.5);
  box-shadow: var(--shadow-md);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #3a2400;
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
  background: rgba(192, 57, 43, 0.06);
}

#faq details p {
  padding: 0 20px 18px;
  margin: 0;
  animation: fadeIn 0.4s var(--ease);
}

#howto ol,
#howto ul {
  list-style-position: outside;
}

#howto ol li::marker {
  color: var(--brand-red);
  font-weight: 800;
}

#howto ul li::marker {
  color: var(--brand-gold);
}

#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 8px;
}

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

#contact li,
#sitemap li,
#links li {
  margin: 0;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#contact li:hover,
#sitemap li:hover,
#links li:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 57, 43, 0.35);
  box-shadow: var(--shadow-sm);
}

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

#sitemap a:hover,
#links a:hover {
  color: var(--brand-red);
  text-decoration: none;
}

#legal h3,
#author h2 {
  margin-top: 1.2em;
}

#author p {
  margin-bottom: 0.4em;
}

footer[role="contentinfo"] {
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
  padding: 32px 20px 40px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.9rem;
}

footer[role="contentinfo"] p {
  margin: 0 0 6px;
  color: var(--text-mute);
}

footer[role="contentinfo"] a {
  color: var(--brand-red);
  font-weight: 600;
}

#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(192, 57, 43, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s var(--ease);
  opacity: 0;
  pointer-events: none;
}

#back-to-top::before {
  content: "↑";
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 48px;
  display: block;
}

#back-to-top.is-visible,
body.scrolled #back-to-top {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 34px rgba(192, 57, 43, 0.55);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

.hero {
  animation: floatIn 0.7s var(--ease) both;
}

section {
  animation: fadeUp 0.6s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .site-search input {
    width: 140px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }

  .header-inner {
    gap: 10px;
    padding: 10px 16px;
  }

  .main-nav {
    order: 10;
    flex-basis: 100%;
    display: none;
  }

  .main-nav.is-open {
    display: block;
    animation: fadeIn 0.3s var(--ease);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
  }

  .main-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  #menu-toggle {
    display: inline-block;
  }

  .site-search {
    order: 11;
    flex-basis: 100%;
    display: none;
  }

  .site-search.is-open {
    display: flex;
    animation: fadeIn 0.3s var(--ease);
  }

  .site-search input {
    width: 100%;
    flex: 1 1 auto;
  }

  main {
    padding: 0 14px 48px;
  }

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

  .hero {
    margin: 16px 0 20px;
    gap: 18px;
  }

  .hero-slider .slide svg {
    height: 180px;
  }
}

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

  .brand-name {
    font-size: 0.98rem;
  }

  #theme-toggle,
  #menu-toggle {
    padding: 7px 11px;
    font-size: 0.8rem;
  }

  .hero-text {
    padding: 22px 18px;
  }

  .cta,
  .cta-secondary {
    display: block;
    text-align: center;
    margin: 8px 0;
  }

  .hero-slider .slide svg {
    height: 150px;
  }

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

  #articles article,
  .news-list li {
    padding: 16px;
  }

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

  #back-to-top {
    right: 14px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  #back-to-top::before {
    line-height: 44px;
  }
}