/* ============================================================
   金宝博主页 · 共享站点样式 /assets/site.css
   航海图鉴 × 数字档案室
   ============================================================ */

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

:root {
  --deep: #071a26;
  --abyss: #0b2434;
  --ink: #123448;
  --ink-soft: #17405a;
  --salt: #f3ece0;
  --coral: #ff6a45;
  --brass: #d9a84e;
  --reef: #2c8a84;
  --reef-light: #57bdb5;
  --line: rgba(243, 236, 224, 0.12);
  --line-brass: rgba(217, 168, 78, 0.30);
  --radius-lg: 22px;
  --radius-md: 16px;
  --shell: 1240px;
  --pad-x: clamp(18px, 4vw, 40px);
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html {
  background: var(--deep);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--salt);
  background:
    radial-gradient(90% 55% at 82% -8%, rgba(44, 138, 132, 0.20), transparent 62%),
    radial-gradient(70% 45% at 0% 0%, rgba(255, 106, 69, 0.09), transparent 58%),
    var(--deep);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--salt);
}
h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.5rem); line-height: 1.32; }
h4 { font-size: 1.05rem; line-height: 1.4; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
a { color: var(--brass); text-underline-offset: 3px; }
strong, b { font-weight: 700; color: #ffffff; }
small { font-size: 0.82em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.88em; color: var(--reef-light); }
hr { border: 0; height: 1px; background: var(--line); margin: clamp(24px, 4vw, 44px) 0; }
::selection { background: var(--coral); color: #101418; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 布局工具 ---------- */
.tk-container {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.tk-section {
  padding-block: clamp(36px, 6vw, 76px);
}
.tk-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.tk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-grid--sidebar { grid-template-columns: minmax(0, 1fr) minmax(210px, 300px); }

.tk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.tk-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

/* ---------- 基础组件 ---------- */
.tk-card {
  position: relative;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(18, 52, 72, 0.88), rgba(9, 29, 41, 0.92));
  border: 1px solid var(--line);
  box-shadow: 0 30px 54px -44px #000000;
  overflow: hidden;
}
.tk-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 168, 78, 0.6), transparent);
  pointer-events: none;
}
.tk-card--glass {
  background: rgba(243, 236, 224, 0.05);
  border-color: var(--line-brass);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
}

.tk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--reef-light);
  border: 1px solid rgba(87, 189, 181, 0.35);
  background: rgba(44, 138, 132, 0.12);
}

.tk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}
.tk-btn--ghost {
  color: var(--salt);
  background: rgba(243, 236, 224, 0.06);
  border-color: rgba(217, 168, 78, 0.45);
}
.tk-btn--ghost:hover {
  background: rgba(217, 168, 78, 0.16);
  border-color: rgba(217, 168, 78, 0.85);
  transform: translateY(-1px);
}
.tk-btn--coral {
  color: #12100c;
  background: var(--coral);
  box-shadow: 0 16px 30px -20px rgba(255, 106, 69, 1);
}
.tk-btn--coral:hover { transform: translateY(-2px); }
.tk-btn--brass {
  color: #0a151d;
  background: var(--brass);
  box-shadow: 0 16px 30px -22px rgba(217, 168, 78, 1);
}
.tk-btn--brass:hover { transform: translateY(-2px); }
.tk-btn--sm { padding: 9px 18px; font-size: 13px; }

.tk-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(18px, 3vw, 30px);
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(243, 236, 224, 0.5);
}
.tk-crumbs li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.tk-crumbs li + li::before {
  content: "/";
  color: rgba(217, 168, 78, 0.55);
}
.tk-crumbs a {
  color: rgba(243, 236, 224, 0.72);
  text-decoration: none;
  border-bottom: 1px dashed rgba(217, 168, 78, 0.42);
}
.tk-crumbs a:hover { color: var(--brass); }
.tk-crumbs [aria-current="page"] { color: var(--brass); }

/* ---------- 图片容器基础（页面阶段放入 img / svg 占位） ---------- */
.tk-figure {
  position: relative;
  margin: 0 0 1.15em;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-brass);
  background:
    radial-gradient(circle at 28% 18%, rgba(44, 138, 132, 0.24), transparent 58%),
    linear-gradient(160deg, var(--ink) 0%, #0a2130 100%);
}
.tk-figure__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.tk-figure__media--wide { aspect-ratio: 21 / 9; }
.tk-figure__media--square { aspect-ratio: 1 / 1; }
.tk-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(243, 236, 224, 0.07) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.55;
}
.tk-figure__caption {
  margin: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(243, 236, 224, 0.55);
  border-top: 1px solid var(--line);
  background: rgba(7, 26, 38, 0.6);
}

/* ---------- 跳至主要内容 ---------- */
.tk-skip {
  position: absolute;
  left: 16px;
  top: -90px;
  z-index: 210;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--brass);
  color: #0a151d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.22s ease;
}
.tk-skip:focus { top: 14px; }

/* ---------- 头部：悬浮胶囊浮岛 ---------- */
.tk-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px var(--pad-x) 0;
}
.tk-header__inner {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  padding: 10px clamp(12px, 1.8vw, 22px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(14, 44, 62, 0.94), rgba(7, 24, 34, 0.90));
  border: 1px solid var(--line-brass);
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(243, 236, 224, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.tk-header__inner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: min(56%, 420px);
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-brass) 0 1px, transparent 1px 13px);
  pointer-events: none;
}

.tk-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--salt);
}
.tk-brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-brass);
  background: radial-gradient(circle at 50% 50%, rgba(217, 168, 78, 0.24), transparent 70%);
}
.tk-brand__mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px dashed rgba(243, 236, 224, 0.35);
}
.tk-brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 106, 69, 0.20);
}
.tk-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.tk-brand__name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--salt);
}
.tk-brand__meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(217, 168, 78, 0.78);
}

/* ---------- 导航 ---------- */
.tk-nav { margin-inline: auto; }
.tk-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tk-nav__list li { margin: 0; }
.tk-nav__link {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 999px;
  color: rgba(243, 236, 224, 0.72);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.tk-nav__link:hover {
  color: var(--salt);
  background: rgba(243, 236, 224, 0.07);
}
.tk-nav__link[aria-current="page"] {
  color: #0a151d;
  background: var(--brass);
  font-weight: 700;
  box-shadow: 0 10px 22px -14px rgba(217, 168, 78, 0.95);
}

.tk-header__cta {
  flex: 0 0 auto;
  padding: 9px 18px;
  font-size: 13.5px;
}

/* ---------- 移动导航按钮 ---------- */
.tk-navtoggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(217, 168, 78, 0.45);
  background: rgba(243, 236, 224, 0.06);
  color: var(--salt);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.tk-navtoggle:hover {
  background: rgba(217, 168, 78, 0.16);
  border-color: rgba(217, 168, 78, 0.85);
}
.tk-navtoggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  flex: 0 0 auto;
}
.tk-navtoggle__bars::before,
.tk-navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--brass);
  transition: top 0.22s ease, transform 0.22s ease;
}
.tk-navtoggle__bars::before { top: 1px; }
.tk-navtoggle__bars::after { top: 9px; }
.tk-navtoggle[aria-expanded="true"] .tk-navtoggle__bars::before {
  top: 5px;
  transform: rotate(45deg);
}
.tk-navtoggle[aria-expanded="true"] .tk-navtoggle__bars::after {
  top: 5px;
  transform: rotate(-45deg);
}
.tk-navtoggle__text { display: inline-block; }

/* ---------- 页脚：海图卷轴 ---------- */
.tk-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  overflow: hidden;
  color: rgba(243, 236, 224, 0.78);
  border-top: 1px solid rgba(217, 168, 78, 0.28);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(44, 138, 132, 0.20), transparent 62%),
    linear-gradient(180deg, var(--abyss) 0%, #071822 100%);
}
.tk-footer__contour {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-radial-gradient(circle at 88% 6%, rgba(217, 168, 78, 0.12) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(115deg, rgba(243, 236, 224, 0.05) 0 1px, transparent 1px 34px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 72%);
}
.tk-footer__grid {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 80px) var(--pad-x) clamp(26px, 3vw, 36px);
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 0.95fr 1.5fr;
  gap: clamp(24px, 3.2vw, 48px);
}
.tk-brand--footer .tk-brand__name { font-size: 22px; }
.tk-footer__brand { min-width: 0; }
.tk-footer__motto {
  margin: 18px 0 0;
  max-width: 32ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(243, 236, 224, 0.62);
}
.tk-footer__coords {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(217, 168, 78, 0.72);
}
.tk-footer__col { min-width: 0; }
.tk-footer__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(217, 168, 78, 0.85);
}
.tk-footer__title::after {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  margin-top: 10px;
  background: rgba(217, 168, 78, 0.45);
}
.tk-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.tk-footer__list li { margin: 0; }
.tk-footer__link {
  position: relative;
  display: inline-block;
  padding: 2px 0;
  font-size: 14px;
  color: rgba(243, 236, 224, 0.72);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}
.tk-footer__link::before {
  content: "";
  position: absolute;
  left: -14px;
  top: calc(50% - 0.5px);
  width: 6px;
  height: 1px;
  background: var(--coral);
  opacity: 0;
  transition: opacity 0.18s ease, left 0.18s ease;
}
.tk-footer__link:hover {
  color: var(--salt);
  transform: translateX(2px);
}
.tk-footer__link:hover::before { opacity: 1; left: -10px; }

.tk-footer__list--plain { gap: 12px; }
.tk-footer__contact {
  display: grid;
  gap: 3px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(243, 236, 224, 0.74);
  word-break: break-word;
}
.tk-footer__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--reef-light);
}
.tk-footer__note {
  margin: 16px 0 0;
  padding-left: 10px;
  border-left: 2px solid rgba(44, 138, 132, 0.6);
  font-size: 12px;
  line-height: 1.8;
  color: rgba(243, 236, 224, 0.45);
}
.tk-footer__bottom {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--pad-x) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  border-top: 1px solid rgba(243, 236, 224, 0.10);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 236, 224, 0.48);
}
.tk-footer__legal,
.tk-footer__icp { margin: 0; }
.tk-footer__icp { color: rgba(217, 168, 78, 0.72); }

/* ---------- 滚动进度 ---------- */
.tk-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 190;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--reef-light), var(--brass) 55%, var(--coral));
  pointer-events: none;
  will-change: transform;
}

/* ---------- 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 0.8, 0.3, 1),
    transform 0.65s cubic-bezier(0.22, 0.8, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .tk-nav__link { padding: 8px 11px; font-size: 14px; }
}

@media (max-width: 980px) {
  .tk-navtoggle { display: inline-flex; margin-left: auto; }
  .tk-header__cta { display: none; }
  .tk-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    display: none;
    margin: 0;
    padding: 10px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(11, 36, 52, 0.985), rgba(7, 22, 32, 0.985));
    border: 1px solid rgba(217, 168, 78, 0.3);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
    max-height: min(70vh, 460px);
    overflow: auto;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .tk-nav[data-open] {
    display: block;
    animation: tk-nav-in 0.22s ease both;
  }
  .tk-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .tk-nav__link {
    display: block;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 16px;
  }
  .tk-nav__link[aria-current="page"] { box-shadow: none; }
  .tk-footer__grid { grid-template-columns: 1fr 1fr; }
}

@keyframes tk-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .tk-grid--2,
  .tk-grid--3,
  .tk-grid--sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .tk-footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .tk-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tk-brand__meta { display: none; }
  .tk-brand__name { font-size: 17px; }
  .tk-header__inner { padding: 9px 14px; }
}

@media (max-width: 400px) {
  .tk-navtoggle__text { display: none; }
  .tk-navtoggle { padding: 10px 13px; }
}

/* ---------- 动效降级 ---------- */
@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 !important;
    transform: none !important;
  }
  .tk-nav[data-open] { animation: none !important; }
}
