/* =========================================================
   果博东方站 · /assets/site.css
   共享层：重置 / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ========================================================= */

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

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

body,
h1, h2, h3, p, figure, blockquote {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
}

img, svg, picture {
  display: block;
  max-width: 100%;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩体系 */
  --ink: #0B1A24;
  --navy: #14293A;
  --slate: #1E3D52;
  --steel: #4A6572;
  --mist: #C9D4D8;
  --paper: #F4F1EA;
  --orange: #E8792B;
  --cinnabar: #B23A2E;
  --gold: #C9A227;
  --gray: #5C6B73;

  --line-dark: rgba(201, 212, 216, .22);
  --line-gold: rgba(201, 162, 39, .38);
  --line-ink: rgba(11, 26, 36, .16);

  /* 字体 */
  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 尺寸与节奏 */
  --w-max: 1320px;
  --pad: clamp(18px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, .12);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

h1 {
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 900;
  line-height: 1.1;
}

h2 {
  font-size: clamp(26px, 3.4vw, 40px);
}

h3 {
  font-size: clamp(19px, 2vw, 23px);
  letter-spacing: -.01em;
}

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
}

strong { font-weight: 800; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.section--paper :focus-visible,
.section--mist :focus-visible {
  outline-color: var(--cinnabar);
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  box-shadow: var(--shadow-soft);
  transition: transform .2s var(--ease);
}

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

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  border-bottom: 1px solid var(--line-gold);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}

.header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  transition: width .12s linear;
  pointer-events: none;
}

.header__upper {
  background: var(--ink);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 13px var(--pad);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-right: auto;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(201, 162, 39, .08);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.brand__line {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand__tagline {
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  white-space: nowrap;
}

/* 版本切换 */
.version {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.version__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--steel);
  white-space: nowrap;
}

.version__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  background: transparent;
  color: var(--mist);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}

.version__btn::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  background: transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.version__btn:hover {
  color: var(--paper);
  border-color: var(--gold);
}

.version__btn[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--gold);
  background: rgba(201, 162, 39, .14);
}

.version__btn[aria-pressed="true"]::before {
  background: var(--gold);
  border-color: var(--gold);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--gold);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  background: rgba(201, 162, 39, .14);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 下层栏目索引 */
.header__lower {
  background: var(--navy);
  border-top: 1px solid var(--line-dark);
  transition: background-color .22s var(--ease);
}

.site-nav {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  counter-reset: nav;
}

.site-nav__item {
  counter-increment: nav;
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px clamp(11px, 1.5vw, 21px);
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.4;
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}

.site-nav__link::before {
  content: counter(nav, decimal-leading-zero);
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  transition: color .2s var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--gold);
  background: rgba(201, 162, 39, .1);
}

.site-nav__link:hover::before,
.site-nav__link:focus-visible::before {
  color: var(--gold);
}

.site-nav__link[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--orange);
  background: rgba(232, 121, 43, .12);
}

.site-nav__link[aria-current="page"]::before {
  color: var(--orange);
}

/* 对照版状态 */
.site-header[data-version="alt"] .header__lower {
  background: var(--slate);
}

.site-header[data-version="alt"] .site-nav__link[aria-current="page"] {
  border-bottom-color: var(--gold);
  background: rgba(201, 162, 39, .14);
}

.site-header[data-version="alt"] .site-nav__link[aria-current="page"]::before {
  color: var(--gold);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--mist);
  border-top: 1px solid var(--line-gold);
  padding: clamp(44px, 6vw, 78px) 0 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 24px);
  opacity: .45;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.35fr .9fr 1fr 1.15fr;
  gap: clamp(22px, 3vw, 54px);
  align-items: start;
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer__col--b { margin-top: 26px; }
.footer__col--d { margin-top: 52px; }

.footer__brand-name {
  display: block;
  margin-bottom: 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.footer__line {
  max-width: 26ch;
  margin-bottom: 16px;
  color: var(--mist);
  font-size: 14px;
  line-height: 1.8;
}

.footer__hint {
  max-width: 22ch;
  padding: 10px 13px;
  background: rgba(178, 58, 46, .18);
  border-left: 2px solid var(--cinnabar);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
  transform: rotate(-2deg);
  transform-origin: left top;
  box-shadow: var(--shadow-soft);
}

.footer__title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 212, 216, .16);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  line-height: 1.4;
}

.footer__list {
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  line-height: 1.7;
}

.footer__list a {
  color: var(--mist);
  transition: color .2s var(--ease);
}

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

.footer__contact {
  display: grid;
  gap: 12px;
}

.footer__contact li {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.65;
}

.footer__contact-label {
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
}

.footer__contact-value {
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  width: 100%;
  max-width: var(--w-max);
  margin: clamp(34px, 4vw, 60px) auto 0;
  padding: 18px var(--pad) 26px;
  border-top: 1px solid rgba(201, 212, 216, .14);
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.6;
}

.footer__legal p { margin: 0; }

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer__legal-links a {
  color: var(--mist);
  transition: color .2s var(--ease);
}

.footer__legal-links a:hover,
.footer__legal-links a:focus-visible {
  color: var(--gold);
}

/* ---------- 7. 布局与通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: clamp(48px, 6.5vw, 100px) 0;
  background: var(--ink);
  color: var(--paper);
}

.section--navy {
  background: var(--navy);
  color: var(--paper);
}

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

.section--paper {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(11, 26, 36, .045) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
}

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

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

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

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 20px);
}

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

.rule--gold { background: var(--line-gold); }

.tick-band {
  height: 22px;
  background-color: var(--steel);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(201, 162, 39, .6) 0 1px,
    transparent 1px 96px
  );
}

/* 排印组件 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  line-height: 1.6;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section--paper .eyebrow,
.section--mist .eyebrow {
  color: var(--cinnabar);
}

.annotation {
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  line-height: 1.6;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.section--paper .annotation,
.section--mist .annotation {
  color: var(--gray);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  cursor: pointer;
  transition: color .22s var(--ease), background-color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(232, 121, 43, .24);
}

.btn--primary:hover {
  background: #f08a45;
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--paper);
  border-color: var(--gold);
  background-color: transparent;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0% 100%;
  transition: background-size .24s var(--ease), color .24s var(--ease);
}

.btn--ghost:hover {
  background-size: 100% 100%;
  color: var(--ink);
}

.section--paper .btn--ghost,
.section--mist .btn--ghost {
  color: var(--ink);
}

.btn--quiet {
  padding: 6px 0;
  color: var(--orange);
  border: 0;
  border-bottom: 1px solid rgba(232, 121, 43, .45);
  border-radius: 0;
}

.section--paper .btn--quiet,
.section--mist .btn--quiet {
  color: var(--cinnabar);
  border-bottom-color: rgba(178, 58, 46, .4);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  line-height: 1.6;
}

.breadcrumb a {
  color: var(--mist);
  transition: color .2s var(--ease);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--gold);
}

.breadcrumb__sep {
  color: var(--slate);
}

/* 图片容器 */
.figure {
  margin: 0;
}

.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: var(--navy);
  box-shadow: var(--shadow-soft);
}

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

.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media--placeholder {
  display: grid;
  place-items: center;
  background-image: linear-gradient(160deg, var(--navy) 0%, var(--slate) 100%);
}

.media--placeholder::after {
  content: attr(data-label);
  padding: 0 16px;
  color: rgba(201, 212, 216, .72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-align: center;
  line-height: 1.8;
}

.media__caption {
  margin-top: 10px;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.7;
}

/* 分段切换 */
.tabs {
  display: block;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line-dark);
}

.tabs__tab {
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.4;
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}

.tabs__tab:hover {
  color: var(--paper);
  background: rgba(201, 162, 39, .1);
}

.tabs__tab[aria-selected="true"] {
  background: var(--orange);
  border-bottom-color: var(--orange);
  color: var(--ink);
}

.tabs__panel {
  padding-top: 22px;
}

.tabs__panel[hidden] {
  display: none;
}

.section--paper .tabs__list,
.section--mist .tabs__list {
  border-bottom-color: var(--line-ink);
}

.section--paper .tabs__tab,
.section--mist .tabs__tab {
  color: var(--gray);
}

.section--paper .tabs__tab[aria-selected="true"],
.section--mist .tabs__tab[aria-selected="true"] {
  color: var(--ink);
}

/* ---------- 8. 显现动画 ---------- */
[data-reveal] {
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}

html[data-js] [data-reveal]:not([data-revealed]) {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1000px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px 34px;
  }

  .footer__col--b,
  .footer__col--d {
    margin-top: 0;
  }
}

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

  .brand__tagline {
    display: none;
  }

  .version__label {
    display: none;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    padding-bottom: 12px;
  }

  .site-nav[data-open] {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    width: 100%;
  }

  .site-nav__item + .site-nav__item {
    border-top: 1px solid rgba(201, 212, 216, .12);
  }

  .site-nav__link {
    width: 100%;
    padding: 14px 0 14px 12px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .site-nav__link:hover,
  .site-nav__link:focus-visible {
    border-bottom-color: transparent;
    border-left-color: var(--gold);
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--orange);
  }

  .col-4, .col-5, .col-6, .col-7, .col-8 {
    grid-column: span 12;
  }

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

@media (max-width: 760px) {
  .header__inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    margin-right: auto;
  }

  .version {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-dark);
  }

  .nav-toggle {
    order: 2;
  }

  body {
    font-size: 16px;
  }
}

@media (max-width: 620px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__legal {
    gap: 8px 20px;
  }

  .footer__legal-links {
    margin-left: 0;
    gap: 14px;
  }

  .footer__hint {
    max-width: none;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .brand__line {
    font-size: 15px;
    white-space: normal;
  }

  .version__btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .nav-toggle__text {
    display: none;
  }
}

/* ---------- 10. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html[data-js] [data-reveal]:not([data-revealed]) {
    opacity: 1;
    transform: none;
  }
}
