:root {
  --primary: #2b6cb0;
  --primary-light: #4299e1;
  --primary-dark: #1a4a7a;
  --accent: #ed64a6;
  --accent-light: #fbb6ce;
  --bg: #f7fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.45);
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 16px 48px rgba(43, 108, 176, 0.16);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia,
    serif;
  --max-width: 1140px;
  --header-height: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #63b3ed;
    --primary-light: #90cdf4;
    --primary-dark: #2b6cb0;
    --accent: #fbb6ce;
    --accent-light: #fed7e2;
    --bg: #0f1419;
    --bg-card: #1a202c;
    --bg-glass: rgba(26, 32, 44, 0.78);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border: #2d3748;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 16px 48px rgba(99, 179, 237, 0.2);
  }
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

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

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

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

ul,
ol {
  list-style: none;
}

/* ===== Header ===== */
header {
  position: relative;
  padding: 80px 24px 64px;
  background: linear-gradient(
    135deg,
    #1a365d 0%,
    #2b6cb0 25%,
    #4299e1 50%,
    #63b3ed 75%,
    #90cdf4 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
  color: #fff;
  overflow: hidden;
  text-align: center;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 20% 50%,
      rgba(237, 100, 166, 0.25) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 30%,
      rgba(99, 179, 237, 0.3) 0%,
      transparent 55%
    );
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg);
  clip-path: ellipse(75% 100% at 50% 100%);
  transition: background var(--transition);
}

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

header h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease both;
}

header > p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  animation: fadeInUp 0.8s ease 0.15s both;
}

/* ===== Navigation ===== */
header nav {
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease 0.3s both;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: var(--max-width);
  margin: 0 auto;
}

header nav a {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  transition: all var(--transition);
  white-space: nowrap;
}

header nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

/* ===== Sections ===== */
section {
  margin-bottom: 56px;
  padding: 40px 36px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

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

section h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
  border-image-slice: 1;
  border-bottom-style: solid;
  border-bottom-width: 3px;
  display: inline-block;
  letter-spacing: 0.01em;
}

section h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.5;
}

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

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin: 24px 0 10px;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
}

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

/* ===== Article Cards ===== */
article {
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

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

article h3 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
  color: var(--text);
  font-size: 1.1rem;
}

article time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 3px 12px;
  background: var(--bg-card);
  border-radius: 100px;
  border: 1px solid var(--border);
}

article p {
  font-size: 0.94rem;
  color: var(--text-secondary);
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

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

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

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

/* ===== FAQ ===== */
#faq h3 {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  font-size: 1rem;
  cursor: default;
  transition: all var(--transition);
}

#faq h3:hover {
  background: var(--bg-glass);
  box-shadow: var(--shadow-sm);
}

#faq p {
  padding: 0 20px;
  margin-bottom: 20px;
}

/* ===== HowTo ===== */
#howto h4 {
  padding: 12px 18px;
  background: linear-gradient(
    135deg,
    rgba(43, 108, 176, 0.06),
    rgba(237, 100, 166, 0.06)
  );
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  margin-top: 20px;
  transition: all var(--transition);
}

#howto h4:hover {
  background: linear-gradient(
    135deg,
    rgba(43, 108, 176, 0.12),
    rgba(237, 100, 166, 0.12)
  );
  transform: translateX(4px);
}

/* ===== Contact ===== */
#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

#contact p:last-child {
  border-bottom: none;
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(43, 108, 176, 0.3);
}

/* ===== Privacy & Disclaimer ===== */
#privacy p,
#disclaimer p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ===== Copyright ===== */
#copyright {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(43, 108, 176, 0.04),
    rgba(237, 100, 166, 0.04)
  );
}

#copyright p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
footer {
  padding: 48px 24px 40px;
  background: linear-gradient(135deg, #1a365d, #2b6cb0);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(237, 100, 166, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

footer p {
  position: relative;
  z-index: 1;
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

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

footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer a:hover {
  color: #fff;
}

/* ===== Scroll Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

section {
  animation: fadeInUp 0.7s ease both;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.2s; }
section:nth-child(5) { animation-delay: 0.25s; }
section:nth-child(6) { animation-delay: 0.3s; }
section:nth-child(7) { animation-delay: 0.35s; }
section:nth-child(8) { animation-delay: 0.4s; }
section:nth-child(9) { animation-delay: 0.45s; }
section:nth-child(10) { animation-delay: 0.5s; }
section:nth-child(11) { animation-delay: 0.55s; }
section:nth-child(12) { animation-delay: 0.6s; }
section:nth-child(13) { animation-delay: 0.65s; }
section:nth-child(14) { animation-delay: 0.7s; }
section:nth-child(15) { animation-delay: 0.75s; }

article {
  animation: fadeInUp 0.6s ease both;
}

article:nth-child(1) { animation-delay: 0.05s; }
article:nth-child(2) { animation-delay: 0.1s; }
article:nth-child(3) { animation-delay: 0.15s; }
article:nth-child(4) { animation-delay: 0.2s; }
article:nth-child(5) { animation-delay: 0.25s; }
article:nth-child(6) { animation-delay: 0.3s; }
article:nth-child(7) { animation-delay: 0.35s; }
article:nth-child(8) { animation-delay: 0.4s; }
article:nth-child(9) { animation-delay: 0.45s; }
article:nth-child(10) { animation-delay: 0.5s; }

/* ===== Glassmorphism Accent ===== */
#brand,
#products,
#solutions,
#cases {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-glass-border);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header {
    padding: 60px 20px 52px;
  }

  main {
    padding: 0 16px 60px;
  }

  section {
    padding: 28px 22px;
    margin-bottom: 36px;
    border-radius: var(--radius-md);
  }

  article {
    padding: 22px 20px 18px;
  }
}

@media (max-width: 640px) {
  header {
    padding: 48px 16px 44px;
  }

  header h1 {
    font-size: 1.35rem;
  }

  header > p {
    font-size: 0.88rem;
    margin-bottom: 28px;
  }

  header nav ul {
    gap: 6px;
  }

  header nav a {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 12px 48px;
  }

  section {
    padding: 22px 16px;
    margin-bottom: 28px;
    border-radius: var(--radius-sm);
  }

  section h2 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  section h3 {
    font-size: 1rem;
    margin: 24px 0 10px;
    padding-left: 10px;
  }

  article {
    padding: 18px 16px 14px;
    border-radius: var(--radius-sm);
  }

  article h3 {
    font-size: 0.98rem;
  }

  #faq h3 {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  #faq p {
    padding: 0 14px;
  }

  #sitemap ul,
  #links ul {
    gap: 8px;
  }

  #sitemap a,
  #links a {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  footer {
    padding: 36px 16px 32px;
  }

  footer p {
    font-size: 0.8rem;
  }
}

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

  header {
    background-size: 100% 100%;
  }
}

/* ===== Print ===== */
@media print {
  header {
    background: none;
    color: #000;
    padding: 20px 0;
  }

  header::after {
    display: none;
  }

  header nav {
    display: none;
  }

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

  article {
    break-inside: avoid;
    animation: none;
  }

  footer {
    background: none;
    color: #000;
  }
}

/* ===== Selection ===== */
::selection {
  background: var(--primary);
  color: #fff;
}

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

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

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Focus Visible ===== */
a:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Utility: Smooth Section Entrance on Scroll ===== */
@supports (animation-timeline: view()) {
  section {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  article {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }
}