/* =========================================================
   滕博会CN官网 · 共享站点套件
   文件位置：/assets/site.css
   负责：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul, ol { padding: 0; list-style: none; }

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0E1B2C;
  --ink-2: #172A42;
  --paper: #F4EFE6;
  --card: #FBF8F2;
  --signal: #E8501F;
  --signal-deep: #C84216;
  --fix: #19E3B1;
  --notice: #FFB020;
  --muted: #8A94A6;
  --rule: #2D3A4D;

  --rail: 96px;
  --bar-h: 76px;
  --wrap: 1240px;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .68, .28, 1);
}

/* ---------- 3. 全局排版 ---------- */
body {
  background-color: var(--paper);
  background-image: linear-gradient(180deg, rgba(45, 58, 77, .055) 0, rgba(45, 58, 77, 0) 420px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--signal-deep);
  text-decoration: none;
}
a:hover { color: var(--signal); }

:focus-visible {
  outline: 3px solid var(--fix);
  outline-offset: 3px;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail); }
}

/* ---------- 4. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn--signal {
  background-color: var(--signal-deep);
  border-color: var(--signal-deep);
  color: #FFFFFF;
}
.btn--signal:hover,
.btn--signal:focus-visible {
  background-color: var(--signal);
  border-color: var(--signal);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn--ghost {
  background-color: transparent;
  border-color: rgba(244, 239, 230, .38);
  color: var(--paper);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--fix);
  color: var(--fix);
}

.btn--ink {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn--ink:hover,
.btn--ink:focus-visible {
  background-color: var(--ink-2);
  border-color: var(--ink-2);
  color: var(--paper);
}

/* ---------- 5. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.section { padding-block: clamp(44px, 6.5vw, 92px); }
.section--tight { padding-block: clamp(26px, 4vw, 52px); }

.section--ink {
  background-color: var(--ink);
  color: var(--paper);
}
.section--ink .lede { color: rgba(244, 239, 230, .8); }
.section--ink .section-title { color: var(--paper); }

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

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-deep);
}

.section-title { font-size: clamp(26px, 3.4vw, 40px); }

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
  color: var(--ink-2);
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 0.9em; }
.prose ul,
.prose ol { margin-block: 1em; padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 26px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.card {
  position: relative;
  background-color: var(--card);
  border: 1px solid rgba(45, 58, 77, .22);
  border-radius: 2px;
  padding: clamp(16px, 2.2vw, 26px);
  box-shadow: 0 1px 0 rgba(14, 27, 44, .05), 0 14px 26px -22px rgba(14, 27, 44, .6);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background-color: var(--card);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--signal { background-color: var(--signal-deep); border-color: var(--signal-deep); color: #FFFFFF; }
.tag--fix { background-color: var(--fix); border-color: var(--fix); color: var(--ink); }
.tag--notice { background-color: var(--notice); border-color: var(--notice); color: var(--ink); }
.tag--quiet { background-color: transparent; border-color: rgba(45, 58, 77, .34); color: var(--muted); }

.rule {
  border: 0;
  border-top: 1px solid rgba(45, 58, 77, .22);
  margin-block: clamp(20px, 3vw, 34px);
}

/* 图片容器基础规则（页面阶段放置 img / picture 即可） */
.figure {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 58, 77, .28);
  border-radius: 2px;
  background-color: var(--ink-2);
  aspect-ratio: 16 / 9;
}
.figure > img,
.figure > picture,
.figure > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide { aspect-ratio: 21 / 9; }
.figure--3x2 { aspect-ratio: 3 / 2; }
.figure--1x1 { aspect-ratio: 1 / 1; }
.figure--4x5 { aspect-ratio: 4 / 5; }

.figure__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 14px;
  background-color: rgba(14, 27, 44, .86);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

/* 显现协议：无 JS 时内容默认可见 */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.js-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 60;
  height: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail) + 16px);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 2px;
  background-color: var(--fix);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform .2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--ink);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background-color: rgba(14, 27, 44, .18);
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background-color: var(--signal);
}

/* 品牌轨道 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 24px;
  background-color: var(--ink);
  border-right: 1px solid rgba(45, 58, 77, .85);
}
.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--paper);
  text-decoration: none;
}
.rail__brand:hover { color: var(--paper); }
.rail__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  background-color: var(--signal);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: background-color .2s var(--ease);
}
.rail__brand:hover .rail__mark { background-color: var(--fix); }
.rail__word {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.24em;
  color: var(--paper);
}
.rail__cn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.rail__tagline {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.rail__pulse {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--fix);
  box-shadow: 0 0 0 0 rgba(25, 227, 177, .5);
  animation: rail-pulse 2.8s var(--ease) infinite;
}
@keyframes rail-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(25, 227, 177, .5); }
  70%  { box-shadow: 0 0 0 12px rgba(25, 227, 177, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 227, 177, 0); }
}

/* 顶部横栏 */
.topbar {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  z-index: 60;
  height: var(--bar-h);
  background-image: linear-gradient(180deg,
    rgba(14, 27, 44, .86) 0%,
    rgba(14, 27, 44, .44) 62%,
    rgba(14, 27, 44, 0) 100%);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header[data-scrolled] .topbar {
  background-color: var(--ink);
  background-image: none;
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .7);
}
.topbar__inner {
  height: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
}
.topbar__brand {
  display: none;
  align-items: baseline;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
}
.topbar__brand:hover { color: var(--paper); }
.topbar__brandname {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.topbar__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid rgba(244, 239, 230, .36);
  border-radius: 2px;
  background-color: rgba(14, 27, 44, .3);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--fix); color: var(--fix); }
.nav-toggle__text { font-family: var(--font-mono); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.nav-toggle__bars > span {
  display: block;
  height: 2px;
  background-color: currentColor;
  transition: transform .22s var(--ease);
}
.nav-toggle[data-open] .nav-toggle__bars > span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[data-open] .nav-toggle__bars > span:last-child { transform: translateY(-3px) rotate(-45deg); }

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, .9vw, 14px);
}
.primary-nav__link {
  display: inline-block;
  padding: 9px 7px;
  border-bottom: 2px solid transparent;
  color: rgba(244, 239, 230, .84);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.primary-nav__link:hover {
  color: #FFFFFF;
  border-bottom-color: rgba(232, 80, 31, .75);
}
.primary-nav__link[aria-current="page"] {
  color: #FFFFFF;
  border-bottom-color: var(--signal);
}
.primary-nav__foot { display: none; }
.primary-nav__note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.topbar__cta { margin-left: 10px; }

.quick-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 55;
  padding: 16px 9px;
  border-radius: 2px 0 0 2px;
  background-color: var(--signal-deep);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  box-shadow: -8px 0 22px -12px rgba(14, 27, 44, .65);
  transition: background-color .2s var(--ease);
}
.quick-tab:hover {
  background-color: var(--signal);
  color: #FFFFFF;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  background-color: var(--ink);
  color: var(--paper);
  padding-top: clamp(36px, 5vw, 64px);
}
.footer__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--rule);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 2px;
  background-color: var(--signal);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.footer__brandline {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.footer__stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(26px, 4vw, 44px);
}
.footer__col { min-width: 0; }
.footer__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fix);
}
.footer__list { display: grid; gap: 10px; }
.footer__list a {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  color: rgba(244, 239, 230, .82);
  font-size: 15px;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer__list a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--signal);
}
.footer__list--plain {
  gap: 12px;
  color: rgba(244, 239, 230, .78);
  font-size: 14.5px;
  line-height: 1.65;
  word-break: break-word;
}
.footer__label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.footer__icp,
.footer__copy {
  font-size: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/* ---------- 8. 响应式 ---------- */
@media (min-width: 1024px) and (max-width: 1199px) {
  :root { --rail: 84px; }
}

@media (max-width: 1023px) {
  body { padding-left: 0; }
  .rail { display: none; }
  .skip-link { left: 16px; }
  .topbar { left: 0; }
  .topbar__brand { display: flex; }
  .nav-toggle { display: inline-flex; }
  .topbar__cta { display: none; }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 340px);
    margin-left: 0;
    padding: calc(var(--bar-h) + 14px) 22px 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--ink);
    border-left: 1px solid var(--rule);
    box-shadow: -30px 0 60px -34px rgba(0, 0, 0, .8);
    transform: translateX(103%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
    pointer-events: none;
  }
  .primary-nav[data-open] {
    transform: none;
    pointer-events: auto;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav__item { border-bottom: 1px solid rgba(45, 58, 77, .7); }
  .primary-nav__link {
    display: block;
    padding: 16px 2px;
    border-bottom: 0;
    font-size: 17px;
    color: var(--paper);
  }
  .primary-nav__link:hover { color: var(--fix); }
  .primary-nav__link[aria-current="page"] {
    color: var(--fix);
    border-bottom-color: transparent;
  }
  .primary-nav__foot {
    display: block;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(45, 58, 77, .7);
  }
  .primary-nav__note { margin-top: 12px; }
}

@media (max-width: 899px) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  :root { --bar-h: 64px; }
  body { font-size: 16px; }
  .quick-tab { display: none; }
  .topbar__tagline { display: none; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__note { max-width: none; }
  .btn { padding: 10px 16px; font-size: 13.5px; }
}

/* ---------- 9. 动效收敛 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js-reveal {
    opacity: 1;
    transform: none;
  }
  .rail__pulse {
    animation: none;
    box-shadow: 0 0 0 6px rgba(25, 227, 177, .16);
  }
}
