/* ==========================================================================
   好博看台 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ========================================================================== */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

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

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

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

button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

/* ---------- 1. 变量 ---------- */
:root {
  --green-night: #0B2E23;
  --green-pitch: #1B7A4B;
  --amber: #F2B233;
  --amber-soft: #FFC65C;
  --red: #D8382F;
  --blue: #2C6FB5;
  --paper: #F6F3EA;
  --mist: #DCE8E0;
  --ink: #111513;
  --stone: #6E7671;
  --shade: #2A3A3F;

  --line: rgba(17, 21, 19, 0.14);
  --line-dark: rgba(246, 243, 234, 0.16);
  --on-dark-1: rgba(246, 243, 234, 0.92);
  --on-dark-2: rgba(246, 243, 234, 0.68);
  --on-dark-3: rgba(246, 243, 234, 0.48);

  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --wrap: 1240px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --hdr-h: 66px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  --cut-sm: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

/* ---------- 2. 中文排版基线 ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  min-height: 100%;
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; }

.display {
  font-size: clamp(3rem, 9vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 200;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.num,
.index-label { font-variant-numeric: tabular-nums slashed-zero; }

.num {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.index-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ---------- 3. 布局与可访问工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -120px;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--amber);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 0.75rem; }

#main-content { display: block; }

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

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: clamp(1.6rem, 3vw, 2.4rem) 0;
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  clip-path: var(--cut-sm);
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

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

.btn--accent { background: var(--amber); color: var(--ink); }
.btn--accent:hover { background: var(--amber-soft); }

.btn--solid { background: var(--green-pitch); color: var(--paper); }
.btn--solid:hover { background: #0F5F3A; }

.btn--ghost { border-color: var(--line-dark); color: var(--paper); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn--quiet { border-color: var(--line); color: var(--ink); }
.btn--quiet:hover { border-color: var(--green-pitch); color: var(--green-pitch); }

/* ---------- 5. 页头：紧凑命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--green-night);
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
}

.sh-inner {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 品牌 */
.sh-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}

.sh-brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--green-pitch);
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.sh-brand__text { display: block; }

.sh-brand__name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.sh-brand__line {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--on-dark-3);
}

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

.sh-nav__list {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
}

.sh-nav__item { display: flex; }

.sh-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.6rem 0.6rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-dark-2);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
  transition: color 0.24s var(--ease), background-color 0.24s var(--ease);
}

.sh-nav__link:hover {
  color: var(--paper);
  background: rgba(27, 122, 75, 0.42);
}

.sh-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--on-dark-3);
  transition: color 0.24s var(--ease);
}

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

.sh-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.22rem;
  height: 2px;
  background: var(--amber);
}

.sh-nav__link[aria-current="page"] .sh-nav__num { color: var(--amber); }

/* 状态提示 */
.sh-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid rgba(242, 178, 51, 0.42);
  white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.sh-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: sh-pulse 2.4s var(--ease) infinite;
}

@keyframes sh-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.sh-cta { flex: 0 0 auto; }

/* 移动开关 */
.sh-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(246, 243, 234, 0.3);
  background: transparent;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px),
    calc(100% - 8px) 100%, 0 100%);
}

.sh-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.sh-toggle__bars::before,
.sh-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--paper);
  transition: transform 0.24s var(--ease), top 0.24s var(--ease),
    bottom 0.24s var(--ease);
}

.sh-toggle__bars::before { top: 0; }
.sh-toggle__bars::after { bottom: 0; }

.site-header[data-open="true"] .sh-toggle__bars::before {
  top: 5px;
  transform: rotate(45deg);
}

.site-header[data-open="true"] .sh-toggle__bars::after {
  bottom: 5px;
  transform: rotate(-45deg);
}

/* 滚动进度 */
.sh-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--green-pitch), var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 2;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--green-night);
  color: var(--on-dark-2);
  border-top: 3px solid var(--green-pitch);
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 35% 35%,
    rgba(27, 122, 75, 0.55), rgba(27, 122, 75, 0) 70%);
  pointer-events: none;
}

.sf-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) 2rem;
}

.sf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
}

.sf-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sf-brand__mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--green-pitch);
  color: var(--paper);
  font-size: 16px;
  font-weight: 800;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.sf-brand__text { display: block; }

.sf-brand__name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.sf-brand__line {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--on-dark-3);
}

.sf-season {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.sf-touchline {
  position: relative;
  height: 1px;
  margin: clamp(1.8rem, 3.5vw, 2.6rem) 0;
  background: linear-gradient(90deg, var(--amber),
    rgba(242, 178, 51, 0.18) 42%, rgba(246, 243, 234, 0.18) 100%);
}

.sf-touchline span {
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.sf-touchline span:nth-child(1) { left: 0; }
.sf-touchline span:nth-child(2) { left: 33%; }
.sf-touchline span:nth-child(3) { left: 66%; }

.sf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
  gap: clamp(1.4rem, 3vw, 3rem);
}

.sf-col__title {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.sf-links li + li { margin-top: 0.55rem; }

.sf-links a {
  padding-bottom: 2px;
  font-size: 15px;
  color: var(--on-dark-2);
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.sf-links a:hover {
  color: var(--paper);
  border-bottom-color: var(--amber);
}

.sf-contact .index-label { color: var(--on-dark-3); }

.sf-contact__list { margin-top: 1rem; }

.sf-contact__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 14px;
  line-height: 1.7;
}

.sf-contact__list li + li { margin-top: 0.4rem; }

.sf-contact__k {
  flex: 0 0 5.4em;
  padding-top: 0.3em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--on-dark-3);
}

.sf-contact__v { color: var(--on-dark-1); }

.sf-note {
  margin-top: 1rem;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--on-dark-3);
}

.sf-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.6rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}

.sf-legal__copy {
  font-size: 12.5px;
  color: var(--on-dark-3);
}

.sf-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.sf-legal__links a {
  font-size: 12.5px;
  color: var(--on-dark-2);
  transition: color 0.24s var(--ease);
}

.sf-legal__links a:hover { color: var(--amber); }

/* ---------- 7. 通用内容组件 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.breadcrumb li { display: inline-flex; align-items: center; }

.breadcrumb li::after {
  content: "／";
  margin-left: 0.5rem;
  color: rgba(110, 118, 113, 0.55);
}

.breadcrumb li:last-child::after { content: ""; }

.breadcrumb a { color: var(--stone); transition: color 0.24s var(--ease); }
.breadcrumb a:hover { color: var(--green-pitch); }

.prose { max-width: 42rem; }

.prose p {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.75;
}

.prose p + p { margin-top: 1.05em; }

.prose h2,
.prose h3 { margin: 2.2rem 0 0.8rem; }

.card {
  position: relative;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  background: #FFFFFF;
  border: 1px solid var(--line);
  clip-path: var(--cut);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--green-pitch);
}

.card--mist { background: var(--mist); border-color: transparent; }

.card--dark {
  background: var(--green-night);
  border-color: transparent;
  color: var(--on-dark-1);
}

.card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.card__title {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card__meta {
  margin-top: 0.6rem;
  font-size: 13px;
  color: var(--stone);
}

.card--dark .card__meta { color: var(--on-dark-3); }

/* 标签页分段 */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tab {
  padding: 0.6rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--stone);
  background: transparent;
  border: 1px solid var(--line);
  clip-path: var(--cut-sm);
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease);
}

.tab:hover {
  color: var(--ink);
  border-color: var(--green-pitch);
}

.tab[aria-selected="true"] {
  background: var(--green-night);
  border-color: var(--green-night);
  color: var(--paper);
}

.tabpanel { padding-top: 1.6rem; }
.tabpanel[hidden] { display: none; }

/* 图片容器 */
.media {
  position: relative;
  overflow: hidden;
  background: var(--shade);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px),
    calc(100% - 24px) 100%, 0 100%);
}

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

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.8rem 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: linear-gradient(to top, rgba(42, 58, 63, 0.92),
    rgba(42, 58, 63, 0));
}

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

/* 滚动显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease);
}

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

/* 回到顶部 */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  background: var(--green-pitch);
  color: var(--paper);
  border: 1px solid rgba(246, 243, 234, 0.28);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px),
    calc(100% - 10px) 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
    visibility 0.28s var(--ease), background-color 0.24s var(--ease);
}

.to-top:hover { background: var(--amber); color: var(--ink); }

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1180px) {
  .sh-status { display: none; }
}

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

@media (max-width: 1024px) {
  .sh-toggle { display: grid; margin-left: auto; }

  .sh-cta { order: 3; }

  .sh-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5;
    margin-left: 0;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    background: var(--green-night);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 26px 44px -34px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease),
      visibility 0.26s var(--ease);
  }

  .site-header[data-open="true"] .sh-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .sh-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
  }

  .sh-nav__item { border-bottom: 1px solid var(--line-dark); }

  .sh-nav__link {
    justify-content: flex-start;
    padding: 0.95rem 0.2rem;
    font-size: 16px;
    clip-path: none;
  }

  .sh-nav__link[aria-current="page"]::after {
    left: 0.2rem;
    right: auto;
    width: 24px;
    bottom: 0.6rem;
  }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }

  .sh-brand__mark { width: 34px; height: 34px; font-size: 12px; }
  .sh-brand__name { font-size: 15px; }
  .sh-brand__line { display: none; }

  .sh-cta { padding: 0.6rem 0.85rem; font-size: 12.5px; }

  .sf-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-contact__k { flex: 0 0 auto; }
  .sf-legal { justify-content: flex-start; }
}

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

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

  .to-top,
  .sh-nav {
    transition: none !important;
  }
}
