/* ==========================================================================
   宝马740线上 · /assets/site.css
   共享外壳：reset / 令牌 / 中文排版 / 头部 / 页脚 / 基础组件
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, hr {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; }

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

table { border-collapse: collapse; width: 100%; }

/* --------------------------------------------------------- 设计令牌 --- */
:root {
  --ink-950: #02060F;
  --ink-900: #060E1F;
  --ink-800: #0D2044;
  --line: #1C355F;
  --line-soft: rgba(28, 53, 95, 0.62);
  --steel: #A9B6C9;
  --steel-dim: rgba(169, 182, 201, 0.62);
  --silver: #F2F6FB;
  --cyan: #2FE0D0;
  --cyan-soft: rgba(47, 224, 208, 0.14);
  --violet: #7B5BFF;
  --violet-soft: rgba(123, 91, 255, 0.14);
  --ice: #4A8CC7;
  --amber: #F0B34E;

  --bg: var(--ink-900);
  --surface: var(--ink-800);
  --text: var(--steel);
  --text-strong: var(--silver);

  --font-sans: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "Inter", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(12.5px, 0.75rem + 0.08vw, 13.5px);
  --step-0: clamp(16px, 0.95rem + 0.18vw, 18px);
  --step-1: clamp(19px, 1.05rem + 0.45vw, 24px);
  --step-2: clamp(24px, 1.25rem + 1.1vw, 36px);
  --step-3: clamp(30px, 1.6rem + 2.2vw, 52px);
  --step-4: clamp(38px, 2rem + 3.8vw, 88px);

  --gutter: clamp(18px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 4px;
  --header-h: 78px;
  --header-h-scrolled: 60px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-1: 0 1px 0 rgba(242, 246, 251, 0.03), 0 22px 44px -32px var(--ink-950);
}

/* --------------------------------------------------------- 基础排版 --- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(58% 42% at 80% 4%, rgba(47, 224, 208, 0.10), transparent 62%),
    radial-gradient(46% 36% at 6% 26%, rgba(123, 91, 255, 0.10), transparent 66%),
    radial-gradient(72% 56% at 50% 106%, rgba(74, 140, 199, 0.13), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { display: block; }
#main-content:focus { outline: none; }

h1, h2, h3, h4 {
  color: var(--text-strong);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { max-width: 40em; }

::selection { background: var(--cyan); color: var(--ink-950); }

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

/* --------------------------------------------------------- 布局工具 --- */
.wrap {
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { padding-block: clamp(52px, 7vw, 108px); }

.section--lead { padding-block-start: clamp(124px, 17vh, 190px); }

.section--flush { padding-block-start: 0; }

.rule {
  height: 1px;
  border: 0;
  background: var(--line-soft);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

.section-head__title { font-size: var(--step-2); max-width: 20em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.lead {
  font-size: clamp(17px, 1rem + 0.35vw, 21px);
  line-height: 1.7;
  color: var(--steel);
  max-width: 34em;
}

.prose { max-width: 38em; line-height: 1.8; }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--silver); font-weight: 700; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(47, 224, 208, 0.4); }

.note {
  font-size: var(--step--1);
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--steel-dim);
  max-width: 30em;
}

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 34px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--8-4 { grid-template-columns: 8fr 4fr; }
.grid--5-7 { grid-template-columns: 5fr 7fr; }

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--7-5, .grid--8-4, .grid--5-7 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------- 基础组件 --- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 220;
  padding: 0.72em 1.15em;
  background: var(--cyan);
  color: var(--ink-950);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: top 0.22s var(--ease);
}

.skip-link:focus { top: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.btn--primary {
  background: var(--cyan);
  color: var(--ink-950);
  box-shadow: 0 14px 32px -22px var(--cyan);
}

.btn--primary:hover { background: #4df0e2; transform: translateY(-1px); }

.btn--ghost {
  border-color: var(--line);
  color: var(--silver);
  background: linear-gradient(180deg, rgba(28, 53, 95, 0.42), rgba(28, 53, 95, 0.08));
}

.btn--ghost:hover { border-color: var(--violet); color: var(--silver); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  color: var(--steel-dim);
  margin-bottom: 26px;
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 0.55em; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a:hover { color: var(--cyan); }

.board {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, rgba(13, 32, 68, 0.92), rgba(6, 14, 31, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.board::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.board--silver {
  background: linear-gradient(180deg, var(--silver), #E2E9F3);
  border-color: rgba(28, 53, 95, 0.28);
  color: #1B2A44;
}

.board--silver .board__title,
.board--silver .board__lede { color: #0B1730; }

.board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.board__title { font-size: var(--step-1); font-weight: 900; letter-spacing: -0.01em; }
.board__lede { margin-top: 10px; max-width: 34em; font-size: 15px; line-height: 1.75; }

.board__foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--step--1);
  color: var(--steel-dim);
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(16px, 1.8vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 32, 68, 0.55);
}

.kpi__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1;
  color: var(--cyan);
  letter-spacing: -0.01em;
}

.kpi__label {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  color: var(--steel-dim);
}

.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.6em;
  font-weight: 800;
  line-height: 1;
  color: var(--cyan);
  letter-spacing: -0.01em;
}

.data--sm { font-size: 1.15em; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.24em 0.62em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28, 53, 95, 0.28);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--steel);
  white-space: nowrap;
}

.tag--cyan { color: var(--cyan); border-color: rgba(47, 224, 208, 0.42); background: var(--cyan-soft); }
.tag--violet { color: #B9A8FF; border-color: rgba(123, 91, 255, 0.45); background: var(--violet-soft); }
.tag--amber { color: var(--amber); border-color: rgba(240, 179, 78, 0.45); background: rgba(240, 179, 78, 0.12); }

.toc {
  border-top: 1px solid var(--line);
}

.toc__item { border-bottom: 1px solid var(--line); }

.toc__link {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  padding: 18px 4px;
  font-size: clamp(16px, 1rem + 0.3vw, 20px);
  font-weight: 700;
  color: var(--silver);
  transition: color 0.22s var(--ease), padding-left 0.28s var(--ease);
}

.toc__link:hover { color: var(--cyan); padding-left: 12px; }

.toc__index {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--steel-dim);
}

.toc__meta { font-size: var(--step--1); font-weight: 400; color: var(--steel-dim); }

/* 图片容器基础规则（页面阶段放置 img / svg 占位） */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background-image:
    radial-gradient(120% 100% at 18% 0%, rgba(74, 140, 199, 0.38), transparent 62%),
    radial-gradient(90% 90% at 100% 100%, rgba(123, 91, 255, 0.22), transparent 60%),
    linear-gradient(140deg, var(--ink-800), var(--ink-950));
}

.media > img,
.media > svg { width: 100%; height: 100%; object-fit: cover; }

.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }

.media__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 14px 16px;
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  color: var(--steel);
  background: linear-gradient(0deg, rgba(2, 6, 15, 0.9), transparent);
}

/* 滚动显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

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

/* ------------------------------------------------------------- 头部 --- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(169, 182, 201, 0.32) 22%, rgba(169, 182, 201, 0.32) 78%, transparent);
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: rgba(13, 32, 68, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 22px 46px -36px var(--ink-950);
}

.site-header[data-scrolled="true"]::after { opacity: 0.25; }

.site-header__inner {
  position: relative;
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 36px);
  height: var(--header-h);
  transition: height 0.32s var(--ease);
}

.site-header[data-scrolled="true"] .site-header__inner { height: var(--header-h-scrolled); }

.scroll-progress {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 34px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cyan), var(--ice));
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__text { display: block; }

.brand__name {
  display: block;
  font-size: clamp(17px, 1.05rem + 0.2vw, 20px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--silver);
}

.brand__sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--steel-dim);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 32, 68, 0.62);
  color: var(--silver);
  cursor: pointer;
}

.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle__label { font-size: 13px; letter-spacing: 0.16em; }

.nav-toggle[aria-expanded="true"] { border-color: rgba(47, 224, 208, 0.5); color: var(--cyan); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-5.5px) rotate(-45deg); }

.site-nav { margin-inline-start: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.3vw, 16px);
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 4px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--steel);
  transition: color 0.22s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover { color: var(--silver); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] { color: var(--silver); font-weight: 700; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__cta { display: none; }

.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.64em 1.1em;
  border: 1px solid rgba(47, 224, 208, 0.5);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(47, 224, 208, 0.14), rgba(47, 224, 208, 0.03));
  color: var(--cyan);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.header-cta:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-950);
}

body[data-nav-open="true"] { overflow: hidden; }

/* ------------------------------------------------------------- 页脚 --- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 118px);
  border-top: 1px solid var(--line);
  background-image: linear-gradient(180deg, var(--ink-900), var(--ink-800) 62%, #08152E);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(360px, 42%);
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.site-footer__inner { padding-block: clamp(44px, 5vw, 74px) 26px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.5fr 1fr;
  gap: clamp(24px, 3vw, 48px);
}

.footer-col__title {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--steel-dim);
}

.brand--footer .brand__mark { width: 40px; height: 30px; font-size: 13.5px; }

.footer-lede {
  margin-top: 18px;
  max-width: 28em;
  font-size: 14px;
  line-height: 1.75;
  color: var(--steel-dim);
}

.footer-icp {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: rgba(169, 182, 201, 0.55);
}

.footer-links li + li { margin-top: 10px; }

.footer-links a {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 14.5px;
  color: var(--steel);
  transition: color 0.22s var(--ease), padding-left 0.26s var(--ease);
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.26s var(--ease);
}

.footer-links a:hover { color: var(--cyan); padding-left: 16px; }
.footer-links a:hover::before { width: 10px; }

.footer-contact li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
}

.footer-contact li + li { margin-top: 12px; }

.footer-contact__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--steel-dim);
}

.footer-contact__value { color: var(--silver); word-break: break-word; }

.footer-contact__note {
  margin-top: 16px;
  font-size: var(--step--1);
  line-height: 1.7;
  color: var(--steel-dim);
  max-width: 26em;
}

.footer-base {
  margin-top: clamp(30px, 4vw, 54px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--step--1);
  color: var(--steel-dim);
}

.footer-copy { letter-spacing: 0.04em; }
.footer-note { letter-spacing: 0.06em; }

/* --------------------------------------------------------- 响应式 --- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    margin: 0;
    padding: calc(var(--header-h) + 84px) var(--gutter) 40px;
    background-image: linear-gradient(180deg, var(--ink-800), var(--ink-900) 70%);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 60px -40px var(--ink-950);
    transform: translateX(102%);
    transition: transform 0.38s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav[data-open="true"] { transform: none; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 16px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    font-weight: 600;
    color: var(--silver);
  }

  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] { color: var(--cyan); }

  .site-nav__cta {
    display: inline-flex;
    width: 100%;
    margin-top: 26px;
  }
}

@media (max-width: 620px) {
  :root { --header-h: 68px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand__sub { letter-spacing: 0.22em; }
  .toc__link { grid-template-columns: 48px minmax(0, 1fr); }
  .toc__meta { grid-column: 2; }
  .footer-contact li { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
}
