/* =========================================================================
   乐鱼赛事 · 共享样式表 /assets/site.css
   技术蓝图网格 · 深海蓝 / 荧光橙 / 裁决黄 / 球场绿
   ========================================================================= */

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

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

body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --deep: #061A2B;
  --deep-2: #08243A;
  --panel: #0B2E4A;
  --line: #1C5D7A;
  --line-soft: rgba(28, 93, 122, 0.55);
  --line-faint: rgba(28, 93, 122, 0.26);
  --accent: #FF6B1A;
  --accent-soft: rgba(255, 107, 26, 0.16);
  --caution: #FFC857;
  --pitch: #2EC4B6;
  --ice: #E6F1F7;
  --steel: #8FAAB8;
  --white: #FFFFFF;
  --paper: #F5F7FA;
  --ink: #0A2233;

  --font-head: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1320px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 78px;
  --ease: cubic-bezier(0.25, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  padding-top: var(--header-h);
  background-color: var(--deep);
  background-image:
    linear-gradient(to right, rgba(28, 93, 122, 0.13) 0 1px, transparent 1px 120px),
    linear-gradient(to bottom, rgba(28, 93, 122, 0.09) 0 1px, transparent 1px 120px);
  background-attachment: fixed;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--white);
}

h1 { font-size: clamp(34px, 5.4vw, 72px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
h4 { font-size: 18px; }

p { max-width: 74ch; }
strong, b { color: var(--white); font-weight: 700; }
small { font-size: 13px; }
::selection { background: var(--accent); color: var(--deep); }

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

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  display: inline-block;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

/* ---------- 5. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  min-height: var(--header-h);
  background: linear-gradient(to bottom, rgba(6, 26, 43, 0.78), rgba(6, 26, 43, 0));
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header[data-scrolled] {
  background: rgba(6, 26, 43, 0.95);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.header-grid {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 42px);
  min-height: var(--header-h);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--accent);
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 107, 26, 0.45), transparent 62%),
    linear-gradient(135deg, rgba(46, 196, 182, 0.24), rgba(6, 26, 43, 0) 62%);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
  background: var(--pitch);
}

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

.brand-text__name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

/* 主导航（桌面） */
.primary-nav { margin-left: auto; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.2vw, 16px);
}

.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 8px 12px;
  font-size: clamp(14px, 1.05vw, 15.5px);
  font-weight: 500;
  color: var(--ice);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.primary-nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--steel);
  transition: color 0.2s var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.primary-nav__link:hover { color: var(--white); }
.primary-nav__link:hover::after { transform: scaleX(1); }

.primary-nav__link[aria-current="page"] { color: var(--accent); }
.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav__link[aria-current="page"] .primary-nav__index { color: var(--caution); }

/* 移动开关 */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 42px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: rgba(11, 46, 74, 0.6);
  color: var(--ice);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

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

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}

.site-header[data-open] .nav-toggle { border-color: var(--accent); color: var(--accent); }
.site-header[data-open] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 头部刻度进度尺 */
.header-meter {
  position: relative;
  height: 3px;
  background-color: rgba(28, 93, 122, 0.22);
  background-image: repeating-linear-gradient(
    to right,
    rgba(28, 93, 122, 0.85) 0 1px,
    transparent 1px 20px
  );
}

.header-meter__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--pitch), var(--accent));
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 120px);
  background: var(--deep);
  border-top: 1px solid var(--line);
  color: var(--steel);
  font-size: 14px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(28, 93, 122, 0.2) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, rgba(28, 93, 122, 0.14) 0 1px, transparent 1px 96px);
}

.footer-grid {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(42px, 6vw, 76px) var(--gutter) clamp(28px, 4vw, 46px);
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(220px, 1.2fr);
  gap: clamp(22px, 3.4vw, 54px);
}

.footer-brand__name {
  font-family: var(--font-head);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--white);
}

.footer-brand__tag {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.footer-brand__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--steel);
}

.footer-nav__title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--caution);
}

.footer-nav__list { display: grid; gap: 10px; }

.footer-nav__list a {
  display: inline-block;
  font-size: 14.5px;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-nav__list a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-nav__list a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.footer-contact__list {
  display: grid;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.footer-contact__list li { display: grid; gap: 3px; }

.footer-contact__key {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--pitch);
}

.footer-contact__val { color: var(--ice); word-break: break-word; }

.footer-contact__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--steel);
}

.footer-base {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.footer-base__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--gutter) 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  color: var(--steel);
}

.footer-base__copy,
.footer-base__links { margin: 0; }

.footer-base__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-base__links a {
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-base__links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

.section { padding-block: clamp(44px, 6.5vw, 92px); }
.section--tight { padding-block: clamp(26px, 4vw, 54px); }

.section--paper {
  background: var(--paper);
  color: var(--ink);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: #061A2B; }

.section--paper strong { color: #061A2B; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 26px);
}

.grid-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(18px, 2.6vw, 40px);
}

.grid-split--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb__list li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__list li + li::before { content: "/"; color: var(--line); }

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

.breadcrumb a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 9. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  background: rgba(11, 46, 74, 0.55);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--deep);
  font-weight: 700;
}

.btn--primary:hover { background: #FF8038; border-color: #FF8038; color: var(--deep); }

.btn--ghost { background: transparent; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--caution);
}

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

.blueprint-card {
  position: relative;
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(11, 46, 74, 0.92), rgba(6, 26, 43, 0.92));
}

.blueprint-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.blueprint-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: rgba(28, 93, 122, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ice);
}

.tag--accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tag--caution { border-color: var(--caution); color: var(--caution); background: rgba(255, 200, 87, 0.12); }
.tag--pitch { border-color: var(--pitch); color: var(--pitch); background: rgba(46, 196, 182, 0.12); }

/* 主题筛选 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-chip {
  appearance: none;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.filter-chip:hover { color: var(--ice); border-color: var(--ice); }

.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--deep);
  font-weight: 700;
}

[data-filtered-out] { display: none !important; }

/* ---------- 10. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-soft);
  background-color: var(--panel);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(28, 93, 122, 0.18) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to bottom, rgba(28, 93, 122, 0.14) 0 1px, transparent 1px 40px);
}

.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--3x2 { aspect-ratio: 3 / 2; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(6, 26, 43, 0.94), rgba(6, 26, 43, 0));
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ice);
}

/* ---------- 11. 显现动效 ---------- */
[data-reveal][data-revealed] {
  animation: blueprint-rise 0.5s var(--ease) both;
}

@keyframes blueprint-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 12. 工具类 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 13. 平板 ---------- */
@media (max-width: 1080px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: flex; }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin-left: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 26px;
    background: rgba(6, 26, 43, 0.98);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s linear;
  }

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

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

  .primary-nav__item { border-bottom: 1px dashed var(--line-faint); }
  .primary-nav__item:last-child { border-bottom: 0; }

  .primary-nav__link {
    width: 100%;
    padding: 15px 2px;
    font-size: 17px;
  }

  .primary-nav__link::after { left: 0; right: auto; width: 28px; bottom: 10px; }

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

/* ---------- 14. 手机 ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .brand-text__name { font-size: 17px; }
  .brand-text__tag { letter-spacing: 0.14em; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-base__inner { justify-content: flex-start; }
}

/* ---------- 15. 降低动效 ---------- */
@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;
  }

  [data-reveal][data-revealed] { animation: none; }
  .header-meter__fill { transition: none; }
}
