/* ==========================================================================
   猛犸体育中文站 · 共享样式 /assets/site.css
   冻原档案 × 赛事数据台
   ========================================================================== */

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

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

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

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

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

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

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- 变量 ---------- */
:root {
  /* 色彩 */
  --bone: #F3EFE6;
  --bone-deep: #E8E1D4;
  --peat: #2B211B;
  --peat-soft: #4A382D;
  --ice: #3FA9F5;
  --ice-deep: #1B6F9E;
  --ice-pale: #9ED8F2;
  --lava: #FF6B35;
  --tool: #8A9A8B;
  --frost: #C9D8DE;
  --night: #14100D;
  --focus: #9ED8F2;

  --ink: var(--peat);
  --paper: var(--bone);

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

  /* 度量 */
  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --cut: 16px;
  --line: rgba(43, 33, 27, .16);
  --line-strong: rgba(43, 33, 27, .34);
  --ease: cubic-bezier(.32, .72, .28, 1);
}

/* ---------- 中文排版基底 ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.75;
  color: var(--peat);
  background-color: var(--bone);
  background-image:
    repeating-linear-gradient(114deg,
      rgba(43, 33, 27, .022) 0 1px,
      transparent 1px 10px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.06;
  color: var(--peat);
}

p + p { margin-top: .85em; }

strong { font-weight: 700; }

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

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

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

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--night);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: top .18s var(--ease);
}

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

/* ==========================================================================
   页头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bone);
  border-bottom: 1px solid var(--line-strong);
  transition: box-shadow .2s var(--ease);
}

.site-header[data-compact] {
  box-shadow: 0 18px 34px -30px rgba(20, 16, 13, .95);
}

.header-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 顶部细条 */
.header-strip {
  background: var(--night);
  color: rgba(243, 239, 230, .82);
}

.header-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.strip-callsign {
  color: var(--ice-pale);
  white-space: nowrap;
}

.strip-meta {
  color: rgba(243, 239, 230, .52);
  letter-spacing: .16em;
  white-space: nowrap;
}

.strip-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.strip-link {
  color: rgba(243, 239, 230, .84);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.strip-link:hover {
  color: var(--bone);
  border-bottom-color: var(--ice);
}

/* 刊头 */
.masthead {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(243, 239, 230, 0) 0%, rgba(201, 216, 222, .16) 100%);
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: clamp(10px, 1.6vw, 18px);
  transition: padding-block .22s var(--ease);
}

.masthead-kicker {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--peat-soft);
}

.masthead-title {
  position: relative;
  justify-self: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1;
  letter-spacing: .04em;
  color: var(--peat);
  text-decoration: none;
  transition: font-size .22s var(--ease), letter-spacing .22s var(--ease);
}

.masthead-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 0;
  height: 2px;
  background: var(--ice);
  transform: translateX(-50%);
  transition: width .26s var(--ease);
}

.masthead-title:hover::after,
.masthead-title:focus-visible::after { width: 100%; }

.masthead-sub {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--peat-soft);
  white-space: nowrap;
}

/* 压缩态 */
.site-header[data-compact] .masthead__inner { padding-block: 6px; }

.site-header[data-compact] .masthead-kicker,
.site-header[data-compact] .masthead-sub { display: none; }

.site-header[data-compact] .masthead-title {
  font-size: clamp(19px, 2.1vw, 25px);
  letter-spacing: .02em;
}

/* 栏目条 */
.nav-bar {
  position: relative;
  background: var(--bone);
}

.nav-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.site-nav {
  width: 100%;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: clamp(6px, 1.7vw, 28px);
}

.nav-item { display: flex; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 15px 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: .02em;
  color: var(--peat);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.nav-link:hover {
  color: var(--ice-deep);
  border-bottom-color: var(--frost);
}

.nav-link[aria-current="page"] {
  color: var(--peat);
  border-bottom-color: var(--lava);
}

.nav-link[aria-current="page"]:hover {
  border-bottom-color: var(--lava);
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bone);
  border: 1px solid var(--line-strong);
  color: var(--peat);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background-color .16s var(--ease), color .16s var(--ease);
}

.nav-toggle:hover { background: var(--bone-deep); }

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

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

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--ice-deep), var(--ice));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--night);
  color: rgba(243, 239, 230, .78);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(63, 169, 245, .10) 0%, rgba(20, 16, 13, 0) 42%),
    repeating-linear-gradient(102deg,
      rgba(243, 239, 230, .028) 0 2px,
      transparent 2px 24px);
}

.footer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 64px) var(--gutter) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(24px, 3vw, 48px);
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid rgba(243, 239, 230, .16);
}

.footer-brand { min-width: 0; }

.footer-callsign {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ice-pale);
}

.footer-brand-line {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--bone);
}

.footer-tagline {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(243, 239, 230, .62);
}

.footer-note {
  margin-top: 14px;
  max-width: 40ch;
  padding-left: 12px;
  border-left: 2px solid rgba(63, 169, 245, .55);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(243, 239, 230, .5);
}

.footer-col { min-width: 0; }

.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, .46);
}

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

.footer-link {
  font-size: 14.5px;
  color: rgba(243, 239, 230, .82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-link:hover {
  color: var(--bone);
  border-bottom-color: var(--ice);
}

.footer-contact {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(243, 239, 230, .74);
}

.footer-contact__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, .42);
}

.footer-contact__value {
  display: block;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px 28px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .07em;
  color: rgba(243, 239, 230, .5);
}

.footer-fixed {
  color: rgba(243, 239, 230, .82);
}

.footer-icp {
  color: var(--ice-pale);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-legal__link {
  color: rgba(243, 239, 230, .7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-legal__link:hover {
  color: var(--bone);
  border-bottom-color: var(--frost);
}

.footer-copy {
  color: rgba(243, 239, 230, .44);
}

/* ==========================================================================
   通用内容组件
   ========================================================================== */
.page-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-shell--narrow {
  max-width: 880px;
}

.split {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ice-deep);
}

.section-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -.035em;
  color: var(--peat);
}

.section-lead {
  margin-top: 14px;
  max-width: 64ch;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.75;
  color: var(--peat-soft);
}

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

.rule--ice {
  background: linear-gradient(90deg, var(--ice) 0%, rgba(63, 169, 245, 0) 78%);
}

/* 按钮 */
.btn {
  --btn-bg: var(--peat);
  --btn-fg: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: transform .16s var(--ease), background-color .16s var(--ease),
              color .16s var(--ease), border-color .16s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--line {
  --btn-bg: transparent;
  --btn-fg: var(--peat);
  border-color: var(--line-strong);
}

.btn--line:hover {
  --btn-bg: var(--peat);
  --btn-fg: var(--bone);
  border-color: var(--peat);
}

.btn--ice {
  --btn-bg: var(--ice);
  --btn-fg: var(--night);
}

.btn--ice:hover {
  --btn-bg: var(--ice-deep);
  --btn-fg: var(--bone);
}

/* 面包屑 */
.breadcrumb {
  margin-block: clamp(16px, 2.4vw, 28px) 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--peat-soft);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--frost);
  margin-right: 0;
}

.breadcrumb-link {
  color: var(--peat-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.breadcrumb-link:hover {
  color: var(--ice-deep);
  border-bottom-color: var(--ice);
}

.breadcrumb-current {
  color: var(--peat);
  font-weight: 500;
}

/* 切角面板 */
.cut-panel {
  background: var(--bone);
  border: 1px solid var(--line);
  padding: clamp(18px, 2.4vw, 28px);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: transform .18s var(--ease), border-color .18s var(--ease),
              background-color .18s var(--ease);
}

.cut-panel:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(63, 169, 245, .14);
  color: var(--ice-deep);
  border: 1px solid rgba(27, 111, 158, .3);
}

.tag--lava {
  background: rgba(255, 107, 53, .14);
  color: #9A3410;
  border-color: rgba(255, 107, 53, .42);
}

.tag--tool {
  background: rgba(138, 154, 139, .18);
  color: #46564A;
  border-color: rgba(138, 154, 139, .46);
}

/* 图片容器 */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--bone-deep);
  background-image:
    repeating-linear-gradient(114deg,
      rgba(43, 33, 27, .06) 0 1px,
      transparent 1px 12px),
    radial-gradient(120% 90% at 18% 8%, rgba(201, 216, 222, .55) 0%, rgba(243, 239, 230, 0) 70%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

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

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--peat-soft);
  opacity: .78;
}

/* 刻度链接的激活态（由 JS 写入） */
[data-track-link].is-active {
  color: var(--peat);
  font-weight: 700;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }

  .masthead__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 6px;
    padding-block: 14px;
  }

  .masthead-kicker,
  .masthead-sub {
    justify-self: center;
    font-size: 10.5px;
    letter-spacing: .26em;
  }

  .nav-bar__inner {
    justify-content: flex-end;
    min-height: 58px;
  }

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

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 90;
    padding: 6px var(--gutter) 20px;
    background: var(--bone);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 30px 44px -34px rgba(20, 16, 13, .9);
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item {
    border-bottom: 1px solid var(--line);
  }

  .nav-item:last-child { border-bottom: 0; }

  .nav-link {
    justify-content: space-between;
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: color .16s var(--ease), border-color .16s var(--ease),
                background-color .16s var(--ease);
  }

  .nav-link:hover { border-left-color: var(--frost); }

  .nav-link[aria-current="page"] {
    border-left-color: var(--lava);
    background: rgba(63, 169, 245, .07);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .site-header[data-compact] .masthead-kicker,
  .site-header[data-compact] .masthead-sub { display: none; }
}

@media (max-width: 720px) {
  .strip-meta { display: none; }
  .header-strip__inner { gap: 12px; }
  .strip-links { gap: 14px; }
}

@media (max-width: 620px) {
  .masthead-kicker,
  .masthead-sub { display: none; }

  .masthead-title {
    font-size: clamp(24px, 8vw, 32px);
    letter-spacing: .05em;
  }

  .site-header[data-compact] .masthead-title {
    font-size: clamp(20px, 6vw, 24px);
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-legal { gap: 14px; }

  .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   动效偏好
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .btn:hover,
  .cut-panel:hover { transform: none; }
}
