/* ==========================================================================
   四季体育 · /assets/site.css
   赛季年鉴画布 / 悬浮胶囊导航 / 四季四色 / 锐利直角与精密细线
   ========================================================================== */

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

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

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

ul, ol { list-style: none; }

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

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

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

/* 2. 变量 ---------------------------------------------------------------- */
:root {
  --ink: #0E2B22;
  --sand: #F4EFE4;
  --charcoal: #171A18;
  --fog: #D7D0C3;
  --spring: #5E9B57;
  --summer: #E86A2B;
  --autumn: #C99A3D;
  --winter: #7FA9BF;
  --flame: #F28A2E;
  --gold-ink: #7A4B17;

  --line: rgba(23, 26, 24, .16);
  --line-strong: rgba(23, 26, 24, .34);
  --line-light: rgba(244, 239, 228, .18);
  --muted: rgba(23, 26, 24, .66);
  --sand-muted: rgba(244, 239, 228, .68);
  --ink-veil: rgba(14, 43, 34, .07);

  --font-display: "Barlow Condensed", "Roboto Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Noto Sans SC", monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);

  --step-1: clamp(15px, .4vw + 14px, 17px);
  --step-2: clamp(20px, 2.4vw, 26px);
  --step-3: clamp(26px, 3.6vw, 38px);
  --step-4: clamp(32px, 5vw, 54px);
  --step-5: clamp(40px, 7.4vw, 86px);
  --step-num: clamp(52px, 10vw, 132px);

  --dur: 200ms;
  --border: 1px solid var(--line);
}

/* 3. 中文排版与基础 ------------------------------------------------------- */
body {
  background: var(--sand);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--step-1);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: .012em;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }

::selection {
  background: var(--flame);
  color: #1A0E02;
}

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

[id] { scroll-margin-top: 108px; }

#main-content { display: block; }
#main-content:focus { outline: none; }

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.page-main { display: block; padding-top: clamp(14px, 2.4vw, 28px); }

.prose { max-width: 72ch; }
.prose > p + p { margin-top: 1em; }

.mono { font-family: var(--font-mono); }

/* 4. 跳转链接 ------------------------------------------------------------ */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  display: inline-block;
  padding: 11px 18px;
  background: var(--ink);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  border: 1px solid var(--flame);
  transition: top var(--dur) ease;
}

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

/* 5. 头部：悬浮胶囊浮岛 --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: clamp(8px, 1.4vw, 16px) 0 6px;
  background: linear-gradient(180deg, var(--sand) 0%, var(--sand) 64%, rgba(244, 239, 228, 0) 100%);
}

.header-shell {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.nav-island {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  min-height: 62px;
  padding: 6px 8px 8px 14px;
  background: var(--sand);
  border: 1px solid var(--fog);
  border-radius: 999px;
  box-shadow:
    0 22px 44px -36px rgba(14, 43, 34, .95),
    inset 0 1px 0 rgba(255, 255, 255, .65);
}

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

.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.brand-mark span { display: block; background: var(--fog); }
.brand-mark span:nth-child(1) { background: var(--spring); }
.brand-mark span:nth-child(2) { background: var(--summer); }
.brand-mark span:nth-child(3) { background: var(--autumn); }
.brand-mark span:nth-child(4) { background: var(--winter); }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .012em;
  color: var(--ink);
  white-space: nowrap;
  transition: background var(--dur) ease, color var(--dur) ease;
}

.nav-link:hover { background: var(--ink-veil); }

.nav-link[aria-current="page"] {
  background: var(--ink);
  color: var(--sand);
  font-weight: 700;
}

/* 工具区 */
.header-utility {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-cta { white-space: nowrap; }

.utility-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink);
  padding: 8px 2px;
  border-bottom: 1px solid var(--line-strong);
  transition: color var(--dur) ease, border-color var(--dur) ease;
}

.utility-link:hover {
  color: var(--gold-ink);
  border-color: var(--gold-ink);
}

/* 汉堡 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  transition: background var(--dur) ease, border-color var(--dur) ease;
}

.nav-toggle:hover { background: var(--ink-veil); }

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

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

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

.nav-toggle[aria-expanded="true"] { border-color: var(--ink); background: var(--ink-veil); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* 滚动进度尺 */
.scroll-meter {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--spring) 0%, var(--summer) 38%, var(--autumn) 68%, var(--winter) 100%);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform .1s linear;
  pointer-events: none;
  opacity: .92;
}

@keyframes nav-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 头部响应式 */
@media (max-width: 1180px) {
  .utility-link { display: none; }
}

@media (max-width: 1079px) {
  .site-header { padding-bottom: 10px; }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    z-index: 6;
    padding: 8px;
    background: var(--sand);
    border: 1px solid var(--fog);
    border-radius: 20px;
    box-shadow: 0 30px 50px -32px rgba(14, 43, 34, .9);
  }

  .site-nav[data-open="true"] {
    display: block;
    animation: nav-panel-in 200ms ease both;
  }

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

  .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .nav-link[aria-current="page"] { border-radius: 12px; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 17px; letter-spacing: .1em; }
  .nav-island { padding-left: 12px; }
  .header-cta { padding: 9px 12px; font-size: 11.5px; letter-spacing: .04em; }
  .scroll-meter { left: 12px; right: 12px; }
}

/* 6. 按钮 ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--sand);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--btn-bd);
  border-radius: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform var(--dur) ease, background var(--dur) ease,
              color var(--dur) ease, border-color var(--dur) ease;
}

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

.btn--flame {
  --btn-bg: var(--flame);
  --btn-fg: #1A0E02;
  --btn-bd: var(--flame);
}

.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--sand);
  --btn-bd: var(--ink);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--sand);
  --btn-bd: var(--ink);
}

.btn--sm {
  padding: 9px 14px;
  font-size: 12px;
  letter-spacing: .06em;
}

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

/* 7. 页脚 ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink);
  color: var(--sand);
}

.footer-seasons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 6px;
}

.footer-seasons__seg { display: block; height: 100%; }
.footer-seasons__seg:nth-child(1) { background: var(--spring); }
.footer-seasons__seg:nth-child(2) { background: var(--summer); }
.footer-seasons__seg:nth-child(3) { background: var(--autumn); }
.footer-seasons__seg:nth-child(4) { background: var(--winter); }

.footer-inner {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(36px, 6vw, 68px) 0 clamp(20px, 3vw, 30px);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px);
}

.footer-brand .brand-mark { margin-bottom: 16px; }

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
  color: var(--sand);
}

.footer-tagline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--autumn);
}

.footer-line {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--sand-muted);
}

.footer-col__title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--sand-muted);
}

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

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 14.5px;
  color: rgba(244, 239, 228, .86);
  transition: color var(--dur) ease, padding-left var(--dur) ease;
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--flame);
  transition: width var(--dur) ease;
}

.footer-link:hover {
  color: var(--flame);
  padding-left: 10px;
}

.footer-link:hover::before { width: 6px; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: rgba(244, 239, 228, .48);
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(244, 239, 228, .92);
}

.footer-cta {
  margin-top: 18px;
  align-self: flex-start;
  display: inline-flex;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 28px;
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
}

.footer-legal,
.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.75;
  color: rgba(244, 239, 228, .6);
}

.footer-note { max-width: 56ch; }

@media (min-width: 720px) {
  .footer-top { grid-template-columns: 1.15fr 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
}

@media (min-width: 1040px) {
  .footer-top { grid-template-columns: 1.5fr .8fr .8fr 1.15fr; }
  .footer-col--contact { grid-column: auto; }
}

/* 8. 章节 / 画板 --------------------------------------------------------- */
.section {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0;
}

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

.section--fog {
  background: var(--fog);
  color: var(--charcoal);
}

.section--rule {
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}

.section--ink.section--rule {
  background-image: linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(24px, 3.6vw, 44px);
}

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

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--flame);
  flex: 0 0 auto;
}

.section--ink .eyebrow { color: var(--autumn); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.02;
}

.section-lede {
  max-width: 62ch;
  font-size: 16.5px;
  color: var(--muted);
}

.section--ink .section-lede { color: var(--sand-muted); }

.panel {
  border: var(--border);
  background: var(--sand);
  padding: clamp(18px, 2.6vw, 32px);
}

.panel--ink {
  background: var(--ink);
  color: var(--sand);
  border-color: rgba(244, 239, 228, .22);
}

/* 9. 数据与标签 ---------------------------------------------------------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: var(--step-num);
  font-weight: 700;
  line-height: .86;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}

.section--ink .stat-num { color: var(--sand); }
.section--ink .stat-label { color: var(--sand-muted); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
}

.tag--spring { color: #3E6B39; border-color: rgba(94, 155, 87, .58); background: rgba(94, 155, 87, .12); }
.tag--summer { color: #A3441A; border-color: rgba(232, 106, 43, .55); background: rgba(232, 106, 43, .12); }
.tag--autumn { color: var(--gold-ink); border-color: rgba(201, 154, 61, .6); background: rgba(201, 154, 61, .14); }
.tag--winter { color: #38647A; border-color: rgba(127, 169, 191, .6); background: rgba(127, 169, 191, .16); }

/* 10. 面包屑 ------------------------------------------------------------- */
.crumbs {
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--muted);
}

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

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

.crumbs li + li::before {
  content: "/";
  color: var(--line-strong);
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* 11. 栅格 --------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.4vw, 30px);
}

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

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

/* 12. 图片容器基础规则（页面阶段放入 <img>） ----------------------------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink);
  border: var(--border);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(120% 90% at 18% 0%, rgba(14, 43, 34, .32), rgba(14, 43, 34, 0) 62%),
    repeating-linear-gradient(0deg, rgba(244, 239, 228, .07) 0 1px, transparent 1px 3px);
}

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

.media__caption {
  margin-top: 10px;
  max-width: 64ch;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: var(--muted);
}

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

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: rgba(23, 26, 24, .05);
  border: var(--border);
}

.tabs__btn {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
  transition: background var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
}

.tabs__btn:hover { background: var(--ink-veil); }

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

.tabs__panel {
  padding-top: clamp(18px, 3vw, 30px);
  animation: tab-in 220ms ease both;
}

.tabs__panel[hidden] { display: none; }

@keyframes tab-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 14. 显现动效 ----------------------------------------------------------- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

.js-motion [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 15. 减弱动效 ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover { transform: none; }
}
