:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4a9eff;
  --accent: #ff6b9d;
  --accent-2: #a855f7;
  --accent-3: #06b6d4;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-hero: linear-gradient(135deg, #1a73e8 0%, #a855f7 50%, #ff6b9d 100%);
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1a1d24;
  --text-secondary: #4a5161;
  --text-muted: #7a8296;
  --border: rgba(26, 115, 232, 0.12);
  --border-glass: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(26, 29, 36, 0.06);
  --shadow: 0 8px 30px rgba(26, 115, 232, 0.1);
  --shadow-lg: 0 20px 60px rgba(26, 115, 232, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-alt: #171a23;
    --bg-card: rgba(30, 34, 45, 0.7);
    --bg-glass: rgba(30, 34, 45, 0.55);
    --text: #eef1f8;
    --text-secondary: #b8c0d4;
    --text-muted: #7c869e;
    --border: rgba(120, 160, 255, 0.14);
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
    --gradient-hero: linear-gradient(135deg, #1557b0 0%, #7c3aed 50%, #db2777 100%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(26, 115, 232, 0.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(168, 85, 247, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 107, 157, 0.06), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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(--accent);
}

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); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
h4 { font-size: clamp(1rem, 1.8vw, 1.15rem); }

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

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

/* ============ HEADER ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.topbar {
  background: var(--gradient-hero);
  padding: 0.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.topbar p {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0;
  position: relative;
  z-index: 1;
}

nav[aria-label="主导航"] {
  padding: 0.6rem 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--transition);
}

nav[aria-label="主导航"] a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--gradient-1);
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
  z-index: -1;
}

nav[aria-label="主导航"] a:hover {
  color: #fff;
  transform: translateY(-2px);
}

nav[aria-label="主导航"] a:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* ============ MAIN ============ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ============ BREADCRUMB ============ */
nav[aria-label="面包屑导航"] {
  margin-bottom: 1.5rem;
}

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

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

nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

nav[aria-label="面包屑导航"] a {
  color: var(--primary);
  font-weight: 500;
}

nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--text-muted);
}

/* ============ HERO ============ */
#hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
}

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

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

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

#hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  max-width: 820px;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}

/* ============ SECTIONS ============ */
section {
  margin-bottom: 3rem;
  scroll-margin-top: 90px;
}

section > h2 {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 1.75rem;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 70%;
  border-radius: var(--radius-full);
  background: var(--gradient-1);
}

section > h3 {
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

section > h3:first-of-type {
  margin-top: 0;
}

/* ============ CARD-LIKE SECTIONS ============ */
#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#contact,
#sitemap,
#links,
#privacy,
#disclaimer,
#copyright {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

/* ============ ARTICLES ============ */
#articles article {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.1rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

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

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

#articles article h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

#articles article h3 a {
  color: var(--text);
}

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

#articles article > p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#articles article > p:first-of-type::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

#articles article a[href="#articles"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(26, 115, 232, 0.08);
  transition: all var(--transition);
}

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

#articles article a[href="#articles"]:hover {
  background: var(--gradient-1);
  color: #fff;
}

#articles article a[href="#articles"]:hover::after {
  transform: translateX(4px);
}

/* ============ BLOCKQUOTE ============ */
blockquote {
  position: relative;
  margin: 1.1rem 0;
  padding: 1.1rem 1.5rem 1.1rem 3rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

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

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  margin: 1.5rem 0 0;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
}

#faq h3:first-of-type {
  margin-top: 0;
}

#faq h3::after {
  content: "＋";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  transition: transform var(--transition);
}

#faq h3:hover {
  background: rgba(26, 115, 232, 0.06);
  color: var(--primary);
}

#faq h3 + p {
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  transition: all var(--transition);
}

#faq h3:hover + p {
  background: rgba(26, 115, 232, 0.03);
}

/* ============ HOWTO ============ */
#howto h4 {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 1rem 0 0.6rem;
  font-size: 1rem;
  transition: all var(--transition);
}

#howto h4::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-1);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

#howto {
  counter-reset: step;
}

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

#howto h4 + p {
  padding-left: 2.5rem;
  font-size: 0.95rem;
}

/* ============ CONTACT ============ */
#contact p {
  line-height: 2;
}

#contact p br {
  line-height: 2;
}

/* ============ SITEMAP / LINKS LISTS ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}

#sitemap li a,
#links li a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#sitemap li a::before,
#links li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-1);
  transform: scaleY(0);
  transition: transform var(--transition);
}

#sitemap li a:hover,
#links li a:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}

#sitemap li a:hover::before,
#links li a:hover::before {
  transform: scaleY(1);
}

/* ============ FOOTER ============ */
footer[role="contentinfo"] {
  margin-top: 3rem;
  padding: 2.5rem 1.5rem;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.12), transparent 40%);
  pointer-events: none;
}

footer[role="contentinfo"] p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

footer[role="contentinfo"] p:last-child {
  margin-bottom: 0;
}

footer[role="contentinfo"] a {
  color: #fff;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

footer[role="contentinfo"] a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ============ SCROLL ANIMATION ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* Fallback reveal */
@media (prefers-reduced-motion: no-preference) {
  section:not(#hero) {
    opacity: 1;
  }
}

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

/* ============ SELECTION ============ */
::selection {
  background: var(--primary);
  color: #fff;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), var(--accent));
}

/* ============ FOCUS ============ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  main {
    padding: 1.75rem 1rem 3rem;
  }

  #hero {
    padding: 2.5rem 1.75rem;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 130px;
  }

  body {
    font-size: 15px;
  }

  nav[aria-label="主导航"] ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.25rem;
  }

  nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] a {
    white-space: nowrap;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
  }

  .topbar p {
    font-size: 0.72rem;
  }

  main {
    padding: 1.25rem 0.85rem 2.5rem;
  }

  #hero {
    padding: 2rem 1.35rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
  }

  section {
    margin-bottom: 2rem;
  }

  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #contact,
  #sitemap,
  #links,
  #privacy,
  #disclaimer,
  #copyright {
    padding: 1.35rem 1.15rem;
    border-radius: var(--radius);
  }

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

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

  blockquote {
    padding: 1rem 1.15rem 1rem 2.6rem;
  }

  footer[role="contentinfo"] {
    padding: 2rem 1.15rem;
    border-radius: var(--radius);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.3rem; }

  #hero {
    padding: 1.75rem 1.15rem;
  }

  #hero::before,
  #hero::after {
    width: 280px;
    height: 280px;
  }

  section > h2 {
    padding-left: 0.9rem;
  }

  #faq h3 {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  #faq h3::after {
    right: 1rem;
  }

  #faq h3 + p {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  #howto h4 {
    padding-left: 2.25rem;
    font-size: 0.95rem;
  }

  #howto h4 + p {
    padding-left: 2.25rem;
  }

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

  nav[aria-label="面包屑导航"] ol {
    font-size: 0.78rem;
  }
}

/* ============ PRINT ============ */
@media print {
  header[role="banner"],
  footer[role="contentinfo"],
  #hero::before,
  #hero::after,
  .topbar {
    display: none;
  }

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

  #hero,
  footer[role="contentinfo"] {
    background: #eee;
    box-shadow: none;
  }

  #hero h1,
  #hero p {
    color: #000;
    text-shadow: none;
  }

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