:root {
  --brand: #e63946;
  --brand-2: #ff6b6b;
  --brand-3: #ffb703;
  --grad: linear-gradient(135deg, #e63946 0%, #ff6b6b 45%, #ffb703 100%);
  --grad-soft: linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(255, 183, 3, 0.12));
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1c1e26;
  --text-2: #4a4e5a;
  --text-3: #767b8a;
  --border: rgba(28, 30, 38, 0.1);
  --border-strong: rgba(28, 30, 38, 0.16);
  --shadow-sm: 0 2px 10px rgba(20, 22, 30, 0.06);
  --shadow: 0 10px 30px rgba(20, 22, 30, 0.08);
  --shadow-lg: 0 20px 60px rgba(20, 22, 30, 0.14);
  --glass-blur: 16px;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f14;
    --bg-2: #12151c;
    --surface: rgba(24, 27, 36, 0.68);
    --surface-solid: #181b24;
    --text: #f1f2f6;
    --text-2: #c3c7d2;
    --text-3: #8f95a3;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(135deg, rgba(230, 57, 70, 0.18), rgba(255, 183, 3, 0.14));
  }
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(230, 57, 70, 0.1), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(255, 183, 3, 0.1), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover,
a:focus-visible {
  color: var(--brand-2);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

ul,
ol {
  padding-left: 1.35em;
  margin: 0 0 1em;
}

li {
  margin: 0.35em 0;
}

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

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

h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  line-height: 1.4;
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  position: relative;
  padding-bottom: 0.55em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad);
}

h3 {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  margin-top: 1.4em;
}

blockquote {
  margin: 0;
  padding: 1.1em 1.3em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--grad-soft);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

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

/* ============ Header / Hero ============ */
header {
  position: relative;
  padding: calc(var(--header-h) + 56px) 24px 64px;
  text-align: center;
  color: #fff;
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradientShift 14s ease infinite;
  overflow: hidden;
  isolation: isolate;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(700px 350px at 85% 80%, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(75% 100% at 50% 100%);
  z-index: -1;
}

header h1 {
  max-width: 900px;
  margin: 0 auto 0.5em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
  animation: fadeUp 0.9s var(--ease) both;
}

header p {
  max-width: 820px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  text-align: left;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 1.2em 1.4em;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  animation: fadeUp 0.9s 0.15s var(--ease) both;
}

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

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

/* ============ Nav ============ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: -28px auto 0;
  max-width: var(--maxw);
  padding: 0 16px;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 0.42em 0.85em;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
  background: var(--grad);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

section {
  position: relative;
  margin: 0 0 28px;
  padding: 28px 30px;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: sectionIn 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 22%;
}

@supports not (animation-timeline: view()) {
  section {
    animation: fadeUp 0.7s var(--ease) both;
  }
}

section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(32px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Section accent */
section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 64px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--grad);
  opacity: 0.85;
}

/* ============ Products / features cards ============ */
#products,
#advantages,
#solutions,
#applications,
#cases,
#testimonials,
#knowledge {
  display: block;
}

#products > h3,
#advantages > h3,
#solutions > h3,
#applications > h3,
#cases > h3,
#knowledge > h3 {
  padding: 18px 20px;
  margin: 16px 0;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

#products > h3:hover,
#advantages > h3:hover,
#solutions > h3:hover,
#applications > h3:hover,
#cases > h3:hover,
#knowledge > h3:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  background: var(--grad);
  color: #fff;
}

#products > h3 + p,
#advantages > h3 + p,
#solutions > h3 + p,
#applications > h3 + p,
#cases > h3 + p,
#knowledge > h3 + p {
  padding-left: 4px;
}

/* ============ Testimonials ============ */
#testimonials blockquote {
  margin: 14px 0;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#testimonials blockquote:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow);
}

/* ============ News ============ */
#news h3 {
  padding-top: 1.2em;
  border-top: 1px dashed var(--border-strong);
}

#news h3:first-of-type {
  border-top: none;
  padding-top: 0;
}

#news h3 + p {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 0.4em;
}

/* ============ Articles ============ */
#articles article {
  padding: 20px 22px;
  margin: 0 0 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}

#articles h3 {
  margin-top: 0;
  color: var(--text);
}

#articles article p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 0.6em;
}

#articles article a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35em 1em;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

#articles article a:hover {
  background: var(--grad);
  color: #fff;
  transform: translateX(4px);
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 14px 18px 14px 46px;
  margin: 12px 0 0;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 1rem;
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  border-radius: 50%;
}

#faq h3:hover {
  background: var(--grad);
  color: #fff;
}

#faq h3 + p {
  margin: 0 0 14px;
  padding: 14px 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.95rem;
}

/* ============ HowTo ============ */
#howto h3 {
  display: inline-block;
  padding: 0.3em 0.95em;
  margin-top: 1.4em;
  font-size: 0.92rem;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.25);
}

#howto ul {
  padding: 16px 20px 16px 2.2em;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

#howto h3 + p {
  padding: 16px 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ============ Contact ============ */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

#contact li {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact li:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

/* ============ Sitemap / Links ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 0.4em 1em;
  font-size: 0.875rem;
  color: var(--text-2);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.28);
}

/* ============ Legal sections ============ */
#privacy,
#disclaimer,
#copyright,
#security,
#updates {
  font-size: 0.94rem;
}

#updates p {
  margin: 0.25em 0;
  font-size: 0.9rem;
  color: var(--text-3);
}

#updates p:first-child {
  color: var(--text-2);
}

/* ============ Footer ============ */
footer {
  position: relative;
  padding: 48px 24px 36px;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, #171a22 0%, #0d0f14 100%);
  overflow: hidden;
}

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

footer p {
  max-width: var(--maxw);
  margin: 0 auto 0.7em;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.7;
}

footer p:first-of-type {
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

footer a {
  color: rgba(255, 255, 255, 0.86);
  padding: 0 0.3em;
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  :root {
    --header-h: 56px;
  }

  header {
    padding: calc(var(--header-h) + 40px) 18px 52px;
  }

  nav {
    margin: -22px 12px 0;
    border-radius: var(--radius);
  }

  nav ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 4px;
  }

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

  main {
    padding: 28px 14px 64px;
  }

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

  section::before {
    left: 20px;
  }

  h2::after {
    width: 44px;
    height: 3px;
  }
}

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

  header {
    padding: calc(var(--header-h) + 32px) 14px 44px;
  }

  header p {
    padding: 1em 1.1em;
    font-size: 0.9rem;
  }

  nav {
    margin: -18px 10px 0;
  }

  nav a {
    font-size: 0.82rem;
    padding: 0.4em 0.7em;
  }

  main {
    padding: 22px 10px 56px;
  }

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

  section::before {
    left: 16px;
    width: 48px;
  }

  #products > h3:hover,
  #advantages > h3:hover,
  #solutions > h3:hover,
  #applications > h3:hover,
  #cases > h3:hover,
  #knowledge > h3:hover {
    transform: none;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  #articles article {
    padding: 16px;
  }

  #faq h3 {
    padding: 12px 14px 12px 42px;
    font-size: 0.95rem;
  }

  #faq h3 + p {
    padding: 12px 14px;
  }

  footer {
    padding: 40px 16px 32px;
  }
}

/* ============ Accessibility / Motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  section {
    animation: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(28, 30, 38, 0.28);
    --border-strong: rgba(28, 30, 38, 0.4);
    --text-2: #2a2d36;
    --text-3: #454a57;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --border: rgba(255, 255, 255, 0.3);
      --border-strong: rgba(255, 255, 255, 0.45);
      --text-2: #e3e6ee;
      --text-3: #b9bec9;
    }
  }
}

/* ============ Print ============ */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  header {
    background: none;
    color: #000;
  }

  header h1,
  header p {
    color: #000;
  }

  nav,
  footer::before {
    display: none;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    break-inside: avoid;
    animation: none;
  }

  footer {
    background: none;
    color: #000;
  }

  footer p,
  footer a {
    color: #000;
  }
}