:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 50, 0.65);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c5;
  --text-muted: #7a7a95;
  --accent-1: #ff6b9d;
  --accent-2: #a855f7;
  --accent-3: #6366f1;
  --accent-4: #22d3ee;
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 35%, #4a1d6e 65%, #1a1a2e 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b9d 0%, #a855f7 50%, #6366f1 100%);
  --gradient-text: linear-gradient(90deg, #ff6b9d, #a855f7, #22d3ee);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px rgba(168, 85, 247, 0.35);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 68px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --gradient-banner: linear-gradient(135deg, #e8e0ff 0%, #f0d5ff 35%, #ffe0f0 65%, #e0e8ff 100%);
    --shadow-sm: 0 2px 8px rgba(80, 60, 140, 0.08);
    --shadow-md: 0 8px 32px rgba(80, 60, 140, 0.12);
    --shadow-lg: 0 16px 48px rgba(80, 60, 140, 0.16);
    --shadow-glow: 0 0 24px rgba(168, 85, 247, 0.2);
  }
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(168, 85, 247, 0.35);
  color: var(--text-primary);
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--accent-1);
}

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

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

ul, ol {
  list-style: none;
}

/* ===== Header / Navigation ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header nav > a[href="#top"] {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

header nav > a[href="#top"]:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

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

header nav ul li {
  flex-shrink: 0;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

header nav ul li a:hover {
  color: var(--text-primary);
  background: rgba(168, 85, 247, 0.1);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ===== Main Layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

main section {
  margin-top: 56px;
  opacity: 0;
  transform: translateY(32px);
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

main section:nth-child(1) { animation-delay: 0.05s; }
main section:nth-child(2) { animation-delay: 0.1s; }
main section:nth-child(3) { animation-delay: 0.15s; }
main section:nth-child(4) { animation-delay: 0.2s; }
main section:nth-child(5) { animation-delay: 0.25s; }
main section:nth-child(6) { animation-delay: 0.3s; }
main section:nth-child(7) { animation-delay: 0.35s; }
main section:nth-child(8) { animation-delay: 0.4s; }
main section:nth-child(9) { animation-delay: 0.45s; }
main section:nth-child(10) { animation-delay: 0.5s; }
main section:nth-child(11) { animation-delay: 0.55s; }
main section:nth-child(12) { animation-delay: 0.6s; }

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

/* ===== Hero Section ===== */
#hero {
  position: relative;
  margin-top: 40px;
  padding: 72px 48px;
  border-radius: var(--radius-xl);
  background: var(--gradient-banner);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glass);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.25) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: floatGlow 14s ease-in-out infinite reverse;
}

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

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

#hero p {
  position: relative;
  z-index: 1;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 820px;
  animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

#hero nav[aria-label="面包屑"] {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

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

#hero nav[aria-label="面包屑"] ol li {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hero nav[aria-label="面包屑"] ol li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.5;
}

#hero nav[aria-label="面包屑"] ol li a {
  color: var(--text-secondary);
}

#hero nav[aria-label="面包屑"] ol li a:hover {
  color: var(--accent-1);
}

/* ===== Section Headings ===== */
main section > h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  position: relative;
  color: var(--text-primary);
}

main section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-accent);
  box-shadow: var(--shadow-glow);
}

main section h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

main section h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-2);
  margin: 20px 0 8px;
  line-height: 1.4;
}

main section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.975rem;
  line-height: 1.9;
}

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

main section > p,
main section > h3,
main section > h4,
main section > ul,
main section > ol {
  max-width: 900px;
}

/* ===== Card-like Sections ===== */
#brand,
#concept,
#industry,
#products,
#solutions,
#scenarios,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

#brand:hover,
#concept:hover,
#industry:hover,
#products:hover,
#solutions:hover,
#scenarios:hover,
#cases:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(168, 85, 247, 0.3);
}

/* ===== Articles ===== */
#articles article {
  padding: 24px 26px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-left: 3px solid transparent;
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

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

#articles article:hover {
  transform: translateX(6px);
  border-left-color: var(--accent-1);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: var(--shadow-sm);
}

#articles article h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

#articles article p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

#articles article a {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
  color: var(--accent-2);
  position: relative;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

#articles article a::after {
  content: "→";
  margin-left: 4px;
  transition: transform var(--transition-fast);
  display: inline-block;
}

#articles article a:hover {
  color: var(--accent-1);
}

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

/* ===== FAQ ===== */
#faq h3 {
  padding: 16px 20px;
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  cursor: default;
  position: relative;
  padding-left: 44px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  line-height: 1;
}

#faq h3:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-1);
}

#faq h3 + p {
  padding: 16px 20px 18px 44px;
  margin: 0 0 8px;
  font-size: 0.925rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-secondary);
  position: relative;
  transition: background var(--transition-fast);
}

#faq h3 + p::before {
  content: "A";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-4);
  line-height: 1;
}

#faq h3 + p:hover {
  background: rgba(34, 211, 238, 0.06);
}

/* ===== Lists (Sitemap, Links) ===== */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 12px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

#sitemap ul li a::before,
#links ul li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

#sitemap ul li a:hover::before,
#links ul li a:hover::before {
  opacity: 1;
}

#sitemap ul li a,
#links ul li a {
  position: relative;
  z-index: 0;
}

/* ===== Footer ===== */
footer {
  margin-top: 80px;
  padding: 48px 24px 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 46, 0.6) 100%);
  border-top: 1px solid var(--border-glass);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--gradient-accent);
  opacity: 0.5;
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto;
}

footer h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
  color: var(--text-primary);
}

footer h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
}

footer h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 10px;
}

footer p:last-child {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-glass);
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
}

/* ===== Scroll Animation (IntersectionObserver friendly) ===== */
@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;
  }
  main section {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  main {
    padding: 0 16px 60px;
  }

  #hero {
    padding: 56px 32px;
    border-radius: var(--radius-lg);
  }

  #brand,
  #concept,
  #industry,
  #products,
  #solutions,
  #scenarios,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact {
    padding: 28px 24px;
  }

  main section {
    margin-top: 44px;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
    --radius-lg: 18px;
    --radius-xl: 22px;
  }

  body {
    font-size: 15px;
  }

  header nav {
    padding: 0 14px;
    gap: 10px;
  }

  header nav > a[href="#top"] {
    font-size: 1rem;
  }

  header nav ul {
    gap: 0;
  }

  header nav ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 12px 48px;
  }

  main section {
    margin-top: 36px;
  }

  #hero {
    margin-top: 24px;
    padding: 40px 22px;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  #hero p {
    font-size: 0.9rem;
    line-height: 1.85;
  }

  #hero nav[aria-label="面包屑"] {
    margin-top: 24px;
  }

  main section > h2 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  main section h3 {
    font-size: 1.05rem;
    margin: 22px 0 10px;
  }

  main section h4 {
    font-size: 0.975rem;
  }

  main section p {
    font-size: 0.9rem;
    line-height: 1.85;
  }

  #brand,
  #concept,
  #industry,
  #products,
  #solutions,
  #scenarios,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  #articles article {
    padding: 18px 18px;
    border-radius: var(--radius-sm);
  }

  #articles article:hover {
    transform: translateY(-2px);
  }

  #articles article h3 {
    font-size: 1rem;
  }

  #faq h3 {
    padding: 14px 16px 14px 40px;
    font-size: 0.925rem;
  }

  #faq h3 + p {
    padding: 14px 16px 16px 40px;
    font-size: 0.875rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  footer {
    margin-top: 56px;
    padding: 36px 16px 28px;
  }

  footer h2 {
    font-size: 1.1rem;
  }

  footer p {
    font-size: 0.8rem;
  }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 400px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  #hero {
    padding: 32px 18px;
  }

  header nav > a[href="#top"] {
    font-size: 0.9rem;
  }
}

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

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}