/* ==========================================================================
   优德赛事 · 共享站点样式 /assets/site.css
   暗色赛场基调 / 左侧轨道导航 / 赛刊版权页式页脚
   ========================================================================== */

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

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:root {
  /* 色彩 */
  --ink: #0B0F0D;
  --ink-2: #0E1A14;
  --card: #152219;
  --line: #24382C;
  --line-soft: #1B2A21;
  --lime: #C6FF3D;
  --lime-dim: rgba(198, 255, 61, 0.16);
  --orange: #FF6A1F;
  --steel: #7FA8C9;
  --paper: #E8F1EA;
  --muted: #8FA39A;
  --navy: #1A2430;

  /* 尺寸 */
  --rail-w: 76px;
  --shell-max: 1440px;
  --gutter: 24px;
  --radius: 4px;

  /* 字体 */
  --font-head: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 动效 */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html,
body {
  min-height: 100%;
}

body {
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  padding-left: var(--rail-w);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
h1, h2, h3, h4 {
  font-family: var(--font-head);
}

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

h1 { font-size: clamp(2rem, 1.35rem + 3.1vw, 4.25rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 0.98rem + 0.6vw, 1.4rem); }

p {
  max-width: 38em;
}

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

/* --------------------------------------------------------------------------
   跳过导航
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 999;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transform: translate(-50%, -180%);
  transition: transform 0.18s var(--ease-out);
}

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

/* --------------------------------------------------------------------------
   通用排版与容器
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(40px, 3.2vw + 22px, 76px);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.prose {
  max-width: 38em;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--paper);
}

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

.prose a {
  color: var(--lime);
  border-bottom: 1px solid var(--lime-dim);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   按钮 / 标签 / 卡片 / 图片容器
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  transition: transform 0.16s var(--ease-out),
              background-color 0.16s var(--ease-out),
              color 0.16s var(--ease-out),
              box-shadow 0.16s var(--ease-out),
              border-color 0.16s var(--ease-out);
}

.btn--lime {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(198, 255, 61, 0.18);
}

.btn--lime:hover {
  background: #d6ff72;
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 rgba(198, 255, 61, 0.22);
}

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

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

.label {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(21, 34, 25, 0.72);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.label--lime {
  color: var(--lime);
  border-color: rgba(198, 255, 61, 0.4);
}

.label--orange {
  color: var(--orange);
  border-color: rgba(255, 106, 31, 0.42);
}

.plate {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 8px 8px 0 rgba(26, 36, 48, 0.55);
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(127, 168, 201, 0.18), transparent 60%),
    var(--navy);
}

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

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 13, 0) 42%, rgba(11, 15, 13, 0.86));
  pointer-events: none;
}

.media__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   面包屑
   -------------------------------------------------------------------------- */
.breadcrumbs {
  padding-block: 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-inline: 10px;
  color: #3c5346;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--lime);
}

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

/* --------------------------------------------------------------------------
   网格
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

/* --------------------------------------------------------------------------
   头部：桌面端左侧轨道
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0 14px;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 58%, var(--ink) 100%);
  border-right: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 96px;
  background: linear-gradient(180deg, var(--lime), rgba(198, 255, 61, 0));
  pointer-events: none;
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 2px;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--lime-dim);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.brand:hover .brand__mark {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--lime-dim);
}

.brand__name {
  writing-mode: vertical-rl;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.brand__tag {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* 移动端触发按钮（桌面隐藏） */
.nav-toggle {
  display: none;
}

/* 轨道导航 */
.rail-nav {
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.rail-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.rail-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 3px;
  color: var(--muted);
  transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}

.rail-nav__idx {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: #3c5346;
  transition: color 0.18s var(--ease-out);
}

.rail-nav__text {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rail-nav__link:hover {
  color: var(--paper);
  background: rgba(198, 255, 61, 0.07);
}

.rail-nav__link:hover .rail-nav__idx {
  color: var(--steel);
}

.rail-nav__link[aria-current="page"] {
  color: var(--lime);
  background: rgba(198, 255, 61, 0.08);
}

.rail-nav__link[aria-current="page"] .rail-nav__idx {
  color: var(--lime);
}

.rail-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  border-radius: 2px;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(198, 255, 61, 0.85);
}

/* 轨道状态灯 */
.rail-status {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.rail-status__text {
  writing-mode: vertical-rl;
}

.rail-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.12);
  animation: railPulse 2.8s ease-in-out infinite;
}

@keyframes railPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.12); }
  50%      { box-shadow: 0 0 0 7px rgba(198, 255, 61, 0.04); }
}

/* 阅读进度 */
.rail-progress {
  flex: 0 0 auto;
  width: 2px;
  height: 68px;
  margin-top: auto;
  border-radius: 2px;
  background: var(--line-soft);
  overflow: hidden;
}

.rail-progress__bar {
  display: block;
  width: 100%;
  height: var(--p, 0%);
  background: linear-gradient(180deg, var(--lime), var(--orange));
  transition: height 0.12s linear;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 4vw + 24px, 96px);
  padding: clamp(40px, 3vw + 18px, 64px) var(--gutter) 30px;
  background:
    radial-gradient(70% 120% at 12% 0%, rgba(198, 255, 61, 0.07), transparent 62%),
    var(--ink-2);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--orange) 46%, rgba(255, 106, 31, 0) 88%);
}

.footer-inner {
  max-width: 1240px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(180px, 21%) minmax(0, 1fr);
  gap: 34px 44px;
  align-items: start;
}

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

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.footer-brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.footer-brand__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--paper);
}

.footer-brand__line {
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--muted);
  max-width: 15em;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding-left: 36px;
}

.footer-grid::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--lime) 0%, rgba(198, 255, 61, 0.06) 100%);
}

.footer-col__title {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--lime);
}

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

.footer-links a {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--paper);
  transition: color 0.16s var(--ease-out);
}

.footer-links a:hover {
  color: var(--lime);
}

.footer-contact {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 20px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-contact p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  max-width: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.footer-contact__key {
  min-width: 68px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  max-width: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   入场与标签页通用协议
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

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

[data-tab].is-active {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

/* --------------------------------------------------------------------------
   平板
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    padding-left: 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .footer-grid::before {
    top: 0;
    bottom: auto;
    left: 0;
    width: 56px;
    height: 1px;
    background: linear-gradient(90deg, var(--lime), rgba(198, 255, 61, 0));
  }
}

/* --------------------------------------------------------------------------
   移动端：抽屉导航
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  body {
    padding-left: 0;
    padding-top: 60px;
  }

  html.nav-open,
  html.nav-open body {
    overflow: hidden;
  }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 15, 13, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

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

  .brand {
    flex-direction: row;
    gap: 10px;
    padding: 0;
  }

  .brand__mark {
    width: 28px;
    height: 28px;
    font-size: 13px;
    box-shadow: 2px 2px 0 var(--lime-dim);
  }

  .brand__name {
    writing-mode: horizontal-tb;
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  .brand__tag {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--paper);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
  }

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

  .nav-toggle__bars i {
    display: block;
    height: 1.5px;
    margin: 3px 0;
    background: currentColor;
    transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
  }

  .nav-toggle[aria-expanded="true"] {
    border-color: var(--lime);
    color: var(--lime);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
    opacity: 0;
  }

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

  .rail-nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 78px 20px 30px;
    overflow-y: auto;
    background:
      radial-gradient(120% 70% at 90% 0%, rgba(198, 255, 61, 0.1), transparent 58%),
      var(--ink-2);
    border-top: 1px solid var(--line);
    transform: translateY(-101%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s var(--ease-out),
                opacity 0.22s var(--ease-out),
                visibility 0.22s var(--ease-out);
  }

  .rail-nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .rail-nav__list {
    align-items: stretch;
    gap: 0;
  }

  .rail-nav__link {
    justify-content: flex-start;
    gap: 14px;
    padding: 15px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .rail-nav__idx {
    font-size: 11px;
    color: var(--steel);
  }

  .rail-nav__text {
    writing-mode: horizontal-tb;
    font-size: 19px;
    letter-spacing: 0.08em;
    color: var(--paper);
  }

  .rail-nav__link[aria-current="page"] {
    background: rgba(198, 255, 61, 0.08);
  }

  .rail-nav__link[aria-current="page"]::before {
    top: 20%;
    bottom: 20%;
    left: 0;
    width: 2px;
  }

  .rail-status {
    margin-top: auto;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
  }

  .rail-status__text {
    writing-mode: horizontal-tb;
    letter-spacing: 0.18em;
  }

  .rail-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: auto;
    height: 2px;
    margin: 0;
    border-radius: 0;
    background: var(--line-soft);
  }

  .rail-progress__bar {
    height: 100%;
    width: var(--p, 0%);
    background: linear-gradient(90deg, var(--lime), var(--orange));
    transition: width 0.12s linear;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .footer-contact p {
    font-size: 12.5px;
  }

  .footer-contact__key {
    min-width: 62px;
  }

  .plate {
    padding: 18px;
    box-shadow: 5px 5px 0 rgba(26, 36, 48, 0.55);
  }

  .prose {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: minmax(0, 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;
  }
}
