/* ==========================================================================
   乐竞体育官网 · 共享样式 /assets/site.css
   夜间竞赛信号台：深空底、信号绿数据、琥珀节点、奶油纸长文
   ========================================================================== */

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

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

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

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

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

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

a { color: inherit; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #070B14;
  --panel: #0E1728;
  --panel-up: #121E33;
  --green: #38F49A;
  --amber: #FFB454;
  --cyan: #38D9FF;
  --paper: #F1E7D6;
  --brown: #241A12;
  --mist: #8F9AAE;
  --alert: #FF6B5E;
  --white: #F7FAFF;

  --line: rgba(143, 154, 174, 0.22);
  --line-soft: rgba(143, 154, 174, 0.12);
  --line-strong: rgba(143, 154, 174, 0.44);

  --rail: 264px;
  --gutter: clamp(18px, 4vw, 56px);
  --wrap: 1180px;

  --font-head: "Inter Tight", "Noto Sans SC", "HarmonyOS Sans", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Roboto Mono", ui-monospace, monospace;
  --font-label: "Inter", "Noto Sans SC", "PingFang SC", sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.22s;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--white);
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 82% -10%, rgba(56, 217, 255, 0.10), transparent 62%),
    radial-gradient(720px 460px at 4% 2%, rgba(56, 244, 154, 0.07), transparent 66%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(143, 154, 174, 0.055) 1px, transparent 1px);
  background-size: 96px 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.012em;
}

p { max-width: 72ch; }

::selection {
  background: var(--green);
  color: #04180F;
}

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

main {
  position: relative;
  z-index: 1;
  display: block;
  padding-bottom: clamp(40px, 6vw, 88px);
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--green);
  color: #04180F;
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- 5. 头部 · 品牌轨道 ---------- */
.site-head {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--rail);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 26px);
  padding: clamp(18px, 2.6vh, 30px) clamp(16px, 1.8vw, 24px);
  background-color: rgba(7, 11, 20, 0.72);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.site-head.is-solid {
  background-color: var(--panel);
  border-right-color: var(--line-strong);
}

/* 左轨滚动进度 */
.site-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--green), var(--cyan));
  transform: scaleY(var(--progress, 0));
  transform-origin: top center;
  pointer-events: none;
}

/* 右缘细信号线 */
.site-head::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(56, 244, 154, 0.85), rgba(56, 244, 154, 0) 46%, rgba(56, 217, 255, 0.7));
  opacity: 0.6;
  pointer-events: none;
}

.head-top {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 24px;
  height: 26px;
  flex: none;
}

.brand-mark i {
  display: block;
  width: 3px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(56, 244, 154, 0.55);
}

.brand-mark i:nth-child(1) { height: 10px; opacity: 0.5; }
.brand-mark i:nth-child(2) { height: 18px; opacity: 0.78; }
.brand-mark i:nth-child(3) { height: 26px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--mist);
}

/* 移动端索引按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

.nav-toggle-bars {
  display: block;
  width: 16px;
}

.nav-toggle-bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle-bars i + i { margin-top: 4.5px; }

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

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

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

/* 状态条 + 主按钮 */
.head-foot {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.signal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--mist);
  max-width: none;
}

.pulse {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(56, 244, 154, 0.55);
  animation: signal-pulse 2.6s var(--ease) infinite;
}

@keyframes signal-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(56, 244, 154, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(56, 244, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 244, 154, 0); }
}

.head-cta { width: 100%; }

/* 导航 */
.site-nav {
  order: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.nav-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 4px 11px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--mist);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}

.nav-list li:last-child .nav-link { border-bottom: 1px solid var(--line-soft); }

.nav-link::before {
  content: attr(data-idx);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--line-strong);
  transition: color 0.18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--green);
  transform: translateY(-50%);
  transition: height 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--white);
  padding-left: 18px;
}

.nav-link:hover::before { color: var(--amber); }

.nav-link:hover::after,
.nav-link[aria-current="page"]::after { height: 62%; }

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

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

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease),
              color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.btn-signal {
  background-color: var(--green);
  border-color: var(--green);
  color: #04180F;
}

.btn-signal:hover {
  background-color: #63ffb4;
  border-color: #63ffb4;
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--white);
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 7. 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  background-color: var(--panel);
  border-top: 1px solid var(--line-strong);
}

.foot-signal {
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--green) 0 18px,
    transparent 18px 26px,
    var(--cyan) 26px 40px,
    transparent 40px 48px
  );
  opacity: 0.72;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px);
  max-width: 1360px;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 56px) var(--gutter) clamp(22px, 3vw, 34px);
}

.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  grid-column: 1 / -1;
}

.foot-kicker {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--amber);
  max-width: none;
}

.foot-summary {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--mist);
  max-width: 34ch;
}

.foot-cta { margin-top: 4px; }

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-title {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--white);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.foot-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--mist);
}

.foot-list a {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.foot-list a:hover { color: var(--green); }

.foot-contact .foot-list { color: var(--mist); }

.foot-line {
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(143, 154, 174, 0.78);
  max-width: 32ch;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  max-width: 1360px;
  margin-inline: auto;
  padding: 14px var(--gutter) 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(143, 154, 174, 0.8);
}

.foot-legal,
.foot-note { max-width: none; }

/* ---------- 8. 通用版式组件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(36px, 5vw, 72px);
  border-top: 1px solid var(--line-soft);
}

.section:first-child {
  border-top: 0;
  padding-top: clamp(26px, 4vw, 52px);
}

.label {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.rule {
  height: 1px;
  border: 0;
  background-color: var(--line);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--mist);
  white-space: nowrap;
}

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

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--mist);
}

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

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

.crumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

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

.crumbs [aria-current="page"] { color: var(--white); }

/* 奶油纸长阅读面板 */
.paper {
  background-color: var(--paper);
  color: var(--brown);
  padding: clamp(22px, 3.2vw, 44px);
  border: 1px solid rgba(36, 26, 18, 0.16);
  box-shadow: 0 28px 52px -34px rgba(0, 0, 0, 0.75);
}

.paper h2,
.paper h3,
.paper h4 {
  color: var(--brown);
  letter-spacing: -0.01em;
}

.paper p { color: #3b2c20; }

.paper .label { color: #7A6350; }

.paper a {
  color: #8F3A10;
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 58, 16, 0.36);
  transition: border-color 0.16s var(--ease);
}

.paper a:hover { border-bottom-color: #8F3A10; }

.paper .rule {
  background-color: rgba(36, 26, 18, 0.18);
}

/* 图片容器基础规则（页面阶段填入实际图片） */
.media {
  display: block;
  position: relative;
  margin: 0;
  overflow: hidden;
  background-image: linear-gradient(160deg, var(--panel-up), var(--panel));
  border: 1px solid var(--line);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(56, 244, 154, 0.14);
  pointer-events: none;
}

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

.media-frame { aspect-ratio: 16 / 9; }
.media-frame.is-tall { aspect-ratio: 4 / 5; }
.media-frame.is-square { aspect-ratio: 1 / 1; }

.media-caption {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--mist);
  letter-spacing: 0.02em;
}

/* ---------- 9. 渐显协议 ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  }

  html.js-reveal [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- 10. 桌面侧轨留白 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail); }
}

/* ---------- 11. 平板 ---------- */
@media (min-width: 768px) {
  .foot-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }

  .foot-brand { grid-column: 1 / 2; }
  .foot-contact { grid-column: 2 / -1; }
}

@media (min-width: 1100px) {
  .foot-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }

  .foot-brand { grid-column: auto; }
  .foot-contact { grid-column: auto; }
}

/* ---------- 12. 移动 / 平板竖屏 顶栏 ---------- */
@media (max-width: 1023px) {
  body { padding-left: 0; }

  body::before { background-size: 64px 100%; }

  .site-head {
    position: sticky;
    inset: auto;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 10px var(--gutter) 12px;
    background-color: rgba(7, 11, 20, 0.95);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .site-head::before,
  .site-head::after { display: none; }

  .head-top {
    flex: 1 0 100%;
    width: 100%;
  }

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

  .head-foot {
    flex: 1 0 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    margin-top: 6px;
  }

  .head-cta {
    width: auto;
    padding: 8px 13px;
    font-size: 0.7rem;
  }

  .site-nav {
    flex: 1 0 100%;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.28s var(--ease), opacity 0.2s var(--ease),
                margin-top 0.28s var(--ease);
  }

  .site-nav[data-open] {
    max-height: 460px;
    opacity: 1;
    margin-top: 8px;
  }

  .site-nav .nav-list { justify-content: flex-start; }

  .nav-link {
    padding: 12px 4px 12px 14px;
    font-size: 0.98rem;
  }

  .nav-link:hover { padding-left: 14px; }

  .site-foot { border-top-color: var(--line); }

  .foot-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 400px) {
  .signal-status { font-size: 0.62rem; letter-spacing: 0.06em; }
  .brand-sub { display: none; }
}

/* ---------- 13. 减少动态效果 ---------- */
@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;
  }

  .pulse {
    animation: none;
    box-shadow: 0 0 0 3px rgba(56, 244, 154, 0.22);
  }

  .site-head::before {
    transform: scaleY(var(--progress, 0));
  }
}
