:root {
  /* 科技蓝暗黑主题 */
  --bg: #030712;
  --bg-soft: #0a1628;
  --panel: rgba(10, 22, 40, 0.8);
  --panel-strong: rgba(15, 27, 50, 0.92);
  --line: rgba(59, 130, 246, 0.15);
  --line-strong: rgba(59, 130, 246, 0.4);
  --text: #f1f5f9;
  --text-soft: #94a3b8;
  --text-muted: #64748b;
  /* 科技蓝主色调 */
  --brand: #3b82f6;
  --brand-light: #60a5fa;
  --brand-bright: #93c5fd;
  --brand-glow: rgba(59, 130, 246, 0.25);
  --brand-soft: rgba(59, 130, 246, 0.12);
  --success: #22d3ee;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  /* 宽度容器 - 参考 edgex 样式 */
  --shell-width: 1480px;
  --shell-wide: 1540px;
  --shell-docs: 1240px;
  --header-bg: rgba(3, 7, 18, 0.85);
  --surface: rgba(10, 22, 40, 0.6);
  --hero-bg: linear-gradient(135deg, rgba(3, 10, 28, 0.96), rgba(10, 22, 50, 0.9)), linear-gradient(135deg, #1e3a5f, #1e4a6e);
  --button-primary-text: #ffffff;
  --button-primary-bg: linear-gradient(135deg, #3b82f6, #2563eb);
  --button-secondary-bg: rgba(59, 130, 246, 0.15);
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(59, 130, 246, 0.3);
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --brand: #2563eb;
  --brand-light: #3b82f6;
  --brand-bright: #60a5fa;
  --brand-soft: rgba(37, 99, 235, 0.1);
  --brand-glow: rgba(37, 99, 235, 0.15);
  --success: #0891b2;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.1);
  --header-bg: rgba(255, 255, 255, 0.9);
  --surface: rgba(241, 245, 249, 0.9);
  --hero-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  --button-primary-text: #ffffff;
  --button-primary-bg: linear-gradient(135deg, #2563eb, #1d4ed8);
  --button-secondary-bg: rgba(255, 255, 255, 0.9);
}

/* 亮色主题 - 指标卡片 */
:root[data-theme="light"] .metric-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

:root[data-theme="light"] .metric-card strong {
  color: var(--brand);
}

:root[data-theme="light"] .metric-card:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

/* 亮色主题 - Hero 区域面板 */
:root[data-theme="light"] .status-panel,
:root[data-theme="light"] .hero-card-board,
:root[data-theme="light"] .hero-mini-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}

/* 亮色主题 - Hero mini 卡片 */
:root[data-theme="light"] .hero-mini-card {
  background: rgba(241, 245, 249, 0.95);
}

/* 亮色主题 - 能力卡片 */
:root[data-theme="light"] .capability-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .capability-card:hover {
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
}

/* 亮色主题 - 文档卡片 */
:root[data-theme="light"] .doc-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .doc-card:hover {
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
}

/* 亮色主题 - 指标卡片描述文字 */
:root[data-theme="light"] .metric-card span {
  color: var(--text-soft);
  font-weight: 500;
}

/* 亮色主题 - body 背景适配 */
:root[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(29, 78, 216, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  background-attachment: fixed;
}

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

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

.landing-body,
.page-body {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  width: min(calc(100% - 32px), var(--shell-width));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.site-brand__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
  font-weight: 600;
}

.site-brand__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand-light);
  background: var(--brand-soft);
}

.theme-toggle {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--brand-soft);
  border-color: var(--line-strong);
}

.landing-main {
  padding-bottom: 64px;
}

.hero {
  width: min(calc(100% - 32px), var(--shell-wide));
  margin: 32px auto 24px;
  padding: clamp(32px, 4vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--hero-bg);
  box-shadow: var(--shadow), var(--shadow-glow);
  overflow: visible;
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 48px;
  align-items: stretch;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--brand-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h2 {
  margin: 0 0 22px;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-light) 50%, var(--brand-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  margin: 0;
  max-width: 820px;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.8;
  color: var(--text-soft);
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.metric-card {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(10px);
  transition: 0.25s ease;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25), 0 0 20px rgba(59, 130, 246, 0.15);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--brand-light);
}

.metric-card span {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero__description {
  color: var(--text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 0.25s ease;
}

.button-link--primary {
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.button-link--secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--button-secondary-bg);
  backdrop-filter: blur(10px);
}

.button-link:hover,
.button-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.button-link--secondary:hover,
.button-link--secondary:focus-visible {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.hero__panel {
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-panel,
.metric-strip,
.hero-card-board,
.hero-mini-card,
.doc-card,
.capability-card,
.doc-content,
.doc-intro {
  border: 1px solid var(--line);
  background: rgba(3, 10, 28, 0.5);
  backdrop-filter: blur(12px);
}

.status-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

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

.status-panel__title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-panel__title strong {
  font-size: 1.15rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--success);
  font-weight: 500;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2), 0 0 12px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.hero-card-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
}

.hero-mini-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.hero-mini-card__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero-mini-card strong {
  font-size: 1rem;
}

.hero-mini-card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.landing-section {
  width: min(calc(100% - 32px), var(--shell-width));
  margin: 0 auto;
  padding: 28px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 780px;
  color: var(--text-soft);
  line-height: 1.8;
}

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

/* 文档卡片网格 - 宽屏四栏布局 */
.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card,
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: 0.2s ease;
}

.capability-card h3,
.doc-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.capability-card p,
.doc-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 1rem;
}

.capability-card ul,
.doc-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.doc-card__meta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.doc-card:hover,
.doc-card:focus-visible,
.capability-card:hover,
.capability-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2), 0 0 0 1px var(--brand-soft);
}

.doc-shell {
  padding: 32px 0 64px;
}

.doc-shell__inner {
  width: min(calc(100% - 32px), var(--shell-docs));
  margin: 0 auto;
}

.doc-intro {
  margin-bottom: 18px;
  padding: 24px 28px;
  border-radius: 24px;
}

.doc-intro__eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.doc-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
}

.doc-intro__summary {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.doc-content {
  padding: 32px 40px 44px;
  border-radius: 24px;
  line-height: 1.9;
  font-size: 1.05rem;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 {
  margin: 1.8em 0 0.7em;
  line-height: 1.3;
  color: var(--text);
}

.doc-content h1:first-child,
.doc-content h2:first-child,
.doc-content h3:first-child {
  margin-top: 0;
}

.doc-content h2 {
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--line);
}

.doc-content p,
.doc-content li,
.doc-content blockquote {
  color: var(--text-soft);
}

.doc-content a {
  color: var(--brand-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s ease;
}

.doc-content a:hover {
  color: var(--brand-bright);
  border-bottom-color: var(--brand);
}

.doc-content img {
  margin: 1.75rem auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  overflow: hidden;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.doc-content thead {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.doc-content th,
.doc-content td {
  padding: 14px 16px;
  border: 1px solid var(--line);
  text-align: left;
}

.doc-content th {
  color: var(--brand-light);
  font-weight: 600;
}

.doc-content code {
  padding: 0.2em 0.5em;
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-light);
  font-size: 0.92em;
}

.doc-content pre {
  overflow-x: auto;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.doc-content pre code {
  padding: 0;
  background: transparent;
  color: var(--text);
}

.doc-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.doc-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

@media (max-width: 1180px) {
  .hero__grid,
  .feature-grid,
  .card-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

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

  .hero-card-board {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .shell,
  .shell--wide,
  .shell--docs,
  .site-header__inner,
  .landing-section,
  .doc-shell__inner,
  .hero {
    width: min(calc(100% - 20px), 100%);
  }

  .site-header__inner {
    min-height: 68px;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    margin-top: 20px;
    padding: 26px 20px;
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero__grid,
  .feature-grid,
  .card-grid,
  .metric-strip,
  .hero-card-board {
    grid-template-columns: 1fr;
  }

  .hero-card-board {
    grid-template-columns: 1fr;
  }

  .doc-intro,
  .doc-content {
    padding: 22px 20px;
    border-radius: 20px;
  }

  .doc-content table {
    font-size: 0.92rem;
    overflow-x: auto;
    white-space: nowrap;
  }
}
