/* ============ K8天生赢家中国站 · 共享外壳样式 /assets/site.css ============ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

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

ul, ol { padding: 0; }

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

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

/* ---------- 变量 ---------- */
:root {
  --ink: #0A0D12;
  --panel: #12161F;
  --mist: #F2ECE3;
  --stone: #6E7681;
  --moss: #4F6B4A;
  --clay: #B96A45;
  --cyan: #14F0D2;
  --magenta: #FF3D8B;
  --lemon: #F5E14B;
  --cyan-deep: #0B6B66;
  --steel: #1B2230;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shell: min(1180px, 100% - 32px);
  --header-offset: 100px;

  --t-fast: 200ms cubic-bezier(.22, .61, .36, 1);
  --t-slow: 480ms cubic-bezier(.22, .61, .36, 1);

  --fs-h1: clamp(34px, 5.2vw, 56px);
  --fs-h2: clamp(23px, 3vw, 32px);
  --fs-h3: clamp(17px, 1.6vw, 19px);
}

/* ---------- 基础排版 ---------- */
body {
  background: var(--ink);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: 0;
  padding-top: var(--header-offset);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--mist);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { overflow-wrap: break-word; }

a { color: var(--cyan); text-decoration: none; }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

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

:focus-visible {
  outline: 2px dashed var(--cyan);
  outline-offset: 3px;
}

/* ---------- 布局骨架 ---------- */
.container {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding: 0 0 clamp(56px, 7vw, 88px);
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(242, 236, 227, .86);
}

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

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--clay);
  margin-bottom: 10px;
}

/* ---------- 章节色带 ---------- */
.section-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  padding: 16px 0;
  margin: 0 0 30px;
  border-top: 1px solid var(--steel);
  border-bottom: 1px solid var(--steel);
}

.section-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--moss), rgba(79, 107, 74, 0));
  transition: background var(--t-slow);
}

.section-band[data-in-view]::after {
  background: linear-gradient(90deg, var(--clay), rgba(185, 106, 69, 0));
}

.section-band__num {
  font-family: var(--font-mono);
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--moss);
  transition: color var(--t-slow);
}

.section-band[data-in-view] .section-band__num {
  color: var(--clay);
}

.section-band__title {
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-band__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin-left: auto;
  text-align: right;
}

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

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

@media (min-width: 861px) {
  .grid--offset { padding-right: clamp(20px, 2.6vw, 44px); }
  .grid--offset > *:nth-child(even) {
    transform: translateX(clamp(20px, 2.6vw, 44px));
  }
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--steel);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 28px);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.card:hover,
.card:focus-within {
  border-color: var(--cyan-deep);
  box-shadow: 0 0 0 1px rgba(20, 240, 210, .18), 0 18px 44px rgba(0, 0, 0, .45);
}

.card__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--stone);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid var(--steel);
  background: rgba(27, 34, 48, .8);
  color: var(--mist);
}

.tag--cyan { border-color: rgba(20, 240, 210, .4); color: var(--cyan); background: rgba(20, 240, 210, .1); }
.tag--magenta { border-color: rgba(255, 61, 139, .4); color: var(--magenta); background: rgba(255, 61, 139, .1); }
.tag--clay { border-color: rgba(185, 106, 69, .5); color: var(--clay); background: rgba(185, 106, 69, .12); }

.mono-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(20, 240, 210, .1);
  border: 1px solid rgba(20, 240, 210, .34);
  color: var(--cyan);
}

.mono-tag--clay {
  background: rgba(185, 106, 69, .12);
  border-color: rgba(185, 106, 69, .48);
  color: var(--clay);
}

.mono-tag--magenta {
  background: rgba(255, 61, 139, .12);
  border-color: rgba(255, 61, 139, .42);
  color: var(--magenta);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.btn--primary {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(20, 240, 210, .4), 0 10px 30px rgba(20, 240, 210, .2);
}

.btn--primary:hover {
  box-shadow: 0 0 0 1px var(--cyan), 0 14px 40px rgba(20, 240, 210, .36);
}

.btn--accent {
  background: var(--lemon);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(245, 225, 75, .22);
}

.btn--accent:hover {
  box-shadow: 0 14px 38px rgba(245, 225, 75, .34);
}

.btn--ghost {
  background: transparent;
  border-color: var(--steel);
  color: var(--mist);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(20, 240, 210, .2);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 26px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--stone);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--clay);
}

.breadcrumb__link {
  color: var(--stone);
  transition: color var(--t-fast);
}

.breadcrumb__link:hover { color: var(--cyan); }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--steel);
  background: var(--panel);
  aspect-ratio: 16 / 10;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(10, 13, 18, .42) 0 1px, rgba(10, 13, 18, 0) 1px 4px);
  opacity: .38;
}

.media-frame:hover {
  border-color: var(--cyan-deep);
  box-shadow: 0 0 0 1px rgba(20, 240, 210, .18), 0 20px 48px rgba(0, 0, 0, .5);
}

.media-frame__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--steel);
  background: rgba(10, 13, 18, .76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ============ 头部 ============ */
.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--lemon);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  pointer-events: auto;
  transform: translate(-50%, -220%);
  transition: transform var(--t-fast);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline-offset: 2px;
}

.site-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 90;
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  pointer-events: auto;
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--steel);
  background: rgba(18, 22, 31, .74);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.site-header[data-scrolled] .site-header__inner {
  background: rgba(10, 13, 18, .95);
  border-color: rgba(20, 240, 210, .28);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .58);
}

/* 品牌浮岛 */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 5px 14px 5px 5px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--mist);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.brand-island:hover {
  background: rgba(20, 240, 210, .07);
  border-color: rgba(20, 240, 210, .26);
}

.brand-island__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--cyan), var(--cyan-deep));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(20, 240, 210, .35), 0 0 20px rgba(20, 240, 210, .32);
}

.brand-island__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-island__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-island__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--stone);
}

/* 导航胶囊 */
.nav-capsule {
  margin-left: auto;
}

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

.nav-capsule__item { display: flex; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--stone);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-link__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--clay);
  transition: color var(--t-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--mist);
  background: rgba(20, 240, 210, .1);
}

.nav-link:hover .nav-link__index { color: var(--cyan); }

.nav-link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(20, 240, 210, .12);
}

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

.nav-link[aria-current="page"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px 9px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--steel);
  background: var(--panel);
  color: var(--mist);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

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

.nav-toggle__bars {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.nav-toggle__label { line-height: 1; }

/* 头部入口 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.header-actions__btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--steel);
  background: var(--panel);
  color: var(--mist);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.header-actions__btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(20, 240, 210, .22);
}

.header-actions__btn--dual { display: none; }

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: rgba(27, 34, 48, .95);
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transform: scaleX(0);
  transform-origin: left center;
}

/* ============ 页脚 ============ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  background: linear-gradient(180deg, rgba(18, 22, 31, .9), var(--ink) 55%);
  border-top: 1px solid var(--steel);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  opacity: .55;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(20, 240, 210, .045) 0 1px, rgba(20, 240, 210, 0) 1px 6px);
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 5vw, 60px) 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 3vw, 40px);
}

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

.footer-brand__name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.footer-brand__line {
  font-size: 14px;
  line-height: 1.8;
  color: var(--stone);
  max-width: 34ch;
  margin-bottom: 16px;
}

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

.footer-col__title {
  position: relative;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--mist);
  margin-bottom: 16px;
}

.footer-col__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--clay);
}

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

.footer-link {
  color: rgba(242, 236, 227, .78);
  font-size: 14.5px;
  line-height: 1.7;
  transition: color var(--t-fast);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.footer-contact__item { display: grid; gap: 2px; }

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.footer-contact__val {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242, 236, 227, .84);
  overflow-wrap: anywhere;
}

.footer-meta {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding: 20px 0 40px;
  border-top: 1px solid var(--steel);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-closing {
  font-size: 13px;
  color: var(--stone);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--stone);
}

.footer-legal .footer-link { font-size: 13px; }

.footer-legal__item { color: var(--stone); }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .nav-link { padding: 8px 10px; font-size: 13.5px; }
  .nav-link__index { font-size: 10px; }
  .header-actions__btn { padding: 9px 13px; font-size: 13px; }
}

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

@media (max-width: 860px) {
  :root { --header-offset: 90px; }

  body { font-size: 16.5px; }

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

  .section-band {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .section-band__label {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions__btn { display: none; }
  .header-actions__btn--dual { display: inline-flex; }

  .nav-capsule {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin-left: 0;
    display: none;
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--steel);
    background: rgba(10, 13, 18, .97);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .62);
    max-height: min(70vh, 520px);
    overflow-y: auto;
  }

  .site-header[data-open] .nav-capsule { display: block; }

  .nav-capsule__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
  }

  .nav-link__index {
    min-width: 26px;
    font-size: 11px;
  }

  .nav-link[aria-current="page"]::after { margin-left: auto; }

  .scroll-progress { left: 18px; right: 18px; }
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .brand-island__sub { display: none; }
}

@media (max-width: 420px) {
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 9px 12px; }
}

/* ============ 无障碍与动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-progress__bar { transition: none; }
}
