/* ============================================================
   博鱼官网 · 共享样式 /assets/site.css
   海图骨架：坐标条 + 桅杆导航 + 深海蓝页脚
   ============================================================ */

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

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

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

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

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

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

a { color: inherit; }

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

/* ---------- 变量 ---------- */
:root {
  --ink:        #0A1A22;
  --navy-900:   #062A3A;
  --navy-700:   #0B3C52;
  --tide:       #2E7D9A;
  --mist:       #8FB9C4;
  --coral:      #FF6B4A;
  --coral-deep: #D94E30;
  --foam:       #F7F4EC;
  --sand:       #D9C7A0;
  --salt:       #5C6B70;

  --hair:        rgba(10, 26, 34, 0.14);
  --hair-strong: rgba(10, 26, 34, 0.34);
  --hair-light:  rgba(143, 185, 196, 0.24);

  --shell:  1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --ease:   cubic-bezier(0.2, 0.8, 0.2, 1);

  --fs-display: clamp(2.2rem, 6vw, 5.4rem);
  --fs-h2:      clamp(1.5rem, 3.2vw, 2.6rem);
  --fs-h3:      clamp(1.15rem, 1.9vw, 1.5rem);
  --fs-body:    clamp(15px, 1.05vw, 17px);

  --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-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--foam);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { max-width: 68ch; }

strong, b { font-weight: 700; }

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

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(10, 26, 34, 0.85);
}

/* ============================================================
   头部
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--foam);
  border-bottom: 1px solid var(--ink);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--scroll-pct, 0) * 100%);
  background: var(--coral);
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: -120px;
  left: 12px;
  z-index: 200;
  display: inline-block;
  padding: 10px 20px;
  background: var(--coral);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: top 0.2s var(--ease);
}

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

/* ---------- 顶部坐标条 ---------- */
.frame-bar {
  background: var(--navy-900);
  color: rgba(247, 244, 236, 0.78);
  border-bottom: 1px solid var(--hair-light);
}

.frame-bar__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.frame-bar__brand {
  color: var(--sand);
  font-weight: 600;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.frame-bar__coord {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
}

.frame-bar__coord::after {
  content: "";
  display: inline-block;
  width: 64px;
  height: 6px;
  margin-left: 12px;
  vertical-align: middle;
  opacity: 0.65;
  background: repeating-linear-gradient(90deg, var(--mist) 0 1px, transparent 1px 8px);
}

.frame-bar__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.tool-item {
  position: relative;
  padding-left: 12px;
  white-space: nowrap;
}

.tool-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%);
  background: var(--mist);
}

.tool-item--accent {
  color: var(--foam);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.tool-item--accent::before {
  background: var(--coral);
}

/* ---------- 桅杆区 ---------- */
.masthead {
  background: var(--foam);
}

.masthead__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 14px;
  height: 14px;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--ink), 4px 4px 0 0 rgba(10, 26, 34, 0.16);
  transition: transform 0.3s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(45deg);
}

.brand__name {
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand__sub {
  padding-left: 10px;
  border-left: 1px solid var(--hair-strong);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--salt);
  line-height: 1;
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}

.nav-toggle:hover {
  background: var(--ink);
  color: var(--foam);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}

.nav-toggle__label {
  line-height: 1;
}

/* ---------- 主导航 ---------- */
.primary-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 22px);
}

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 2px 8px;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.nav-link__index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  transition: color 0.22s var(--ease);
}

.nav-link:hover {
  color: var(--tide);
  border-bottom-color: var(--mist);
}

.nav-link:hover .nav-link__index {
  color: var(--tide);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--coral);
}

.nav-link[aria-current="page"] .nav-link__index {
  color: var(--coral);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  margin-top: auto;
}

.footer-main {
  background-color: var(--navy-900);
  background-image:
    repeating-linear-gradient(90deg, rgba(143, 185, 196, 0.07) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(143, 185, 196, 0.07) 0 1px, transparent 1px 96px);
  border-top: 3px solid var(--sand);
  color: rgba(247, 244, 236, 0.8);
}

.footer-main__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) var(--gutter) clamp(32px, 4vw, 52px);
  display: grid;
  grid-template-columns: minmax(200px, 1.05fr) 1.7fr 1.15fr;
  gap: clamp(28px, 4vw, 56px);
}

.footer-brand__mark {
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: 16px;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--sand);
}

.footer-brand__title {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--foam);
  line-height: 1.2;
}

.footer-brand__text {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.8;
  color: rgba(247, 244, 236, 0.66);
  max-width: 32ch;
}

.footer-brand__meta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--hair-light);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--mist);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--sand);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 0.88rem;
  color: rgba(247, 244, 236, 0.8);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-link:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.footer-contact__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.footer-contact__label {
  flex: 0 0 3.2em;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.footer-contact__value {
  color: rgba(247, 244, 236, 0.86);
  overflow-wrap: anywhere;
}

.footer-contact__value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.footer-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hair-light);
  font-size: 0.76rem;
  line-height: 1.75;
  color: rgba(247, 244, 236, 0.56);
  max-width: 40ch;
}

.footer-bottom {
  background: var(--ink);
  border-top: 1px solid var(--hair-light);
}

.footer-bottom__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(247, 244, 236, 0.58);
}

.footer-copy,
.footer-legal {
  max-width: none;
}

.footer-legal {
  color: var(--mist);
}

/* ============================================================
   通用布局与组件
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.section--tight {
  padding-block: clamp(28px, 4vw, 56px);
}

.section--dark {
  background: var(--navy-900);
  color: var(--foam);
}

.section--sand {
  background: var(--sand);
  color: var(--ink);
}

.section--grid {
  background-color: var(--navy-700);
  background-image:
    repeating-linear-gradient(90deg, rgba(143, 185, 196, 0.12) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(143, 185, 196, 0.12) 0 1px, transparent 1px 72px);
  color: var(--foam);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--hair-strong);
}

.ticks {
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--hair-strong) 0 1px, transparent 1px 12px);
}

/* ---------- 文本组件 ---------- */
.display {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--salt);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--coral);
}

.eyebrow--onDark {
  color: var(--mist);
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.72;
  color: var(--salt);
  max-width: 62ch;
}

.section--dark .lede,
.section--grid .lede {
  color: rgba(247, 244, 236, 0.72);
}

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

.note {
  border-left: 2px solid var(--sand);
  padding: 4px 0 4px 16px;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--salt);
}

.section--dark .note,
.section--grid .note {
  color: rgba(247, 244, 236, 0.64);
  border-left-color: var(--coral);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--hair-strong);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--salt);
  background: transparent;
}

.badge--accent {
  border-color: var(--coral);
  color: var(--ink);
  background: var(--coral);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--foam);
}

.btn--line {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--line:hover {
  background: var(--ink);
  color: var(--foam);
}

.btn--onDark {
  border-color: var(--sand);
  color: var(--foam);
}

.btn--onDark:hover {
  background: var(--foam);
  border-color: var(--foam);
  color: var(--ink);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--salt);
}

.breadcrumbs__link {
  color: var(--salt);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumbs__link:hover {
  color: var(--coral-deep);
  border-bottom-color: var(--coral);
}

.breadcrumbs__sep {
  color: var(--mist);
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  background: var(--foam);
  border: 1px solid var(--hair-strong);
  border-radius: 0;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 0;
  height: 3px;
  background: var(--coral);
  transition: width 0.32s var(--ease);
}

.card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.card:hover::before {
  width: calc(100% + 2px);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--salt);
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
}

.card__text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--salt);
  max-width: 40ch;
}

.card__meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--tide);
}

.card--dark {
  background: var(--navy-700);
  border-color: var(--hair-light);
  color: var(--foam);
}

.card--dark .card__text { color: rgba(247, 244, 236, 0.7); }
.card--dark .card__meta { color: var(--sand); border-top-color: var(--hair-light); }
.card--dark .card__top { color: var(--mist); }

/* ---------- 图片容器（页面阶段放置 img） ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--ink);
  background-color: var(--navy-900);
  background-image:
    repeating-linear-gradient(115deg, rgba(143, 185, 196, 0.18) 0 1px, transparent 1px 15px),
    repeating-radial-gradient(circle at 22% 18%, rgba(143, 185, 196, 0.16) 0 1px, transparent 1px 26px),
    linear-gradient(150deg, var(--navy-700) 0%, var(--navy-900) 58%, var(--ink) 100%);
}

.img-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--wide   { aspect-ratio: 21 / 9; }
.img-frame--tall   { aspect-ratio: 4 / 5; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 7px 14px;
  background: var(--foam);
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 滚动显现协议 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

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

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  .footer-main__inner {
    grid-template-columns: 1fr 1.4fr;
  }
  .footer-contact {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid var(--hair-light);
  }
}

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

  .primary-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--hair-strong);
  }

  .primary-nav[data-open] { display: block; }

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

  .nav-item + .nav-item { border-top: 1px solid var(--hair); }

  .nav-link {
    width: 100%;
    padding: 13px 4px 13px 12px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
  }

  .nav-link:hover { border-left-color: var(--mist); }

  .nav-link[aria-current="page"] {
    border-left-color: var(--coral);
    border-bottom-color: transparent;
    background: rgba(255, 107, 74, 0.08);
  }

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

  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .frame-bar__coord { display: none; }
  .frame-bar__brand { letter-spacing: 0.14em; font-size: 0.66rem; }
  .frame-bar__tools { gap: 14px; font-size: 0.66rem; }
  .tool-item { padding-left: 9px; }
  .tool-item:not(.tool-item--accent) { display: none; }
}

@media (max-width: 640px) {
  .masthead__inner { gap: 10px 16px; padding-block: 12px; }
  .brand__sub { display: none; }

  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
  .cols-2,
  .cols-3 { grid-template-columns: 1fr; }

  .footer-bottom__inner { justify-content: flex-start; }

  .btn { width: 100%; }
}

/* ============================================================
   减弱动效
   ============================================================ */
@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;
  }

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

  .brand:hover .brand__mark,
  .btn:hover,
  .card:hover { transform: none; }
}
