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

:root {
  --ink-900: #051c19;
  --ink-850: #071312;
  --ink-800: #08211d;
  --ink-700: #0b3b33;
  --ink-600: #145246;
  --cyan-500: #19e3d0;
  --cyan-300: #9af7ec;
  --amber-400: #f5b942;
  --amber-200: #ffd98e;
  --mist: #c4dad4;
  --white: #f2fbf8;
  --coral: #ff7a66;

  --line: rgba(25, 227, 208, 0.18);
  --line-soft: rgba(154, 247, 236, 0.1);
  --line-strong: rgba(25, 227, 208, 0.42);

  --rail: 112px;
  --pad: clamp(18px, 4vw, 40px);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-display: "Barlow Condensed", "Rajdhani", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --scroll-progress: 0;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(92% 62% at 16% -12%, rgba(25, 227, 208, 0.1), transparent 62%),
    radial-gradient(72% 52% at 100% 0%, rgba(11, 59, 51, 0.85), transparent 72%);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.78;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--cyan-300);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--white);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.55em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--white);
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }

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

:focus-visible {
  outline: 2px solid var(--cyan-500);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(25, 227, 208, 0.3);
  color: var(--white);
}

/* ---------- 通用排版原子 ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.prose {
  max-width: 70ch;
}

.prose p {
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.85;
  color: var(--mist);
}

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

.prose > :first-child { margin-top: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan-300);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--amber-400);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(25, 227, 208, 0.07);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan-300);
  white-space: nowrap;
}

.tag--amber {
  border-color: rgba(245, 185, 66, 0.45);
  background: rgba(245, 185, 66, 0.12);
  color: var(--amber-200);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
  grid-template-columns: 1fr;
}

.breadcrumb { padding: 22px 0 0; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(154, 247, 236, 0.55);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(25, 227, 208, 0.4);
}

.breadcrumb a {
  color: rgba(196, 218, 212, 0.82);
}

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

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 18% 0%, rgba(25, 227, 208, 0.22), transparent 62%),
    linear-gradient(152deg, var(--ink-700), var(--ink-850));
  isolation: isolate;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(154, 247, 236, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 247, 236, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.6;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.06) brightness(0.94);
}

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

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

.btn--primary {
  background: linear-gradient(135deg, var(--amber-400), var(--amber-200));
  color: #20180a;
  box-shadow: 0 12px 26px -14px rgba(245, 185, 66, 0.8);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  color: #20180a;
  box-shadow: 0 16px 32px -14px rgba(245, 185, 66, 0.95);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(25, 227, 208, 0.06);
  color: var(--cyan-300);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--cyan-500);
  background: rgba(25, 227, 208, 0.14);
  color: var(--white);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -84px;
  left: 12px;
  z-index: 400;
  padding: 12px 22px;
  border-radius: 0 0 16px 16px;
  background: var(--amber-400);
  color: #1a1206;
  font-size: 14px;
  font-weight: 700;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
  color: #1a1206;
}

/* ---------- 头部：移动优先 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #071312;
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(4, 14, 12, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.site-header[data-open="true"]::before {
  opacity: 1;
}

.scroll-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-rail__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-500), var(--amber-400));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  transition: transform 0.12s linear;
}

.track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 16px;
}

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

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--white);
  text-decoration: none;
}

.brand:hover { color: var(--white); }

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--cyan-500), var(--cyan-300) 58%, var(--ink-600));
  clip-path: polygon(30% 0, 100% 0, 100% 70%, 70% 100%, 0 100%, 0 30%);
}

.brand__mark::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--ink-900);
  transform: rotate(45deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--white);
}

.brand__sub {
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  color: rgba(154, 247, 236, 0.6);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 汉堡按钮 */
.nav-toggle {
  position: relative;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(25, 227, 208, 0.08);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
  background: rgba(25, 227, 208, 0.16);
  border-color: var(--cyan-500);
}

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan-500);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.site-header[data-open="true"] .nav-toggle__bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* 导航抽屉 */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 130;
  width: min(330px, 86vw);
  display: flex;
  flex-direction: column;
  padding: 92px 18px 180px;
  overflow-y: auto;
  background: linear-gradient(180deg, #08201c 0%, var(--ink-850) 100%);
  border-right: 1px solid var(--line-strong);
  box-shadow: 26px 0 64px -34px rgba(0, 0, 0, 0.95);
  transform: translateX(-104%);
  transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.24, 1);
}

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

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--mist);
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.track-link__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(154, 247, 236, 0.5);
  transition: color 0.18s ease;
}

.track-link__label {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.track-link:hover {
  background: rgba(25, 227, 208, 0.09);
  border-color: var(--line-strong);
  color: var(--white);
}

.track-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(25, 227, 208, 0.22), rgba(25, 227, 208, 0.04));
  border-color: var(--line-strong);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(25, 227, 208, 0.14), 0 10px 26px -20px var(--cyan-500);
}

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

/* 状态胶囊 */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid rgba(25, 227, 208, 0.34);
  border-radius: var(--radius-pill);
  background: rgba(25, 227, 208, 0.09);
  color: var(--cyan-300);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-chip__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-500);
  animation: chipPulse 2.8s ease-out infinite;
}

@keyframes chipPulse {
  0% { box-shadow: 0 0 0 0 rgba(25, 227, 208, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(25, 227, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 227, 208, 0); }
}

/* 轨道行动区（移动端作为抽屉底部面板） */
.track__foot {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 131;
  width: min(330px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(7, 19, 18, 0), #071312 34%);
  border-right: 1px solid var(--line-strong);
  transform: translateX(-104%);
  transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.24, 1);
}

.site-header[data-open="true"] .track__foot {
  transform: translateX(0);
}

.track__cta {
  width: 100%;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(84% 124% at 6% 0%, rgba(25, 227, 208, 0.1), transparent 62%),
    linear-gradient(180deg, var(--ink-850), #041110);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(154, 247, 236, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 247, 236, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 74%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 74%);
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 72px) var(--pad) clamp(26px, 4vw, 44px);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.brand--footer {
  flex-direction: row;
  align-items: center;
  text-align: left;
}

.brand--footer .brand__name { font-size: 17px; }

.brand--footer .brand__sub {
  display: block;
  font-size: 10px;
  white-space: normal;
}

.footer__summary {
  max-width: 36ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(196, 218, 212, 0.86);
}

.footer__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--cyan-300);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--mist);
}

.footer__links a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 1px;
  background: rgba(25, 227, 208, 0.5);
  transform: rotate(45deg);
  transition: background-color 0.18s ease;
}

.footer__links a:hover { color: var(--white); }
.footer__links a:hover::before { background: var(--amber-400); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__contact li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(154, 247, 236, 0.55);
}

.footer__v {
  font-size: 14.5px;
  color: var(--white);
  overflow-wrap: anywhere;
}

.footer__base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px var(--pad) 30px;
  border-top: 1px solid rgba(25, 227, 208, 0.12);
  font-size: 13px;
  color: rgba(196, 218, 212, 0.7);
}

.footer__note,
.footer__legal {
  margin: 0;
}

.footer__legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(154, 247, 236, 0.6);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(8, 33, 29, 0.94);
  color: var(--cyan-300);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.to-top[data-visible="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: rgba(25, 227, 208, 0.16);
  border-color: var(--cyan-500);
}

.to-top__arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  color: var(--amber-400);
}

/* ---------- 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ---------- 平板 ---------- */
@media (min-width: 680px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    grid-template-columns: 1.4fr 0.85fr 1fr;
    align-items: start;
  }
}

/* ---------- 桌面：左侧固定轨道 ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail);
    background-attachment: fixed;
  }

  .skip-link {
    left: calc(var(--rail) + 14px);
  }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: transparent;
  }

  .site-header::before { display: none; }

  .scroll-rail {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 3px;
    height: auto;
  }

  .scroll-rail__fill {
    background: linear-gradient(180deg, var(--cyan-500), var(--amber-400));
    transform: scaleY(var(--scroll-progress, 0));
    transform-origin: top center;
  }

  .track {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    height: 100%;
    min-height: 0;
    padding: 22px 12px 18px;
    background: linear-gradient(180deg, #061513 0%, #0b3b33 50%, #061513 100%);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .track__head {
    flex-direction: column;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(25, 227, 208, 0.14);
  }

  .brand {
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
  }

  .brand__name {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .brand__sub { display: none; }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    z-index: auto;
    width: auto;
    flex: 1 1 auto;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    transition: none;
  }

  .track-link {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 2px;
    text-align: center;
  }

  .track-link__label {
    font-size: 12.5px;
    line-height: 1.3;
  }

  .track__foot {
    position: static;
    width: auto;
    margin-top: auto;
    padding: 0;
    background: none;
    border: 0;
    transform: none;
    transition: none;
  }

  .track .status-chip {
    align-self: stretch;
    justify-content: center;
    padding: 6px 4px;
    font-size: 9.5px;
    line-height: 1.45;
    letter-spacing: 0;
    white-space: normal;
    text-align: center;
  }

  .track .track__cta {
    padding: 10px 4px;
    border-radius: 14px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .footer__inner {
    grid-template-columns: 1.5fr 0.75fr 1.1fr;
  }
}

@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 动效降级 ---------- */
@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,
  .track__foot,
  .to-top {
    transition: none;
  }
}
