/* ==========================================================================
   海博体育主站 · 共享层 /assets/site.css
   深海赛事指挥台：侧边轨道 + 堆叠面板 + 锐利直角 + 珊瑚橙信号
   ========================================================================== */

:root {
  --abyss: #061A2E;
  --deck: #0B2942;
  --foam: #F4F8FA;
  --mist: #9FB8C8;
  --coral: #FF6B4A;
  --neon: #35F0C0;
  --swell: #1B6A93;
  --steel: #728A99;
  --light: #E8EEF2;

  --line: rgba(114, 138, 153, 0.30);
  --line-strong: rgba(159, 184, 200, 0.48);
  --overlay: rgba(4, 16, 28, 0.72);

  --rail-w: 112px;
  --pad: clamp(18px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --maxw: 1180px;

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

  --ease: cubic-bezier(0.32, 0.72, 0.28, 1);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--foam);
  background-color: var(--abyss);
  background-image:
    radial-gradient(120% 82% at 88% -12%, rgba(27, 106, 147, 0.40), rgba(27, 106, 147, 0) 62%),
    radial-gradient(90% 68% at 4% 104%, rgba(53, 240, 192, 0.07), rgba(53, 240, 192, 0) 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--foam);
}

h1 { font-size: clamp(32px, 4.4vw, 56px); }
h2 { font-size: clamp(26px, 3vw, 44px); }
h3 { font-size: clamp(19px, 1.8vw, 26px); }
h4 { font-size: clamp(16px, 1.3vw, 19px); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--coral); }

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

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

button { font: inherit; color: inherit; }

strong { font-weight: 700; color: var(--foam); }

::selection { background: var(--coral); color: var(--abyss); }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 18px;
  background: var(--coral);
  color: var(--abyss);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--abyss);
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.site-main {
  display: block;
  min-height: 62vh;
  padding-top: clamp(28px, 5vw, 64px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 1023px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 排版原子 ---------- */
.display {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 0.35em;
}

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

.prose { max-width: 68ch; }
.prose p { color: var(--mist); }
.prose p + p { margin-top: 1em; }
.prose a { color: var(--neon); border-bottom: 1px solid rgba(53, 240, 192, 0.4); }
.prose a:hover { color: var(--coral); border-bottom-color: var(--coral); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--coral);
}

.anno {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--steel);
  user-select: none;
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(24px, 4vw, 44px) 0;
  background: linear-gradient(90deg, var(--line-strong), rgba(114, 138, 153, 0));
}

.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.4;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--foam);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--coral {
  background: var(--coral);
  color: var(--abyss);
  border-color: var(--coral);
}
.btn--coral:hover { background: #FF8768; border-color: #FF8768; color: var(--abyss); }

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

.btn--neon {
  background: var(--neon);
  color: var(--abyss);
  border-color: var(--neon);
}
.btn--neon:hover { background: #6CF7D6; border-color: #6CF7D6; color: var(--abyss); }

/* ---------- 标签 / 状态 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
  white-space: nowrap;
}
.tag--coral { border-color: rgba(255, 107, 74, 0.55); color: var(--coral); }
.tag--neon { border-color: rgba(53, 240, 192, 0.5); color: var(--neon); }

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(11, 41, 66, 0.92), rgba(6, 26, 46, 0.88));
  border: 1px solid var(--line);
  border-radius: 0;
}

.panel--tight { padding: clamp(14px, 1.8vw, 22px); }
.panel--flat { background: var(--deck); }
.panel--light {
  background: var(--light);
  border-color: rgba(6, 26, 46, 0.16);
  color: var(--abyss);
}
.panel--light h2,
.panel--light h3,
.panel--light h4 { color: var(--abyss); }
.panel--light .lead,
.panel--light p { color: #33546B; }

.panel__index {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--coral);
}

/* ---------- 数据卡 / 条形对照 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: rgba(11, 41, 66, 0.74);
  border: 1px solid var(--line);
}

.stat__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.stat__value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1;
  color: var(--foam);
}
.stat__value--neon { color: var(--neon); }
.stat__value--coral { color: var(--coral); }

.meter {
  position: relative;
  height: 6px;
  background: rgba(114, 138, 153, 0.24);
  overflow: hidden;
}

.meter__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v, 50%);
  background: linear-gradient(90deg, var(--swell), var(--neon));
  transform-origin: left center;
  transition: width 0.7s var(--ease);
}

/* ---------- 图片容器基础 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--deck) 0%, var(--swell) 58%, var(--abyss) 100%);
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 46, 0) 42%, rgba(6, 26, 46, 0.58) 100%);
}

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

/* ---------- 面包屑 ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--steel);
}

.crumb a { color: var(--mist); }
.crumb a:hover { color: var(--coral); }
.crumb [aria-current="page"] { color: var(--foam); }
.crumb__sep { color: var(--steel); opacity: 0.7; }

/* ---------- 标签页 / 分段切换 ---------- */
.tabs { display: block; }

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tabs__btn {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--mist);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.tabs__btn:hover { color: var(--foam); border-color: var(--coral); }

.tabs__btn[aria-selected="true"] {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--abyss);
}

.tabs__panel { padding-top: clamp(18px, 2.4vw, 28px); }
.tabs__panel[hidden] { display: none; }

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

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

/* ==========================================================================
   HEADER — 侧边轨道导航
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 80;
}

/* 移动端顶部条 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 82;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px var(--pad);
  background: rgba(6, 26, 46, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--foam);
}
.topbar__brand:hover { color: var(--foam); }

.topbar__mark {
  width: 18px;
  height: 3px;
  background: var(--coral);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--foam);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--coral); color: var(--coral); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--coral);
  transition: background-color 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--coral);
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 轨道本体（移动端 = 抽屉） */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(86vw, 320px);
  padding: 24px 20px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--deck) 0%, var(--abyss) 72%);
  border-right: 1px solid var(--line-strong);
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform 0.34s var(--ease), visibility 0.34s var(--ease);
}

.rail[data-open] {
  transform: none;
  visibility: visible;
}

.site-header[data-open]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 85;
  background: var(--overlay);
}

.rail__brand {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--foam);
}
.rail__brand:hover { color: var(--foam); }

.rail__mark { width: 28px; height: 3px; background: var(--coral); }

.rail__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.rail__note {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 10px 11px 14px;
  color: var(--mist);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 22px;
  background: var(--coral);
  transform: translateY(-50%) scaleY(0);
  transform-origin: center;
  transition: transform 0.24s var(--ease);
}

.rail__link:hover {
  color: var(--foam);
  background: rgba(27, 106, 147, 0.22);
}

.rail__link[aria-current="page"] {
  color: var(--foam);
  background: rgba(27, 106, 147, 0.30);
}

.rail__link[aria-current="page"]::before {
  transform: translateY(-50%) scaleY(1);
}

.rail__no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.rail__link[aria-current="page"] .rail__no { color: var(--coral); }

.rail__cta {
  margin-top: auto;
  width: 100%;
  font-size: 13px;
  padding: 12px 10px;
  letter-spacing: 0.06em;
}

/* 桌面端：固定竖向轨道 */
@media (min-width: 900px) {
  body { padding-left: var(--rail-w); }

  .site-main { padding-top: clamp(40px, 5vw, 72px); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    z-index: 70;
    background: linear-gradient(180deg, rgba(11, 41, 66, 0.96), rgba(6, 26, 46, 0.99));
    border-right: 1px solid var(--line-strong);
  }

  .topbar { display: none; }

  .rail {
    position: static;
    width: 100%;
    height: 100%;
    padding: 24px 12px 22px;
    gap: 18px;
    border-right: 0;
    background: transparent;
    transform: none;
    visibility: visible;
    overflow-y: auto;
    transition: none;
  }

  .site-header[data-open]::after { content: none; }

  .rail__brand { gap: 8px; padding-bottom: 16px; }
  .rail__mark { width: 22px; height: 3px; }
  .rail__name { font-size: 15px; letter-spacing: 0.06em; }
  .rail__note { font-size: 10px; line-height: 1.5; letter-spacing: 0; }

  .rail__link {
    gap: 5px;
    padding: 10px 4px 10px 10px;
    font-size: 13px;
    letter-spacing: 0.02em;
  }
  .rail__link::before { height: 18px; }
  .rail__no { font-size: 9px; }

  .rail__cta {
    font-size: 12px;
    padding: 11px 6px;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.4;
  }
}

/* ==========================================================================
   FOOTER — 层叠收束带
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  padding-top: clamp(36px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(6, 26, 46, 0.94), var(--deck) 100%);
  border-top: 1px solid var(--line-strong);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--coral) 0 26px,
    rgba(255, 107, 74, 0) 26px 60px
  );
  opacity: 0.85;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 44px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; }
}

.footer-brand { max-width: 42ch; }

.footer-brand__name {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--foam);
}

.footer-brand__summary {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-brand__cta { min-height: 42px; padding: 10px 18px; font-size: 14px; }

.footer-nav__title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--coral);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav__list a {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-nav__list a:hover {
  color: var(--foam);
  border-bottom-color: var(--coral);
}

.footer-contact__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-contact__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact__key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-contact__val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--foam);
  word-break: break-word;
}

.footer-contact__note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--steel);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--steel);
}

.footer-meta__copy,
.footer-meta__icp { margin: 0; }

.footer-meta__icp { font-family: var(--mono); color: var(--mist); }

/* ==========================================================================
   无障碍 / 减少动效
   ========================================================================== */
@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; }
  .rail { transition: none; }
  .btn:hover { transform: none; }
}
