:root {
  --bg: #050508;
  --surface: #111118;
  --surface-alt: #181822;
  --text: #ffffff;
  --muted: #c8c8d2;
  --subtle: #8b8b9e;
  --border: rgba(255, 255, 255, 0.1);
  --primary: #d16aff;
  --primary-deep: #a814e7;
  --grad: linear-gradient(135deg, #d16aff 0%, #a814e7 100%);
  --radius: 14px;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 1000; background: var(--primary-deep); color: #fff; padding: 8px 14px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  color: #fff;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { height: 28px; width: auto; border-radius: 0; }

.primary-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.primary-nav a { color: var(--muted); font-weight: 500; font-size: 0.93rem; white-space: nowrap; transition: color 0.15s; }
.primary-nav a[aria-current="page"], .primary-nav a:hover { color: var(--primary); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 140px;
}
.lang-switch li a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.lang-switch li a:hover { background: var(--surface-alt); color: #fff; text-decoration: none; }
.lang-switch li a[aria-current="true"] { font-weight: 700; color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.menu-toggle {
  display: none;
  background: var(--surface);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Hero (faithful to original dark + purple Software House style) */
.hero {
  position: relative;
  padding: 84px 0 72px;
  background:
    radial-gradient(ellipse 65% 55% at 75% 20%, rgba(168, 20, 231, 0.28), transparent 70%),
    radial-gradient(ellipse 50% 45% at 15% 80%, rgba(209, 106, 255, 0.16), transparent 70%),
    #050508;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero-highlight {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lede { font-size: 1.06rem; color: var(--muted); max-width: 660px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.hero-visual img { margin: 0 auto 14px; max-height: 92px; width: auto; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.stat-item strong { display: block; font-size: 1.85rem; color: var(--primary); line-height: 1.2; }
.stat-item span { font-size: 0.9rem; color: var(--subtle); }

/* Sections & Cards */
.section { padding: 64px 0; }
.section-alt { background: #0a0a10; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.55rem, 2.7vw, 2.15rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; max-width: 740px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: rgba(209, 106, 255, 0.45); transform: translateY(-2px); }
.card-num { font-size: 0.88rem; font-weight: 800; color: var(--primary); letter-spacing: 0.06em; }
.card h3 { margin: 0; font-size: 1.15rem; color: #fff; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 0.92rem; color: var(--primary); }

.case-card { padding: 0; overflow: hidden; }
.case-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  background: var(--surface-alt);
}
.case-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.case-meta { font-size: 0.82rem; color: var(--primary); font-weight: 600; }
.case-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.case-body h3 a { color: #fff; }
.case-body h3 a:hover { color: var(--primary); }

/* Banner & Article */
.page-banner {
  background:
    radial-gradient(ellipse 60% 70% at 85% 20%, rgba(168, 20, 231, 0.2), transparent 70%),
    #0a0a10;
  border-bottom: 1px solid var(--border);
  padding: 46px 0 36px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.88rem;
  color: var(--subtle);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--subtle); }
.page-banner h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 3.1vw, 2.4rem); line-height: 1.25; }
.page-banner p.lede { margin: 0; color: var(--muted); max-width: 780px; font-size: 1.05rem; }

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.article-body h2 { margin-top: 28px; margin-bottom: 12px; font-size: 1.4rem; color: #fff; }
.article-body h3 { margin-top: 22px; margin-bottom: 10px; font-size: 1.15rem; color: #fff; }
.article-body p { margin: 0 0 16px; color: var(--muted); }
.article-body img { margin: 18px auto; }
.article-body figure { margin: 20px 0; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 16px; color: var(--muted); }

/* CTA Banner */
.cta-box {
  background: linear-gradient(135deg, rgba(168, 20, 231, 0.22), rgba(17, 17, 24, 0.95));
  border: 1px solid rgba(209, 106, 255, 0.35);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-box h2 { margin: 0 0 6px; font-size: 1.65rem; }
.cta-box p { margin: 0; color: var(--muted); }

/* Filter pills */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

/* FAQ */
.faq-list { display: grid; gap: 14px; max-width: 880px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
}
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; color: #fff; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer {
  background: #040407;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 52px 0 30px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--subtle); font-size: 0.92rem; }
.site-footer a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--subtle);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .primary-nav.open { display: flex; }
  .article-body { padding: 20px; }
}
