/* ============================================================
   博鱼看台 · 共享样式 /assets/site.css
   水下竞技场 · 侧边导览 · 精密网格 · 锐利直角
   ============================================================ */

/* ---------- 0. 设计变量 ---------- */
:root {
  --abyss: #04121F;
  --deep: #082A3F;
  --fin-dark: #0E4A5E;
  --fin: #1FA3A8;
  --fin-light: #7FE3DA;
  --coral: #FF5F3D;
  --coral-soft: #FFB38A;
  --mist: #E8F4F2;
  --slate: #8FA9B3;
  --grid: #152F3D;

  --mist-80: rgba(232, 244, 242, 0.80);
  --mist-65: rgba(232, 244, 242, 0.66);
  --mist-45: rgba(232, 244, 242, 0.45);
  --fin-30: rgba(31, 163, 168, 0.30);
  --fin-12: rgba(31, 163, 168, 0.12);

  --font-cn: "Noto Sans SC", "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --rail-w: 92px;
  --header-h: 88px;
}

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

html {
  background-color: #04121F;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

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

ul, ol { 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;
  padding: 0;
  cursor: pointer;
}

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

/* ---------- 2. 页面基底 ---------- */
body {
  position: relative;
  min-height: 100vh;
  background-color: transparent;
  color: var(--mist);
  font-family: var(--font-cn);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(31, 163, 168, 0.16), transparent 62%),
    radial-gradient(900px 520px at 4% 104%, rgba(14, 74, 94, 0.55), transparent 66%),
    radial-gradient(700px 400px at 50% 45%, rgba(8, 42, 63, 0.55), transparent 70%),
    var(--abyss);
}

/* ---------- 3. 排版 ---------- */
h1, .h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.012em;
  color: var(--mist);
}

h2, .h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--mist);
}

h3, .h3 {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.36;
  font-weight: 700;
  color: var(--mist);
}

p { margin: 0; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fin-light);
}

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

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.78;
  color: var(--mist-80);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2,
.prose h3 { margin-top: 1.9em; }

.prose a {
  color: var(--fin-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--fin-30);
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

.prose a:hover {
  color: #fff;
  text-decoration-color: var(--coral);
}

/* ---------- 4. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.page-body {
  padding-block: clamp(40px, 5.5vw, 84px) clamp(56px, 7vw, 108px);
}

.main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

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

/* ---------- 5. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
  transition: background-color 150ms ease, border-color 150ms ease,
              color 150ms ease, transform 150ms ease;
}

.btn--primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #1B0A05;
}

.btn--primary:hover {
  background: var(--coral-soft);
  border-color: var(--coral-soft);
  color: #1B0A05;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(127, 227, 218, 0.42);
  color: var(--fin-light);
}

.btn--ghost:hover {
  background: var(--fin-12);
  border-color: var(--fin-light);
  color: #FFFFFF;
}

.btn--sm {
  padding: 9px 15px;
  font-size: 13px;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 15px;
}

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

/* ---------- 6. 通用组件 ---------- */
.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(31, 163, 168, 0.4);
  border-radius: 2px;
  background: var(--fin-12);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--fin-light);
}

.tag--coral {
  border-color: rgba(255, 95, 61, 0.5);
  background: rgba(255, 95, 61, 0.1);
  color: var(--coral-soft);
}

.panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--grid);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(14, 74, 94, 0.52) 0%, rgba(8, 42, 63, 0.88) 100%);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.panel:hover { border-color: rgba(31, 163, 168, 0.55); }

.panel--offset { transform: translate(-12px, -12px); }

.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: clamp(36px, 4.5vw, 68px);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--grid);
}

.rule__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}

.index-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 1px;
  background: var(--fin);
}

.index-dot--coral { background: var(--coral); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

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

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--grid);
}

.breadcrumbs a {
  color: var(--slate);
  transition: color 150ms ease;
}

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

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

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--grid);
  border-radius: 2px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(14, 74, 94, 0.95) 0%, rgba(4, 18, 31, 0.98) 100%),
    var(--deep);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 18, 31, 0) 42%, rgba(4, 18, 31, 0.78) 100%);
}

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

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

/* ---------- 7. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--coral);
  color: #1B0A05;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 14px;
  outline: 2px solid var(--mist);
  outline-offset: 2px;
}

/* ============================================================
   8. 头部
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    rgba(4, 18, 31, 0.95) 0%,
    rgba(4, 18, 31, 0.72) 68%,
    rgba(4, 18, 31, 0) 100%
  );
  border-bottom: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.site-header[data-scrolled] {
  background-image: none;
  background-color: var(--deep);
  border-bottom-color: var(--grid);
  box-shadow: 0 18px 44px rgba(2, 9, 16, 0.55);
}

.header-frame {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  width: 100%;
  max-width: 1440px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

/* --- 品牌轨道 --- */
.brand-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  align-self: stretch;
  padding-right: 16px;
  border-right: 1px solid var(--grid);
  color: var(--fin-light);
  transition: color 150ms ease, border-color 150ms ease;
}

.brand-rail:hover {
  color: var(--coral-soft);
  border-right-color: var(--fin);
}

.brand-rail__mark {
  display: block;
  line-height: 0;
}

.brand-rail__word {
  font-family: var(--font-cn);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--mist);
  white-space: nowrap;
}

/* --- 主导航 --- */
.site-nav {
  min-width: 0;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 32px 2px 34px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--mist-65);
  transition: color 150ms ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 26px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--mist);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--mist);
}

.site-nav__link[aria-current="page"]::after {
  left: 2px;
  right: auto;
  width: 18px;
  height: 2px;
  background: var(--fin-light);
  transform: none;
}

/* --- 行动组 --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

/* --- 移动菜单按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(127, 227, 218, 0.35);
  border-radius: 2px;
  background: transparent;
  color: var(--mist);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.nav-toggle:hover {
  border-color: var(--fin-light);
  background: var(--fin-12);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 160ms ease, top 160ms ease, bottom 160ms ease;
}

.nav-toggle__bars span:first-child { top: 1px; }
.nav-toggle__bars span:last-child { bottom: 1px; }

.site-header[data-open] .nav-toggle__bars span:first-child {
  top: 5px;
  transform: rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:last-child {
  bottom: 5px;
  transform: rotate(-45deg);
}

/* ============================================================
   9. 页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 6vw, 96px);
  border-top: 1px solid var(--fin-dark);
  background: linear-gradient(180deg, var(--deep) 0%, #051828 62%, var(--abyss) 100%);
  color: var(--mist-65);
  font-size: 14px;
}

.footer-frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(40px, 5vw, 72px) clamp(18px, 4vw, 48px) clamp(24px, 3vw, 36px);
  overflow: hidden;
}

.footer-frame::before {
  content: "BOYU STANDS / UNDERWATER ARENA";
  position: absolute;
  top: 6px;
  right: -8px;
  font-family: var(--font-mono);
  font-size: clamp(28px, 6vw, 84px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(31, 163, 168, 0.07);
  pointer-events: none;
  white-space: nowrap;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1.35fr;
  column-gap: 0;
  row-gap: 40px;
}

.footer-col {
  padding-inline: 28px;
  border-left: 1px solid var(--grid);
}

.footer-col:first-child {
  padding-left: 0;
  border-left: 0;
}

.footer-col:last-child { padding-right: 0; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fin-light);
  transition: color 150ms ease;
}

.footer-brand:hover { color: var(--coral-soft); }

.footer-brand__mark { display: block; line-height: 0; }

.footer-brand__word {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.footer-note {
  margin-top: 16px;
  max-width: 32ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.footer-legal {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 10px;
  border: 1px solid var(--grid);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mist-45);
}

.footer-title {
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  color: var(--fin-light);
}

.footer-list li + li { margin-top: 9px; }

.footer-list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: var(--mist-65);
  transition: color 150ms ease, transform 150ms ease;
}

.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--fin);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}

.footer-list a:hover {
  color: var(--mist);
  transform: translateX(2px);
}

.footer-list a:hover::after { transform: scaleX(1); }

.footer-contact li + li { margin-top: 14px; }

.footer-label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fin);
}

.footer-value {
  display: block;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--mist-80);
  word-break: break-word;
}

.footer-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--grid);
  font-size: 13px;
  color: var(--slate);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-legal__links a {
  font-size: 13px;
  color: var(--slate);
  transition: color 150ms ease;
}

.footer-legal__links a:hover { color: var(--fin-light); }

/* ---------- 10. 侧轨滚动高亮（页面阶段使用） ---------- */
[data-spy-link][aria-current="true"] {
  color: var(--mist);
  border-color: var(--fin-light);
}

[data-spy-link][aria-current="true"] .index-dot {
  background: var(--coral);
}

/* ============================================================
   11. 响应式
   ============================================================ */
@media (max-width: 1080px) {
  :root { --header-h: 68px; }

  .header-frame {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 10px;
    min-height: var(--header-h);
  }

  .brand-rail {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-right: 0;
    border-right: 0;
  }

  .brand-rail__word {
    font-size: 14px;
    letter-spacing: 0.06em;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    display: none;
    padding: 6px clamp(16px, 4vw, 32px) 20px;
    border-top: 1px solid var(--grid);
    border-bottom: 1px solid var(--grid);
    background: var(--deep);
    box-shadow: 0 28px 52px rgba(2, 9, 16, 0.65);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 15px 4px;
    border-bottom: 1px solid var(--grid);
    font-size: 15px;
  }

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

  .site-nav__link[aria-current="page"] {
    padding-left: 14px;
    color: var(--fin-light);
  }

  .site-nav__link[aria-current="page"]::after {
    display: block;
    left: 0;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 4px;
    height: 18px;
    margin-top: -9px;
    background: var(--coral);
  }

  .header-actions .btn--ghost { display: none; }

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

  .grid-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
}

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

  .footer-col {
    padding-inline: 0;
    border-left: 0;
  }

  .footer-note { max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .header-frame { column-gap: 8px; }

  .header-actions .btn--primary {
    padding: 8px 10px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .nav-toggle__label { display: none; }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }

  .footer-col + .footer-col {
    padding-top: 28px;
    border-top: 1px solid var(--grid);
  }

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

  .panel--offset { transform: none; }
}

@media (max-width: 420px) {
  .brand-rail__word { font-size: 13px; }
  .header-actions .btn--primary { font-size: 11px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
