/* ==========================================================================
   完美平台赛场 — 共享站点样式 /assets/site.css
   ========================================================================== */

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

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

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

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

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

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

main {
  display: block;
}

/* ---------- 变量 ---------- */
:root {
  --ink-900: #0B1F1A;
  --ink-700: #123A2E;
  --moss-500: #1F6E52;
  --paper-100: #F4F1E8;
  --paper-50: #FBFAF5;
  --cyan-glow: #35F0C8;
  --cyan-deep: #0E8F79;
  --amber: #FF8A34;
  --amber-deep: #C25A12;
  --slate-500: #5A6B63;
  --ink-text: #12211C;

  --rail-w: 88px;
  --bar-h: 62px;

  --font-head: "Barlow Condensed", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;

  --fs-1: clamp(40px, 6.4vw, 72px);
  --fs-2: clamp(32px, 4vw, 48px);
  --fs-3: clamp(24px, 2.6vw, 32px);
  --fs-4: clamp(19px, 1.8vw, 24px);
  --fs-5: clamp(16px, 1.2vw, 18px);

  --line-ink: rgba(11, 31, 26, 0.14);
  --line-glow: rgba(53, 240, 200, 0.16);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-text);
  background-color: var(--paper-100);
  padding-left: var(--rail-w);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

p {
  max-width: 38em;
}

strong {
  font-weight: 700;
}

::selection {
  background: var(--cyan-glow);
  color: var(--ink-900);
}

/* ---------- 焦点 ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.on-ink :focus-visible {
  outline-color: var(--cyan-glow);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 999;
  transform: translate(-50%, -220%);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--cyan-glow);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: transform 0.24s var(--ease-out);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ==========================================================================
   页头
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-900);
  color: var(--paper-50);
  box-shadow: 0 1px 0 rgba(53, 240, 200, 0.2);
}

/* --- 左侧品牌轨道 --- */
.brand-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 24px;
  background: linear-gradient(180deg, #06180F 0%, #0B1F1A 52%, #0A2A22 100%);
  border-right: 1px solid var(--line-glow);
}

.rail-mark {
  display: block;
  padding: 4px 0;
}

.rail-word {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.16em;
  color: var(--paper-50);
  transition: color 0.2s ease;
}

.rail-mark:hover .rail-word {
  color: var(--cyan-glow);
}

.rail-note {
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--moss-500);
}

.rail-ios {
  writing-mode: vertical-rl;
  padding: 12px 5px;
  border: 1px solid rgba(53, 240, 200, 0.34);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--cyan-glow);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.rail-ios:hover {
  background: rgba(53, 240, 200, 0.14);
  border-color: var(--cyan-glow);
}

/* --- 阅读进度线 --- */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan-glow));
  pointer-events: none;
}

/* --- 上层窄条 --- */
.header-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line-glow);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.header-brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--paper-50);
  white-space: nowrap;
}

.header-stage {
  position: relative;
  padding-left: 14px;
  color: rgba(244, 241, 232, 0.66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--cyan-glow);
}

.header-ios {
  margin-left: auto;
  padding: 5px 14px;
  border: 1px solid rgba(53, 240, 200, 0.3);
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan-glow);
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.header-ios:hover {
  background: rgba(53, 240, 200, 0.14);
}

/* --- 下层导航 --- */
.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 3vw, 40px) 14px;
}

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

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line-glow);
  border-radius: var(--radius-pill);
  background: rgba(53, 240, 200, 0.05);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 232, 0.78);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: rgba(53, 240, 200, 0.13);
  color: var(--paper-50);
}

.nav-link[aria-current="page"] {
  background: var(--cyan-glow);
  color: var(--ink-900);
  font-weight: 700;
}

.header-cta {
  margin-left: auto;
  flex: 0 0 auto;
}

/* --- 移动导航按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(53, 240, 200, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(53, 240, 200, 0.07);
  color: var(--paper-50);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(53, 240, 200, 0.16);
  border-color: var(--cyan-glow);
}

.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--cyan-glow);
  box-shadow: 0 5px 0 var(--cyan-glow), 0 -5px 0 var(--cyan-glow);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
  box-shadow: 0 0 0 var(--cyan-glow), 0 0 0 var(--cyan-glow);
}

.nav-toggle-text {
  white-space: nowrap;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(4, 16, 13, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.site-header[data-nav-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding: clamp(44px, 6vw, 76px) 0 0;
  background: var(--ink-900);
  color: rgba(244, 241, 232, 0.74);
  border-top: 1px solid var(--line-glow);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 42%);
  height: 2px;
  background: var(--cyan-glow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.25fr;
  gap: clamp(24px, 3vw, 52px);
  padding-bottom: clamp(36px, 5vw, 60px);
}

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

.footer-brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--paper-50);
}

.footer-tagline {
  margin-top: 12px;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(244, 241, 232, 0.72);
}

.footer-note {
  margin-top: 14px;
  max-width: 24em;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--moss-500);
}

.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--cyan-glow);
  opacity: 0.86;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-block;
  padding: 2px 0;
  font-size: 14px;
  color: rgba(244, 241, 232, 0.74);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
  color: var(--cyan-glow);
  border-bottom-color: rgba(53, 240, 200, 0.5);
}

.footer-meta-item {
  display: inline-block;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(244, 241, 232, 0.58);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line-glow);
}

.footer-copy {
  max-width: none;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 232, 0.5);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(244, 241, 232, 0.58);
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: var(--cyan-glow);
}

/* ==========================================================================
   通用组件
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 34px);
}

.grid--5-7 { grid-template-columns: 5fr 7fr; }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--4-8 { grid-template-columns: 4fr 8fr; }
.grid--6-6 { grid-template-columns: 6fr 6fr; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-deep);
}

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

.section-title {
  font-size: var(--fs-2);
  color: var(--ink-text);
}

.lede {
  max-width: 36em;
  font-size: var(--fs-5);
  line-height: 1.75;
  color: var(--slate-500);
}

.v-note {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--moss-500);
}

.v-note--glow {
  color: var(--cyan-glow);
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.panel {
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--paper-50);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1px solid var(--line-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-text);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  background: rgba(18, 58, 46, 0.06);
  border-color: var(--cyan-deep);
}

.chip[aria-pressed="true"] {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--cyan-glow);
}

.on-ink .chip {
  border-color: rgba(53, 240, 200, 0.28);
  color: rgba(244, 241, 232, 0.82);
}

.on-ink .chip:hover {
  background: rgba(53, 240, 200, 0.12);
  border-color: var(--cyan-glow);
}

.on-ink .chip[aria-pressed="true"] {
  background: var(--cyan-glow);
  border-color: var(--cyan-glow);
  color: var(--ink-900);
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-accent {
  background: var(--amber);
  color: #241004;
}

.btn-accent:hover {
  background: #FFA05E;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(53, 240, 200, 0.36);
  color: var(--cyan-glow);
}

.btn-ghost:hover {
  background: rgba(53, 240, 200, 0.14);
  border-color: var(--cyan-glow);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* --- 面包屑 --- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate-500);
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: var(--moss-500);
}

.breadcrumbs a {
  color: var(--slate-500);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--cyan-deep);
}

/* --- 图片容器基础规则 --- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 78% 18%, rgba(53, 240, 200, 0.22), transparent 58%),
    linear-gradient(155deg, var(--ink-700) 0%, var(--ink-900) 62%, var(--moss-500) 130%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 240, 200, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 240, 200, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
  pointer-events: none;
}

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

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

/* ==========================================================================
   动效
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.42s var(--ease-out),
    transform 0.42s var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
    font-size: 15px;
    line-height: 1.7;
  }

  .brand-rail {
    inset: auto 0 0 0;
    width: 100%;
    height: var(--bar-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-right: 0;
    border-top: 1px solid rgba(53, 240, 200, 0.22);
  }

  .rail-mark {
    padding: 0;
  }

  .rail-word {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 15px;
    letter-spacing: 0.08em;
  }

  .rail-note {
    writing-mode: horizontal-tb;
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .rail-ios {
    writing-mode: horizontal-tb;
    padding: 7px 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .header-top {
    gap: 12px;
    padding: 9px 16px;
  }

  .header-stage {
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .header-ios {
    display: none;
  }

  .header-nav {
    gap: 10px;
    padding: 10px 16px 12px;
  }

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

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: block;
    width: min(340px, 86vw);
    padding: calc(var(--bar-h) + 44px) 20px 32px;
    border-left: 1px solid rgba(53, 240, 200, 0.22);
    background: var(--ink-900);
    overflow-y: auto;
    transform: translateX(101%);
    transition: transform 0.34s var(--ease-out);
  }

  .primary-nav::before {
    content: "栏目";
    display: block;
    margin-bottom: 18px;
    font-family: var(--font-num);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--moss-500);
  }

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

  .nav-list {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .nav-link {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 16px;
  }

  .header-cta {
    margin-left: auto;
  }

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

  .grid--5-7,
  .grid--7-5,
  .grid--4-8,
  .grid--6-6 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rail-note {
    display: none;
  }

  .header-stage {
    max-width: 52vw;
  }

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

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

  .media-frame {
    border-radius: var(--radius-md);
  }
}

/* ==========================================================================
   降级动效
   ========================================================================== */

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

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
