:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #ebebeb;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --r: 10px;
  --r-lg: 20px;
  --shadow: 0 4px 6px rgba(0, 0, 0, .05);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, .09);
  --bar: 74px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .01em;
  padding-bottom: calc(var(--bar) + 44px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); }

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 底部导航条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}

.brand-mark { width: 22px; height: 22px; border-radius: 4px; }

.bar-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bar-nav::-webkit-scrollbar { display: none; }

.bar-nav ol {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-nav ol > li { flex: none; }

.bar-nav ol > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: background .22s ease, color .22s ease;
}

.bar-nav ol > li > a:hover { background: var(--surface); }

.bar-nav ol > li > a[aria-current="true"] {
  background: var(--surface-2);
  font-weight: 500;
}

.contact {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: background .22s ease;
}

.contact:hover { background: var(--surface-2); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 36px;
  min-height: 70vh;
  margin: 22px 0 30px;
  padding: 52px 44px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -25%;
  right: -12%;
  width: 64%;
  height: 155%;
  background: var(--surface);
  transform: skewX(-9deg);
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-copy { max-width: 34em; }

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -.02em;
}

.hero-desc {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: transform .25s ease, box-shadow .25s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-art {
  height: 100%;
  min-height: 300px;
  max-height: 58vh;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

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

.art-fallback {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: .04em;
  color: #b5b5b5;
  padding: 24px;
  text-align: center;
}

/* ---------- 内容区 ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 4px 0 56px;
  align-items: start;
}

.stream {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.stream > section {
  grid-column: span 6;
  margin: 0;
  padding: 28px 26px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
  transition: transform .3s ease;
}

.stream > section > :first-child { margin-top: 0; }
.stream > section > :last-child { margin-bottom: 0; }

.stream h2 {
  margin: 0 0 12px;
  font-size: clamp(21px, 2.5vw, 28px);
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: -.01em;
}

.stream h3 {
  margin: 24px 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.stream p { margin: 0 0 13px; color: #333; }
.stream ul, .stream ol { margin: 0 0 14px; padding-left: 1.25em; }
.stream li { margin: 0 0 6px; }
.stream li::marker { color: #9a9a9a; }

.stream a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.stream a:hover { background: #e9e9e9; }

.stream figure { margin: 18px 0; }
.stream figure img { border-radius: 8px; width: 100%; height: auto; }
.stream figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }

.stream blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ink);
  color: #3a3a3a;
}

.stream table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 16px 0;
}

.stream th, .stream td {
  padding: 10px 12px;
  border-bottom: 1px solid #dedede;
  text-align: left;
}

.stream code {
  font-size: 15px;
  background: #e7e7e7;
  padding: 1px 5px;
  border-radius: 4px;
}

.stream pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}

/* ---------- 侧栏 ---------- */
.rail {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.rail h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 500;
}

.rail .subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.rail ol a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  transition: background .2s ease, transform .2s ease;
}

.rail ol a:hover { background: var(--bg); transform: translateX(2px); }

.rail ol a[aria-current="true"] {
  background: var(--ink);
  color: #fff;
}

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  gap: 14px;
  padding-top: 6px;
  padding-bottom: 26px;
}

.f-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.f-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}

.f-form { display: flex; flex-wrap: wrap; gap: 8px; }

.f-form input {
  width: 210px;
  max-width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.f-form input::placeholder { color: #a2a2a2; }

.f-form button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity .2s ease;
}

.f-form button:hover { opacity: .85; }

.f-legal { padding: 0 4px; }

.f-legal p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bar) + 16px);
  z-index: 61;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: var(--shadow-lg);
}

.to-top.on { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 焦点 ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 入场动效 ---------- */
.js [data-reveal],
.js .stream > section,
.js .rail {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}

.js [data-reveal].in,
.js .stream > section.in,
.js .rail.in {
  opacity: 1;
  transform: none;
}

.stream > section:hover { transform: scale(1.006); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js .stream > section,
  .js .rail {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .stream > section:hover { transform: none; }
}

/* ---------- 平板 ---------- */
@media (min-width: 700px) {
  .stream > section:nth-child(1),
  .stream > section:nth-child(4),
  .stream > section:nth-child(7) { grid-column: span 6; }
  .stream > section { grid-column: span 3; }
}

/* ---------- 桌面 ---------- */
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 288px; gap: 24px; }
  .rail { position: sticky; top: 22px; }
  .hero { padding: 56px 52px; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 780px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 34px 24px;
    gap: 24px;
    margin: 16px 0 22px;
  }
  .hero::before {
    top: auto;
    bottom: -30%;
    right: -25%;
    width: 105%;
    height: 60%;
    transform: skewY(-6deg);
  }
  .hero-art { min-height: 220px; max-height: 300px; order: 2; }
  .stream > section { padding: 24px 20px; }
  .rail { padding: 22px 18px; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 0 14px; }
  .bar { gap: 8px; padding: 8px 10px; }
  .brand { padding: 0 11px; font-size: 15px; }
  .bar-nav ol > li > a { padding: 0 11px; font-size: 15px; }
  .contact { padding: 0 12px; font-size: 15px; }
  .hero h1 { font-size: clamp(30px, 9vw, 44px); }
  .f-brand { padding: 18px; }
  .f-form input { width: 100%; }
  .f-form { width: 100%; }
}

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