/* ==========================================================================
   欧博主站 · 全站共享外壳样式 /assets/site.css
   蓝图网格 · 左右分置导航 · 墨底鎏金
   ========================================================================== */

/* ---------- 1. 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, h6, p, ul, ol, li, figure, blockquote, dl, dd, hr { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #07090C;
  --ink-800: #0D1116;
  --ink-700: #141A21;
  --line-600: #2A323C;
  --gold-500: #C8A24A;
  --gold-300: #E7CE8F;
  --jade-400: #4FBF9F;
  --magenta-500: #E0457B;
  --mist-200: #C7CED6;
  --mist-400: #8A939E;

  --rail-left: 84px;
  --rail-right: 178px;
  --head-h: 62px;
  --wrap: 1180px;
  --gut: 24px;

  --grad-tier: linear-gradient(135deg, var(--gold-500) 0%, var(--jade-400) 100%);
  --grad-edge: linear-gradient(90deg, var(--gold-500), var(--magenta-500));

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100%;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(to right, rgba(42, 50, 60, 0.40) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 50, 60, 0.24) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  background-position: 0 0, 0 0;
  color: var(--mist-200);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff;
}

p { max-width: 72ch; }
p + p { margin-top: 1em; }

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

::selection { background: rgba(224, 69, 123, 0.32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--magenta-500);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-size: 13px;
  letter-spacing: 0.1em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部 ---------- */
.site-head {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.head-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  background: rgba(42, 50, 60, 0.85);
}
.head-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-edge);
  transition: width 0.12s linear;
}

.head-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 品牌轴 · 左端竖排 */
.brand {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-left);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
  background: linear-gradient(180deg, rgba(13, 17, 22, 0.94), rgba(7, 9, 12, 0.72));
  border-right: 1px solid var(--line-600);
}
.brand__mark {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--gold-500);
}
.brand__rule {
  display: block;
  width: 1px;
  flex: 1 1 auto;
  margin: 16px 0;
  background: linear-gradient(180deg, transparent, var(--line-600) 45%, transparent);
}
.brand__line {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  max-height: 58vh;
  overflow: hidden;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mist-400);
}

/* 栏目轴 · 右端竖排 */
.site-nav {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-right);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  padding: 92px 0 26px;
  background: linear-gradient(180deg, rgba(13, 17, 22, 0.94), rgba(7, 9, 12, 0.74));
  border-left: 1px solid var(--line-600);
}
.site-nav__label {
  margin: 0 0 24px;
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--line-600);
}
.site-nav__list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-nav__item { list-style: none; }
.site-nav__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 22px;
  border-right: 2px solid transparent;
  color: var(--mist-400);
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--line-600);
  transition: color 0.22s var(--ease);
}
.site-nav__text {
  display: block;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.site-nav__link:hover {
  color: var(--gold-300);
  background-color: rgba(200, 162, 74, 0.07);
}
.site-nav__link:hover .site-nav__idx { color: var(--gold-500); }
.site-nav__link:focus-visible { outline-offset: -2px; }
.site-nav__link[aria-current="page"] {
  color: var(--gold-300);
  border-right-color: var(--magenta-500);
  background-image: linear-gradient(270deg, rgba(224, 69, 123, 0.16), rgba(224, 69, 123, 0) 78%);
}
.site-nav__link[aria-current="page"] .site-nav__idx { color: var(--magenta-500); }

.site-nav__util {
  margin: 18px 22px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-600);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-nav__util-link {
  display: block;
  padding: 3px 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist-400);
  transition: color 0.2s var(--ease);
}
.site-nav__util-link:hover { color: var(--jade-400); }

/* 移动端切换按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line-600);
  border-radius: 2px;
  color: var(--mist-200);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold-500); color: var(--gold-300); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}
.nav-toggle__bars i {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--gold-500);
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child { transform: translateY(2.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child { transform: translateY(-2.5px) rotate(-45deg); }
.nav-toggle__text { font-size: 12px; letter-spacing: 0.16em; }

/* 桌面端为左右侧栏留出内容宽度 */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-left);
    padding-right: var(--rail-right);
  }
}

/* 平板与手机：头部折叠为顶部横条 */
@media (max-width: 1023px) {
  .site-head {
    inset: 0 0 auto 0;
    pointer-events: auto;
    background: rgba(7, 9, 12, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-600);
  }
  .head-frame {
    position: relative;
    inset: auto;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
  }
  .brand {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: none;
    border: 0;
  }
  .brand__mark { writing-mode: horizontal-tb; font-size: 12px; letter-spacing: 0.2em; }
  .brand__rule { width: 1px; height: 16px; flex: 0 0 auto; margin: 0; background: var(--line-600); }
  .brand__line {
    writing-mode: horizontal-tb;
    max-height: none;
    font-size: 11px;
    letter-spacing: 0.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    display: block;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background: var(--ink-800);
    border-left: 0;
    border-top: 1px solid var(--line-600);
    transition: max-height 0.34s var(--ease), opacity 0.24s var(--ease), visibility 0.24s linear;
  }
  .site-nav[data-open] {
    max-height: 76vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
  }
  .site-nav__label { padding: 16px 20px 4px; margin: 0; }
  .site-nav__list { gap: 0; padding: 4px 0 8px; }
  .site-nav__link {
    padding: 13px 20px;
    border-right: 0;
    border-left: 2px solid transparent;
  }
  .site-nav__text { font-size: 15px; }
  .site-nav__link[aria-current="page"] {
    border-right-color: transparent;
    border-left-color: var(--magenta-500);
    background-image: linear-gradient(90deg, rgba(224, 69, 123, 0.16), rgba(224, 69, 123, 0) 78%);
  }
  .site-nav__util { margin: 0; padding: 12px 20px 18px; }

  body { padding-top: var(--head-h); }
}

/* ---------- 6. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: 120px;
  padding: 72px 0 40px;
  background: var(--ink-800);
  border-top: 1px solid var(--line-600);
}
.foot-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.foot-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-600);
}
.foot-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.foot-brand__mark {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-500);
}
.foot-brand__name {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--mist-200);
}
.foot-head__side {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-head__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist-400);
}

.foot-figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line-600);
}
.foot-figures__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--line-600);
}
.foot-figures__num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--gold-500);
  font-variant-numeric: tabular-nums;
}
.foot-figures__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist-400);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 40px 0 48px;
}
.foot-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.foot-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-col__link {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  font-size: 13.5px;
  color: var(--mist-200);
  transition: color 0.2s var(--ease);
}
.foot-col__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 1px;
  background: var(--line-600);
  transition: width 0.2s var(--ease), background-color 0.2s var(--ease);
}
.foot-col__link:hover { color: var(--gold-300); }
.foot-col__link:hover::before { width: 10px; background: var(--jade-400); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-600);
}
.foot-base__legal,
.foot-base__icp,
.foot-base__contact {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist-400);
}
.foot-base__icp { font-family: var(--font-mono); letter-spacing: 0.1em; }
.foot-base__contact { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------- 7. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.wrap--narrow { max-width: 780px; }

.section {
  position: relative;
  padding: clamp(72px, 10vw, 150px) 0;
}
.section--tight { padding: clamp(48px, 6vw, 84px) 0; }
.section + .section { border-top: 1px solid var(--line-600); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 48px;
  max-width: 72ch;
}
.section__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--mist-400);
  transition: color 0.3s var(--ease);
}
.section__title {
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
  transition: background 0.3s var(--ease);
}

.lead {
  max-width: 68ch;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.85;
  color: var(--mist-200);
}

.rule {
  height: 1px;
  width: 100%;
  background: var(--line-600);
}

/* 滚动高亮：当前章节 */
[data-scroll-section].is-active .section__index { color: var(--gold-500); }
[data-scroll-section].is-active .eyebrow::before {
  background: linear-gradient(90deg, var(--magenta-500), transparent);
}

/* ---------- 8. 12 列蓝图网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gut);
}
.grid > * { grid-column: span 12; }

@media (min-width: 768px) {
  .grid > .is-3 { grid-column: span 3; }
  .grid > .is-4 { grid-column: span 4; }
  .grid > .is-5 { grid-column: span 5; }
  .grid > .is-6 { grid-column: span 6; }
  .grid > .is-7 { grid-column: span 7; }
  .grid > .is-8 { grid-column: span 8; }
}

/* ---------- 9. 卡片 / 标签 / 数字 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  background: var(--ink-700);
  border: 1px solid var(--line-600);
  transition: border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.card:hover {
  border-color: rgba(200, 162, 74, 0.55);
  box-shadow: inset 0 1px 0 rgba(231, 206, 143, 0.14);
}
.card__title {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
}
.card__body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist-200);
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist-400);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist-200);
  background: rgba(20, 26, 33, 0.6);
  border: 1px solid var(--line-600);
}
.tag--jade { color: var(--jade-400); border-color: rgba(79, 191, 159, 0.42); }
.tag--gold { color: var(--gold-300); border-color: rgba(200, 162, 74, 0.48); }
.tag--magenta { color: var(--magenta-500); border-color: rgba(224, 69, 123, 0.48); }

.num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--gold-300);
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--mist-200);
  background: transparent;
  border: 1px solid var(--line-600);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.btn:hover {
  color: var(--gold-300);
  border-color: var(--gold-500);
  background-color: rgba(200, 162, 74, 0.08);
}
.btn--solid {
  color: var(--ink-900);
  font-weight: 600;
  border-color: transparent;
  background-image: linear-gradient(135deg, var(--gold-300), var(--gold-500));
}
.btn--solid:hover {
  color: var(--ink-900);
  border-color: transparent;
  background-image: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 0 0 1px rgba(231, 206, 143, 0.5);
}
.btn--quiet {
  padding-left: 0;
  padding-right: 0;
  border-color: transparent;
  color: var(--jade-400);
}
.btn--quiet:hover {
  color: var(--gold-300);
  border-color: transparent;
  background-color: transparent;
}

/* ---------- 11. 面包屑 ---------- */
.crumbs { padding: 22px 0 0; }
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist-400);
}
.crumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.crumbs__sep { color: var(--line-600); }
.crumbs__link { color: var(--mist-400); transition: color 0.2s var(--ease); }
.crumbs__link:hover { color: var(--jade-400); }
.crumbs__current { color: var(--gold-500); }

/* ---------- 12. 图片容器（页面阶段放置占位） ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--ink-700);
  border: 1px solid var(--line-600);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grad-tier);
  opacity: 0.18;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(199, 206, 214, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(199, 206, 214, 0.07) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
}
.media__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }

/* ---------- 13. 横向滚动轨道（6 档桌台 / 12 分类） ---------- */
.rail { position: relative; }
.rail__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-600) transparent;
}
.rail__track::-webkit-scrollbar { height: 6px; }
.rail__track::-webkit-scrollbar-track { background: transparent; }
.rail__track::-webkit-scrollbar-thumb { background: var(--line-600); }
.rail__item {
  flex: 0 0 clamp(220px, 26vw, 300px);
  scroll-snap-align: start;
}
.rail__item--wide { flex: 0 0 clamp(280px, 42vw, 460px); }

/* ---------- 14. 入场显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 响应式：页脚 ---------- */
@media (max-width: 1023px) {
  .site-foot { margin-top: 84px; padding-top: 56px; }
  .foot-grid { padding: 34px 0 40px; }
}

@media (max-width: 767px) {
  .site-foot { margin-top: 64px; padding: 48px 0 32px; }
  .foot-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .foot-head__side { width: 100%; justify-content: space-between; }
  .foot-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  .section__head { margin-bottom: 32px; }
}

@media (max-width: 479px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-figures__num { font-size: 22px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
}

/* ---------- 16. 动效偏好 ---------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .head-progress__bar { transition: none; }
}
