/* ==========================================================================
   忆博电竞 · 共享 Site Kit  /assets/site.css
   深空蓝黑底 + 电光青轨道 + 霓虹紫状态 + 琥珀金版本锚点
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #04060B;
}

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

ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- 02. Tokens ---------- */
:root {
  /* 色阶 */
  --ink: #04060B;
  --space: #0A1220;
  --panel: #121C2C;
  --line: #1C2A3F;
  --cyan: #3DE8FF;
  --violet: #8B5CFF;
  --amber: #FFB84D;
  --mist: #92A6BA;
  --white: #F2F7FF;
  --violet-deep: #241A3D;

  /* 尺度 */
  --rail-w: 248px;
  --bar-h: 62px;
  --cut: 12px;
  --gutter: clamp(18px, 3.2vw, 48px);
  --max-w: 1360px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 运动 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --raise: 0 18px 44px -26px rgba(0, 0, 0, .92);
}

/* ---------- 03. Base ---------- */
body {
  min-height: 100vh;
  padding-top: var(--bar-h);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(28, 42, 63, .42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 42, 63, .26) 1px, transparent 1px),
    radial-gradient(760px 460px at 88% -8%, rgba(139, 92, 255, .18), transparent 72%),
    radial-gradient(620px 380px at 3% 5%, rgba(61, 232, 255, .10), transparent 74%);
  background-size: 64px 64px, 64px 64px, auto, auto;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

#main-content { scroll-margin-top: calc(var(--bar-h) + 18px); }

::selection {
  background: rgba(61, 232, 255, .28);
  color: var(--white);
}

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

/* ---------- 04. Typography ---------- */
.display {
  font-size: clamp(56px, 10vw, 156px);
  font-weight: 200;
  line-height: .95;
  letter-spacing: -.04em;
}

.page-title {
  font-size: clamp(38px, 5.6vw, 78px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.section-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.8;
  color: var(--mist);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.caption {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: var(--mist);
}

/* ---------- 05. Layout helpers ---------- */
.site-content {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 60px) var(--gutter) clamp(48px, 7vw, 96px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(61, 232, 255, .55), var(--line) 42%, transparent);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan);
}

/* 切角资料卡 */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(158deg, rgba(18, 28, 44, .96), rgba(10, 18, 32, .92));
  border: 1px solid var(--line);
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  box-shadow: inset 0 1px 0 rgba(61, 232, 255, .10);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.panel:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 232, 255, .45);
  box-shadow: var(--raise), inset 0 1px 0 rgba(61, 232, 255, .2);
}

/* ---------- 06. Buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 44, .8);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.btn--primary {
  border-color: var(--cyan);
  background: rgba(61, 232, 255, .08);
  color: var(--cyan);
}

.btn--primary:hover { background: var(--cyan); color: var(--ink); }

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(61, 232, 255, .35);
  background: rgba(61, 232, 255, .08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
}

.tag--violet {
  border-color: rgba(139, 92, 255, .42);
  background: rgba(139, 92, 255, .12);
  color: var(--violet);
}

.tag--amber {
  border-color: rgba(255, 184, 77, .44);
  background: rgba(255, 184, 77, .12);
  color: var(--amber);
}

/* ---------- 07. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, #0C1626 0%, #0A1220 58%, #1B1436 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61, 232, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 232, 255, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}

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

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

.media-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--mist);
}

/* ---------- 08. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mist);
}

.breadcrumb a {
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.breadcrumb a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.breadcrumb-sep { color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--white); }

/* ---------- 09. Header / 侧边轨道 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--bar-h);
  padding: 10px var(--gutter);
  background: rgba(4, 6, 11, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header[data-open] { border-bottom-color: rgba(61, 232, 255, .45); }

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 24px;
  height: 26px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  clip-path: polygon(50% 0%, 100% 26%, 100% 74%, 50% 100%, 0% 74%, 0% 26%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ink);
  clip-path: polygon(50% 0%, 100% 26%, 100% 74%, 50% 100%, 0% 74%, 0% 26%);
}

.brand-text { display: block; min-width: 0; }

.brand-name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--white);
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .22em;
  color: var(--mist);
}

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

/* 抽屉开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 44, .8);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

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

.nav-toggle-bars { display: grid; gap: 3px; width: 16px; }

.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: var(--cyan);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.nav-toggle-label { line-height: 1; }

/* 移动端抽屉 */
.rail-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  max-height: calc(100vh - var(--bar-h));
  max-height: calc(100dvh - var(--bar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px var(--gutter) 30px;
  background: linear-gradient(180deg, #0A1220 0%, #05080F 86%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 64px -24px rgba(0, 0, 0, .95);
}

.rail-nav[data-open] { display: block; }

.rail-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rail-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mist);
}

.rail-badge {
  padding: 3px 8px;
  border: 1px solid rgba(255, 184, 77, .45);
  background: rgba(255, 184, 77, .10);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
}

.rail-filter { display: grid; gap: 6px; }

.rail-filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--mist);
}

.rail-filter-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(18, 28, 44, .92);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--white);
  font-size: 14px;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.rail-filter-input::placeholder { color: #5D6E84; }

.rail-filter-input:hover { border-color: #2C3E58; }

.rail-filter-input:focus-visible {
  border-color: var(--cyan);
  outline-offset: 1px;
}

.rail-list {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 18px;
}

.rail-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(61, 232, 255, .28) 58%, var(--line) 100%);
  transform-origin: top center;
  animation: rail-draw .6s var(--ease) both;
}

@keyframes rail-draw {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.rail-item { position: relative; }

.rail-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  color: var(--mist);
  transition: color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--ease);
}

.rail-link::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.rail-link:hover { color: var(--white); transform: translateX(2px); }
.rail-link:hover::before { background: var(--cyan); }

.rail-link[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(90deg, rgba(61, 232, 255, .14), transparent 72%);
}

.rail-link[aria-current="page"]::before {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 184, 77, .18);
}

.rail-index {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(146, 166, 186, .62);
}

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

.rail-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.rail-empty {
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
}

.rail-tools {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rail-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-left: 2px solid var(--violet);
  background: rgba(18, 28, 44, .72);
  color: var(--mist);
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.rail-tool:hover {
  color: var(--white);
  border-left-color: var(--amber);
  background: rgba(36, 26, 61, .66);
}

.rail-tool-key { font-size: 12px; letter-spacing: .04em; }

.rail-tool-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--amber);
}

.rail-tool--ios { border-left-color: var(--cyan); }
.rail-tool--ios .rail-tool-val { color: var(--cyan); }

.rail-note {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  color: rgba(146, 166, 186, .7);
}

/* 抽屉打开时锁定背景滚动 */
@media (max-width: 959px) {
  body.nav-open { overflow: hidden; }
}

/* 桌面：侧边轨道 */
@media (min-width: 960px) {
  :root { --rail-w: 248px; --bar-h: 0px; }

  body {
    padding-top: 0;
    padding-left: var(--rail-w);
    background-attachment: fixed;
  }

  #main-content { scroll-margin-top: 24px; }

  .site-header {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    min-height: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 26px;
    padding: 30px 22px 26px;
    background: linear-gradient(180deg, #0A1220 0%, #070B14 54%, #04060B 100%);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .brand { gap: 12px; }
  .brand-name { font-size: 19px; }

  .nav-toggle { display: none; }

  .rail-nav {
    position: static;
    display: flex;
    flex: 1 1 auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .rail-inner {
    flex: 1 1 auto;
    gap: 18px;
  }

  .rail-filter-input { font-size: 13px; }
  .rail-note { margin-top: auto; padding-top: 10px; }
}

/* ---------- 10. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: linear-gradient(180deg, rgba(10, 18, 32, .96) 0%, rgba(4, 6, 11, 1) 72%);
  color: var(--mist);
  font-size: 14px;
}

.footer-rail {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--cyan) 14%,
    var(--violet) 48%,
    var(--amber) 78%,
    transparent 100%);
  opacity: .62;
}

.footer-inner {
  display: grid;
  gap: clamp(26px, 3.4vw, 44px);
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(32px, 4.6vw, 64px) var(--gutter) clamp(22px, 3vw, 34px);
}

@media (min-width: 720px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
}

@media (min-width: 1080px) {
  .footer-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr) minmax(0, .95fr); }
}

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

.footer-brand-line {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--white);
}

.footer-note {
  max-width: 42ch;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.footer-top:hover {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.footer-cols {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

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

.footer-col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-links { display: grid; gap: 8px; }

.footer-link {
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  color: var(--mist);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-link:hover { color: var(--white); border-bottom-color: var(--cyan); }

.footer-meta {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.footer-meta-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--amber);
}

.footer-contact { font-size: 13px; line-height: 1.7; }

.footer-contact .mono {
  font-size: 12px;
  color: var(--white);
  word-break: break-word;
}

.footer-service {
  max-width: 34ch;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(146, 166, 186, .9);
}

.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--mist);
}

.footer-copy .mono { color: var(--cyan); }
.footer-icp { color: var(--mist); }

/* ---------- 11. Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 62%, var(--amber));
  pointer-events: none;
  will-change: transform;
}

/* ---------- 12. Responsive polish ---------- */
@media (max-width: 420px) {
  .brand-sub { letter-spacing: .14em; }
  .rail-label { font-size: 14px; }
  .footer-legal { justify-content: flex-start; }
}

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

  .panel:hover { transform: none; }
  .rail-link:hover { transform: none; }
  .scroll-progress { transition: none; }
}
