/* ==========================================================================
   必威看台 · 共享样式表 /assets/site.css
   看台夜色 · Bento 拼板 · 右下 12px 斜切
   ========================================================================== */

:root {
  --ink: #050A08;
  --ink-2: #0B1A14;
  --surface: #122A20;
  --lime: #C8FF3D;
  --lime-mist: #F2FFD6;
  --orange: #FF8A3D;
  --paper: #E8F0E9;
  --muted: #8FA79C;
  --stroke: #1F3A2E;
  --panel: #0F1417;

  --cut: 12px;
  --rail: 1320px;
  --gutter: clamp(16px, 4vw, 44px);
  --gap: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

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

  --header-h: 88px;
  --header-h-compact: 56px;
  --dock-h: 56px;
}

/* ---------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(112deg, rgba(232, 240, 233, 0.035) 0 1px, transparent 1px 96px),
    radial-gradient(120% 70% at 50% -20%, rgba(200, 255, 61, 0.055), transparent 62%);
}

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

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

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

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

[hidden] { display: none !important; }

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

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

#main-content {
  position: relative;
  z-index: 1;
  display: block;
}

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

/* ------------------------------------------------------------ 跳转链接 -- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

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

/* ---------------------------------------------------------------- 布局 -- */

.wrap {
  width: 100%;
  max-width: var(--rail);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(48px, 7vw, 96px);
}

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

.col-3 { grid-column: span 3; }
.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; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.stack { display: grid; gap: var(--gap); }

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

/* ---------------------------------------------------------------- 排版 -- */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--paper);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
}

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

.label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  max-width: 68ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
  color: var(--muted);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- 面板 -- */

.panel {
  --cut: 12px;
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(31, 58, 46, 0.9);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.panel--deep { background: var(--ink-2); }

.panel--flush { padding: 0; }

/* ------------------------------------------------------------ 图片容器 -- */

.figure {
  --cut: 12px;
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

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

.figure__ph {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  background:
    radial-gradient(90% 120% at 14% -12%, rgba(200, 255, 61, 0.18), transparent 62%),
    repeating-linear-gradient(90deg, rgba(232, 240, 233, 0.055) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(232, 240, 233, 0.035) 0 1px, transparent 1px 56px),
    linear-gradient(155deg, #0E231B 0%, #07110D 58%, #050A08 100%);
}

.figure__ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 45.6%, rgba(200, 255, 61, 0.1) 46%, transparent 46.6%);
  pointer-events: none;
}

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

/* ---------------------------------------------------------------- 按钮 -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 12px 20px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

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

.btn--lime:hover,
.btn--lime:focus-visible {
  background: var(--lime-mist);
  border-color: var(--lime-mist);
  color: var(--ink);
}

.btn--ghost { color: var(--muted); }

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--lime);
  border-color: var(--lime);
}

.btn--line:hover,
.btn--line:focus-visible {
  color: var(--lime);
  border-color: var(--lime);
}

/* ------------------------------------------------------------ 标签筛选 -- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.tag:hover { color: var(--paper); border-color: var(--muted); }

.tag[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.chip:hover { color: var(--lime); border-color: var(--lime); }

/* ------------------------------------------------------------ 折叠内容 -- */

.disclosure {
  border-bottom: 1px solid var(--stroke);
}

.disclosure__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s var(--ease);
}

.disclosure__trigger::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--lime);
}

.disclosure__trigger[aria-expanded="true"] { color: var(--lime); }

.disclosure__trigger[aria-expanded="true"]::after { content: "−"; }

.disclosure__panel {
  display: none;
  padding: 0 0 22px;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.disclosure__panel[data-open] {
  display: block;
  animation: wipe 0.26s var(--ease);
}

@keyframes wipe {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------------------------------------------------------------- 页头 -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, #070E0B 0%, #050A08 100%);
  border-bottom: 1px solid transparent;
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease);
}

.site-header[data-compact] {
  background: var(--panel);
  border-bottom-color: var(--stroke);
}

.site-header__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 48px);
  min-height: var(--header-h);
  transition: min-height 0.24s var(--ease);
}

.site-header[data-compact] .site-header__rail {
  min-height: var(--header-h-compact);
}

.brand {
  display: grid;
  gap: 3px;
  padding-block: 6px;
  text-decoration: none;
  color: var(--paper);
  line-height: 1.1;
}

.brand__mark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__mark::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 19px;
  margin-right: 10px;
  vertical-align: -2px;
  background: var(--lime);
  transform: skewX(-14deg);
}

.brand__sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

.brand__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.brand__meta::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(200, 255, 61, 0.8);
}

.site-header[data-compact] .brand__sub,
.site-header[data-compact] .brand__meta { display: none; }

.brand--footer .brand__mark { font-size: 20px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 28px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
}

.nav-list__item { display: block; }

.nav-link {
  position: relative;
  display: block;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}

.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(0.55); }

.nav-link[aria-current="page"] { color: var(--paper); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  margin-left: clamp(4px, 1vw, 16px);
  padding: 11px 16px;
  font-size: 11px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

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

.nav-toggle__lines {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__lines span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease);
}

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

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

.nav-toggle__label { text-transform: uppercase; }

.scroll-meter {
  height: 2px;
  background: transparent;
  overflow: hidden;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--surface) 0%, var(--lime) 70%, var(--lime-mist) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

/* ------------------------------------------------------------ 移动入口 -- */

.mobile-dock { display: none; }

/* ---------------------------------------------------------------- 页脚 -- */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(32px, 6vw, 80px);
  background: var(--panel);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(28px, 4.5vw, 64px);
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.15fr;
  gap: clamp(24px, 3.6vw, 56px);
  padding-block: clamp(56px, 7vw, 104px) clamp(28px, 4vw, 52px);
}

.footer-brand { display: grid; align-content: start; gap: 16px; }

.footer-note {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-col { display: grid; align-content: start; }

.footer-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer-list { display: grid; gap: 9px; }

.footer-list a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-list a:hover { color: var(--lime); }

.footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-contact { display: grid; gap: 0; }

.footer-contact__item {
  display: grid;
  gap: 2px;
  padding-block: 9px;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-contact__item .label {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
}

.footer-col .footer-note { margin-top: 16px; max-width: 32ch; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--muted);
}

.footer-legal__copy { margin: 0; letter-spacing: 0.04em; }

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal__links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-legal__links a:hover { color: var(--lime); }

/* ------------------------------------------------------------ 显现动效 -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

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

/* ---------------------------------------------------------------- 响应 -- */

@media (max-width: 1180px) {
  .nav-link { font-size: 11px; letter-spacing: 0.08em; }
  .nav-cta { padding: 10px 13px; font-size: 10px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 76px; }

  body { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px)); }

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

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 380px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--header-h) + 20px) 26px 120px;
    background: var(--ink-2);
    border-left: 1px solid var(--stroke);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
    transform: translateX(104%);
    transition: transform 0.28s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav[data-open] { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list__item { border-bottom: 1px solid var(--stroke); }

  .nav-link {
    padding: 17px 0;
    font-size: 15px;
    letter-spacing: 0.14em;
    color: var(--paper);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] { color: var(--lime); }

  .nav-cta {
    align-self: flex-start;
    margin: 28px 0 0;
    padding: 13px 20px;
    font-size: 12px;
  }

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

  body.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(5, 10, 8, 0.68);
  }

  .mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--stroke);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--stroke);
  }

  .mobile-dock__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--dock-h);
    padding: 12px 8px;
    background: var(--panel);
    color: var(--paper);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
  }

  .mobile-dock__link--lime {
    background: var(--lime);
    color: var(--ink);
  }

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

  .footer-legal {
    padding-bottom: calc(24px + var(--dock-h) + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 6; }
  .col-12 { grid-column: span 6; }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.8; }

  .grid { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 1; }

  .brand__mark { font-size: 19px; }
  .brand__sub { font-size: 10px; letter-spacing: 0.12em; }
  .brand__meta { display: none; }
  .nav-toggle__label { display: none; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { justify-content: flex-start; gap: 10px; }
}

/* -------------------------------------------------------- 减少动态偏好 -- */

@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;
  }

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

  .site-nav { transition: none !important; }
  .scroll-meter__bar { transition: none !important; }
}
