:root {
  --primary: #1a3d7c;
  --primary-light: #2d5aa8;
  --primary-dark: #0f2a5a;
  --accent: #ffd166;
  --accent-soft: #ffe6a3;
  --bg: #f5f8fd;
  --bg-alt: #e8eef8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.55);
  --text: #1c2333;
  --text-soft: #4a5568;
  --text-muted: #6b7280;
  --border: #dbe4f3;
  --shadow-sm: 0 2px 8px rgba(26, 61, 124, 0.08);
  --shadow-md: 0 8px 28px rgba(26, 61, 124, 0.12);
  --shadow-lg: 0 16px 48px rgba(26, 61, 124, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --header-h: 72px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5b8def;
    --primary-light: #7aa6f5;
    --primary-dark: #3a63b8;
    --accent: #ffd166;
    --accent-soft: #8a6d2a;
    --bg: #0d1321;
    --bg-alt: #131a2b;
    --surface: #182034;
    --surface-glass: rgba(24, 32, 52, 0.72);
    --surface-glass-border: rgba(120, 150, 210, 0.22);
    --text: #e8eef8;
    --text-soft: #b6c2d9;
    --text-muted: #8494b0;
    --border: #26314a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  }
}

*,
*::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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(45, 90, 168, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 209, 102, 0.10), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

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

h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--primary-light);
}

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

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

li {
  margin-bottom: 0.4em;
  color: var(--text-soft);
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-sm);
}

header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
  transition: transform var(--transition);
}

header .brand:hover {
  transform: translateY(-1px);
}

header .brand svg {
  width: 40px;
  height: 40px;
  flex: none;
  filter: drop-shadow(0 4px 10px rgba(26, 61, 124, 0.28));
  transition: transform var(--transition);
}

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

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

header nav li {
  margin: 0;
}

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

header nav a:hover,
header nav a:focus-visible {
  color: var(--surface);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 300px;
  min-width: 0;
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

header form[role="search"] input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

header form[role="search"] input::placeholder {
  color: var(--text-muted);
}

header form[role="search"] input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(45, 90, 168, 0.15);
}

header form[role="search"] button {
  flex: none;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.08);
}

header form[role="search"] button:active {
  transform: translateY(0);
}

/* ===== Layout ===== */
main {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 40px) 64px;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 10px 18px;
  list-style: none;
  font-size: 0.85rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-glass-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--text-muted);
}

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

/* ===== Sections ===== */
section {
  margin-bottom: clamp(28px, 4vw, 48px);
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

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

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

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

/* ===== Hero ===== */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 42, 90, 0.94), rgba(45, 90, 168, 0.82) 55%, rgba(255, 209, 102, 0.55)),
    linear-gradient(120deg, #1a3d7c, #2d5aa8);
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -15%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  pointer-events: none;
}

#hero h1,
#hero h2,
#hero h3 {
  color: #fff;
  position: relative;
  z-index: 1;
}

#hero h1::after {
  background: var(--accent);
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  max-width: 78ch;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
}

#hero .hero-visual {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}

#hero .hero-visual:hover {
  transform: translateY(-6px) scale(1.01);
}

#hero .hero-visual svg rect:first-child {
  fill: rgba(255, 255, 255, 0.12);
}

/* ===== Playlist & feature cards (generic content blocks) ===== */
#playlist,
#service,
#scenarios,
#solution,
#applications,
#cases,
#testimonials,
#news,
#articles,
#faq,
#howto,
#knowledge,
#contact,
#sitemap,
#links {
  position: relative;
}

#playlist h3,
#service h3,
#scenarios h3,
#solution h3,
#applications h3,
#cases h3,
#news h3 {
  padding-left: 16px;
  border-left: 4px solid var(--accent);
}

/* Articles */
#articles article {
  padding: 20px 22px;
  margin-bottom: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

#articles article:hover {
  transform: translateY(-4px);
  background: var(--surface);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

#articles article h3 {
  margin-bottom: 4px;
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

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

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

/* Testimonials */
#testimonials h3 {
  color: var(--primary-light);
}

#testimonials p {
  position: relative;
  padding: 16px 20px 16px 44px;
  margin-bottom: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  font-style: italic;
  transition: transform var(--transition), box-shadow var(--transition);
}

#testimonials p::before {
  content: "“";
  position: absolute;
  left: 14px;
  top: 6px;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent);
  font-style: normal;
  font-family: Georgia, serif;
}

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

/* FAQ */
#faq h3 {
  margin-top: 1.4em;
  padding: 14px 18px;
  font-size: 1.02rem;
  color: var(--text);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary-light);
  cursor: default;
  transition: background var(--transition), border-color var(--transition);
}

#faq h3:hover {
  background: var(--surface-glass);
  border-left-color: var(--accent);
}

#faq h3 + p {
  padding: 0 4px;
}

/* HowTo steps */
#howto h3 {
  margin-top: 1.4em;
  color: var(--primary-light);
}

/* Contact */
#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

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

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* ===== Footer ===== */
footer {
  position: relative;
  margin-top: 24px;
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px) 32px;
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(160deg, rgba(15, 42, 90, 0.97), rgba(26, 61, 124, 0.94) 60%, rgba(45, 90, 168, 0.9));
  border-top: 3px solid var(--accent);
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 300px at 80% 0%, rgba(255, 209, 102, 0.14), transparent 70%);
  pointer-events: none;
}

footer > section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto 20px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  animation: none;
}

footer > section:hover {
  box-shadow: none;
  border: none;
  transform: none;
}

footer h2 {
  font-size: 1.05rem;
  color: var(--accent);
  padding-bottom: 0.4em;
  margin-bottom: 0.6em;
}

footer h2::after {
  width: 40px;
  height: 3px;
  background: var(--accent);
}

footer p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  max-width: 90ch;
}

footer > p:last-child {
  position: relative;
  max-width: var(--maxw);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  header {
    gap: 10px 16px;
  }

  header nav {
    order: 3;
    flex-basis: 100%;
  }

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

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
  }

  header form[role="search"] {
    margin-left: auto;
  }
}

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

  header {
    padding: 10px 16px;
  }

  header .brand {
    font-size: 1rem;
  }

  header .brand svg {
    width: 34px;
    height: 34px;
  }

  header form[role="search"] {
    flex: 1 1 100%;
    order: 2;
  }

  header nav {
    order: 3;
  }

  main {
    padding: 16px 14px 48px;
  }

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

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

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

  #articles article {
    padding: 16px;
  }

  #testimonials p {
    padding: 14px 16px 14px 40px;
  }

  #sitemap a,
  #links a {
    padding: 7px 14px;
    font-size: 0.85rem;
  }
}

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

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

  header form[role="search"] input,
  header form[role="search"] button {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

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

  section {
    animation: none;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #hero::before,
  #hero::after {
    display: none;
  }

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

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