/* ============================================================
   灵犀 Lingxi — 官网样式
   ============================================================ */

:root {
  --bg: #07080d;
  --bg-soft: #0b0d15;
  --text: #eef1f8;
  --text-soft: #a8b0c4;
  --text-dim: #6f7791;
  --border: rgba(255, 255, 255, 0.09);
  --brand: #7c5cff;
  --brand-2: #22b8ff;
  --radius: 16px;
  --max: 1180px;
  --header-h: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(var(--max), 100% - 48px);
  margin-inline: auto;
}

.narrow {
  max-width: 860px;
}

.grad-text {
  background: linear-gradient(100deg, #8f78ff 0%, #34c0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 24px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(124, 92, 255, 0.75);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -12px rgba(124, 92, 255, 0.9);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Header ──────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(7, 8, 13, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 8, 13, 0.85);
  border-bottom-color: var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  border-radius: 8px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--text-soft);
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 34px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

/* ─── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 172px 0 96px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 760px;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(124, 92, 255, 0.38),
    rgba(34, 184, 255, 0.16) 46%,
    transparent 74%
  );
  filter: blur(24px);
}

.hero-inner {
  position: relative;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-soft);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero-sub {
  max-width: 730px;
  margin: 22px auto 0;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.78;
  color: var(--text-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  margin-top: 18px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.window {
  margin: 64px auto 0;
  max-width: 1040px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 50px 130px -50px rgba(90, 66, 231, 0.65);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.window img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #131629, #0b0d15);
}

/* ─── Sections ────────────────────────────────────────────── */

.section {
  padding: 100px 0;
}

.section-head {
  text-align: center;
}

.section-head h2,
.intro h2 {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.25;
}

.intro p {
  margin: 18px auto 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-soft);
}

.section-lede {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--text-soft);
}

/* ─── Feature rows ────────────────────────────────────────── */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 110px;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-row.reverse .feature-media {
  order: 1;
}

.feature-index {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand-2);
}

.feature-copy h3 {
  margin: 12px 0 14px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.32;
}

.feature-copy p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-soft);
}

.feature-media {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 34px 90px -46px rgba(0, 0, 0, 0.95);
}

.feature-media img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #131629, #0b0d15);
}

.feature-row .feature-media img {
  aspect-ratio: 4 / 3;
}

/* ─── Scenarios ───────────────────────────────────────────── */

.scenarios {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(124, 92, 255, 0.055) 50%,
    transparent 100%
  );
}

.tabs {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 56px;
}

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab:hover {
  color: var(--text-soft);
}

.tab.is-active {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.tab-no {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand-2);
}

.tab-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-panel p {
  margin: 0 0 26px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-soft);
}

.tab-panel .feature-media img {
  aspect-ratio: 16 / 9;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Security cards ──────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0.015)
  );
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.45);
}

.card h3 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-soft);
}

/* ─── Deploy ──────────────────────────────────────────────── */

.deploy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.deploy-copy h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.25;
}

.deploy-copy > p {
  margin: 16px 0 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-soft);
}

.steps {
  margin: 30px 0 34px;
}

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.step:last-child {
  margin-bottom: 0;
}

.step-no {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.16);
  color: #cdbcff;
  font-size: 14px;
  font-weight: 700;
}

.step strong {
  display: block;
  font-size: 15.5px;
}

.step p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
}

.deploy-code {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0c14;
  box-shadow: 0 34px 90px -46px rgba(0, 0, 0, 0.95);
}

.code-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}

.code-lang {
  color: var(--brand-2);
  font-weight: 600;
}

.deploy-code pre {
  margin: 0;
  padding: 22px 20px;
  overflow-x: auto;
}

.deploy-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.9;
  color: #cfd6e6;
}

.code-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ─── Download ────────────────────────────────────────────── */

.download-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 48px;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0.015)
  );
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.download-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.45);
}

.download-card.is-primary {
  border-color: rgba(124, 92, 255, 0.38);
  background: linear-gradient(
    160deg,
    rgba(124, 92, 255, 0.16),
    rgba(34, 184, 255, 0.06) 60%,
    rgba(255, 255, 255, 0.02)
  );
}

.download-card h3 {
  margin: 16px 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.download-card p {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-soft);
}

.download-card .download-meta {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  word-break: break-all;
}

.download-card .btn-ghost {
  margin-top: auto;
}

.download-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.os-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.download-ver {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ─── Footer ──────────────────────────────────────────────── */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.07));
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 72px 0 56px;
}

.footer-cta h2 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
}

.footer-cta p {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--text-soft);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-desc {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-cols {
  display: flex;
  gap: 72px;
}

.footer-col h4 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-soft);
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Reveal animation ────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ──────────────────────────────────────────── */

@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-left: 0;
    padding: 12px 24px 22px;
    background: rgba(9, 10, 17, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    font-size: 15.5px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    gap: 16px;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .section {
    padding: 76px 0;
  }

  .feature-row,
  .deploy-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 76px;
  }

  .feature-row.reverse .feature-copy,
  .feature-row.reverse .feature-media {
    order: 0;
  }

  .tabs {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 40px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 56px 0 44px;
  }

  .footer-main {
    flex-direction: column;
    gap: 36px;
  }

  .footer-cols {
    flex-wrap: wrap;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(var(--max), 100% - 36px);
  }

  .hero {
    padding: 124px 0 64px;
  }

  .section {
    padding: 60px 0;
  }

  .window {
    margin-top: 44px;
    border-radius: 14px;
  }

  .btn-lg {
    padding: 12px 22px;
    font-size: 15px;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  .footer-cols {
    flex-direction: column;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tab-panel.is-active {
    animation: none;
  }
}