:root {
  --primary: #1a5cff;
  --primary-dark: #0d3ec4;
  --primary-light: #4d80ff;
  --accent: #ffd166;
  --accent-2: #ff6b9d;
  --bg: #f5f7fc;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --border: rgba(26, 92, 255, 0.12);
  --text: #1a2233;
  --text-soft: #4a5568;
  --text-muted: #7a8599;
  --shadow-sm: 0 2px 8px rgba(26, 92, 255, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 92, 255, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 92, 255, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-banner: linear-gradient(135deg, #1a5cff 0%, #4d80ff 40%, #7b5cff 75%, #ff6b9d 100%);
  --grad-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 252, 0.6));
  --grad-btn: linear-gradient(135deg, #1a5cff, #7b5cff);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #111830;
    --surface: rgba(20, 28, 52, 0.7);
    --surface-solid: #141c34;
    --border: rgba(120, 150, 255, 0.18);
    --text: #e8edf8;
    --text-soft: #b4c0d8;
    --text-muted: #8492ad;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --grad-card: linear-gradient(145deg, rgba(30, 40, 70, 0.85), rgba(20, 28, 52, 0.6));
  }
}

*,
*::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;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      circle at 10% 0%,
      rgba(26, 92, 255, 0.08),
      transparent 45%
    ),
    radial-gradient(circle at 90% 20%, rgba(255, 107, 157, 0.07), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(123, 92, 255, 0.06), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

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

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-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 99px;
  background: var(--grad-btn);
}

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

h4 {
  font-size: 1.02rem;
  color: var(--text-soft);
}

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

strong {
  color: var(--text);
  font-weight: 700;
}

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

li {
  margin-bottom: 0.4em;
}

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

header > a[aria-label] {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header > a[aria-label]:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.1);
}

header nav[aria-label="主导航"] {
  flex: 1 1 auto;
  min-width: 0;
}

header nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav[aria-label="主导航"] li {
  margin: 0;
}

header nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 99px;
  transition: all 0.25s var(--ease);
}

header nav[aria-label="主导航"] a:hover {
  color: var(--primary);
  background: rgba(26, 92, 255, 0.08);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 320px;
  position: relative;
}

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

header form[role="search"] input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

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

header form[role="search"] input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.12);
}

header form[role="search"] button {
  flex: 0 0 auto;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--grad-btn);
  border: none;
  border-radius: 99px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 92, 255, 0.35);
  filter: brightness(1.05);
}

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

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

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

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

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

/* ============ Main layout ============ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 48px) 0;
}

main > section {
  margin-bottom: clamp(32px, 5vw, 64px);
  animation: fadeUp 0.7s var(--ease) both;
}

main > section:nth-child(2) { animation-delay: 0.05s; }
main > section:nth-child(3) { animation-delay: 0.1s; }
main > section:nth-child(4) { animation-delay: 0.15s; }
main > section:nth-child(5) { animation-delay: 0.2s; }
main > section:nth-child(6) { animation-delay: 0.25s; }
main > section:nth-child(7) { animation-delay: 0.3s; }

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border-radius: var(--radius-xl);
  background: var(--grad-banner);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  animation: heroShift 12s ease infinite, fadeUp 0.7s var(--ease) both;
}

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

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.55), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  animation: float 8s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -8%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  filter: blur(24px);
  z-index: -1;
  animation: float 10s ease-in-out infinite reverse;
}

#hero h1 {
  color: #fff;
  max-width: 900px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 820px;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
}

#hero strong {
  color: var(--accent);
  font-weight: 800;
}

#hero > div {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero > div:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.32);
}

#hero svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ============ Cards ============ */
#intro,
#about,
#products,
#services,
#scenarios,
#solutions,
#cases,
#news,
#howto,
#notes,
#author,
#contact,
#sitemap,
#links {
  padding: clamp(24px, 3.5vw, 40px);
  background: var(--grad-card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

#intro:hover,
#about:hover,
#products:hover,
#services:hover,
#scenarios:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#howto:hover,
#notes:hover,
#author:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-md);
}

/* ============ Articles ============ */
#articles {
  padding: 0;
}

#articles h2 {
  margin-bottom: 1.2em;
}

#articles > article {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 18px;
  background: var(--grad-card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

#articles > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-btn);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#articles > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 92, 255, 0.28);
}

#articles > article:hover::before {
  opacity: 1;
}

#articles > article h3 {
  margin-bottom: 0.4em;
  transition: color 0.3s var(--ease);
}

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

#articles > article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6em;
  padding: 2px 10px;
  background: rgba(26, 92, 255, 0.08);
  border-radius: 99px;
}

#articles > article p {
  margin-bottom: 0.8em;
  font-size: 0.94rem;
}

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}

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

#articles > article a:hover {
  gap: 10px;
  color: var(--primary-dark);
}

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

/* ============ News ============ */
#news article {
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

#news article h3 {
  margin-bottom: 0.3em;
  font-size: 1.05rem;
}

#news article time {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.4em;
  letter-spacing: 0.02em;
}

#news article p {
  margin: 0;
  font-size: 0.92rem;
}

/* ============ Cases ============ */
#cases p {
  background: var(--surface-solid);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
  font-size: 0.94rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#cases p:hover {
  border-left-color: var(--primary);
  transform: translateX(3px);
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  padding: 14px 18px 14px 56px;
  margin-bottom: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  counter-increment: step;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-btn);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(26, 92, 255, 0.3);
}

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

/* ============ FAQ ============ */
#faq {
  padding: 0;
}

#faq h2 {
  margin-bottom: 1.2em;
}

#faq details {
  margin-bottom: 10px;
  background: var(--grad-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(26, 92, 255, 0.25);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 92, 255, 0.3);
}

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

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary);
  background: rgba(26, 92, 255, 0.1);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

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

#faq summary:hover {
  color: var(--primary);
  background: rgba(26, 92, 255, 0.04);
}

#faq details p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-soft);
  animation: fadeUp 0.4s var(--ease) both;
}

/* ============ Author / Contact / Sitemap / Links ============ */
#author p,
#contact address p {
  margin-bottom: 0.6em;
  font-size: 0.94rem;
}

#contact address {
  font-style: normal;
}

#contact a {
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.25s var(--ease);
}

#contact a:hover {
  border-bottom-color: var(--primary);
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: all 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-btn);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 92, 255, 0.3);
}

/* ============ Footer ============ */
footer {
  margin-top: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 48px) 32px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}

footer section {
  max-width: 1280px;
  margin: 0 auto 20px;
}

footer h2 {
  font-size: 1.05rem;
  padding-left: 14px;
  margin-bottom: 0.8em;
}

footer h2::before {
  width: 4px;
}

footer p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.5em;
}

footer > p {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

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

  header nav[aria-label="主导航"] {
    order: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --radius-lg: 18px;
    --radius-xl: 22px;
  }

  body {
    font-size: 15px;
  }

  header {
    padding: 10px 16px;
  }

  header > a[aria-label] {
    font-size: 1.15rem;
  }

  header nav[aria-label="主导航"] ul {
    gap: 2px;
  }

  header nav[aria-label="主导航"] a {
    padding: 5px 9px;
    font-size: 0.82rem;
  }

  header form[role="search"] button {
    padding: 8px 14px;
  }

  #hero {
    padding: 28px 20px;
  }

  #hero > div {
    margin-top: 20px;
    border-radius: var(--radius);
  }

  #articles > article {
    padding: 18px;
  }

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

@media (max-width: 480px) {
  header nav[aria-label="主导航"] ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav[aria-label="主导航"] a {
    white-space: nowrap;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #howto ol li {
    padding: 12px 14px 12px 50px;
  }

  #howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.92rem;
  }

  #faq details p {
    padding: 0 16px 16px;
  }
}

/* ============ Motion preferences ============ */
@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;
  }
}

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

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

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

/* ============ Support scroll-driven reveal ============ */
@supports (animation-timeline: view()) {
  main > section {
    animation: revealSection linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

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