/* ===== CSS Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #0f0f1a; color: #e0e0e0; line-height: 1.6; min-height: 100vh; }

/* ===== Variables ===== */
:root {
  --primary: #e94560;
  --primary-dark: #c2334a;
  --accent: #0f3460;
  --accent-light: #16213e;
  --bg-dark: #0f0f1a;
  --bg-card: rgba(30, 30, 50, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-h: 70px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ===== Header & Nav ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; 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);
  height: var(--header-h);
  transition: background var(--transition);
}
nav {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
nav ul {
  display: flex; gap: 6px; list-style: none; flex-wrap: wrap;
}
nav ul li a {
  color: var(--text-muted); text-decoration: none; font-size: 0.82rem;
  padding: 6px 12px; border-radius: 20px; transition: all var(--transition);
  white-space: nowrap;
}
nav ul li a:hover, nav ul li a:focus {
  color: #fff; background: var(--primary); outline: none;
}

/* ===== Main sections ===== */
main { padding-top: var(--header-h); }
section {
  max-width: var(--max-width); margin: 0 auto; padding: 80px 24px 60px;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
/* 更多延迟通过后续元素自然实现 */

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

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 28px; position: relative; display: inline-block; }
h2::after {
  content: ''; position: absolute; bottom: -8px; left: 0;
  width: 60px; height: 4px; background: var(--primary); border-radius: 2px;
}
h3 { font-size: 1.3rem; margin-bottom: 12px; color: #fff; }
p { margin-bottom: 16px; color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #ff7a8a; }

/* ===== Hero Section ===== */
#hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding-top: 100px; padding-bottom: 80px;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a3e 50%, #0f3460 100%);
  border-radius: 0 0 40px 40px; margin: 0; max-width: 100%;
  padding-left: calc((100% - var(--max-width)) / 2 + 24px);
  padding-right: calc((100% - var(--max-width)) / 2 + 24px);
  position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15), transparent 60%);
  pointer-events: none;
}
#hero h1 { background: linear-gradient(135deg, #fff 30%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
#hero p { font-size: 1.15rem; max-width: 500px; }
#hero > div:first-child { flex: 1; }
#hero > div:last-child { flex: 0 0 auto; }
#hero svg { max-width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }
#hero .cta-buttons { display: flex; gap: 16px; margin-top: 24px; }
#hero .cta-buttons a {
  display: inline-block; padding: 12px 32px; border-radius: 30px;
  font-weight: 600; transition: all var(--transition);
}
#hero .cta-buttons a:first-child {
  background: var(--primary); color: #fff;
}
#hero .cta-buttons a:first-child:hover {
  background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}
#hero .cta-buttons a:last-child {
  background: transparent; border: 2px solid var(--border); color: #fff;
}
#hero .cta-buttons a:last-child:hover {
  border-color: var(--primary); background: rgba(233, 69, 96, 0.1);
}

/* ===== Card style sections ===== */
#about, #company, #products, #services, #solutions, #industries, #features, #benefits, #workflow, #cases, #testimonials, #knowledge, #faq, #howto, #contact, #legal {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
#about:hover, #company:hover, #products:hover, #services:hover, #solutions:hover, #industries:hover, #features:hover, #benefits:hover, #workflow:hover, #cases:hover, #testimonials:hover, #knowledge:hover, #faq:hover, #howto:hover, #contact:hover, #legal:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* ===== Articles & Cards ===== */
article, .card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px; margin-bottom: 20px;
  transition: all var(--transition);
}
article:hover, .card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-3px);
  border-color: var(--primary);
}

/* Lists */
ul, ol { padding-left: 20px; margin-bottom: 16px; }
li { margin-bottom: 8px; color: var(--text-muted); }

/* ===== FAQ details ===== */
details {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px; padding: 12px 20px;
  transition: all var(--transition); cursor: pointer;
}
details[open] { border-color: var(--primary); background: rgba(233, 69, 96, 0.05); }
summary { font-weight: 600; color: #fff; font-size: 1.05rem; cursor: pointer; }
details p { margin-top: 12px; padding-left: 8px; border-left: 3px solid var(--primary); }

/* ===== Blockquote ===== */
blockquote {
  background: var(--bg-glass); border-left: 4px solid var(--primary);
  padding: 20px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px; font-style: italic;
}
blockquote p { margin: 0; }

/* ===== Contact & Footer ===== */
address p { margin-bottom: 6px; }
footer {
  max-width: var(--max-width); margin: 0 auto; padding: 40px 24px 20px;
  border-top: 1px solid var(--border); display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
footer div p { margin-bottom: 4px; font-size: 0.9rem; }
footer ul { list-style: none; display: flex; gap: 16px; padding: 0; }
footer ul li a { color: var(--text-muted); font-size: 0.9rem; }
footer ul li a:hover { color: var(--primary); }

/* ===== Legal ===== */
#legal { margin-top: 40px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  #hero { flex-direction: column; text-align: center; padding: 80px 24px 60px; }
  #hero p { max-width: 100%; }
  #hero .cta-buttons { justify-content: center; }
  #hero svg { max-width: 80%; }
  nav ul { gap: 4px; }
  nav ul li a { font-size: 0.75rem; padding: 4px 10px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  header { height: auto; min-height: var(--header-h); }
  nav { flex-direction: column; padding: 10px 16px; gap: 8px; }
  nav ul { justify-content: center; gap: 3px; }
  nav ul li a { font-size: 0.7rem; padding: 4px 8px; }
  section { padding: 48px 16px 40px; }
  #hero { padding: 80px 16px 50px; }
  #hero h1 { font-size: 1.8rem; }
  #hero p { font-size: 1rem; }
  #hero svg { max-width: 100%; }
  #about, #company, #products, #services, #solutions, #industries, #features, #benefits, #workflow, #cases, #testimonials, #knowledge, #faq, #howto, #contact, #legal {
    padding: 28px 20px;
  }
  footer { flex-direction: column; text-align: center; }
  footer ul { justify-content: center; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  nav ul { gap: 2px; }
  nav ul li a { font-size: 0.65rem; padding: 3px 6px; }
  #hero .cta-buttons { flex-direction: column; align-items: center; }
  #hero .cta-buttons a { width: 100%; text-align: center; }
}

/* ===== Dark mode is default, but ensure light mode fallback (optional) ===== */
@media (prefers-color-scheme: light) {
  :root {
    --bg-dark: #f5f5fa;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text: #1a1a2e;
    --text-muted: #555;
    --border: rgba(0,0,0,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.1);
    --bg-glass: rgba(0,0,0,0.03);
  }
  body { background: var(--bg-dark); color: var(--text); }
  header { background: rgba(245, 245, 250, 0.85); }
  h3 { color: #1a1a2e; }
  summary { color: #1a1a2e; }
  #hero { background: linear-gradient(135deg, #e8e8f0 0%, #d0d0e8 50%, #c0c0e0 100%); }
  #hero h1 { background: linear-gradient(135deg, #1a1a2e 30%, var(--primary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
  #hero .cta-buttons a:last-child { border-color: rgba(0,0,0,0.15); color: #1a1a2e; }
  #hero .cta-buttons a:last-child:hover { border-color: var(--primary); }
  blockquote { border-left-color: var(--primary); }
  details[open] { background: rgba(233, 69, 96, 0.05); }
  article:hover, .card:hover { background: rgba(0,0,0,0.03); }
}

/* ===== Accessibility & Focus ===== */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Smooth scroll animation for all sections (already have fadeUp) ===== */
/* Additional hover effect on images/svg */
svg { transition: transform var(--transition); }
svg:hover { transform: scale(1.02); }

/* ===== Print ===== */
@media print {
  header { position: static; }
  section { opacity: 1; transform: none; animation: none; }
  #hero { background: none; }
}