:root {
  --bg: #0b1026;
  --bg-2: #101a3a;
  --bg-3: #16224a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8f1ff;
  --text-2: #b7c8e8;
  --text-3: #8fa6cc;
  --brand: #5ee7ff;
  --brand-2: #b06bff;
  --brand-3: #ff6bd6;
  --accent: #ffd166;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef3ff;
    --bg-2: #e3ebff;
    --bg-3: #d8e4ff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(20, 40, 90, 0.12);
    --text: #101a33;
    --text-2: #33456b;
    --text-3: #5b6f96;
    --brand: #0a8fb8;
    --brand-2: #7a3ee0;
    --brand-3: #d1379f;
    --accent: #b97b00;
    --shadow: 0 18px 48px rgba(30, 50, 100, 0.16);
    --shadow-soft: 0 10px 30px rgba(30, 50, 100, 0.1);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 231, 255, 0.16), transparent 60%),
    radial-gradient(1000px 520px at 92% 0%, rgba(176, 107, 255, 0.18), transparent 62%),
    radial-gradient(900px 600px at 50% 110%, rgba(255, 107, 214, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--brand-2);
}

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

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

h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  font-weight: 800;
  background: linear-gradient(100deg, var(--brand) 0%, #a7f3ff 35%, var(--brand-2) 75%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(94, 231, 255, 0.18));
}

h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  font-weight: 700;
  padding-bottom: 0.55em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 18px rgba(94, 231, 255, 0.5);
}

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

h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--brand);
  margin-top: 1.4em;
}

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

ul,
ol {
  color: var(--text-2);
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.35em;
}

address {
  font-style: normal;
}

::selection {
  background: rgba(94, 231, 255, 0.3);
  color: #fff;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(11, 16, 38, 0.92), rgba(11, 16, 38, 0.7));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: light) {
  #site-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.66));
    box-shadow: 0 8px 30px rgba(30, 50, 100, 0.12);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 0.8rem;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}

.topbar nav {
  display: flex;
  gap: 18px;
}

.topbar a {
  color: var(--text-3);
  font-weight: 500;
}

.topbar a:hover {
  color: var(--brand);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.logo svg {
  filter: drop-shadow(0 6px 18px rgba(94, 231, 255, 0.45));
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
  filter: drop-shadow(0 8px 26px rgba(176, 107, 255, 0.6));
}

.logo-text {
  font-size: 1.35rem;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-slogan {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-search:focus-within {
  border-color: rgba(94, 231, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(94, 231, 255, 0.12);
}

.site-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-search input {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 8px 10px 8px 0;
  width: 210px;
  min-width: 0;
}

.site-search input::placeholder {
  color: var(--text-3);
}

.site-search input:focus {
  outline: none;
}

.site-search button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #06122a;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(100deg, var(--brand), #9ef0ff);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(94, 231, 255, 0.4);
}

.main-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

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

.main-nav a {
  display: inline-block;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.28s var(--ease);
}

.main-nav a:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
  transform: translateY(-2px);
}

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

section {
  margin: 46px 0;
  scroll-margin-top: 150px;
}

article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.2vw, 34px);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: rise 0.7s var(--ease) both;
}

article:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 231, 255, 0.28);
  box-shadow: var(--shadow);
}

article + article {
  margin-top: 18px;
}

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

/* ============ Hero ============ */
#hero {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 52px);
  border-radius: calc(var(--radius-lg) + 8px);
  background:
    radial-gradient(700px 340px at 12% 0%, rgba(94, 231, 255, 0.22), transparent 62%),
    radial-gradient(700px 380px at 88% 10%, rgba(176, 107, 255, 0.24), transparent 64%),
    radial-gradient(600px 340px at 50% 120%, rgba(255, 107, 214, 0.16), transparent 60%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  position: relative;
  overflow: hidden;
  animation: rise 0.8s var(--ease) both;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 520px;
  height: 520px;
  background: conic-gradient(from 120deg, rgba(94, 231, 255, 0.22), rgba(176, 107, 255, 0.2), rgba(255, 107, 214, 0.16), rgba(94, 231, 255, 0.22));
  filter: blur(70px);
  border-radius: 50%;
  pointer-events: none;
  animation: floaty 14s ease-in-out infinite alternate;
}

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

#hero .lead {
  max-width: 860px;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: #06122a;
  background: linear-gradient(100deg, var(--brand) 0%, #9ef0ff 52%, var(--brand-2) 120%);
  box-shadow: 0 12px 30px rgba(94, 231, 255, 0.32);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  color: #06122a;
  box-shadow: 0 18px 42px rgba(94, 231, 255, 0.45);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  color: var(--brand);
  border-color: rgba(94, 231, 255, 0.5);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.banner {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.banner svg {
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease);
}

.banner:hover svg {
  transform: scale(1.03);
}

.banner figcaption {
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ============ Breadcrumb & TOC ============ */
#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: fit-content;
  max-width: 100%;
}

#breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-3);
}

#page-toc {
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-soft);
}

#page-toc h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8em;
}

#page-toc h2::after {
  width: 42px;
  height: 3px;
}

#page-toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

#page-toc li {
  counter-increment: toc;
  margin: 0;
}

#page-toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

#page-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  opacity: 0.85;
}

#page-toc a:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
  transform: translateX(4px);
}

/* ============ Articles / News / FAQ lists ============ */
#articles > p {
  margin-bottom: 20px;
}

#articles article h3,
#news article h3,
#faq article h3 {
  margin-top: 0;
}

#articles article,
#news article,
#faq article {
  position: relative;
  padding-left: clamp(20px, 3.2vw, 34px);
}

#articles article::before,
#news article::before,
#faq article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article:hover::before,
#news article:hover::before,
#faq article:hover::before {
  opacity: 1;
  box-shadow: 0 0 16px rgba(94, 231, 255, 0.55);
}

#articles article p,
#news article p {
  font-size: 0.94rem;
}

/* ============ Cases / Contact highlights ============ */
#cases article h4,
#contact article h4 {
  color: var(--brand-3);
}

#contact address p {
  margin: 0 0 6px;
  padding-left: 18px;
  position: relative;
}

#contact address p::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-size: 0.7rem;
  top: 0.35em;
}

/* ============ Sitemap & Links ============ */
#sitemap nav ul,
#links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

#sitemap nav a,
#links a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
}

#sitemap nav a:hover,
#links a:hover {
  color: var(--text);
  border-color: rgba(94, 231, 255, 0.45);
  background: var(--surface-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* ============ Footer ============ */
#site-footer {
  margin-top: 40px;
  padding: clamp(30px, 5vw, 56px) 24px 26px;
  background:
    radial-gradient(800px 320px at 15% 0%, rgba(94, 231, 255, 0.12), transparent 60%),
    radial-gradient(700px 320px at 85% 10%, rgba(176, 107, 255, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(8, 12, 30, 0.9), rgba(6, 9, 22, 0.98));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (prefers-color-scheme: light) {
  #site-footer {
    background:
      radial-gradient(800px 320px at 15% 0%, rgba(10, 143, 184, 0.1), transparent 60%),
      radial-gradient(700px 320px at 85% 10%, rgba(122, 62, 224, 0.1), transparent 62%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 243, 255, 0.98));
  }
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
}

#site-footer h2 {
  font-size: 1.15rem;
}

#site-footer h2::after {
  width: 40px;
  height: 3px;
}

#site-footer h3 {
  font-size: 0.95rem;
  color: var(--brand);
  margin-top: 1.1em;
}

#site-footer p {
  font-size: 0.9rem;
  color: var(--text-3);
  max-width: 760px;
}

#site-footer .copyright {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .brand-row {
    gap: 14px;
  }

  .brand-slogan {
    border-left: none;
    padding-left: 0;
    width: 100%;
    order: 3;
  }

  .site-search {
    flex: 1 1 100%;
    margin-left: 0;
    order: 4;
  }

  .site-search input {
    width: 100%;
  }

  .main-nav ul {
    flex-wrap: nowrap;
  }
}

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

  .topbar {
    padding: 8px 16px;
    font-size: 0.74rem;
  }

  .topbar nav {
    gap: 12px;
  }

  .brand-row {
    padding: 12px 16px;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .main-nav {
    padding: 0 16px 10px;
  }

  main {
    padding: 0 16px 40px;
  }

  section {
    margin: 32px 0;
    scroll-margin-top: 170px;
  }

  #hero {
    margin-top: 24px;
    padding: 22px 18px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost {
    flex: 1 1 auto;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  #page-toc {
    padding: 18px;
  }

  #page-toc ol {
    grid-template-columns: 1fr;
  }

  #sitemap nav ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

  article:hover {
    transform: none;
  }

  .banner figcaption {
    font-size: 0.74rem;
  }
}

@media (max-width: 380px) {
  #sitemap nav ul,
  #links ul {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  #site-header,
  #site-footer,
  .hero-actions,
  #page-toc,
  #breadcrumb {
    display: none;
  }

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

  article {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}