/* ==========================================================================
   bob半岛入口 — /assets/site.css
   共享层：重置 / 变量 / 中文排版 / 命令栏 / 页脚 / 通用组件
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--deepsea-700); text-decoration-thickness: 1px; text-underline-offset: 0.28em; }
a:hover { color: var(--tide-500); }

:root {
  /* 色彩 */
  --deepsea-900: #0A1E33;
  --deepsea-700: #123A5A;
  --tide-500: #1E8FA8;
  --tide-200: #A8D8E0;
  --sand-100: #F3EDE3;
  --paper-000: #FCFAF6;
  --orange-500: #E4691E;
  --orange-100: #FBE3D2;
  --ink-900: #10161C;
  --slate-500: #5A6B7A;
  --jade-600: #22755A;
  --focus-600: #0B6E8A;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Oswald", "Barlow Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;

  /* 度量 */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 76px;
  --header-h-compact: 56px;
  --section-space: clamp(64px, 9vw, 112px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-paper: 6px 6px 0 rgba(10, 30, 51, 0.08);
  --line-soft: rgba(168, 216, 224, 0.28);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--ink-900);
  background-color: var(--sand-100);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.12;
  color: var(--deepsea-900);
}

/* --------------------------------------------------------------------------
   焦点态 / 跳过导航 / 主内容锚点
   -------------------------------------------------------------------------- */

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

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--orange-500);
}

.skip-link {
  position: fixed;
  top: -88px;
  left: var(--gutter);
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--orange-500);
  color: var(--deepsea-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--deepsea-900);
}

#main-content {
  scroll-margin-top: 96px;
  display: block;
}

/* --------------------------------------------------------------------------
   骨架与排版工具
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 1.75rem);
  letter-spacing: 0.04em;
}

.page-title {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tide-500);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.prose p {
  max-width: 38em;
  font-size: 16px;
  line-height: 1.85;
}

.prose p + p { margin-top: 1.2em; }

.prose h2,
.prose h3 { margin-top: 1.6em; }

.lede {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--slate-500);
}

.text-accent { color: var(--orange-500); }
.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   顶部命令栏
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--deepsea-900);
  color: var(--paper-000);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.2vw, 32px);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  transition: min-height 0.24s var(--ease);
}

.site-header.is-compact .header-inner {
  min-height: var(--header-h-compact);
}

/* 品牌署名 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--paper-000);
  text-decoration: none;
}

.brand:hover { color: var(--paper-000); }

.brand-mark {
  display: grid;
  gap: 3px;
  width: 26px;
  flex: 0 0 auto;
}

.brand-mark span {
  display: block;
  height: 3px;
  background: var(--tide-500);
  border-radius: 2px;
  transition: width 0.24s var(--ease);
}

.brand-mark span:nth-child(1) { width: 100%; }
.brand-mark span:nth-child(2) { width: 72%; background: var(--orange-500); }
.brand-mark span:nth-child(3) { width: 46%; }

.site-header.is-compact .brand-mark span:nth-child(1) { width: 78%; }

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper-000);
}

.brand-domain {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide-500);
}

/* 主导航 */
.primary-nav { flex: 1 1 auto; }

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 24px);
}

.nav-item { flex: 0 0 auto; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 2px 11px;
  color: var(--tide-200);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--paper-000);
  border-bottom-color: var(--line-soft);
}

.nav-index {
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--tide-500);
  transition: color 0.2s var(--ease);
}

.nav-text { white-space: nowrap; }

.nav-link[aria-current="page"] {
  color: var(--paper-000);
  border-bottom-color: var(--orange-500);
}

.nav-link[aria-current="page"] .nav-index { color: var(--orange-500); }

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.version-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  background: rgba(18, 58, 90, 0.65);
  border-radius: 2px;
}

.version-option {
  display: inline-block;
  padding: 6px 11px;
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tide-200);
  border-radius: 2px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.version-option:hover { color: var(--paper-000); }

.version-option.is-active {
  background: var(--tide-500);
  color: var(--deepsea-900);
  font-weight: 700;
}

/* 移动端索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  color: var(--tide-200);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover {
  color: var(--paper-000);
  border-color: var(--tide-500);
}

.nav-toggle-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  transition: box-shadow 0.2s var(--ease);
}

.site-header[data-open] .nav-toggle-icon {
  box-shadow: 0 0 0 currentColor, 0 0 0 currentColor;
}

.nav-toggle-label { white-space: nowrap; }

/* 滚动进度潮线 */
.scroll-progress {
  height: 2px;
  width: 100%;
  background: rgba(168, 216, 224, 0.14);
  overflow: hidden;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange-500);
}

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    color 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:active { transform: translateY(2px); }

.btn-accent {
  background: var(--orange-500);
  color: var(--deepsea-900);
  box-shadow: 4px 4px 0 rgba(10, 30, 51, 0.35);
}

.btn-accent:hover {
  background: #F07A30;
  color: var(--deepsea-900);
  box-shadow: 2px 2px 0 rgba(10, 30, 51, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--tide-200);
  border-color: var(--line-soft);
}

.btn-outline:hover {
  background: rgba(168, 216, 224, 0.12);
  color: var(--paper-000);
  border-color: var(--tide-500);
}

/* --------------------------------------------------------------------------
   通用组件：面包屑 / 卡片 / 标签 / 图片容器 / 分段切换 / 显现
   -------------------------------------------------------------------------- */

.breadcrumb {
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate-500);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li { display: inline-flex; align-items: center; }

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--tide-200);
}

.breadcrumb a {
  color: var(--slate-500);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--tide-500); }

.breadcrumb [aria-current="page"] { color: var(--ink-900); }

.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--paper-000);
  border: 1px solid var(--tide-200);
  border-radius: 2px;
  box-shadow: var(--shadow-paper);
}

.stack-card {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--paper-000);
  border: 1px solid var(--tide-200);
  border-radius: 2px;
  box-shadow: 6px 6px 0 rgba(10, 30, 51, 0.08), 12px 12px 0 rgba(10, 30, 51, 0.04);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deepsea-700);
  background: var(--paper-000);
  border: 1px solid var(--tide-200);
  border-radius: 2px;
}

.tag--accent {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: var(--deepsea-900);
}

.tag--live {
  background: var(--jade-600);
  border-color: var(--jade-600);
  color: #FFFFFF;
}

.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--deepsea-700);
  border: 1px solid var(--tide-200);
  border-radius: 2px;
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s var(--ease);
}

.media-frame:hover > img,
.media-frame:hover > picture > img { transform: scale(1.04); }

.media-frame--slant {
  clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
}

.media-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(152deg, var(--deepsea-700) 0%, var(--deepsea-900) 100%);
  color: rgba(243, 237, 227, 0.55);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--paper-000);
  border: 1px solid var(--tide-200);
  border-radius: 2px;
}

.seg-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 2px;
  padding: 8px 14px;
  font-family: var(--font-label);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deepsea-700);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.seg-tab:hover { color: var(--deepsea-900); }

.seg-tab[aria-selected="true"] {
  color: var(--deepsea-900);
  background: rgba(228, 105, 30, 0.08);
  border-bottom-color: var(--orange-500);
}

.tab-panel { padding-top: clamp(20px, 3vw, 32px); }
.tab-panel[hidden] { display: none; }

.reveal {
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease);
}

.reveal.is-armed {
  opacity: 0;
  transform: translateY(18px);
}

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

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 128px);
  background: var(--deepsea-900);
  color: var(--paper-000);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--tide-500) 0 56%,
    var(--orange-500) 56% 64%,
    var(--tide-200) 64% 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 6px 0 auto 0;
  height: 200px;
  background: repeating-linear-gradient(115deg,
    rgba(30, 143, 168, 0.16) 0 1px,
    transparent 1px 44px);
  opacity: 0.55;
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3vw, 48px);
  padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px);
}

.footer-col { min-width: 0; }

.footer-brand .btn { margin-top: 20px; }

.footer-wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--paper-000);
}

.footer-domain {
  margin-top: 4px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide-500);
}

.footer-summary {
  margin-top: 14px;
  max-width: 26em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--tide-200);
}

.footer-heading {
  margin-bottom: 16px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tide-500);
}

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

.footer-list a {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-000);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-list a:hover {
  color: var(--tide-200);
  border-bottom-color: var(--tide-500);
}

.footer-contact li {
  display: grid;
  gap: 2px;
}

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

.footer-contact-label {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(168, 216, 224, 0.72);
}

.footer-contact-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-000);
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.footer-meta {
  border-top: 1px solid var(--line-soft);
  padding-block: 22px;
}

.footer-service {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(168, 216, 224, 0.82);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  border-top: 1px solid var(--line-soft);
  padding-block: 20px 40px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(168, 216, 224, 0.72);
}

.footer-copy { color: rgba(168, 216, 224, 0.72); }

.footer-legal {
  font-variant-numeric: tabular-nums;
  color: rgba(168, 216, 224, 0.72);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer-legal-links a {
  color: rgba(168, 216, 224, 0.72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-legal-links a:hover {
  color: var(--paper-000);
  border-bottom-color: var(--orange-500);
}

/* --------------------------------------------------------------------------
   响应式：平板
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .version-switch { display: none; }
  .nav-list { gap: 6px; }
  .nav-link { font-size: 13px; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   响应式：移动端命令栏折叠为滑出式索引面板
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 64px;
    padding-block: 12px;
    gap: 0 16px;
  }

  .site-header.is-compact .header-inner { min-height: 56px; }

  .brand { grid-column: 1; grid-row: 1; }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .primary-nav,
  .header-actions {
    display: none;
    grid-column: 1 / -1;
  }

  .site-header[data-open] .primary-nav {
    display: block;
    grid-row: 2;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }

  .site-header[data-open] .header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    grid-row: 3;
    padding-block: 16px 6px;
  }

  .site-header[data-open] .version-switch { display: inline-flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }

  .nav-item { width: 100%; }

  .nav-link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 13px 2px;
    font-size: 15px;
    border-bottom: 1px solid rgba(168, 216, 224, 0.14);
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: var(--orange-500);
    background: rgba(30, 143, 168, 0.1);
    padding-inline: 10px;
  }

  .nav-index { font-size: 12px; }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .footer-col:last-child { grid-column: 1 / -1; }

  .footer-legal-links { margin-left: 0; }
}

@media (max-width: 560px) {
  .header-inner { padding-block: 10px; }
  .brand-domain { display: none; }
  .brand-name { font-size: 15px; }

  .section { padding-block: clamp(48px, 10vw, 72px); }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-legal-links { margin-left: 0; }
  .seg-tab { padding: 8px 10px; font-size: 12px; }
}

/* --------------------------------------------------------------------------
   减弱动效
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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

  .media-frame:hover > img,
  .media-frame:hover > picture > img { transform: none; }
}
