@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #121212;
  --panel-soft: #0a0a0d;
  --line: #232838;
  --line-soft: #16181f;
  --ink: #f1f0f4;
  --muted: #a4a9b8;
  --accent: #5f7dff;
  --midnight: #101a3c;
  --neon: #7de2d1;
  --gold: #f3c97c;
  --radius: 28px;
  --nav-w: 272px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --display: 'Calistoga', 'Inter', Georgia, 'Songti SC', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  padding-top: 68px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

:where([id]) { scroll-margin-top: 88px; }

/* ---------- 左侧固定导航 ---------- */
.sidenav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: .01em;
  color: #fff;
}

.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gold);
  border-radius: 11px;
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(243, 201, 124, .35);
}

.brand-name { display: none; }

.pills {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
.pills::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0a0d;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--accent);
  background: var(--midnight);
  color: #fff;
  transform: translateY(-1px);
}

.nav-contact {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.nav-contact:hover { background: var(--gold); color: #0a0a0d; }

/* ---------- 主区域 ---------- */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 34px) 72px;
}

main > div {
  padding: clamp(20px, 4vw, 38px);
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0b0b0f, #06060a);
}

/* hero */
.hero {
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  gap: 20px;
}

.hero-art {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, #0d1734 0%, #05060b 62%, #000 100%);
  min-height: 196px;
}

.hero-art::after {
  content: "";
  position: absolute;
  top: -12%;
  bottom: -12%;
  right: -10%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(95, 125, 255, .26));
  transform: skewX(-9deg);
  pointer-events: none;
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 196px;
  object-fit: cover;
}

.hero-copy { padding: 0 4px 6px; }

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  text-shadow: 0 0 18px rgba(95, 125, 255, .18);
}

.hero .lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  max-width: 46ch;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 600;
  font-size: 16px;
  transition: background .22s ease, color .22s ease, transform .22s ease;
}

.cta:hover { background: var(--gold); color: #08080b; transform: translateY(-1px); }

/* 眉题 */
small.eyebrow,
main small {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

small + h2 { margin-top: 0; }

main h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.4vw, 2.05rem);
  line-height: 1.24;
  margin: 0 0 .55em;
  letter-spacing: -.005em;
}

main h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.5;
  margin: 1.6em 0 .5em;
}

main p { margin: 0 0 1.05em; }
main p:last-child { margin-bottom: 0; }

main a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

main ul,
main ol { margin: 0 0 1.1em; padding-left: 1.35em; }
main li { margin-bottom: .45em; }

main strong { color: #fff; font-weight: 600; }

main blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}

main th,
main td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

main th { color: #fff; font-weight: 600; }

main figure { margin: 1.3em 0; }
main figure img { border-radius: 18px; border: 1px solid var(--line); }

/* 目录侧栏 */
.rail { display: block; }

.toc-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #08080c;
  padding: 12px;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  transition: background .2s ease, color .2s ease;
}

.toc a:hover { background: #12162a; color: #fff; }

.toc .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .08em;
}

.toc-foot {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  text-align: right;
}

.toc-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
.sitefoot {
  border-top: 1px solid var(--line);
  background: #040406;
  padding: 44px clamp(16px, 4vw, 40px) 26px;
  display: grid;
  gap: 30px;
}

.sitefoot > div { min-width: 0; }

.sitefoot small.eyebrow { margin-bottom: 10px; }

.f-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-family: var(--display);
  font-size: 19px;
  color: #fff;
}

.f-about {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 34ch;
}

.f-nav dl {
  margin: 0;
  display: grid;
  gap: 2px;
}

.f-nav dt { margin: 0; }

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 16px;
  transition: color .2s ease;
}

.f-nav a:hover { color: var(--neon); }

.sub label {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sub-row { display: flex; gap: 8px; flex-wrap: wrap; }

.sub input {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0a0e;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

.sub input::placeholder { color: #6d7284; }

.sub input:focus { border-color: var(--accent); outline: none; }

.sub button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.sub button:hover { background: var(--gold); color: #08080b; }

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .2s ease, color .2s ease;
}

.totop:hover { border-color: var(--neon); color: var(--neon); }

.f-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: #7d8294;
}

.flinks {
  margin: 0;
  display: flex;
  gap: 16px;
}

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  color: var(--muted);
}

.flinks a:hover { color: var(--neon); }

/* 滚动揭示 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 平板及以上 ---------- */
@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 34px;
    min-height: 100vh;
    padding: 22px 0;
  }
  .hero-art { min-height: 420px; height: 100%; }
  .hero-img { min-height: 420px; }
  .hero-copy { text-align: right; padding-bottom: 0; }
  .hero .lead { margin-left: auto; }
  .f-bar { flex-wrap: nowrap; }
}

@media (min-width: 900px) {
  body { padding-top: 0; padding-left: var(--nav-w); }

  .sidenav {
    inset: 0 auto 0 0;
    width: var(--nav-w);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 26px 20px;
    background: #030305;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    backdrop-filter: none;
    overflow-y: auto;
  }

  .brand {
    padding: 0 0 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 19px;
  }

  .brand-name { display: inline; }

  .pills {
    flex-direction: column;
    overflow: visible;
    gap: 6px;
    padding: 0;
    flex: 0 0 auto;
  }

  .pill {
    width: 100%;
    justify-content: flex-start;
    min-height: 46px;
    padding: 0 18px;
  }

  .nav-contact {
    margin-top: auto;
    justify-content: center;
    min-height: 46px;
  }

  .sitefoot {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    align-items: start;
    padding: 54px clamp(24px, 4vw, 48px) 24px;
  }

  .f-bar { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    column-gap: 26px;
    align-items: start;
    max-width: 1240px;
    padding-top: 26px;
  }

  main > .hero { grid-column: 1 / -1; }

  main > div:not(.hero):not(.rail) { grid-column: 1; }

  main > .rail {
    grid-column: 2;
    grid-row: 2 / span 40;
    align-self: start;
    position: sticky;
    top: 26px;
    margin-bottom: 0;
  }

  :where([id]) { scroll-margin-top: 26px; }

  .hero-art { border-radius: 34px; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
