/* ============================================================
   华体会主站 · 共享外壳  /assets/site.css
   深靛蓝底 + 看台轨道 + 湖青焦点 + 油菜花黄书签
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

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

img, svg, video { max-width: 100%; }

button { font: inherit; color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-900: #04101F;
  --ink-800: #07142B;
  --ink-700: #0D2342;
  --lake: #38D6C9;
  --lake-soft: #9DF3EA;
  --rape: #F4C84A;
  --red: #E24C4C;
  --paper: #E8F0FA;
  --stone: #8EA4C1;

  --line: rgba(157, 243, 234, 0.16);
  --line-soft: rgba(157, 243, 234, 0.09);

  --rail-w: 104px;
  --bar-h: 60px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 2px;

  --font-display: "Barlow Condensed", "HarmonyOS Sans SC", "Noto Sans SC",
    "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-num: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Menlo,
    Consolas, "Courier New", monospace;
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  padding-top: var(--bar-h);
  background:
    radial-gradient(1100px 620px at 84% -10%, rgba(56, 214, 201, 0.09), transparent 62%),
    radial-gradient(900px 540px at 6% 106%, rgba(244, 200, 74, 0.06), transparent 60%),
    var(--ink-800);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.005em;
}

p { margin: 0; }

a { color: var(--lake); }

strong, b { font-weight: 800; }

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

#main-content {
  display: block;
  scroll-margin-top: calc(var(--bar-h) + 16px);
}

#main-content:focus { outline: none; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--lake);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ---------- 4. 排版工具类 ---------- */
.t-display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.t-section {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.1;
  font-weight: 800;
}

.t-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--lake);
}

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

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 10px 18px;
  background: var(--rape);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 0 0 var(--r) 0;
  transform: translateY(-130%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible,
.skip-link:focus { transform: translateY(0); }

/* ---------- 6. Header / 看台轨道 ---------- */
.site-header {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  background: linear-gradient(180deg, #0D2342 0%, #07142B 100%);
  border-bottom: 1px solid var(--line);
}

.rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 clamp(14px, 4vw, 22px);
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--paper);
  text-decoration: none;
}

.rail__mark {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-900);
  background: var(--lake);
  padding: 3px 6px 2px;
  border-radius: 1px;
  line-height: 1.2;
}

.rail__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}

.rail__sep {
  display: inline-block;
  margin: 0 0.15em;
  color: var(--lake);
}

.rail__jump {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--rape);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--r);
  white-space: nowrap;
  transition: filter 0.18s var(--ease);
}

.rail__jump:hover { filter: brightness(1.08); }

.rail__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(13, 35, 66, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.rail__toggle:hover { border-color: var(--lake); }

.rail__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.rail__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease);
}

.rail__bars span:first-child { top: 0; }
.rail__bars span:last-child { bottom: 0; }

.rail__toggle[aria-expanded="true"] .rail__bars span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.rail__toggle[aria-expanded="true"] .rail__bars span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

/* 移动端抽屉 */
.rail__nav {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(84vw, 320px);
  padding: calc(var(--bar-h) + 16px) 20px 28px;
  background: linear-gradient(180deg, #0D2342 0%, #04101F 100%);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 48px rgba(2, 8, 18, 0.6);
  transform: translateX(-102%);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
}

.rail__nav[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 16px;
  color: var(--stone);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.rail__tick {
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--lake);
  transform: translateY(-50%);
  transition: height 0.28s var(--ease);
}

.rail__link:hover,
.rail__link:focus-visible {
  color: var(--paper);
  background: rgba(56, 214, 201, 0.06);
}

.rail__link[aria-current="page"] {
  color: var(--lake-soft);
  background: rgba(56, 214, 201, 0.1);
}

.rail__link[aria-current="page"] .rail__tick { height: 22px; }

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 26px;
}

.rail__cta {
  width: 100%;
  font-size: 14px;
  padding: 11px 12px;
}

.rail__quiet {
  color: var(--stone);
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.rail__quiet:hover { color: var(--lake-soft); }

.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(4, 16, 31, 0.74);
}

.rail__scrim[hidden] { display: none; }

body.is-nav-open { overflow: hidden; }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--rape);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn--yellow {
  background: var(--rape);
  color: var(--ink-900);
}

.btn--ghost {
  background: transparent;
  color: var(--lake-soft);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: rgba(56, 214, 201, 0.1);
  border-color: var(--lake);
  filter: none;
}

.btn--red {
  background: var(--red);
  color: #FFFFFF;
}

/* ---------- 8. 内容容器 / 面包屑 / 网格 ---------- */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4.5vw, 56px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(18px, 3vw, 28px);
  font-size: 13px;
  color: var(--stone);
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumbs li + li::before {
  content: "/";
  color: rgba(142, 164, 193, 0.5);
}

.crumbs a {
  color: var(--stone);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.crumbs a:hover { color: var(--lake-soft); }

.crumbs [aria-current="page"] { color: var(--paper); }

.grid {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
}

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

.panel {
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(13, 35, 66, 0.92), rgba(7, 20, 43, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 2px 4px rgba(4, 16, 31, 0.45);
}

.rule {
  height: 1px;
  margin: clamp(20px, 4vw, 36px) 0;
  border: 0;
  background: var(--line);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: rgba(56, 214, 201, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--lake-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.tag--yellow {
  color: var(--rape);
  border-color: rgba(244, 200, 74, 0.35);
  background: rgba(244, 200, 74, 0.09);
}

.tag--red {
  color: #FF9C9C;
  border-color: rgba(226, 76, 76, 0.4);
  background: rgba(226, 76, 76, 0.12);
}

/* ---------- 9. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.media img,
.media svg,
.media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--3x2 { aspect-ratio: 3 / 2; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media__caption {
  margin: 8px 0 0;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 9vw, 112px);
  padding: clamp(34px, 5vw, 60px) clamp(18px, 4.5vw, 56px) clamp(20px, 3vw, 28px);
  background: linear-gradient(180deg, #07142B 0%, #04101F 72%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(320px, 42%);
  height: 2px;
  background: linear-gradient(90deg, var(--lake), var(--rape));
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr);
  gap: clamp(28px, 5vw, 64px);
  max-width: 1160px;
  margin: 0 auto;
}

.footer__brand {
  display: inline-block;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1.1;
  transition: color 0.18s var(--ease);
}

.footer__brand:hover { color: var(--lake-soft); }

.footer__line {
  max-width: 32ch;
  margin-top: 10px;
  color: var(--stone);
  font-size: 15px;
  line-height: 1.7;
}

.footer__contact {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.footer__contact li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.7;
}

.footer__k {
  color: var(--lake);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.footer__v {
  color: var(--stone);
  overflow-wrap: anywhere;
}

.footer__cta {
  margin-top: 22px;
  font-size: 14px;
  padding: 10px 18px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--lake);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.footer__title::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--lake);
}

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

.footer__list a {
  color: var(--stone);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer__list a:hover,
.footer__list a:focus-visible { color: var(--lake-soft); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1160px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.footer__meta {
  margin: 0;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 11. 动效 / 阅读进度 ---------- */
.rail-progress {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  background: linear-gradient(180deg, var(--lake), var(--rape));
  transform-origin: top center;
  transform: scaleY(var(--read, 0));
  top: calc(var(--bar-h) - 2px);
  left: 0;
  right: 0;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(var(--read, 0));
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

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

/* ---------- 12. 桌面端：竖向看台轨道 ---------- */
@media (min-width: 1024px) {
  body {
    padding-top: 0;
    padding-left: var(--rail-w);
    font-size: 17px;
  }

  #main-content { scroll-margin-top: 24px; }

  .site-header {
    top: 0;
    bottom: 0;
    right: auto;
    left: 0;
    width: var(--rail-w);
    height: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0D2342 0%, #07142B 45%, #04101F 100%);
  }

  .rail {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    height: 100%;
    padding: 22px 10px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .rail::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 6px;
    width: 1px;
    background: repeating-linear-gradient(
      180deg,
      var(--line) 0 1px,
      transparent 1px 14px
    );
    pointer-events: none;
  }

  .rail__brand {
    flex-direction: column;
    gap: 10px;
    margin-right: 0;
  }

  .rail__mark {
    font-size: 12px;
    letter-spacing: 0.16em;
  }

  .rail__name {
    writing-mode: vertical-rl;
    font-size: 15px;
    letter-spacing: 0.22em;
    line-height: 1.2;
    white-space: normal;
  }

  .rail__jump,
  .rail__toggle,
  .rail__scrim { display: none; }

  .rail__nav {
    position: static;
    z-index: auto;
    width: 100%;
    height: auto;
    margin-top: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
    overflow: visible;
    transition: none;
  }

  .rail__list { gap: 2px; }

  .rail__link {
    justify-content: center;
    min-height: 48px;
    padding: 8px 4px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    border-bottom: 1px solid var(--line-soft);
    border-radius: var(--r);
  }

  .rail__link[aria-current="page"] .rail__tick { height: 20px; }

  .rail__foot {
    padding-top: 18px;
    margin-top: 0;
  }

  .rail__cta {
    font-size: 12.5px;
    padding: 10px 4px;
  }

  .rail__quiet { font-size: 11.5px; }

  .rail-progress {
    top: 0;
    bottom: 0;
    left: calc(var(--rail-w) - 2px);
    right: auto;
    width: 2px;
    height: auto;
    transform-origin: top center;
    transform: scaleY(var(--read, 0));
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --rail-w: 92px; }
  .rail__link { font-size: 12px; }
}

/* ---------- 13. 响应式收束 ---------- */
@media (max-width: 899px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

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

@media (max-width: 599px) {
  body { font-size: 15.5px; }

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

  .footer__cols { grid-template-columns: minmax(0, 1fr); }

  .footer__base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 14. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .rail__nav { transition: none; }
}
