/* ==========================================================================
   完美看台 · 共享样式表  /assets/site.css
   夜场看台灯光 × 数据仪表盘 · 框架式导航
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: #070B12;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --ink: #070B12;
  --ink-deep: #05080D;
  --ink-soft: #0A111A;
  --stand-green: #0E2A26;
  --surface: #1A1F2B;
  --indigo: #3B2A5A;
  --wine: #5A1F2E;
  --green: #1FD18B;
  --green-dim: rgba(31, 209, 139, .12);
  --orange: #FF6B2C;
  --orange-soft: #FFB38A;
  --orange-dim: rgba(255, 107, 44, .10);
  --white: #F2F6F4;
  --muted: #8B8FA8;
  --ink-on-accent: #12060A;

  /* 线与材质 */
  --line: rgba(139, 143, 168, .20);
  --line-strong: rgba(139, 143, 168, .42);
  --line-green: rgba(31, 209, 139, .34);
  --shadow-soft: 0 1px 0 rgba(242, 246, 244, .04), 0 18px 40px -28px rgba(0, 0, 0, .9);

  /* 排版 */
  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* 版式 */
  --maxw: 1240px;
  --header-h: 62px;
  --gutter: clamp(18px, 4vw, 40px);
  --space-section: clamp(56px, 9vw, 120px);
}

@media (min-width: 900px) {
  :root { --header-h: 78px; }
}

/* ---------- 3. 基础排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.06;
  color: var(--white);
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(19px, 2.1vw, 26px); letter-spacing: .03em; }
h4 { font-size: clamp(16px, 1.6vw, 20px); }

p { text-wrap: pretty; }

strong, b { font-weight: 700; color: var(--white); }

::selection {
  background: var(--orange);
  color: var(--ink-on-accent);
}

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

.site-footer :focus-visible,
.site-header :focus-visible {
  outline-color: var(--green);
}

/* ---------- 4. 工具类 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ---------- 5. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--ink-on-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid var(--orange-soft);
  transform: translateY(-220%);
  transition: transform .2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- 6. 框架竖线（导航即边框） ---------- */
.page-frame { display: none; }

@media (min-width: 1400px) {
  .page-frame {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    pointer-events: none;
    z-index: 1;
  }
  .page-frame__edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
      rgba(139, 143, 168, .34) 0%,
      rgba(139, 143, 168, .12) 34%,
      rgba(139, 143, 168, 0) 88%);
  }
  .page-frame__edge--left { left: calc((100vw - var(--maxw)) / 2 - 1px); }
  .page-frame__edge--right { right: calc((100vw - var(--maxw)) / 2 - 1px); }
}

/* ---------- 7. 站点头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  background: rgba(7, 11, 18, .88);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid var(--line);
  color: var(--white);
}

.site-header__inner {
  width: 100%;
  max-width: var(--maxw);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
}

/* 品牌 */
.site-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.site-brand__mark {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  letter-spacing: .1em;
  color: var(--white);
}

.site-brand__mark::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 9px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(31, 209, 139, .8);
  transform: translateY(-1px);
}

.site-brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 主导航 */
.site-nav {
  margin-left: auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.1vw, 18px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item { list-style: none; }

.site-nav__link {
  position: relative;
  display: block;
  padding: 9px 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), background-color .18s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--white); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] {
  color: var(--white);
  font-weight: 700;
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--orange);
}

.site-nav__foot { display: none; }

/* 头部动作区 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: clamp(6px, 1.4vw, 18px);
}

.site-header .btn {
  padding: 9px 16px;
  font-size: 13px;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 13px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

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

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform .22s ease, opacity .18s ease;
}

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

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

/* 阅读进度光带 */
.site-header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(139, 143, 168, .14);
  overflow: hidden;
}

.site-header__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-soft) 100%);
  box-shadow: 0 0 12px rgba(255, 107, 44, .7);
}

/* ---------- 8. 移动端导航状态 ---------- */
@media (max-width: 899px) {
  .site-header__cta { display: none; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    margin-left: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 26px;
    background: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 60px -30px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s linear;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(139, 143, 168, .12);
    color: var(--white);
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] {
    padding-left: 14px;
    border-left: 2px solid var(--orange);
    color: var(--orange-soft);
  }

  .site-nav__foot {
    display: block;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

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

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink-on-accent);
}

.btn--primary:hover {
  background: var(--orange-soft);
  border-color: var(--orange-soft);
  color: var(--ink-on-accent);
}

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

.btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  padding-top: clamp(18px, 3vw, 30px);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

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

.breadcrumb__list li + li::before {
  content: "/";
  color: rgba(139, 143, 168, .55);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease;
}

.breadcrumb a:hover { color: var(--green); }

/* ---------- 11. 正文容器 ---------- */
.prose {
  max-width: 72ch;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.85;
  color: rgba(242, 246, 244, .82);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(24px, 3vw, 34px);
}

.prose h3 {
  margin-top: 1.6em;
  color: var(--white);
}

.prose a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--line-green);
  transition: border-color .18s ease, color .18s ease;
}

.prose a:hover {
  color: var(--orange-soft);
  border-bottom-color: var(--orange);
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li + li { margin-top: .5em; }

.prose strong { color: var(--white); }

.prose blockquote {
  margin-inline: 0;
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--orange);
  color: rgba(242, 246, 244, .7);
  font-size: .96em;
}

/* ---------- 12. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

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

@media (max-width: 560px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 13. 图片容器基础 ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(31, 209, 139, .16) 0%, rgba(31, 209, 139, 0) 55%),
    linear-gradient(135deg, var(--stand-green) 0%, #111A24 48%, var(--indigo) 100%);
}

.img-frame > img,
.img-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 14. 文本装饰组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
}

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

.chapter-mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--muted);
}

.note {
  padding: 12px 16px;
  border-left: 2px solid var(--orange);
  background: linear-gradient(90deg, var(--orange-dim), rgba(255, 107, 44, 0));
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(242, 246, 244, .68);
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--green);
  border: 1px solid var(--line-green);
  background: var(--green-dim);
}

/* ---------- 15. 入场显现 ---------- */
html.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s cubic-bezier(.2, .7, .3, 1), transform .5s cubic-bezier(.2, .7, .3, 1);
}

html.motion-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 16. 站点页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--ink-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(220px, 38vw);
  height: 2px;
  background: linear-gradient(90deg, var(--orange), rgba(255, 107, 44, 0));
}

.site-footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(42px, 6vw, 78px) var(--gutter) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.9fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: .12em;
  line-height: 1;
  color: var(--white);
}

.footer-brand__mark::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 107, 44, .75);
  transform: translateY(-1px);
}

.footer-brand__tagline {
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(242, 246, 244, .78);
  max-width: 24ch;
}

.footer-brand__note {
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(139, 143, 168, .88);
  max-width: 26ch;
}

.footer-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 42px);
}

.footer-col { min-width: 0; }

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-list a:hover {
  color: var(--white);
  border-bottom-color: var(--orange);
}

.footer-contact {
  margin-top: clamp(30px, 4.5vw, 52px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.footer-contact__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(139, 143, 168, .82);
}

.footer-contact__value {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--white);
  word-break: break-word;
}

/* 巨型描边字标 */
.footer-mark {
  margin: clamp(34px, 5vw, 58px) 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 13vw, 158px);
  line-height: .82;
  letter-spacing: .06em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 143, 168, .26);
  user-select: none;
  pointer-events: none;
}

.footer-bottom {
  margin-top: clamp(18px, 3vw, 32px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(139, 143, 168, .82);
}

.footer-bottom__item { display: inline-block; }

.footer-bottom__item + .footer-bottom__item { color: rgba(139, 143, 168, .68); }

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-brand__tagline,
  .footer-brand__note { max-width: 42ch; }
}

@media (max-width: 700px) {
  .footer-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col__title { margin-bottom: 12px; }
}

@media (max-width: 420px) {
  .footer-map { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- 17. 减少动效 ---------- */
@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.motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .site-nav {
    transition: none;
    transform: none;
  }
}
