:root {
  --primary: #2b6cb0;
  --primary-dark: #1e4e8c;
  --primary-light: #4a90d9;
  --accent: #f6e05e;
  --accent-soft: #fef3c7;
  --bg: #f4f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-strong: rgba(255, 255, 255, 0.9);
  --text: #1a2433;
  --text-soft: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-soft: rgba(43, 108, 176, 0.12);
  --shadow-sm: 0 2px 8px rgba(26, 36, 51, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 36, 51, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 36, 51, 0.12);
  --shadow-glow: 0 8px 32px rgba(43, 108, 176, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gradient-hero: linear-gradient(135deg, #2b6cb0 0%, #4a90d9 45%, #6bb6e8 100%);
  --gradient-accent: linear-gradient(135deg, #f6e05e 0%, #f6ad55 100%);
  --gradient-soft: linear-gradient(135deg, #e6f0fa 0%, #f4f7fb 100%);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4a90d9;
    --primary-dark: #2b6cb0;
    --primary-light: #6bb6e8;
    --accent: #f6e05e;
    --accent-soft: rgba(246, 224, 94, 0.12);
    --bg: #0d1420;
    --bg-alt: #131c2b;
    --surface: #182236;
    --surface-glass: rgba(24, 34, 54, 0.72);
    --surface-glass-strong: rgba(24, 34, 54, 0.92);
    --text: #e8eef7;
    --text-soft: #b4c1d4;
    --text-muted: #8494ab;
    --border: #263450;
    --border-soft: rgba(74, 144, 217, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 8px 32px rgba(74, 144, 217, 0.28);
    --gradient-hero: linear-gradient(135deg, #1a3a5c 0%, #2b6cb0 50%, #4a90d9 100%);
    --gradient-accent: linear-gradient(135deg, #d4b93a 0%, #d98a45 100%);
    --gradient-soft: linear-gradient(135deg, #131c2b 0%, #0d1420 100%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      circle at 12% 8%,
      rgba(43, 108, 176, 0.08) 0%,
      transparent 42%
    ),
    radial-gradient(
      circle at 88% 22%,
      rgba(246, 224, 94, 0.1) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(74, 144, 217, 0.07) 0%,
      transparent 50%
    );
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

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

ul {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.1rem;
}

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

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 1rem;
}

section p:last-child {
  margin-bottom: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header {
    background: var(--surface-glass-strong);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 28px rgba(43, 108, 176, 0.4);
}

.brand span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

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

nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-accent);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

nav a:hover,
nav a:focus-visible {
  color: var(--primary);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

nav a:hover::after {
  width: 55%;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

section {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow var(--transition-base), transform var(--transition-base),
    border-color var(--transition-base);
}

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

#hero {
  background: var(--gradient-hero);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 85% 15%,
      rgba(246, 224, 94, 0.28) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(255, 255, 255, 0.16) 0%,
      transparent 50%
    );
  z-index: -1;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 60%;
  height: 180%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 100%
  );
  transform: rotate(18deg);
  z-index: -1;
  pointer-events: none;
}

#hero h1 {
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 68ch;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.85;
  margin-bottom: 1.75rem;
}

#hero svg {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  margin-top: 0.5rem;
}

#hero:hover svg {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#contact,
#sitemap,
#links {
  scroll-margin-top: 90px;
}

#articles article {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 1rem;
  background: var(--gradient-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
    border-color var(--transition-base);
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

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

#articles article h3 {
  margin-top: 0;
  color: var(--primary);
  transition: color var(--transition-fast);
}

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

#articles article p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  border: 1px solid var(--border-soft);
  transition: all var(--transition-fast);
}

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

#articles article a:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

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

#faq h3 {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  padding: 0.9rem 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
  border-bottom: none;
  color: var(--primary);
  position: relative;
  padding-left: 2.4rem;
  transition: background var(--transition-base), color var(--transition-fast);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--accent-soft);
  border-radius: 50%;
  border: 1px solid var(--border-soft);
}

#faq h3 + p {
  padding: 0.9rem 1.1rem 1.1rem;
  margin-bottom: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.95rem;
  transition: background var(--transition-base), border-color var(--transition-base);
}

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

#howto h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 0.95rem;
  border: 1px solid var(--border-soft);
}

#howto p {
  font-size: 0.98rem;
}

#knowledge h3 {
  color: var(--primary);
}

#contact p {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

#contact p:first-of-type {
  font-weight: 600;
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

#sitemap a::before,
#links a::before {
  content: "›";
  margin-right: 0.5rem;
  color: var(--primary);
  font-weight: 800;
  transition: transform var(--transition-fast);
  display: inline-block;
}

#sitemap a:hover,
#links a:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

#sitemap a:hover::before,
#links a:hover::before {
  color: var(--accent);
  transform: translateX(3px);
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 2.5rem;
}

footer section {
  margin-bottom: 1rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

footer section:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  padding-left: 0.9rem;
}

footer h2::before {
  width: 4px;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

footer > p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

footer > p:last-child {
  padding: 1rem;
  border-top: 1px solid var(--border-soft);
  margin-top: 1.5rem;
  font-weight: 500;
}

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

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

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

@supports not (animation-timeline: view()) {
  section {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  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 svg {
  animation: floatSoft 6s ease-in-out infinite;
}

#articles article {
  animation: fadeIn 0.6s ease both;
}

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

@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.7rem clamp(0.85rem, 4vw, 1.5rem);
  }

  .brand {
    justify-content: center;
    font-size: 1rem;
  }

  nav {
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.25rem;
    padding: 0.15rem 0.25rem;
  }

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

  nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.2rem;
  }

  nav a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
  }

  html {
    scroll-padding-top: 130px;
  }

  #intro,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #knowledge,
  #contact,
  #sitemap,
  #links {
    scroll-margin-top: 130px;
  }
}

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

  main {
    padding: 1rem 0.85rem 2rem;
  }

  section {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
  }

  #hero {
    padding: 1.75rem 1.15rem;
    border-radius: var(--radius-lg);
  }

  #hero svg {
    height: auto;
    animation: none;
  }

  h2 {
    padding-left: 0.9rem;
    margin-bottom: 0.8rem;
  }

  h2::before {
    width: 4px;
  }

  h3 {
    margin-top: 1.35rem;
  }

  #faq h3 {
    padding: 0.8rem 0.9rem 0.8rem 2.2rem;
    font-size: 0.95rem;
  }

  #faq h3::before {
    left: 0.7rem;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.7rem;
  }

  #faq h3 + p {
    padding: 0.8rem 0.9rem 1rem;
    font-size: 0.9rem;
  }

  #contact p {
    font-size: 0.88rem;
    word-break: break-word;
  }

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

  footer {
    padding: 0 0.85rem 2rem;
  }

  footer section {
    padding: 1rem;
  }
}

@media (hover: none) {
  #articles article:hover,
  section:hover,
  footer section:hover,
  #sitemap a:hover,
  #links a:hover,
  #contact p:hover {
    transform: none;
  }
}

@media print {
  header,
  nav,
  footer,
  #hero svg {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

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

  a {
    color: #000000;
    text-decoration: underline;
  }
}