:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2332;
  --bg-card: rgba(26, 35, 50, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.5);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-dark: #6d28d9;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
  --gradient-2: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --gradient-3: linear-gradient(160deg, #0a0e17 0%, #1a1033 40%, #0f172a 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-glass-hover: rgba(0, 0, 0, 0.06);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(139, 92, 246, 0.4);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --gradient-3: linear-gradient(160deg, #f8fafc 0%, #ede9fe 40%, #fce7f3 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.12);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: var(--gradient-3);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
  border-radius: 4px;
}

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

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

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

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

ul, ol {
  list-style: none;
}

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

/* ===== HEADER / NAV ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition), box-shadow var(--transition);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(248, 250, 252, 0.82);
  }
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

header nav > div a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity var(--transition-fast);
}

header nav > div a:hover {
  opacity: 0.85;
}

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

header nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

header nav ul li a:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

/* ===== MAIN ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  padding-top: 68px;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  margin: 40px 0 56px;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: var(--gradient-2);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: heroFadeIn 0.8s ease-out both;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(249, 115, 22, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  filter: blur(60px);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#hero p {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  max-width: 900px;
}

#hero p:last-child {
  margin-bottom: 0;
}

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

/* ===== SECTIONS ===== */
section {
  margin-bottom: 56px;
  scroll-margin-top: 88px;
}

section > h2 {
  position: relative;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 14px;
  letter-spacing: -0.01em;
}

section > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient-1);
}

section > h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  line-height: 1.4;
}

section > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

section > ul,
section > ol {
  margin: 16px 0;
  padding-left: 0;
}

section > ul li,
section > ol li {
  position: relative;
  padding: 10px 16px 10px 36px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.75;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

section > ul li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-1);
  box-shadow: 0 0 8px var(--accent-glow);
}

section > ol {
  counter-reset: item;
}

section > ol li {
  counter-increment: item;
  padding-left: 44px;
}

section > ol li::before {
  content: counter(item);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--accent-glow);
}

section > ul li:hover,
section > ol li:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

/* ===== ARTICLES ===== */
article {
  position: relative;
  margin-bottom: 24px;
  padding: 28px 32px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--border-hover);
}

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

article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

article h3 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

article > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.85;
  margin-bottom: 10px;
}

article > p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

article > p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-light);
  padding: 6px 14px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 100px;
  transition: all var(--transition-fast);
}

article > p a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== FAQ / DETAILS ===== */
#faq details {
  margin-bottom: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#faq details:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

#faq summary {
  position: relative;
  padding: 18px 56px 18px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--accent-light);
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
}

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

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

#faq details > p {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
  animation: faqSlide 0.3s ease-out;
}

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

/* ===== BLOCKQUOTE ===== */
blockquote {
  position: relative;
  margin: 20px 0;
  padding: 24px 28px 24px 56px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 8px;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
  font-family: Georgia, serif;
}

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

blockquote p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.85;
  font-style: italic;
  margin-bottom: 8px;
}

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

/* ===== CONTACT / INFO LISTS ===== */
#contact ul li,
#sitemap ul li,
#links ul li,
#updates ul li {
  padding: 10px 16px;
  padding-left: 16px;
  background: transparent;
  border: none;
}

#contact ul li::before,
#sitemap ul li::before,
#links ul li::before,
#updates ul li::before {
  display: none;
}

#contact ul li {
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  padding-left: 0;
}

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

#contact ul li:hover {
  transform: none;
  background: transparent;
}

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap ul li,
#links ul li {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 8px 20px;
  transition: all var(--transition-fast);
}

#sitemap ul li:hover,
#links ul li:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

#sitemap ul li a,
#links ul li a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

#sitemap ul li:hover a,
#links ul li:hover a {
  color: #fff;
}

#updates ul li {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border-color);
  border-radius: 0;
  margin-left: 8px;
}

#updates ul li::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

#updates ul li:hover {
  background: transparent;
  border-color: var(--accent);
  transform: none;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  margin-top: 40px;
  padding: 48px 24px 32px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

@media (prefers-color-scheme: light) {
  footer {
    background: rgba(241, 245, 249, 0.9);
  }
}

footer nav {
  margin-bottom: 28px;
}

footer nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

footer nav ol li {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer nav ol li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--text-muted);
  opacity: 0.5;
}

footer nav ol li a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}

footer nav ol li a:hover {
  color: var(--accent-light);
}

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

footer > p:first-of-type {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer > p:last-child {
  margin-bottom: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
}

/* ===== SCROLL ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.7s ease-out both;
}

#hero { animation-delay: 0s; }
#about { animation-delay: 0.05s; }
#products { animation-delay: 0.1s; }
#solutions { animation-delay: 0.15s; }
#cases { animation-delay: 0.2s; }
#news { animation-delay: 0.25s; }
#articles { animation-delay: 0.3s; }
#faq { animation-delay: 0.35s; }
#howto { animation-delay: 0.4s; }
#contact { animation-delay: 0.45s; }

@supports (animation-timeline: view()) {
  section {
    animation: fadeInUp 0.7s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  header nav {
    padding: 0 16px;
  }

  header nav ul {
    gap: 2px;
  }

  header nav ul li a {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 16px 64px;
    padding-top: 68px;
  }

  #hero {
    padding: 48px 32px;
    margin: 24px 0 40px;
  }

  article {
    padding: 22px 24px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  header nav {
    height: 60px;
    padding: 0 14px;
  }

  header nav > div a {
    font-size: 1.15rem;
  }

  header nav ul {
    display: none;
  }

  main {
    padding: 0 14px 56px;
    padding-top: 60px;
  }

  #hero {
    padding: 36px 22px;
    margin: 16px 0 32px;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  #hero p {
    font-size: 0.875rem;
    line-height: 1.8;
  }

  section {
    margin-bottom: 40px;
  }

  section > h2 {
    font-size: 1.2rem;
    margin-bottom: 18px;
  }

  section > h3 {
    font-size: 1.05rem;
    margin: 22px 0 10px;
  }

  article {
    padding: 20px 18px;
    border-radius: var(--radius-md);
  }

  article h3 {
    font-size: 1rem;
  }

  #faq summary {
    padding: 14px 48px 14px 18px;
    font-size: 0.875rem;
  }

  #faq details > p {
    padding: 0 18px 16px;
    font-size: 0.85rem;
  }

  blockquote {
    padding: 18px 20px 18px 44px;
  }

  blockquote::before {
    left: 12px;
    font-size: 2.2rem;
  }

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

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

  #sitemap ul li,
  #links ul li {
    padding: 6px 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  #hero {
    padding: 28px 18px;
  }

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

  article {
    padding: 16px 14px;
  }

  section > ul li,
  section > ol li {
    padding: 8px 12px 8px 30px;
    font-size: 0.85rem;
  }

  section > ol li {
    padding-left: 38px;
  }
}

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

/* ===== PRINT ===== */
@media print {
  header,
  footer,
  #hero::before,
  #hero::after {
    display: none;
  }

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

  main {
    padding-top: 0;
  }

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