/* ============================================================
   grandstand-boxi.com.cn  ·  共享样式 /assets/site.css
   看台正中：侧轨导航 + 分层看台 + 粗野主义硬边
   ============================================================ */

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

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

body {
  margin: 0;
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--graphite);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--clay); text-underline-offset: 0.22em; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

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

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0E2A22;
  --seat: #174034;
  --pitch: #2F6B4F;
  --clay: #A63A2A;
  --clay-dark: #7C2A1E;
  --amber: #F2B334;
  --card-y: #F2C230;
  --card-r: #D22B2B;
  --paper: #F4F7F2;
  --screen: #DCE9E4;
  --graphite: #101512;
  --muted: #8FA39A;

  --rail-w: 92px;
  --topbar-h: 56px;
  --wrap: 1200px;
  --pad: 24px;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 4px 4px 0 var(--ink);
  --shadow-clay: 6px 6px 0 var(--clay-dark);
  --line-hard: 2px solid var(--ink);
  --line-clay: 2px solid var(--clay);

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

  --stack-gap: 24px;
}

/* ---------- 3. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 4. 顶栏 ---------- */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--pitch);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}
.brand__pip {
  width: 12px;
  height: 12px;
  background: var(--amber);
  box-shadow: 3px 3px 0 var(--clay);
  flex: 0 0 auto;
}
.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber);
  line-height: 1;
  padding-left: 10px;
  border-left: 1px solid var(--pitch);
}

.topbar-note {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-contact {
  margin: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--screen);
}
.topbar-contact__sep { color: var(--clay); }

/* ---------- 5. 移动端唤出按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 13px;
  background: var(--clay);
  color: var(--paper);
  border: 2px solid var(--clay-dark);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.nav-toggle:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.nav-toggle:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
}

/* ---------- 6. 侧边看台轨道 ---------- */
.stand-rail {
  position: fixed;
  left: 0;
  top: var(--topbar-h);
  bottom: 0;
  z-index: 58;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 16px 0 20px;
  background: var(--ink);
  border-right: 1px solid var(--pitch);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--pitch) var(--ink);
}

.stand-rail__label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin: 0 auto 16px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--muted);
  line-height: 1;
}

.stand-rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rail-link {
  position: relative;
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 10px 8px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.15;
  letter-spacing: 0.24em;
  color: var(--screen);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease;
}
.rail-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--clay);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.rail-link:hover,
.rail-link:focus-visible {
  color: var(--paper);
  background: var(--seat);
  border-color: var(--pitch);
}
.rail-link:hover::before,
.rail-link:focus-visible::before,
.rail-link[aria-current="page"]::before {
  transform: scaleY(1);
}
.rail-link[aria-current="page"] {
  color: var(--amber);
  background: var(--seat);
  border-color: var(--pitch);
  font-weight: 800;
}

/* ---------- 7. 抽屉遮罩 ---------- */
.rail-scrim {
  display: none;
}
.site-header[data-open="true"] .rail-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 55;
  border: 0;
  padding: 0;
  background: rgba(14, 42, 34, 0.6);
  cursor: pointer;
}

/* ---------- 8. 滚动进度 ---------- */
.rail-progress {
  position: fixed;
  left: 0;
  top: var(--topbar-h);
  bottom: 0;
  z-index: 59;
  width: 3px;
  pointer-events: none;
}
.rail-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: top center;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: var(--screen);
  border-top: 8px solid var(--clay);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--pad) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand__mark {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.footer-brand__dot {
  color: var(--clay);
  padding: 0 0.35em;
}
.footer-brand__line {
  margin: 0 0 22px;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--seat);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  color: var(--screen);
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--amber);
  border-bottom-color: var(--clay);
  transform: translateX(2px);
}

.footer-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  word-break: break-all;
}
.footer-text .num { color: var(--screen); }

.footer-base {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--pad) 40px;
  border-top: 1px solid var(--seat);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-legal { margin: 0; color: var(--screen); }
.footer-note { margin: 0; flex: 1 1 320px; }
.footer-copy { margin: 0; color: var(--pitch); }

/* ---------- 10. 版面容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.wrap--narrow { max-width: 720px; }

.section { padding: 72px 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--seat { background: var(--seat); color: var(--paper); }
.section--tight { padding: 40px 0; }

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

.grid { display: grid; gap: 24px; }

@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 760px) and (max-width: 999px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.rule {
  height: 3px;
  border: 0;
  margin: 0;
  background: var(--clay);
}

/* ---------- 11. 标题与文本 ---------- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: inherit;
}

.h-display {
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 0 0 0.3em;
}
.h-section {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.h-card {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  line-height: 1.3;
}

.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.7;
  color: var(--seat);
}

.prose { max-width: 36em; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 24px; margin: 1.8em 0 0.6em; }
.prose h3 { font-size: 19px; margin: 1.5em 0 0.5em; }

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
}
.label--light { color: var(--amber); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.num--lg { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; }
.num--xl { font-size: clamp(38px, 6vw, 64px); line-height: 1; }

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease, color 0.16s ease;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--primary {
  background: var(--clay);
  border-color: var(--clay-dark);
  color: var(--paper);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  background: var(--clay-dark);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn--amber {
  background: var(--amber);
  border-color: var(--ink);
  color: var(--ink);
}
.btn--amber:hover { background: #FFC94D; }

.btn--light {
  background: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
  box-shadow: none;
}
.btn--ghost:hover {
  box-shadow: none;
  background: rgba(244, 247, 242, 0.08);
  transform: translateY(-2px);
}

/* ---------- 13. 面板 ---------- */
.panel {
  padding: 24px;
  background: var(--paper);
  border: var(--line-hard);
  box-shadow: var(--shadow-hard);
}
.panel--dark {
  background: var(--seat);
  border-color: var(--seat);
  color: var(--paper);
  box-shadow: var(--shadow-clay);
}
.panel--flat {
  box-shadow: none;
}

/* ---------- 14. 标签 / 面包屑 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--seat);
  background: transparent;
}
.tag--yellow {
  background: var(--card-y);
  border-color: var(--ink);
  color: var(--ink);
}
.tag--red {
  background: var(--card-r);
  border-color: var(--clay-dark);
  color: var(--paper);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before {
  content: "/";
  color: var(--clay);
}
.crumbs a {
  color: var(--pitch);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.crumbs a:hover,
.crumbs a:focus-visible {
  color: var(--clay);
  border-bottom-color: currentColor;
}
.crumbs__item { color: var(--graphite); }

/* ---------- 15. 图片容器基础 ---------- */
.frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--seat);
  border: var(--line-hard);
}
.frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.frame:hover > img { transform: scale(1.02); }
.frame__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--screen);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(244, 247, 242, 0.07) 0 12px,
      transparent 12px 24px
    );
}
.frame--wide { aspect-ratio: 21 / 9; }
.frame--tall { aspect-ratio: 3 / 4; }
.frame--square { aspect-ratio: 1 / 1; }

/* ---------- 16. 滚动淡入 ---------- */
[data-reveal] {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html[data-js="true"] [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(12px);
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1180px) {
  .topbar-note { display: none; }
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
    padding-top: 0;
    font-size: 16.5px;
  }

  .site-topbar {
    position: sticky;
    top: 0;
    height: auto;
    min-height: 56px;
    padding: 9px 16px;
    gap: 12px;
  }

  .topbar-contact { display: none; }
  .nav-toggle { display: inline-flex; }

  .stand-rail {
    top: 0;
    bottom: 0;
    width: min(82vw, 300px);
    padding: 22px 0 24px;
    border-right: 3px solid var(--clay);
    box-shadow: 10px 0 0 rgba(0, 0, 0, 0.22);
    transform: translateX(-102%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .site-header[data-open="true"] .stand-rail {
    transform: translateX(0);
  }

  .stand-rail__label {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    margin: 0 20px 14px;
    font-size: 11px;
    letter-spacing: 0.28em;
  }

  .stand-rail__list {
    align-items: stretch;
    gap: 2px;
  }

  .rail-link {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    display: block;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.06em;
    border: 0;
    border-top: 1px solid var(--seat);
  }
  .rail-link::before {
    width: 4px;
    height: 100%;
    transform: scaleY(0);
  }

  .rail-progress { display: none; }

  .section { padding: 52px 0; }
  .footer-inner { padding-top: 44px; }
  .footer-brand__line { max-width: none; }
}

@media (min-width: 640px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
  .footer-top {
    grid-template-columns: minmax(240px, 1fr) 2.2fr;
    gap: 56px;
  }
  .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}

/* ---------- 18. 减少动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  html[data-js="true"] [data-reveal]:not(.is-in) {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .footer-link:hover {
    transform: none;
  }
}
