:root {
  --bg: #f6f7fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.62);
  --surface-glass-strong: rgba(255, 255, 255, 0.82);
  --text: #1c2230;
  --text-soft: #4a5468;
  --text-muted: #6b7488;
  --border: rgba(28, 34, 48, 0.1);
  --border-strong: rgba(28, 34, 48, 0.16);
  --primary: #5b5bd6;
  --primary-2: #8b5cf6;
  --accent: #ff6b9d;
  --accent-2: #ffb86b;
  --success: #22b07d;
  --shadow-sm: 0 2px 8px rgba(24, 30, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(24, 30, 48, 0.09);
  --shadow-lg: 0 24px 60px rgba(24, 30, 48, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1020;
    --bg-soft: #131629;
    --surface: #181c31;
    --surface-glass: rgba(24, 28, 49, 0.6);
    --surface-glass-strong: rgba(24, 28, 49, 0.85);
    --text: #eef1fb;
    --text-soft: #c3c9dd;
    --text-muted: #98a0b8;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --primary: #8b8bff;
    --primary-2: #b18cff;
    --accent: #ff7fae;
    --accent-2: #ffc27f;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  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:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 91, 214, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(255, 107, 157, 0.12), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(139, 92, 246, 0.1), transparent 60%),
    var(--bg);
  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(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

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

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

h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  position: relative;
  padding-left: 0.62em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  color: var(--text-soft);
}

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

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

li {
  margin-bottom: 0.4em;
}

blockquote {
  margin: 0;
  padding: 1.1em 1.3em;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
}

blockquote p {
  margin: 0;
}

/* ============ Header / Navigation ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(24, 30, 48, 0.05);
}

nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

nav > a[aria-label] {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 6px 0;
  white-space: nowrap;
  background: linear-gradient(92deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav > a[aria-label]:hover {
  -webkit-text-fill-color: transparent;
  filter: brightness(1.12);
}

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

nav ul li {
  margin: 0;
}

nav ul li a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

nav ul li a:hover,
nav ul li a:focus-visible {
  color: var(--primary);
  background: rgba(91, 91, 214, 0.1);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ============ Main / Sections ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

section {
  margin: 0 0 28px;
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: rise-in 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 26%;
  scroll-margin-top: calc(var(--header-h) + 16px);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

@supports not (animation-timeline: view()) {
  section {
    animation: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px) clamp(22px, 4vw, 52px);
  background:
    linear-gradient(125deg, rgba(91, 91, 214, 0.92) 0%, rgba(139, 92, 246, 0.9) 42%, rgba(255, 107, 157, 0.86) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 80px rgba(91, 91, 214, 0.34);
  color: #fff;
  border-radius: var(--radius-xl);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 62%);
  pointer-events: none;
  animation: float-glow 14s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -55% -18%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 184, 107, 0.34), transparent 64%);
  pointer-events: none;
  animation: float-glow 18s ease-in-out infinite alternate-reverse;
}

@keyframes float-glow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-40px, 30px, 0) scale(1.12);
  }
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(20, 16, 48, 0.28);
  margin-bottom: 0.55em;
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.94);
  max-width: 76ch;
  font-size: clamp(0.98rem, 1.5vw, 1.06rem);
}

#hero p a {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.28s var(--ease), transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

#hero p a:hover,
#hero p a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.32);
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20, 16, 48, 0.28);
}

/* ============ Content blocks ============ */
#brand p,
#about p,
#culture p,
#contact p {
  max-width: 82ch;
}

#history h3,
#culture h3,
#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#news h3,
#knowledge h3,
#faq h3,
#howto h3,
#legal h3,
#contact h3 {
  display: inline-block;
  margin-top: 0.6em;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(91, 91, 214, 0.1);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  transition: background 0.28s var(--ease), transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

#history h3:hover,
#culture h3:hover,
#products h3:hover,
#advantages h3:hover,
#solutions h3:hover,
#applications h3:hover,
#cases h3:hover,
#news h3:hover,
#knowledge h3:hover,
#faq h3:hover,
#howto h3:hover,
#legal h3:hover,
#contact h3:hover {
  background: rgba(91, 91, 214, 0.18);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#faq h3 {
  margin-top: 1.1em;
}

#faq h3 + p {
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
}

/* ============ Articles ============ */
#articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

#articles > h2 {
  grid-column: 1 / -1;
}

#articles article {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  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(-6px);
  border-color: rgba(91, 91, 214, 0.4);
  box-shadow: var(--shadow-lg);
}

#articles article h3 {
  margin-bottom: 0.4em;
  color: var(--text);
}

#articles article p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

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

#articles article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(92deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(91, 91, 214, 0.3);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    filter 0.28s var(--ease);
}

#articles article p:last-child a:hover,
#articles article p:last-child a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px rgba(91, 91, 214, 0.42);
}

/* ============ Reviews ============ */
#reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

#reviews > h2 {
  grid-column: 1 / -1;
}

#reviews blockquote {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

#reviews blockquote:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  border-left-color: var(--primary);
  box-shadow: var(--shadow-md);
}

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

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover,
#sitemap ul li a:focus-visible,
#links ul li a:focus-visible {
  color: #fff;
  background: linear-gradient(92deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateY(-2px);
}

/* ============ Article detail sections ============ */
#article-1,
#article-2,
#article-3,
#article-4,
#article-5,
#article-6,
#article-7,
#article-8,
#article-9,
#article-10 {
  padding: clamp(18px, 2.6vw, 28px);
  border-left: 4px solid rgba(91, 91, 214, 0.45);
  border-radius: var(--radius-md);
}

#article-1 h2,
#article-2 h2,
#article-3 h2,
#article-4 h2,
#article-5 h2,
#article-6 h2,
#article-7 h2,
#article-8 h2,
#article-9 h2,
#article-10 h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  padding-left: 0;
}

#article-1 h2::before,
#article-2 h2::before,
#article-3 h2::before,
#article-4 h2::before,
#article-5 h2::before,
#article-6 h2::before,
#article-7 h2::before,
#article-8 h2::before,
#article-9 h2::before,
#article-10 h2::before {
  display: none;
}

/* ============ Footer ============ */
footer {
  margin-top: 20px;
  padding: 40px 20px 48px;
  text-align: center;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer p a {
  font-weight: 600;
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  nav {
    gap: 10px;
    padding: 8px 16px;
  }

  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }

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

  nav ul li a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 6px 11px;
  }

  main {
    padding: 20px 16px 52px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
    --radius-lg: 20px;
    --radius-xl: 24px;
  }

  body {
    font-size: 15px;
    line-height: 1.7;
  }

  section {
    margin-bottom: 18px;
    padding: 18px 16px;
  }

  #hero {
    padding: 30px 20px;
  }

  #hero p a {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  h2 {
    padding-left: 0.55em;
  }

  #articles,
  #reviews {
    grid-template-columns: 1fr;
  }

  #sitemap ul li a,
  #links ul li a {
    font-size: 0.84rem;
    padding: 6px 12px;
  }

  footer {
    padding: 30px 16px 38px;
  }
}

@media (max-width: 400px) {
  nav > a[aria-label] {
    font-size: 1.05rem;
  }

  #hero p a {
    display: block;
    text-align: center;
    margin-right: 0;
  }
}

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

::selection {
  background: rgba(91, 91, 214, 0.28);
  color: var(--text);
}

@supports (scrollbar-width: thin) {
  html {
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 91, 214, 0.5) transparent;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
</style>