:root {
  --bg: #0f0f1a;
  --bg-2: #16213e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-solid: #1a1a2e;
  --border: rgba(255, 255, 255, 0.1);
  --text: #eaeaea;
  --text-2: #a8b2c1;
  --accent: #e94560;
  --accent-2: #0f3460;
  --accent-soft: rgba(233, 69, 96, 0.14);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-2: #e8ecf6;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --border: rgba(20, 30, 60, 0.1);
    --text: #1c2333;
    --text-2: #55617a;
    --accent: #d62f4c;
    --accent-2: #2a4a8a;
    --accent-soft: rgba(214, 47, 76, 0.1);
    --shadow: 0 8px 32px rgba(30, 45, 90, 0.12);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      circle at 12% -8%,
      var(--accent-soft),
      transparent 45%
    ),
    radial-gradient(circle at 92% 4%, rgba(15, 52, 96, 0.35), transparent 42%);
  background-attachment: fixed;
  overflow-x: hidden;
  animation: pageIn 0.6s var(--ease) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

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

.brand-bar svg {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand-bar svg:hover {
  transform: rotate(-8deg) scale(1.06);
}

.brand-bar strong {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--accent), #ff8fa3 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.brand-bar span {
  font-size: 0.82rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

nav[aria-label="主导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

nav[aria-label="主导航"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 7px 14px;
  font-size: 0.88rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--border);
  transform: translateY(-2px);
  outline: none;
}

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

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
}

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

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

main > nav[aria-label="面包屑导航"] a:hover {
  color: var(--accent);
}

section {
  margin-bottom: 56px;
  scroll-margin-top: 130px;
  animation: riseIn 0.7s var(--ease) both;
}

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

section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
section:nth-of-type(5) { animation-delay: 0.2s; }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  padding: 44px 32px;
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 45%, #0f3460 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.45), transparent 65%);
  filter: blur(20px);
  animation: floatGlow 9s ease-in-out infinite alternate;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -60% -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.8), transparent 65%);
  filter: blur(24px);
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

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

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

#hero p {
  color: rgba(234, 234, 234, 0.86);
  max-width: 62ch;
  margin: 0 0 16px;
}

#hero figure {
  margin: 26px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 56px rgba(233, 69, 96, 0.28);
}

#hero figcaption {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: rgba(234, 234, 234, 0.6);
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* ---------- Typography ---------- */
h2 {
  position: relative;
  margin: 0 0 22px;
  padding-left: 16px;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(233, 69, 96, 0.5);
}

h3 {
  margin: 30px 0 12px;
  font-size: 1.12rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

h4 {
  margin: 20px 0 8px;
  font-size: 1rem;
  color: var(--accent);
}

p {
  margin: 0 0 14px;
  color: var(--text-2);
}

strong {
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #ff8fa3;
}

/* ---------- Card-ish content blocks ---------- */
#intro,
#products,
#solutions,
#scenarios,
#knowledge,
#howto {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

#intro:hover,
#products:hover,
#solutions:hover,
#scenarios:hover,
#knowledge:hover,
#howto:hover {
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: 0 14px 44px rgba(233, 69, 96, 0.16);
}

/* ---------- Cases / News / Articles cards ---------- */
#cases blockquote {
  margin: 16px 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#cases blockquote:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 36px rgba(233, 69, 96, 0.2);
}

#cases blockquote p {
  margin: 0;
  color: var(--text);
  font-style: italic;
}

#news article,
#articles article {
  position: relative;
  margin-bottom: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: 0 16px 44px rgba(233, 69, 96, 0.18);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  transition: color 0.25s var(--ease);
}

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

#news time,
#articles time {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 12px;
  font-size: 0.76rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  letter-spacing: 0.03em;
}

#articles article p a {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #ff6b81);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

#articles article p a:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.5);
  color: #fff;
}

/* ---------- FAQ ---------- */
#faq details {
  margin-bottom: 12px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: 0 12px 36px rgba(233, 69, 96, 0.16);
}

#faq summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  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;
  line-height: 24px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--accent);
  border: 1px solid var(--border);
  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(--accent-soft);
}

#faq summary:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  animation: fadeDown 0.4s var(--ease) both;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- HowTo ---------- */
#howto ol {
  counter-reset: step;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin-bottom: 12px;
  padding: 12px 16px 12px 56px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(233, 69, 96, 0.4);
  background: var(--accent-soft);
}

/* ---------- Contact ---------- */
#contact address {
  font-style: normal;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

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

#contact address p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.6);
}

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

#sitemap li a,
#links li a {
  display: block;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#sitemap li a:hover,
#links li a:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: rgba(233, 69, 96, 0.4);
  background: var(--accent-soft);
}

/* ---------- Legal ---------- */
#legal {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  padding: 32px 20px;
  text-align: center;
}

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

footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

/* ---------- Focus visible ---------- */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  #hero {
    padding: 34px 24px;
  }

  #intro,
  #products,
  #solutions,
  #scenarios,
  #knowledge,
  #howto,
  #legal {
    padding: 22px 20px;
  }
}

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

  .brand-bar {
    padding: 12px 16px 8px;
  }

  .brand-bar span {
    flex-basis: 100%;
    font-size: 0.76rem;
  }

  nav[aria-label="主导航"] {
    padding: 0 16px 10px;
  }

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

  main {
    padding: 18px 16px 48px;
  }

  section {
    margin-bottom: 40px;
    scroll-margin-top: 150px;
  }

  #hero {
    padding: 26px 18px;
    border-radius: var(--radius);
  }

  #hero h1 {
    font-size: 1.45rem;
  }

  #hero figure {
    margin-top: 20px;
  }

  h2 {
    padding-left: 14px;
    font-size: 1.24rem;
  }

  h3 {
    margin-top: 24px;
    font-size: 1.04rem;
  }

  #news article,
  #articles article {
    padding: 18px 16px;
  }

  #faq summary {
    padding: 14px 44px 14px 16px;
    font-size: 0.94rem;
  }

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

  #howto ol li {
    padding: 10px 14px 10px 48px;
  }

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

  #contact address {
    padding: 18px 16px;
  }

  footer {
    padding: 24px 16px;
  }
}

/* ---------- Reduced motion ---------- */
@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,
  #hero::before,
  #hero::after {
    display: none;
  }

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

  section {
    break-inside: avoid;
  }
}