/* ============================================================
   365看台 · 共享站点样式 /assets/site.css
   夜场看台 × 技术蓝图 · 移动优先
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #050D0A;
}

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

body {
  margin: 0;
  min-height: 100%;
  color: #F2F6F3;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  background-color: #050D0A;
  background-image:
    radial-gradient(1100px 620px at 84% -12%, rgba(11, 46, 36, 0.92), rgba(5, 13, 10, 0) 72%),
    radial-gradient(880px 520px at 6% 6%, rgba(20, 81, 63, 0.34), rgba(5, 13, 10, 0) 68%),
    linear-gradient(to right, rgba(30, 58, 49, 0.50) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 49, 0.30) 1px, transparent 1px);
  background-size: auto, auto, 96px 96px, 96px 96px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

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

::selection { background: #F5C542; color: #06251B; }

:focus-visible {
  outline: 2px solid #35F2D6;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #050D0A;
  --deep: #0B2E24;
  --turf: #14513F;
  --amber: #F5C542;
  --amber-dim: #B8862B;
  --cyan: #35F2D6;
  --chalk: #F2F6F3;
  --steel: #8FA79C;
  --line: #1E3A31;
  --line-soft: rgba(30, 58, 49, 0.62);
  --glass: rgba(242, 246, 243, 0.08);
  --danger: #E2553D;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 68px;
  --shell: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --step: 10px;
}

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--chalk);
}

h1 { font-size: clamp(2.6rem, 7vw, 6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }

p { line-height: 1.75; }

strong { font-weight: 700; color: var(--chalk); }

em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--cyan);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- 4. 布局 ---------- */
.shell {
  width: min(100% - 32px, var(--shell));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(44px, 7vw, 92px);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 70ch;
  margin-bottom: clamp(26px, 4vw, 44px);
}

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

.section-index::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--amber);
}

.section-title { margin: 0; }

.section-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--steel);
  max-width: 62ch;
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
  color: #DCE7E1;
}

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

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 242, 214, 0.35);
}

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

.prose h2, .prose h3 { margin-top: 1.6em; }

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

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.col-main { grid-column: span 7; min-width: 0; }
.col-side { grid-column: span 5; min-width: 0; }

.blueprint { position: relative; }

.blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 49, 0.38) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.blueprint > * { position: relative; z-index: 1; }

/* ---------- 5. 页头 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--amber);
  color: #06251B;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 13, 10, 0.86);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 2px;
  background: var(--amber);
  z-index: 1;
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-height: var(--header-h);
  transition: min-height 0.28s ease;
}

.site-header.is-condensed .header-shell { min-height: 56px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--chalk);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--amber);
  color: #07241B;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-word {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--steel);
  transition: opacity 0.25s ease;
}

.site-header.is-condensed .brand-sub { opacity: 0; }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-caption { display: none; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { --n: 0; }

.nav-item:nth-child(1) { --n: 0; }
.nav-item:nth-child(2) { --n: 1; }
.nav-item:nth-child(3) { --n: 2; }
.nav-item:nth-child(4) { --n: 3; }
.nav-item:nth-child(5) { --n: 4; }
.nav-item:nth-child(6) { --n: 5; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--steel);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--chalk);
  background: rgba(242, 246, 243, 0.06);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(143, 167, 156, 0.7);
  transition: color 0.2s ease;
}

.nav-label { font-weight: 600; }

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
}

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

.nav-cta { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-left: auto;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--steel);
  white-space: nowrap;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(53, 242, 214, 0.5);
  animation: syncPulse 2.4s ease-out infinite;
}

@keyframes syncPulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 242, 214, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(53, 242, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 242, 214, 0); }
}

.site-header.is-condensed .sync-state {
  opacity: 0;
  visibility: hidden;
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  z-index: 2;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(242, 246, 243, 0.05);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.25s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.25, 1);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { bottom: -6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-toggle-label { font-weight: 600; }

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

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

.btn-primary {
  background: var(--amber);
  border-color: var(--amber-dim);
  color: #07241B;
}

.btn-primary:hover {
  background: var(--amber-dim);
  color: #04170F;
}

.btn-ghost {
  background: rgba(242, 246, 243, 0.05);
  border-color: var(--line);
  color: var(--chalk);
}

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

.btn--sm {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 13px;
}

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

/* ---------- 7. 面包屑 ---------- */
.breadcrumbs { padding-block: 18px 0; }

.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: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

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

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: rgba(143, 167, 156, 0.45);
}

.breadcrumb-item a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.breadcrumb-item[aria-current="page"] { color: var(--chalk); }

/* ---------- 8. 面板与标签 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--deep);
}

.panel--glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.panel--turf { background: var(--turf); }

.panel--accent { border-left: 3px solid var(--amber); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
}

.tag--amber {
  color: var(--amber);
  border-color: rgba(245, 197, 66, 0.45);
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(53, 242, 214, 0.4);
}

.tag--live {
  color: var(--cyan);
  border-color: rgba(53, 242, 214, 0.4);
}

.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: syncPulse 2.4s ease-out infinite;
}

/* ---------- 9. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--deep), var(--ink) 72%);
  isolation: isolate;
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 58, 49, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 49, 0.28) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 1;
}

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--steel);
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 46, 36, 0.6) 0%, rgba(5, 13, 10, 0.98) 78%);
  color: var(--steel);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background:
    linear-gradient(90deg, var(--amber) 0 64px, transparent 64px),
    repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 14px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-block: clamp(42px, 6vw, 74px) clamp(28px, 4vw, 42px);
}

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

.footer-mark {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--chalk);
  margin-bottom: 10px;
}

.footer-line {
  font-size: 15px;
  line-height: 1.7;
  color: var(--steel);
  max-width: 24ch;
  margin-bottom: 14px;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-dim);
}

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

.footer-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chalk);
}

.footer-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--steel);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-list a:hover {
  color: var(--amber);
  padding-left: 5px;
}

.footer-contact {
  list-style: none;
  display: grid;
  gap: 14px;
}

.footer-contact-item { min-width: 0; }

.footer-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(143, 167, 156, 0.72);
}

.footer-value {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--chalk);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  padding-block: 18px 30px;
  border-top: 1px solid var(--line);
}

.footer-base-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
}

.footer-legal a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--chalk);
  border-bottom-color: var(--amber);
}

/* ---------- 11. 滚动显现 ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.25, 1);
}

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

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1099px) {
  .sync-state { display: none; }
}

@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 920px) {
  .col-main,
  .col-side { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  :root { --header-h: 60px; }

  .header-cta { display: none; }

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

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(88vw, 400px);
    display: block;
    padding: 26px 22px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(11, 46, 36, 0.98) 0%, rgba(5, 13, 10, 0.99) 62%);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: translate3d(101%, 0, 0);
    visibility: hidden;
    transition: transform 0.38s cubic-bezier(0.2, 0.7, 0.25, 1), visibility 0.38s ease;
    z-index: 90;
  }

  .primary-nav[data-open] {
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }

  .nav-caption {
    display: block;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--amber);
  }

  .nav-list {
    display: block;
    width: 100%;
  }

  .nav-item {
    border-bottom: 1px solid var(--line);
    margin-left: calc(var(--n) * var(--step));
  }

  .nav-item:first-child { border-top: 1px solid var(--line); }

  .nav-link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 16px 12px;
    border-radius: 0;
    font-size: 16px;
    color: var(--chalk);
  }

  .nav-link:hover {
    background: rgba(242, 246, 243, 0.05);
    color: var(--amber);
  }

  .nav-link[aria-current="page"] {
    background: rgba(245, 197, 66, 0.07);
    box-shadow: inset 3px 0 0 var(--amber);
  }

  .nav-link[aria-current="page"]::after { display: none; }

  .nav-index {
    font-size: 11px;
    color: var(--amber-dim);
  }

  .nav-cta {
    display: flex;
    width: 100%;
    margin-top: 26px;
  }
}

@media (max-width: 767px) {
  body { font-size: 16px; }

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

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-line { max-width: none; }
}

/* ---------- 13. 动效降级 ---------- */
@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;
  }

  .js-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover { transform: none; }
}
