/* Reset & Base Styles */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Color & Theme Variables */
:root {
  --primary: #6c63ff;
  --primary-light: #8b83ff;
  --primary-dark: #4a42d4;
  --accent: #00d4aa;
  --accent-light: #33ddbb;
  --bg-dark: #0f0f1a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --text-light: #c0c0d0;
  --border-light: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1rem; }

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

ul, ol { list-style: none; }

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

/* Scroll Animations */
section {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }
section:nth-child(11) { animation-delay: 1s; }
section:nth-child(12) { animation-delay: 1.1s; }
section:nth-child(13) { animation-delay: 1.2s; }
section:nth-child(14) { animation-delay: 1.3s; }
section:nth-child(15) { animation-delay: 1.4s; }

/* Layout Components */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 2rem;
  transition: background var(--transition);
}

nav[aria-label="主导航"] > ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
}

nav[aria-label="主导航"] a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--transition);
}

nav[aria-label="主导航"] a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a[aria-current="page"] {
  color: #fff;
}

nav[aria-label="主导航"] a:hover::after,
nav[aria-label="主导航"] a[aria-current="page"]::after {
  width: 100%;
}

main {
  padding-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

section {
  padding: 4rem 0;
}

/* Hero Section - Gradient Banner */
#hero {
  text-align: center;
  padding: 6rem 1rem 5rem;
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b4e 30%, #1a2a4a 60%, #0f1f3a 100%);
  border-radius: var(--radius);
  margin: 1rem 0 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(108, 99, 255, 0.15);
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, -5%) scale(1.1); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

#hero p {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 0.8rem;
}

#hero div {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

#hero a[role="button"] {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}

#hero a[role="button"]:first-child {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

#hero a[role="button"]:first-child:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.6);
}

#hero a[role="button"]:last-child {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#hero a[role="button"]:last-child:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.1);
  transform: translateY(-3px);
}

/* Glass Card Effect */
section:not(#hero) {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin: 2rem 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

section:not(#hero):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Cards inside sections */
#about ul, #products ul, #services ul, #solutions ul, #features ul, #advantages ul,
#testimonials ul, #case-studies ul, #team ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

#about li, #products li, #services li, #solutions li, #features li, #advantages li,
#testimonials li, #case-studies li, #team li {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.8rem 1.5rem;
  transition: all var(--transition);
}

#about li:hover, #products li:hover, #services li:hover, #solutions li:hover,
#features li:hover, #advantages li:hover, #testimonials li:hover,
#case-studies li:hover, #team li:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(108, 99, 255, 0.15);
  background: rgba(108, 99, 255, 0.08);
}

#about li h3, #products li h3, #services li h3, #solutions li h3,
#features li h3, #advantages li h3, #team li h3, #case-studies li h3 {
  margin-bottom: 0.6rem;
  color: #fff;
}

#about li p, #products li p, #services li p, #solutions li p,
#features li p, #advantages li p, #team li p, #case-studies li p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Testimonials blockquote */
blockquote {
  font-style: italic;
  color: var(--text-light);
  padding: 0.5rem 0;
}

blockquote footer {
  margin-top: 0.8rem;
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

/* FAQ Section */
#faq dl {
  display: grid;
  gap: 1.5rem;
}

#faq dt {
  font-weight: 600;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  padding-left: 1.8rem;
  transition: color var(--transition);
}

#faq dt::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  transition: transform var(--transition);
}

#faq dt:hover {
  color: var(--primary-light);
}

#faq dt:hover::before {
  transform: rotate(90deg);
}

#faq dd {
  color: var(--text-secondary);
  padding-left: 1.8rem;
  margin-top: 0.3rem;
  line-height: 1.7;
}

/* HowTo Section */
#howto ol {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

#howto li {
  counter-increment: step;
  padding: 1rem 1.2rem 1rem 3rem;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  position: relative;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#howto li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

#howto li:hover {
  border-color: var(--primary);
  transform: translateX(6px);
}

/* Insights Articles */
#insights article {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}

#insights article:hover {
  border-color: var(--accent);
  transform: translateX(8px);
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.1);
}

#insights h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

#insights p {
  color: var(--text-secondary);
}

/* Contact Section */
#contact address {
  font-style: normal;
  display: grid;
  gap: 0.8rem;
  background: var(--bg-glass);
  padding: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

#contact p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Footer */
footer {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 3rem 2rem 2rem;
  margin-top: 3rem;
}

footer nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 2rem;
}

footer nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

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

footer ul:last-of-type {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

footer ul:last-of-type a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity var(--transition);
}

footer ul:last-of-type a:hover {
  opacity: 1;
  color: var(--primary-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 0.6rem 1rem;
  }

  nav[aria-label="主导航"] > ul {
    gap: 0.8rem 1.2rem;
  }

  nav[aria-label="主导航"] a {
    font-size: 0.85rem;
  }

  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  section {
    padding: 2.5rem 0;
  }

  section:not(#hero) {
    padding: 2rem 1.2rem;
  }

  #hero {
    padding: 4rem 1rem 3rem;
    margin: 0.5rem 0 1.5rem;
  }

  #hero div {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  #hero a[role="button"] {
    width: 80%;
    max-width: 280px;
    text-align: center;
  }

  #about ul, #products ul, #services ul, #solutions ul, #features ul,
  #advantages ul, #testimonials ul, #case-studies ul, #team ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }

  footer nav ul {
    gap: 1rem 1.5rem;
  }
}

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

  header {
    padding: 0.5rem 0.8rem;
  }

  nav[aria-label="主导航"] > ul {
    gap: 0.5rem 0.8rem;
  }

  nav[aria-label="主导航"] a {
    font-size: 0.8rem;
  }

  main { padding-top: 70px; }

  #hero {
    padding: 3rem 0.8rem 2.5rem;
  }

  section:not(#hero) {
    padding: 1.5rem 1rem;
  }

  #faq dt {
    font-size: 1rem;
  }
}

/* Dark mode is default, but ensure consistency */
@media (prefers-color-scheme: light) {
  body {
    background: #f5f5fa;
    color: #1a1a2e;
  }

  :root {
    --bg-dark: #f5f5fa;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-light: #2a2a3e;
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

  header { background: rgba(245, 245, 250, 0.9); }

  h1, h2, h3, h4, h5, h6 { color: #1a1a2e; }

  #hero h1 {
    background: linear-gradient(135deg, #1a1a2e 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  #hero p { color: #4a4a5a; }

  #hero a[role="button"]:last-child {
    color: #1a1a2e;
    border-color: rgba(0, 0, 0, 0.2);
  }

  #hero a[role="button"]:last-child:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
  }

  #about li h3, #products li h3, #services li h3, #solutions li h3,
  #features li h3, #advantages li h3, #team li h3, #case-studies li h3,
  #insights h3, #faq dt {
    color: #1a1a2e;
  }

  #about li p, #products li p, #services li p, #solutions li p,
  #features li p, #advantages li p, #team li p, #case-studies li p,
  #insights p, #faq dd, #contact p {
    color: #4a4a5a;
  }

  footer { background: rgba(245, 245, 250, 0.95); }

  nav[aria-label="主导航"] a { color: #4a4a5a; }
  nav[aria-label="主导航"] a:hover { color: #1a1a2e; }

  section:not(#hero) { background: rgba(255, 255, 255, 0.6); }
  #about li, #products li, #services li, #solutions li, #features li,
  #advantages li, #testimonials li, #case-studies li, #team li,
  #insights article, #howto li, #contact address {
    background: rgba(255, 255, 255, 0.8);
  }

  blockquote footer { color: var(--primary); }

  #faq dt::before { color: var(--primary); }
}

/* Accessibility & Print */
@media print {
  header, footer { display: none; }
  body { background: #fff; color: #000; }
  section { break-inside: avoid; }
}

/* Smooth anchor offset for fixed header */
:target {
  scroll-margin-top: 90px;
}