:root {
  --primary: #ff6b35;
  --primary-dark: #e5521c;
  --primary-light: #ff8f63;
  --accent: #4ecdc4;
  --accent-dark: #35b0a7;
  --pink: #f78fb3;
  --bg: #f7f8fc;
  --bg-alt: #ffffff;
  --bg-elevated: #ffffff;
  --text: #1a1a2e;
  --text-soft: #4a4a68;
  --text-muted: #7a7a95;
  --border: rgba(26, 26, 46, 0.08);
  --border-strong: rgba(26, 26, 46, 0.16);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --maxw: 1180px;
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 35%, #ff6b35 100%);
  --gradient-btn: linear-gradient(135deg, #ff6b35 0%, #f78fb3 100%);
  --gradient-accent: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --bg-alt: #16172b;
    --bg-elevated: #1c1d33;
    --text: #eef0f8;
    --text-soft: #c3c6db;
    --text-muted: #8a8da8;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(28, 29, 51, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --gradient-banner: linear-gradient(135deg, #0f1020 0%, #241a3d 40%, #b84a1f 100%);
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 107, 53, 0.10), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(78, 205, 196, 0.10), transparent 40%),
    radial-gradient(circle at 75% 85%, rgba(247, 143, 179, 0.10), transparent 45%);
  pointer-events: none;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  min-height: var(--header-h);
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.brand svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 4px 10px rgba(255, 107, 53, 0.35));
}

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

.brand span {
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

header nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

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

header nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: #fff;
  background: var(--gradient-btn);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.32);
}

/* ============ Layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) 64px;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

main > nav[aria-label="面包屑导航"] li {
  display: flex;
  align-items: center;
  gap: 8px;
}

main > nav[aria-label="面包屑导航"] li:not(:last-child)::after {
  content: "›";
  color: var(--text-muted);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] li:last-child {
  color: var(--primary);
  font-weight: 600;
}

/* ============ Sections ============ */
section {
  margin-bottom: clamp(32px, 5vw, 56px);
  animation: fadeUp 0.7s var(--ease) both;
}

section > h2 {
  position: relative;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 24px;
  padding-left: 18px;
  color: var(--text);
  letter-spacing: 0.01em;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.05em;
  border-radius: 6px;
  background: var(--gradient-btn);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
}

section h3 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  line-height: 1.5;
}

section h3:first-of-type {
  margin-top: 0;
}

section p {
  color: var(--text-soft);
  margin-bottom: 12px;
  font-size: 0.975rem;
}

/* Card-like sections */
#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#notice,
#contact,
#sitemap,
#links {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

#intro:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#notice:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ============ Banner ============ */
#banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px);
  background: var(--gradient-banner);
  color: #fff;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#banner::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  border-radius: 50%;
  z-index: -1;
  animation: float 9s ease-in-out infinite;
}

#banner::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -8%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.28), transparent 65%);
  border-radius: 50%;
  z-index: -1;
  animation: float 11s ease-in-out infinite reverse;
}

#banner h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  max-width: 22ch;
}

#banner > p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.85;
  max-width: 68ch;
  margin-bottom: 28px;
}

#banner figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#banner figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

#banner figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#banner figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============ Cases / Blockquote ============ */
#cases blockquote {
  position: relative;
  margin: 16px 0;
  padding: 18px 22px 18px 52px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: 4px;
  left: 16px;
  font-size: 2.6rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.45;
}

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

/* ============ News & Articles ============ */
#news h3 + p,
#articles article p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

#articles article {
  position: relative;
  padding: 22px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  overflow: hidden;
}

#articles article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 53, 0.35);
}

#articles article:hover::after {
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.08rem;
  color: var(--text);
}

#articles article p {
  margin-bottom: 14px;
  line-height: 1.7;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

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

#articles article a:hover {
  background: var(--gradient-btn);
  color: #fff;
  transform: translateY(-1px);
}

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

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details[open] {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  user-select: none;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.12);
  color: var(--primary);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--gradient-btn);
  color: #fff;
}

#faq summary:hover {
  background: rgba(255, 107, 53, 0.06);
  color: var(--primary);
}

#faq details p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.925rem;
  line-height: 1.8;
  animation: fadeIn 0.35s var(--ease);
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: howto;
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

#howto ol li {
  position: relative;
  counter-increment: howto;
  padding: 16px 20px 16px 60px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(255, 107, 53, 0.3);
}

/* ============ Contact ============ */
#contact p {
  padding: 10px 16px;
  margin-bottom: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.925rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#contact p:hover {
  border-color: rgba(78, 205, 196, 0.5);
  transform: translateX(3px);
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap li,
#links li {
  flex: 0 1 auto;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(78, 205, 196, 0.35);
}

/* ============ Footer ============ */
footer {
  position: relative;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px) 28px;
  margin-top: 24px;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-btn);
}

footer section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  animation: none;
}

footer h2 {
  position: relative;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  padding-left: 14px;
  color: var(--text);
}

footer h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: var(--gradient-accent);
}

footer h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-soft);
  margin: 16px 0 8px;
}

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

footer > p:last-child {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ Animations ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Staggered section entrance */
section:nth-of-type(1) { animation-delay: 0.02s; }
section:nth-of-type(2) { animation-delay: 0.06s; }
section:nth-of-type(3) { animation-delay: 0.10s; }
section:nth-of-type(4) { animation-delay: 0.14s; }
section:nth-of-type(5) { animation-delay: 0.18s; }
section:nth-of-type(6) { animation-delay: 0.22s; }
section:nth-of-type(7) { animation-delay: 0.26s; }
section:nth-of-type(8) { animation-delay: 0.30s; }
section:nth-of-type(9) { animation-delay: 0.34s; }
section:nth-of-type(10) { animation-delay: 0.38s; }

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

@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;
  }
}

/* ============ Responsive ============ */
@media (min-width: 640px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }

  #products,
  #solutions,
  #cases,
  #news,
  #howto,
  #notice {
    display: block;
  }
}

@media (max-width: 860px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  header nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  :root {
    --header-h: auto;
  }
}

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

  #banner {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  #banner h1 {
    max-width: none;
  }

  #banner figure svg {
    height: auto;
  }

  #intro,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #notice,
  #contact,
  #sitemap,
  #links {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.925rem;
  }

  #howto ol li {
    padding: 14px 16px 14px 54px;
  }

  #howto ol li::before {
    left: 12px;
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  #cases blockquote {
    padding: 16px 16px 16px 44px;
  }

  #cases blockquote::before {
    left: 12px;
    font-size: 2rem;
  }
}

@media (max-width: 400px) {
  header nav a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }
}

/* ============ Print ============ */
@media print {
  header,
  footer,
  #banner figure,
  #sitemap,
  #links {
    display: none;
  }

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

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