:root {
  --brand: #6C5CE7;
  --brand-2: #a29bfe;
  --brand-3: #fd79a8;
  --brand-soft: rgba(108, 92, 231, 0.12);
  --bg: #f6f5ff;
  --bg-2: #ffffff;
  --bg-3: #f0eefc;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --border: rgba(108, 92, 231, 0.14);
  --text: #1c1a2e;
  --text-2: #4a4763;
  --text-3: #7c7894;
  --shadow-sm: 0 2px 10px rgba(60, 40, 140, 0.06);
  --shadow: 0 10px 30px rgba(60, 40, 140, 0.10);
  --shadow-lg: 0 20px 50px rgba(60, 40, 140, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --blur: 16px;
  --nav-h: 64px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8b7cf7;
    --brand-2: #a29bfe;
    --brand-3: #ff8fc0;
    --brand-soft: rgba(139, 124, 247, 0.18);
    --bg: #0e0d18;
    --bg-2: #16152a;
    --bg-3: #1b1a30;
    --card: rgba(30, 28, 52, 0.66);
    --card-solid: #1c1a30;
    --border: rgba(162, 155, 254, 0.18);
    --text: #f2f0ff;
    --text-2: #c9c5e4;
    --text-3: #928dae;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(108, 92, 231, 0.18), transparent 60%),
    radial-gradient(900px 500px at 92% 4%, rgba(253, 121, 168, 0.14), transparent 62%),
    radial-gradient(1000px 700px at 50% 108%, rgba(162, 155, 254, 0.16), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  box-shadow: 0 0 14px rgba(108, 92, 231, 0.5);
}

h3 {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

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

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(var(--blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--blur));
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.6s var(--ease) both;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

header nav > a {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  padding: 14px 0;
  position: relative;
}

header nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

header nav > a:hover::after {
  transform: scaleX(1);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.28s var(--ease);
  position: relative;
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.38);
  transform: translateY(-2px);
}

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

/* ===== Hero / H1 ===== */
main > h1 {
  position: relative;
  margin: 40px 0 36px;
  padding: clamp(30px, 6vw, 64px) clamp(22px, 5vw, 56px);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.95), rgba(162, 155, 254, 0.92) 45%, rgba(253, 121, 168, 0.9)),
    linear-gradient(135deg, #6C5CE7, #a29bfe);
  background-size: 200% 200%, 100% 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
  animation: heroIn 0.9s var(--ease) both, gradientShift 14s ease infinite;
  text-shadow: 0 2px 18px rgba(40, 20, 90, 0.35);
}

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

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

main > h1::before,
main > h1::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(2px);
  z-index: -1;
  animation: floaty 9s ease-in-out infinite;
}

main > h1::before {
  width: 220px;
  height: 220px;
  top: -90px;
  left: -60px;
}

main > h1::after {
  width: 160px;
  height: 160px;
  bottom: -70px;
  right: -40px;
  animation-delay: -4.5s;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(18px) translateX(12px); }
}

/* ===== Sections as glass cards ===== */
main section {
  position: relative;
  margin: 0 0 28px;
  padding: clamp(22px, 3.6vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--card);
  backdrop-filter: saturate(160%) blur(var(--blur));
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 42%;
  overflow: hidden;
}

main section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 38%);
  opacity: 0.7;
}

@media (prefers-color-scheme: dark) {
  main section::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%);
  }
}

@supports not (animation-timeline: view()) {
  main section {
    animation: fadeUp 0.7s var(--ease) both;
  }
}

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

main section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 92, 231, 0.34);
}

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

main section > p:first-of-type {
  font-size: 1.02rem;
}

/* ===== Intro ===== */
#intro {
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.10), rgba(253, 121, 168, 0.08)),
    var(--card);
}

/* ===== Brand ===== */
#brand h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

#brand h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  box-shadow: 0 0 0 4px var(--brand-soft);
  flex: none;
}

/* ===== Products ===== */
#products {
  background:
    linear-gradient(160deg, rgba(162, 155, 254, 0.14), transparent 60%),
    var(--card);
}

/* ===== Solutions ===== */
#solutions {
  background:
    linear-gradient(200deg, rgba(253, 121, 168, 0.12), transparent 60%),
    var(--card);
}

/* ===== Cases ===== */
#cases h3 {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--border);
  margin-top: 18px;
  transition: all 0.32s var(--ease);
}

#cases h3:hover {
  background: linear-gradient(120deg, var(--brand-soft), rgba(253, 121, 168, 0.12));
  transform: translateX(6px);
}

#cases p:last-child {
  margin-top: 18px;
  padding: 16px 20px;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-soft);
  font-style: italic;
  color: var(--text-2);
}

/* ===== News ===== */
#news {
  background:
    linear-gradient(120deg, rgba(108, 92, 231, 0.12), rgba(162, 155, 254, 0.10)),
    var(--card);
}

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

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

#articles article {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.38s var(--ease), box-shadow 0.38s var(--ease), border-color 0.38s var(--ease);
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 40%;
}

@supports not (animation-timeline: view()) {
  #articles article {
    animation: fadeUp 0.7s var(--ease) both;
  }
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.42s var(--ease);
}

#articles article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 92, 231, 0.4);
}

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

#articles article h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
  line-height: 1.5;
  transition: color 0.3s var(--ease);
}

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

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#articles article p:first-of-type::before {
  content: "🕒";
  font-size: 0.85rem;
}

#articles article p:nth-of-type(2) {
  font-size: 0.94rem;
  color: var(--text-2);
  flex: 1;
}

#articles article a {
  align-self: flex-start;
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid transparent;
  transition: all 0.32s var(--ease);
}

#articles article a::after {
  content: " →";
  transition: transform 0.32s var(--ease);
  display: inline-block;
}

#articles article a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.4);
  transform: translateY(-2px);
}

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

/* ===== FAQ ===== */
#faq {
  background:
    linear-gradient(180deg, rgba(108, 92, 231, 0.08), transparent 55%),
    var(--card);
}

#faq h3 {
  position: relative;
  margin-top: 22px;
  padding: 16px 20px 16px 52px;
  border-radius: var(--radius);
  font-size: 1.02rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  cursor: default;
  transition: all 0.34s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

#faq h3:hover {
  background: linear-gradient(120deg, var(--brand-soft), rgba(253, 121, 168, 0.12));
  transform: translateX(6px);
  border-color: rgba(108, 92, 231, 0.34);
}

#faq h3 + p {
  margin: -8px 0 4px;
  padding: 14px 20px 4px 52px;
  font-size: 0.95rem;
  color: var(--text-2);
  border-left: 2px dashed var(--border);
  margin-left: 29px;
}

/* ===== HowTo ===== */
#howto {
  background:
    linear-gradient(140deg, rgba(162, 155, 254, 0.16), rgba(253, 121, 168, 0.10)),
    var(--card);
}

#howto h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.98rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.32s var(--ease);
}

#howto h3:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(108, 92, 231, 0.4);
}

#howto h3::before {
  content: "✦";
  color: var(--brand);
  font-size: 0.9rem;
}

#howto p {
  margin-top: 12px;
}

#howto p:nth-of-type(3) {
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--card-solid);
  border: 1px dashed rgba(108, 92, 231, 0.34);
  line-height: 2;
  color: var(--text-2);
}

/* ===== Contact ===== */
#contact {
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.14), rgba(253, 121, 168, 0.10)),
    var(--card);
}

#contact p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  margin: 0 0 10px;
  border-radius: var(--radius-sm);
  background: var(--card-solid);
  border: 1px solid var(--border);
  font-size: 0.96rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(108, 92, 231, 0.36);
}

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

/* ===== Sitemap / Links ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.32s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.4);
}

/* ===== Legal ===== */
#legal {
  background:
    linear-gradient(120deg, rgba(108, 92, 231, 0.08), rgba(162, 155, 254, 0.10)),
    var(--card);
}

#legal p {
  padding-left: 18px;
  border-left: 3px solid var(--brand-soft);
  font-size: 0.94rem;
}

#legal p:hover {
  border-left-color: var(--brand);
}

/* ===== Footer ===== */
footer {
  position: relative;
  padding: 40px 20px 48px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.10));
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.88rem;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90%);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-3), transparent);
  opacity: 0.7;
}

footer p {
  margin: 0 0 6px;
  color: var(--text-3);
  font-size: 0.88rem;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.03em;
}

footer p:last-child {
  margin-bottom: 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

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

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

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-3), var(--brand));
  background-clip: padding-box;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 16px;
  }

  header nav > a {
    text-align: center;
    padding: 8px 0;
  }

  header nav ul {
    margin-left: 0;
    justify-content: center;
    gap: 6px;
    padding-bottom: 8px;
  }

  header nav ul li a {
    padding: 7px 12px;
    font-size: 0.86rem;
  }

  main > h1 {
    margin-top: 28px;
  }
}

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

  main {
    padding: 0 14px 60px;
  }

  main > h1 {
    border-radius: var(--radius);
    margin-bottom: 24px;
  }

  main section {
    border-radius: var(--radius);
    margin-bottom: 20px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #articles {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #articles article {
    padding: 18px;
  }

  #faq h3 {
    padding: 14px 16px 14px 46px;
    font-size: 0.96rem;
  }

  #faq h3::before {
    left: 12px;
    width: 24px;
    height: 24px;
  }

  #faq h3 + p {
    padding-left: 46px;
    margin-left: 24px;
    font-size: 0.9rem;
  }

  #contact p {
    flex-direction: column;
    gap: 2px;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 9px 16px;
    font-size: 0.85rem;
  }

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

/* ===== Motion preference ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  main > h1::before,
  main > h1::after {
    display: none;
  }

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

  main section,
  #articles article {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    break-inside: avoid;
  }
}