:root {
  --bg: #ffffff;
  --bg-elevated: #f6f6f3;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #111111;
  --text-soft: #5f5f5a;
  --accent: #111111;
  --accent-soft: rgba(17, 17, 17, 0.08);
  --success: #111111;
  --line: rgba(17, 17, 17, 0.1);
  --shadow: 0 20px 50px rgba(17, 17, 17, 0.08);
  --radius-lg: 24px;
  --max-width: 1200px;
}

body[data-theme="dark"] {
  --bg: #0b0b0b;
  --bg-elevated: #121212;
  --surface: rgba(18, 18, 18, 0.88);
  --text: #f3f3ef;
  --text-soft: #b7b7b0;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --success: #ffffff;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.04), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(0, 0, 0, 0.03), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 64px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 14px;
  backdrop-filter: blur(18px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.12);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.06);
}

.nav a {
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.theme-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 108px);
  padding: 36px 0 40px;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
  margin: 18px 0 16px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  max-width: 9.4em;
}

.hero p,
.section-heading p,
.contact-card p,
.feature-card p,
.preview-card p {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 16px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 144px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 18px 30px rgba(17, 17, 17, 0.18);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 34px 0 0;
  list-style: none;
}

.hero-metrics li,
.glass-card,
.feature-card,
.preview-card,
.contact-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-metrics li {
  padding: 18px 20px;
}

.hero-metrics strong {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

.hero-metrics span {
  color: var(--text-soft);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.hero-panel {
  position: absolute;
}

.panel-main {
  inset: 40px 72px 56px 0;
  padding: 18px;
}

.panel-side {
  width: 220px;
  padding: 22px;
}

.panel-side-top {
  top: 0;
  right: 0;
}

.panel-side-bottom {
  right: 24px;
  bottom: 0;
}

.panel-head {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(127, 127, 127, 0.4);
}

.panel-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.panel-kpi-row article,
.preview-cards span,
.site-flow div {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 245, 241, 0.9));
  border: 1px solid var(--line);
}

.panel-kpi-row article {
  padding: 16px;
}

.panel-kpi-row span {
  display: block;
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 10px;
}

.panel-kpi-row strong {
  font-size: 28px;
}

.panel-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 160px;
  padding: 18px 0 8px;
}

.panel-chart span {
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.92), rgba(82, 82, 82, 0.54));
}

.panel-chart span:nth-child(1) { height: 48%; }
.panel-chart span:nth-child(2) { height: 72%; }
.panel-chart span:nth-child(3) { height: 56%; }
.panel-chart span:nth-child(4) { height: 100%; }
.panel-chart span:nth-child(5) { height: 68%; }

.panel-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.panel-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.panel-list span {
  color: var(--success);
  font-weight: 600;
}

.feature-section,
.preview-section,
.compare-section,
.contact-section {
  padding: 40px 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading.align-left {
  max-width: 760px;
  margin: 0 0 28px;
  text-align: left;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(30px, 4.6vw, 52px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.preview-card {
  padding: 26px;
}

.preview-switcher {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.preview-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.preview-tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.preview-tab.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.preview-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: center;
}

.preview-panel.is-active {
  display: grid;
}

.preview-copy h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.preview-card-large {
  grid-row: span 2;
}

.preview-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.preview-card header span {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.preview-dashboard,
.site-flow {
  min-height: 280px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.dashboard-dark {
  display: grid;
  grid-template-columns: 84px 1fr;
  background: #111111;
}

.preview-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.preview-main {
  padding: 18px;
}

.preview-topline {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.preview-cards span {
  height: 72px;
}

.preview-table {
  margin-top: 14px;
  height: 178px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.dashboard-light {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f3f3f0);
}

.preview-topline.slim {
  height: 14px;
  background: rgba(17, 17, 17, 0.08);
}

.preview-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  flex: 1;
}

.preview-list,
.preview-detail {
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.06);
}

.flow-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.flow-card {
  min-width: 118px;
  padding: 18px 16px;
  text-align: center;
  font-weight: 600;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 245, 241, 0.9));
}

.flow-arrow {
  color: var(--text-soft);
  font-size: 18px;
}

.site-flow {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f3f3f0);
}

.site-flow div {
  width: 100%;
  padding: 18px;
  text-align: center;
  font-weight: 600;
}

.compare-table-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.compare-table th,
.compare-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 15px;
  line-height: 1.7;
}

.compare-table th {
  background: rgba(17, 17, 17, 0.04);
  font-size: 14px;
  color: var(--text-soft);
}

.compare-table td:last-child,
.compare-table th:last-child {
  color: var(--accent);
  font-weight: 600;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 600;
  list-style: none;
}

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

.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 520px;
  }

  .panel-main {
    inset: 56px 24px 80px 0;
  }

  .panel-side-top {
    right: 12px;
  }

  .panel-side-bottom {
    right: 0;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-card-large {
    grid-row: auto;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
  }

  .hero {
    padding-top: 12px;
    min-height: auto;
  }

  .flow-screen {
    flex-direction: column;
  }

  .hero-metrics,
  .feature-grid,
  .panel-kpi-row {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 480px;
  }

  .panel-main {
    position: relative;
    inset: auto;
  }

  .panel-side {
    position: relative;
    width: auto;
    margin-top: 14px;
  }
}
