/* =========================================================
   博盈登录 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 基础组件
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, dt { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ---------- 1. Design tokens ---------- */
:root {
  --ink-abyss: #05192B;
  --deep-sea: #0B3355;
  --ocean-mid: #1A5C86;
  --cyan: #2EE6D6;
  --cyan-mist: #B9F2ED;
  --coral: #FF6A45;
  --coral-tint: #FFE1D8;
  --sage: #CBDDD3;
  --paper: #F5F8F9;
  --slate: #14232E;
  --grid: #C3D3DC;

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

  --shell-max: 1320px;
  --gutter: 20px;
  --baseline: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 2. 排版 ---------- */
h1, h2, h3, h4,
.display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: inherit;
}

h1, .display { font-size: clamp(2.6rem, 7vw, 6rem); line-height: 0.98; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.12; }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.28; letter-spacing: 0.02em; }
h4 { font-size: 1.05rem; line-height: 1.4; letter-spacing: 0.04em; }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.75;
  color: var(--slate);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow--ink { color: var(--deep-sea); }
.eyebrow--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.26em;
}

/* ---------- 3. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}
.section--paper { background: var(--paper); color: var(--slate); }
.section--sage  { background: var(--sage);  color: var(--slate); }
.section--deep  { background: var(--deep-sea); color: #E8F2F6; }
.section--ink   { background: var(--ink-abyss); color: #DCEAF1; }
.section--deep h2, .section--ink h2,
.section--deep h3, .section--ink h3,
.section--deep h4, .section--ink h4 { color: #FFFFFF; }
.section--deep .lede, .section--ink .lede { color: #C9DEE9; }

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: calc(var(--baseline) * 3);
}
.grid-12 > * { min-width: 0; }

.bp-grid {
  background-image:
    linear-gradient(to right, rgba(195, 211, 220, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(195, 211, 220, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
}

.rule {
  height: 1px;
  width: 100%;
  border: 0;
  background: var(--grid);
}
.rule--cyan {
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(46, 230, 214, 0) 100%);
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--coral { background: var(--coral); color: var(--ink-abyss); border-color: var(--coral); }
.btn--coral:hover { background: #FF8A6C; border-color: #FF8A6C; }

.btn--cyan { background: var(--cyan); color: var(--ink-abyss); border-color: var(--cyan); }
.btn--cyan:hover { background: var(--cyan-mist); border-color: var(--cyan-mist); }

.btn--ink { background: var(--deep-sea); color: #FFFFFF; border-color: var(--deep-sea); }
.btn--ink:hover { background: var(--ocean-mid); border-color: var(--ocean-mid); }

.btn--ghost { background: transparent; color: var(--cyan); border-color: rgba(46, 230, 214, 0.6); }
.btn--ghost:hover { background: rgba(46, 230, 214, 0.14); color: #FFFFFF; border-color: var(--cyan); }

.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- 5. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(20, 35, 46, 0.12);
  background: var(--coral-tint);
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.tag--cyan { background: rgba(46, 230, 214, 0.16); border-color: rgba(46, 230, 214, 0.55); color: var(--deep-sea); }
.tag--dark { background: rgba(46, 230, 214, 0.12); border-color: rgba(46, 230, 214, 0.38); color: var(--cyan); }

/* ---------- 6. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--grid);
  background: var(--deep-sea);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame::before,
.media-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 2;
  pointer-events: none;
}
.media-frame::before {
  top: 8px; left: 8px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}
.media-frame::after {
  bottom: 8px; right: 8px;
  border-bottom: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
}
.media-frame--3x4  { aspect-ratio: 3 / 4; }
.media-frame--1x1  { aspect-ratio: 1 / 1; }
.media-frame--4x3  { aspect-ratio: 4 / 3; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--21x9 { aspect-ratio: 21 / 9; }

.media-frame__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #DCEAF1;
  background: linear-gradient(180deg, rgba(5, 25, 43, 0) 0%, rgba(5, 25, 43, 0.88) 100%);
}

/* ---------- 7. 面包屑与正文 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #587286;
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--grid); }
.breadcrumb a {
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.breadcrumb a:hover { color: var(--deep-sea); border-bottom-color: var(--coral); }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.05em; }
.prose a {
  color: var(--deep-sea);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose--light a { color: var(--cyan-mist); text-decoration-color: rgba(46, 230, 214, 0.8); }
.prose ul, .prose ol { padding-left: 1.2em; list-style: revert; }
.prose li + li { margin-top: 0.4em; }

/* ---------- 8. 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--deep-sea);
  outline-offset: 3px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.section--ink :focus-visible,
.section--deep :focus-visible {
  outline-color: var(--cyan);
}

/* ---------- 9. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 25, 43, 0.84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(195, 211, 220, 0.18);
  color: #E6F1F5;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: calc(var(--scroll-progress, 0) * 100%);
  background: linear-gradient(90deg, var(--cyan) 0%, var(--coral) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.site-header.is-scrolled {
  background: var(--deep-sea);
  border-bottom-color: rgba(46, 230, 214, 0.5);
}
.site-header.is-scrolled::after { opacity: 1; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--coral);
  color: var(--ink-abyss);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 8px; }

/* 首次到访横条 */
.guide-bar {
  background: rgba(5, 25, 43, 0.5);
  border-bottom: 1px solid rgba(195, 211, 220, 0.14);
  font-size: 13px;
  color: #A8C2D2;
}
.site-header.is-scrolled .guide-bar { background: transparent; }

.guide-bar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding-block: 6px;
}

.guide-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.guide-bar__dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--coral);
}

.guide-bar__body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.guide-bar[data-collapsed="true"] .guide-bar__body { display: none; }

.guide-bar__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
}
.guide-bar__steps a {
  display: inline-flex;
  align-items: center;
  color: #CFE2EC;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.guide-bar__steps a:hover { color: #FFFFFF; border-bottom-color: var(--coral); }

.guide-bar__num {
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.guide-bar__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid rgba(46, 230, 214, 0.4);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.guide-bar__toggle:hover { background: rgba(46, 230, 214, 0.14); color: #FFFFFF; }

/* 导航行 */
.nav-row__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand__mark {
  position: relative;
  display: block;
  width: 12px;
  height: 26px;
  flex: none;
  background: var(--cyan);
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 0;
  width: 5px;
  height: 11px;
  background: var(--coral);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #FFFFFF;
}
.brand__version {
  padding: 2px 6px;
  border: 1px solid rgba(185, 242, 237, 0.35);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--cyan-mist);
}

.primary-nav { margin-inline: auto; }
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-nav__list a {
  position: relative;
  display: block;
  padding: 10px 11px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: nowrap;
  color: #CFE0EA;
  transition: color 0.16s var(--ease);
}
.primary-nav__list a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}
.primary-nav__list a:hover { color: #FFFFFF; }
.primary-nav__list a:hover::after { transform: scaleX(1); }
.primary-nav__list a[aria-current="page"] { color: #FFFFFF; font-weight: 700; }
.primary-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.nav-cta {
  min-height: 44px;
  padding: 0 16px;
  font-size: 13.5px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(46, 230, 214, 0.45);
  transition: background-color 0.16s var(--ease);
}
.nav-toggle:hover { background: rgba(46, 230, 214, 0.14); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  transition: background-color 0.16s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.2s var(--ease), top 0.2s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle[data-open="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[data-open="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[data-open="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-abyss);
  border-top: 1px solid rgba(46, 230, 214, 0.3);
  color: #B9CEDB;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(195, 211, 220, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(195, 211, 220, 0.09) 1px, transparent 1px);
  background-size: 40px 40px;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(44px, 6vw, 80px) clamp(32px, 4vw, 48px);
}
.footer-col { min-width: 0; }
.footer-col--brand { display: flex; flex-direction: column; gap: 14px; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #FFFFFF;
}
.footer-brand__mark {
  position: relative;
  display: block;
  width: 12px;
  height: 24px;
  flex: none;
  background: var(--cyan);
}
.footer-brand__mark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 0;
  width: 5px;
  height: 10px;
  background: var(--coral);
}

.footer-tagline {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: #A9C4D4;
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #7E9AAB;
}
.footer-meta .mono { color: var(--cyan); }

.footer-heading {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-list { display: grid; gap: 10px; }
.footer-list a {
  font-size: 14.5px;
  color: #CFE0EA;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-list a:hover { color: #FFFFFF; border-bottom-color: var(--coral); }

.footer-contact { display: grid; gap: 2px; }
.footer-contact dt {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6E8B9D;
}
.footer-contact dt:first-of-type { margin-top: 0; }
.footer-contact dd {
  font-size: 14.5px;
  line-height: 1.65;
  color: #D9E8EF;
  overflow-wrap: anywhere;
}

.footer-base {
  position: relative;
  border-top: 1px solid rgba(195, 211, 220, 0.16);
}
.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
}
.footer-base__copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #7E9AAB;
}
.footer-base__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-base__links a {
  font-size: 12.5px;
  color: #A9C4D4;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-base__links a:hover { color: #FFFFFF; border-bottom-color: var(--coral); }

/* ---------- 11. 分段面板基础动效 ---------- */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
[role="tabpanel"] { animation: panel-in 0.16s var(--ease) both; }

/* ---------- 12. 响应式 ---------- */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    margin: 0;
    padding: 8px 0 14px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--deep-sea);
    border-top: 1px solid rgba(46, 230, 214, 0.35);
    border-bottom: 1px solid rgba(46, 230, 214, 0.35);
  }
  .site-header[data-nav-open="true"] .primary-nav { display: block; }

  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__list a {
    padding: 14px var(--gutter);
    font-size: 16px;
    border-bottom: 1px solid rgba(195, 211, 220, 0.12);
  }
  .primary-nav__list a::after {
    left: var(--gutter);
    right: auto;
    bottom: 8px;
    width: 22px;
  }

  .nav-row__inner { min-height: 64px; gap: 14px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .guide-bar__inner { flex-wrap: wrap; gap: 10px 14px; }
  .guide-bar__steps { gap: 4px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__version { display: none; }
  .brand__name { font-size: 20px; }
  .nav-cta { padding: 0 12px; font-size: 12.5px; }
  .eyebrow--vertical { writing-mode: horizontal-tb; letter-spacing: 0.2em; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base__inner { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .nav-cta { font-size: 12px; padding: 0 10px; }
  .guide-bar__toggle { min-width: 40px; padding: 0 8px; }
}

/* ---------- 13. 降低动效 ---------- */
@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;
  }
  [role="tabpanel"] { animation: none; }
  .primary-nav__list a::after { transition: none; }
  .site-header::after { transition: none; }
}
