/* =========================================================
   德赢体育 · 共享外壳样式 /assets/site.css
   ========================================================= */

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

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

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

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

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

a { color: inherit; }

button { font: inherit; color: inherit; }

/* ---------- 2. tokens ---------- */
:root {
  --ink: #0B1024;
  --panel: #151C42;
  --cyan: #2FF0DC;
  --orange: #FF7A33;
  --novice: #17E0A0;
  --library: #3B7BFF;
  --export: #FFC24A;
  --family: #FF9A5A;
  --green: #34C76A;
  --red: #F2453D;
  --paper: #F4F7FF;
  --muted: #A9B3DE;

  --line: rgba(169, 179, 222, .24);
  --line-strong: rgba(169, 179, 222, .48);

  --rail-w: 232px;
  --bar-h: 64px;

  --font-display: "Archivo Narrow", "Oswald", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, "Noto Sans Mono CJK SC", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 身份色协议：任何元素带 data-tone 即获得 --tone */
[data-tone] { --tone: var(--cyan); }
[data-tone="novice"] { --tone: var(--novice); }
[data-tone="library"] { --tone: var(--library); }
[data-tone="export"] { --tone: var(--export); }
[data-tone="family"] { --tone: var(--family); }
[data-tone="positive"] { --tone: var(--green); }
[data-tone="alert"] { --tone: var(--red); }

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(169, 179, 222, .05) 0 1px, transparent 1px 9px);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
}

/* ---------- 4. 头部：左侧品牌轨道 + 顶部栏目条 ---------- */
.site-header {
  position: relative;
  z-index: 80;
}

.site-header a { text-decoration: none; }

.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.skip-link:focus { top: 12px; }

/* 品牌轨道 */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 82;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 18px 22px;
  background: var(--panel);
  border-right: 2px solid var(--cyan);
  overflow-y: auto;
  scrollbar-width: none;
}

.site-rail::-webkit-scrollbar { display: none; }

.site-rail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(47, 240, 220, .12));
  pointer-events: none;
}

.rail-brand {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
}

.rail-brand__name {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .24em;
  color: var(--paper);
}

.rail-brand__tag {
  writing-mode: vertical-rl;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--cyan);
}

.rail-index {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
}

.rail-index__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}

.rail-index__item span {
  color: var(--tone, var(--cyan));
  font-weight: 700;
}

.rail-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.rail-status__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: var(--green);
  animation: rail-pulse 2.2s var(--ease) infinite;
}

@keyframes rail-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 199, 106, .55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 199, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 106, 0); }
}

/* 顶部条 */
.site-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 81;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: linear-gradient(180deg, #101838, #0B1024);
  border-bottom: 1px solid var(--line);
}

.site-bar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.site-bar__brand {
  display: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .08em;
  color: var(--paper);
}

.site-bar__sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .24em;
  color: var(--cyan);
}

.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: navi;
}

.site-nav__list a {
  display: block;
  padding: 9px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.site-nav__list a::before {
  counter-increment: navi;
  content: "0" counter(navi);
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--line-strong);
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  color: var(--paper);
  background: rgba(47, 240, 220, .08);
  border-bottom-color: var(--cyan);
}

.site-nav__list a[aria-current="page"] {
  color: var(--paper);
  background: rgba(47, 240, 220, .14);
  border-bottom-color: var(--cyan);
}

.site-nav__list a[aria-current="page"]::before { color: var(--cyan); }

.site-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .6);
}

.btn--ghost { border-color: var(--line-strong); color: var(--paper); }

.btn--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  font-weight: 700;
}

.btn--solid:hover { background: #5CF3E4; }

.btn--warn {
  background: var(--orange);
  border-color: var(--orange);
  color: #21100A;
  font-weight: 700;
}

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

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--paper);
  transition: transform .2s var(--ease);
}

.nav-toggle__bar + .nav-toggle__bar { margin-top: 6px; }

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

/* ---------- 5. 主内容区让位 ---------- */
#main-content { display: block; min-height: 60vh; }

/* ---------- 6. 通用布局与组件 ---------- */
.wrap {
  width: min(100% - 32px, 1320px);
  margin-inline: auto;
}

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }

.section--band {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--cyan);
}

.h1 {
  font-size: clamp(38px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: .02em;
}

.h2 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: .01em;
}

.h3 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: .02em;
}

.lede {
  max-width: 46em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.prose { max-width: 42em; }
.prose p + p { margin-top: 1em; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

.band {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(47, 240, 220, .08), rgba(255, 122, 51, .07));
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
}

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
  position: relative;
  padding: 22px;
  border: 2px solid var(--line);
  background: var(--panel);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.panel:hover {
  transform: translate(-3px, -3px);
  border-color: var(--line-strong);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .55);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 2px solid var(--line);
  border-top: 4px solid var(--tone, var(--cyan));
  background: var(--panel);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}

.card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--line-strong);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .55);
}

.card__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--tone, var(--cyan));
}

.card__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
}

.card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 2px solid var(--tone, var(--cyan));
  color: var(--tone, var(--cyan));
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .1em;
  background: transparent;
}

.kpi {
  padding: 4px 0 4px 14px;
  border-left: 4px solid var(--tone, var(--cyan));
}

.kpi__num {
  font-family: var(--font-mono);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--paper);
}

.kpi__label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.crumbs {
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* 筛选交互协议 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(21, 28, 66, .55);
}

.filter-btn {
  padding: 7px 13px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.filter-btn:hover { color: var(--paper); border-color: var(--line-strong); }

.filter-btn[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  font-weight: 700;
}

.filter-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.filter-item { transition: opacity .18s var(--ease); }
.filter-item[hidden] { display: none; }

/* 图片容器基础规则 */
.media {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  background: linear-gradient(135deg, #151C42, #0B1024);
}

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

.media--16x9 { aspect-ratio: 16 / 9; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  background: linear-gradient(0deg, rgba(11, 16, 36, .94), rgba(11, 16, 36, 0));
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper);
}

.media--placeholder::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-align: center;
  color: var(--muted);
}

/* 显现动效 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

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

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--cyan);
  background: var(--panel);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -90px;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(255, 122, 51, .16), rgba(47, 240, 220, .10));
  transform: rotate(20deg);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 40px;
  padding: 56px 0 40px;
}

.site-footer__logo {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .06em;
}

.site-footer__slogan {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--cyan);
}

.site-footer__service {
  max-width: 28em;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .2em;
  color: var(--paper);
}

.footer-col__list { display: grid; gap: 10px; }

.footer-col__list a {
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

.site-footer__contact {
  padding: 18px;
  border: 2px solid var(--line);
  background: rgba(11, 16, 36, .6);
}

.footer-contact__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .2em;
  color: var(--cyan);
}

.footer-contact__list { display: grid; gap: 12px; }

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

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.footer-contact__value {
  color: var(--paper);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.footer-contact__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-contact__link {
  width: 100%;
  margin-top: 16px;
}

.site-footer__base {
  position: relative;
  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);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__legal a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__legal a:hover { color: var(--cyan); }

.site-footer__icp { letter-spacing: .06em; }

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1023px) {
  .site-rail { display: none; }

  .site-bar {
    left: 0;
    right: 0;
    height: 60px;
    gap: 12px;
    padding: 0 14px;
  }

  .site-bar__brand { display: block; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 78;
    max-height: 82vh;
    margin: 0;
    padding: 18px 14px 104px;
    border-top: 2px solid var(--cyan);
    background: var(--panel);
    overflow-y: auto;
    transform: translateY(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .26s var(--ease), visibility .26s var(--ease);
  }

  .site-nav[data-open] {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav__list {
    display: flex;
    gap: 10px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav__list li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .site-nav__list a {
    padding: 12px 16px;
    border: 2px solid var(--line);
    border-bottom-width: 2px;
    color: var(--paper);
    font-size: 15px;
  }

  .site-nav__list a:hover,
  .site-nav__list a:focus-visible {
    background: rgba(47, 240, 220, .08);
    border-color: var(--cyan);
  }

  .site-nav__list a[aria-current="page"] {
    border-color: var(--cyan);
    background: rgba(47, 240, 220, .14);
  }

  .site-bar__actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 79;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .site-bar__actions .btn {
    width: 100%;
    padding: 12px 10px;
    font-size: 14px;
    background: var(--ink);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .6);
  }

  .site-bar__actions .btn--solid {
    background: var(--cyan);
    color: var(--ink);
  }

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

  #main-content {
    padding-top: 60px;
    padding-bottom: 72px;
  }

  .site-footer { padding-bottom: 88px; }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 44px 0 32px;
  }

  .section { padding: 48px 0; }
}

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

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

  .site-footer__base { justify-content: flex-start; }

  .h1 { font-size: clamp(34px, 11vw, 56px); }
}

@media (min-width: 1024px) {
  .wrap { width: min(100% - 64px, 1320px); }

  #main-content { padding-top: var(--bar-h); padding-left: var(--rail-w); }
}

/* ---------- 9. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .btn:hover,
  .card:hover,
  .panel:hover {
    transform: none;
  }
}
