/* ==========================================================================
   恒宝平台 · 共享样式 /assets/site.css
   高原会客厅：坐标点、路径线、等高线的编辑部版式
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, figure, blockquote, dl, dd, h1, h2, h3, h4, h5, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; }

/* ---------- 2. Tokens ---------- */
:root {
  --blue-lake: #0E5C7A;
  --blue-deep: #0A3E55;
  --qing: #1F6F63;
  --gold: #C8912E;
  --red: #A0382F;
  --sand: #EDE4D6;
  --lake-white: #F5F8F8;
  --paper: #FAF6EF;
  --ink: #1B1F24;
  --muted: #5A6B72;
  --contour: #B9C9CF;

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

  --s1: 12px; --s2: 14px; --s3: 16px; --s4: 20px; --s5: 25px;
  --s6: 31px; --s7: 40px; --s8: 50px; --s9: 62px; --s10: 78px;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 22px 46px -34px rgba(10, 62, 85, 0.62);
  --rule: rgba(27, 31, 36, 0.09);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--lake-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(31, 111, 99, 0.22); }

.display {
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.headline {
  font-size: clamp(24px, 3.1vw, 40px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
}
.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.85;
  color: var(--muted);
  max-width: 38ch;
  margin: 0;
}
.eyebrow {
  font-size: var(--s1);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--qing);
  margin: 0;
}
.annotation {
  font-size: 13.5px;
  line-height: 1.78;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
}
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- 4. Focus ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- 5. Layout ---------- */
.wrap { width: calc(100% - 40px); max-width: 1160px; margin-inline: auto; }
.wrap--wide { width: calc(100% - 40px); max-width: 1360px; margin-inline: auto; }
.wrap--narrow { width: calc(100% - 40px); max-width: 720px; margin-inline: auto; }

.section { padding: 76px 0; position: relative; }
.section__head { margin-bottom: 34px; max-width: 60ch; }
.section--sand { background: var(--sand); }
.section--paper { background: var(--paper); }
.section--deep { background: var(--blue-deep); color: #EAF1F3; }
.section--deep .lede,
.section--deep .annotation { color: rgba(234, 241, 243, 0.72); }
.section--deep .eyebrow { color: var(--gold); }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--asym { grid-template-columns: minmax(160px, 0.72fr) minmax(0, 2.28fr); }

/* ---------- 6. Materials & motifs ---------- */
.glass {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.58);
}
.contour {
  background-color: var(--paper);
  background-image:
    repeating-radial-gradient(circle at 20% 26%, transparent 0 36px, rgba(185, 201, 207, 0.5) 36px 37px),
    repeating-radial-gradient(circle at 86% 74%, transparent 0 44px, rgba(185, 201, 207, 0.38) 44px 45px),
    repeating-radial-gradient(circle at 62% 8%, transparent 0 30px, rgba(31, 111, 99, 0.14) 30px 31px);
}
.coordinate {
  width: 14px; height: 14px; flex: none;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(160, 56, 47, 0.16), 0 0 0 14px rgba(160, 56, 47, 0.07);
}
.coordinate--sm { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(160, 56, 47, 0.16); }
.pathline {
  height: 1px; width: 100%;
  background-image: linear-gradient(90deg, var(--contour) 0 10px, transparent 10px 20px);
  background-size: 20px 1px;
  background-repeat: repeat-x;
}
.pathline--v {
  width: 1px; height: 100%;
  background-image: linear-gradient(180deg, var(--contour) 0 10px, transparent 10px 20px);
  background-size: 1px 20px;
  background-repeat: repeat-y;
}
.status-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(200, 145, 46, 0.55);
  background: rgba(200, 145, 46, 0.16);
  color: var(--gold);
  font-size: var(--s1);
  line-height: 1.6;
}

/* ---------- 7. Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card--glass {
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.7);
}
.card__meta {
  font-family: var(--font-mono);
  font-size: var(--s1);
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}
.card__title { font-size: 20px; font-weight: 700; line-height: 1.42; margin: 0 0 8px; }
.card__text { font-size: 15px; line-height: 1.8; color: var(--muted); margin: 0; }
.card__path {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--qing);
}
.card__path::before {
  content: ""; width: 20px; height: 1px; background: var(--qing); flex: none;
}
.section--deep .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.section--deep .card__text, .section--deep .card__meta { color: rgba(234, 241, 243, 0.68); }

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue-lake); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #b57f22; }
.btn--ghost { background: transparent; color: var(--blue-lake); border-color: var(--blue-lake); }
.btn--ghost:hover { background: rgba(14, 92, 122, 0.08); }
.btn--quiet { background: var(--sand); color: var(--ink); }
.btn--quiet:hover { background: #e2d6c3; }
.section--deep .btn--ghost { color: #EAF1F3; border-color: rgba(234, 241, 243, 0.5); }
.section--deep .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- 9. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -120px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 10. Header ---------- */
.site-header { position: relative; z-index: 60; }

.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--qing), var(--gold) 62%, var(--red));
  z-index: 120;
  pointer-events: none;
}

.masthead { background: var(--blue-deep); color: #fff; }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px;
  min-height: 48px;
  padding-block: 9px;
}
.masthead__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: #fff;
}
.masthead__mark {
  width: 12px; height: 12px; flex: none;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 145, 46, 0.22);
}
.masthead__name { font-size: var(--s3); font-weight: 900; letter-spacing: 0.05em; }
.masthead__tag {
  font-size: var(--s1);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.masthead__status {
  font-size: var(--s1);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
}

.navband {
  position: sticky; top: 0; z-index: 70;
  background: rgba(250, 246, 239, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--contour);
}
.navband__inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 62px;
}
.site-nav { flex: 1 1 auto; }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 4px 6px; }

.nav-link {
  position: relative;
  display: block;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 6px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s var(--ease);
}
.nav-link:hover { color: var(--blue-lake); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--blue-lake); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.navband__coord {
  flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  margin-left: auto;
  font-size: var(--s1);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.navband__coord::before {
  content: "";
  width: 28px; height: 1px;
  background-image: linear-gradient(90deg, var(--contour) 0 6px, transparent 6px 12px);
  background-size: 12px 1px;
}

.nav-toggle {
  display: none;
  align-items: center; gap: 9px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--contour);
  border-radius: 999px;
  font-size: var(--s2);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle__bars {
  position: relative;
  width: 16px; height: 2px; flex: none;
  background: var(--red);
  transition: background-color 0.2s ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute; left: 0;
  width: 16px; height: 2px;
  background: var(--red);
  transition: transform 0.22s var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 11. Mobile dock ---------- */
.hb-dock {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 95;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  transition: transform 0.32s var(--ease), opacity 0.32s ease;
}
.hb-dock[data-hidden] { transform: translateY(130%); opacity: 0; pointer-events: none; }
.hb-dock__link {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 56px;
  padding: 9px 20px;
  border-radius: 16px;
  background: rgba(10, 62, 85, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(200, 145, 46, 0.55);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 36px -22px rgba(10, 62, 85, 0.9);
}
.hb-dock__title { font-size: var(--s3); font-weight: 700; line-height: 1.4; }
.hb-dock__sub { font-size: var(--s1); color: rgba(255, 255, 255, 0.72); line-height: 1.5; }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--blue-deep);
  color: #E8EFF1;
  margin-top: 0;
}
.footer-ribbon { border-bottom: 1px solid rgba(255, 255, 255, 0.13); padding: 28px 0; }
.footer-ribbon__inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 26px; }
.footer-ribbon__label {
  font-size: var(--s1);
  letter-spacing: 0.18em;
  color: var(--gold);
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  flex: 1 1 320px;
}
.footer-link {
  font-size: var(--s2);
  color: #D5E2E7;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-link:hover { color: #fff; border-bottom-color: var(--gold); }

.footer-body { padding: 46px 0 34px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 28px;
}
.footer-col { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 16px; }
.footer-col--status { position: relative; }
.footer-col__label {
  font-size: var(--s1);
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 12px;
}
.footer-value {
  font-size: 15px;
  color: #fff;
  margin-bottom: 8px;
  word-break: break-word;
}
.footer-coord { font-size: 15px; color: #fff; margin-bottom: 8px; }
.footer-status {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: #fff;
  margin-bottom: 8px;
}
.footer-note {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(232, 239, 241, 0.62);
}

.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.13); padding: 18px 0 22px; }
.footer-base__inner {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: rgba(232, 239, 241, 0.62);
}
.footer-sign { color: rgba(232, 239, 241, 0.86); }
.footer-icp { letter-spacing: 0.04em; }

/* ---------- 13. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a {
  color: inherit;
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
}
.breadcrumbs a:hover { color: var(--blue-lake); border-bottom-color: var(--blue-lake); }
.crumb-sep { color: var(--contour); font-family: var(--font-mono); }

/* ---------- 14. Rail ---------- */
.rail {
  border-left: 2px solid var(--gold);
  padding-left: 14px;
  font-size: 13.5px;
  line-height: 1.78;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.rail__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--s1);
  letter-spacing: 0.14em;
  color: var(--qing);
  margin-bottom: 8px;
}

/* ---------- 15. Media frames ---------- */
.media-figure { margin: 0; }
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, var(--sand), #DCE6E7);
}
.media-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #fff;
  background: linear-gradient(to top, rgba(10, 62, 85, 0.82), rgba(10, 62, 85, 0));
}
.media-figure figcaption {
  margin-top: 10px;
  font-size: var(--s1);
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- 16. Tabs ---------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--contour);
  margin-bottom: 4px;
}
.tab {
  appearance: none;
  position: relative;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-radius: 10px 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.tab:hover { color: var(--blue-lake); }
.tab[aria-selected="true"] {
  color: var(--blue-lake);
  background: rgba(14, 92, 122, 0.08);
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--red);
}
.tabpanel { padding: 26px 0 0; }
.tabpanel[hidden] { display: none; }

/* ---------- 17. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.52s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1080px) {
  .grid--asym { grid-template-columns: minmax(150px, 0.8fr) minmax(0, 2fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--asym { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 60px 0; }
}

@media (max-width: 860px) {
  .hb-dock { display: block; }
  body { padding-bottom: 92px; }

  .masthead__tag { display: none; }
  .navband__coord { display: none; }
  .nav-toggle { display: inline-flex; }

  .navband__inner { min-height: 58px; gap: 12px; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex: 1 1 auto;
    max-height: 0;
    overflow: hidden;
    background: var(--lake-white);
    border-bottom: 1px solid var(--contour);
    box-shadow: 0 26px 44px -34px rgba(10, 62, 85, 0.75);
    transition: max-height 0.32s var(--ease);
  }
  .site-nav[data-open] { max-height: 72vh; overflow-y: auto; }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 18px;
  }
  .nav-link {
    padding: 15px 0;
    font-size: var(--s3);
    border-bottom: 1px solid rgba(27, 31, 36, 0.07);
  }
  .nav-link::after { left: 0; right: auto; width: 28px; bottom: 10px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; line-height: 1.8; }
  .wrap, .wrap--wide, .wrap--narrow { width: calc(100% - 28px); }
  .section { padding: 48px 0; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 16px; }
  .lead { max-width: none; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-links { gap: 8px 18px; }
  .footer-base__inner { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px; }
  .tab { padding: 11px 12px; font-size: 14px; }
}

/* ---------- 19. Reduced motion ---------- */
@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;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
  .hb-dock { transition: none; }
  .scroll-progress { transition: none; }
}
