/*
 * 视觉参考：Palantir 式极简黑白、大字号、细线网格与克制留白
 * 灵感来源：https://www.palantir.com/
 */
:root {
  --bg: #000000;
  --bg-subtle: #0a0a0a;
  --bg-panel: #050505;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-deep: #737373;
  --accent-gitlab: #fc6d26;
  --radius: 2px;
  --font: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --header-h: 64px;
  --max: min(1240px, 100% - 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: var(--max);
  margin-inline: auto;
}

.narrow {
  max-width: 640px;
  margin-inline: auto;
}

/* —— Header（顶栏：细线、低对比导航） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  border-bottom: none;
}

.brand:hover {
  color: inherit;
  border-bottom: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--muted-deep);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--muted-deep);
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1px;
  margin-inline: auto;
  background: var(--text);
}

.nav-main {
  display: block;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  border-bottom: none;
}

.nav-list a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong) !important;
  color: var(--text) !important;
}

.nav-cta:hover {
  background: var(--text);
  color: var(--bg) !important;
  border-color: var(--text) !important;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: flex;
  }

  .nav-main {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: #000;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-main.is-open {
    max-height: 360px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
  }

  .nav-list a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }
}

/* —— Hero（大标题 + 淡网格） */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 7.5rem) 0 clamp(4.5rem, 10vw, 7rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% -30%, rgba(255, 255, 255, 0.06), transparent 55%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.hero-inner {
  position: relative;
}

.hero-kicker {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.hero-accent {
  color: var(--muted);
  font-weight: 400;
}

.hero-lead {
  margin: 0 0 2.25rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Buttons（白底主按钮 / 线框次按钮） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-outline:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
}

.btn-block {
  width: 100%;
}

/* —— Sections */
.section {
  padding: clamp(4rem, 9vw, 6rem) 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2.75rem;
  max-width: 42rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.card {
  padding: 1.75rem 1.75rem 2rem;
  background: var(--bg);
  box-shadow: none;
  border: none;
  border-radius: 0;
}

.card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card--spotlight {
  grid-column: 1 / -1;
  padding: 2rem 2rem 2.25rem;
  border-bottom: 1px solid var(--line);
}

.card--spotlight .card-spotlight-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-deep);
}

.card--spotlight h3 {
  font-size: 1.125rem;
  margin-bottom: 0.65rem;
}

.card--spotlight p {
  max-width: 52rem;
  margin-bottom: 1rem;
}

.card--spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.card--spotlight-actions .btn-small {
  text-transform: none;
  letter-spacing: 0.04em;
}

.card--facade {
  grid-column: 1 / -1;
  padding: 2rem 2rem 2.25rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid rgba(125, 211, 252, 0.45);
}

.card--facade .card-facade-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-deep);
}

.card--facade h3 {
  font-size: 1.125rem;
  margin-bottom: 0.65rem;
}

.card--facade p {
  max-width: 52rem;
  margin-bottom: 1rem;
}

.card--facade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.card--facade-actions .btn-small {
  text-transform: none;
  letter-spacing: 0.04em;
}

.manual-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.is-hidden {
  display: none !important;
}

/* —— Solutions */
.solution-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 768px) {
  .solution-layout {
    grid-template-columns: 1fr;
  }
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.pill-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.solution-copy p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.process-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.process-list li {
  margin-bottom: 0.6rem;
}

.process-list strong {
  color: var(--text);
  font-weight: 600;
}

/* —— Resources */
.resources {
  border-bottom: 1px solid var(--line);
}

.resource-highlight {
  margin-bottom: 1.25rem;
  padding: 1.75rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.resource-highlight h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.resource-highlight > p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 48rem;
}

.resource-highlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.resource-panel {
  padding: 2rem 2rem 1.75rem;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.resource-panel:last-child {
  border-right: none;
}

@media (max-width: 720px) {
  .resource-panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .resource-panel:last-child {
    border-bottom: none;
  }
}

.resource-panel--gitlab {
  background: var(--bg);
}

.resource-panel-head {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.resource-glyph {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  position: relative;
}

.resource-glyph::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 1px;
  background: var(--muted-deep);
  transform: translateY(-50%);
}

.resource-glyph--gitlab {
  border-color: rgba(252, 109, 38, 0.45);
}

.resource-glyph--gitlab::after {
  background: var(--accent-gitlab);
  opacity: 0.85;
}

.resource-panel h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.resource-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.manual-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.manual-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

.manual-name {
  font-size: 0.875rem;
  color: var(--text);
}

.gitlab-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gitlab-features {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.gitlab-features li {
  margin-bottom: 0.4rem;
}

.resource-panel--gitlab .btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  box-shadow: none;
}

.resource-panel--gitlab .btn-primary:hover {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  filter: none;
}

.resource-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted-deep);
  line-height: 1.55;
}

.resource-note a {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.resource-note a:hover {
  color: var(--text);
}

.resource-note code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.12em 0.4em;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

/* —— About & contact */
.about-text {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.contact {
  padding-bottom: 3rem;
}

.contact h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.contact-line {
  margin: 0 0 0.65rem;
  color: var(--muted);
}

.contact-mail {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.contact-mail:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.contact-hint {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted-deep);
  line-height: 1.55;
}

.footer-contact {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer-contact a {
  font-family: var(--font-mono);
  color: var(--muted);
  border-bottom-color: var(--line);
}

.footer-contact a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

.icp {
  margin: 0;
  font-size: 0.9375rem;
}

.icp a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.icp a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

/* —— Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-inner {
  text-align: left;
}

.footer-inner p {
  margin: 0.2rem 0;
  color: var(--muted-deep);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-meta {
  color: var(--muted-deep) !important;
}
