/* =========================================================
   AB体育 · 共享样式表 /assets/site.css
   高原夜空 + 经幡五色 + 酥油灯暖金
   展览画册留白 × 现代粗野主义粗边框
   ========================================================= */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

b, strong { font-weight: 700; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 底色 */
  --ink-deep: #07111F;
  --navy: #0B1B33;
  --navy-soft: #122A4A;
  --paper: #FAF6EC;

  /* 交互与状态 */
  --gold: #F2B84B;
  --gold-soft: #F7D98B;
  --barley: #7FB069;

  /* 经幡五色 */
  --flag-blue: #2E7DD1;
  --flag-red: #C94C4C;
  --flag-yellow: #E8C547;
  --flag-green: #3F8F5A;

  /* 辅助 */
  --mist: #9FB3C8;
  --line: #2A3B55;

  /* 结构 */
  --shell: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
  --radius: 2px;

  /* 字号阶梯 */
  --step-1: 12px;
  --step-2: 14px;
  --step-3: 16px;
  --step-4: 20px;
  --step-5: 28px;
  --step-6: 40px;
  --step-7: 64px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;

  /* 硬阴影 */
  --shadow-hard: 8px 8px 0 var(--ink-deep);
  --shadow-soft: 5px 5px 0 var(--ink-deep);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- 3. Base ---------- */
body {
  background-color: var(--navy);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--step-3);
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--ink-deep);
}

.num,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

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

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--paper);
}
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { line-height: 1.3; letter-spacing: -0.01em; }
.prose a { color: var(--gold); border-bottom: 1px solid currentColor; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { list-style: disc; }
.prose ol li { list-style: decimal; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  flex: 0 0 auto;
}

.display {
  font-size: clamp(1.9rem, 4.6vw, 3.25rem);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.title-shift {
  display: inline-block;
  transform: translateX(-0.05em);
}

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.75;
  color: var(--mist);
}

.accent-gold { color: var(--gold); }
.accent-barley { color: var(--barley); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  color: var(--mist);
  border-radius: var(--radius);
  white-space: nowrap;
}
.tag--gold { color: var(--gold); border-color: rgba(242, 184, 75, 0.5); }
.tag--barley { color: var(--barley); border-color: rgba(127, 176, 105, 0.45); }
.tag--blue { color: var(--flag-blue); border-color: rgba(46, 125, 209, 0.45); }
.tag--red { color: var(--flag-red); border-color: rgba(201, 76, 76, 0.45); }

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 1rem;
  z-index: 999;
  transform: translateY(-220%);
  padding: 0.7rem 1.1rem;
  background: var(--gold);
  color: var(--ink-deep);
  font-weight: 800;
  font-size: var(--step-2);
  border: 2px solid var(--ink-deep);
  box-shadow: 4px 4px 0 var(--ink-deep);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--navy);
  color: var(--paper);
  border-bottom: 3px solid var(--line);
  transition: border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}
.site-header[data-stuck="true"] {
  border-bottom-color: var(--gold);
  box-shadow: 0 10px 0 -6px rgba(7, 17, 31, 0.9);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  min-height: 68px;
  padding-block: 0.8rem;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
  color: var(--paper);
}
.brand-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  border: 2px solid var(--ink-deep);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(7, 17, 31, 0.92);
  transform: rotate(-3.5deg);
  transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease);
}
.brand:hover .brand-glyph,
.brand:focus-visible .brand-glyph {
  transform: rotate(0deg) translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(7, 17, 31, 0.92);
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-size: 1.0625rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.brand-tag {
  margin-top: 0.22rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}
.brand--stacked .brand-name { font-size: 0.95rem; }

/* 状态条 */
.header-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-inline-start: auto;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 17, 31, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--mist);
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--barley);
  box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.18);
}
.status-item { display: inline-block; }
.status-num { color: var(--gold); font-weight: 700; }
.status-ok { color: var(--barley); font-weight: 700; }
.status-sep { color: var(--line); }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-deep);
  color: var(--paper);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.nav-toggle-bars {
  display: grid;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}
.nav-toggle-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* 导航轨道 */
.site-nav {
  background: var(--ink-deep);
  border-top: 1px solid var(--line);
}
.nav-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
.nav-cell {
  flex: 0 0 auto;
  border-right: 1px solid var(--line);
}
.nav-cell:first-child { border-left: 1px solid var(--line); }
.nav-link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.85rem clamp(0.75rem, 1.6vw, 1.35rem);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--paper);
  border-bottom: 3px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}
.nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--mist);
  transition: color 0.18s ease;
}
.nav-name { display: inline-block; }
.nav-link:hover {
  background: rgba(242, 184, 75, 0.1);
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.nav-link:hover .nav-num { color: var(--gold-soft); }
.nav-link[aria-current="page"] {
  background: var(--gold);
  color: var(--ink-deep);
  border-bottom-color: var(--gold-soft);
}
.nav-link[aria-current="page"] .nav-num {
  color: var(--ink-deep);
  opacity: 0.72;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  border-top: 3px solid var(--line);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.footer-scale {
  height: 20px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px 12px
  );
  background-size: 100% 40%;
  background-position: bottom left;
  background-repeat: repeat-x;
  opacity: 0.9;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(2rem, 4.5vw, 3.25rem);
}
.footer-brand { min-width: 0; }
.footer-note {
  margin-top: 1.1rem;
  max-width: 34ch;
  padding-left: 0.85rem;
  border-left: 2px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}
.footer-col { min-width: 0; }
.footer-heading {
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.footer-list {
  display: grid;
  gap: 0.55rem;
}
.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 2px;
  font-size: var(--step-2);
  color: var(--paper);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.footer-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--line);
  transform: rotate(45deg);
  transition: background-color 0.18s ease;
}
.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.footer-list a:hover::before,
.footer-list a:focus-visible::before {
  background: var(--gold);
}
.footer-contact-line {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--mist);
  word-break: break-word;
}
.footer-key {
  flex: 0 0 2.6em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-top: 0.15rem;
}
.footer-flagline {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--flag-blue) 0 20%,
    var(--paper) 20% 40%,
    var(--flag-red) 40% 60%,
    var(--flag-green) 60% 80%,
    var(--flag-yellow) 80% 100%
  );
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
  padding-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
}
.footer-icp { color: var(--line); }
.footer-icp::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.5rem;
  background: var(--flag-red);
  transform: rotate(45deg);
  vertical-align: 1px;
}
.footer-copy { color: var(--mist); }

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid currentColor;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn--gold {
  background: var(--gold);
  color: var(--ink-deep);
  border-color: var(--gold);
  box-shadow: 5px 5px 0 var(--ink-deep);
}
.btn--gold:hover {
  background: var(--gold-soft);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink-deep);
}
.btn--gold:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink-deep);
}
.btn--line {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn--line:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn--paper {
  background: var(--paper);
  color: var(--ink-deep);
  border-color: var(--ink-deep);
  box-shadow: 5px 5px 0 var(--line);
}
.btn--paper:hover {
  background: var(--gold-soft);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}

/* ---------- 9. Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
}
.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.crumbs li + li::before {
  content: "/";
  color: var(--line);
}
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 10. Image frames ---------- */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      135deg,
      rgba(46, 125, 209, 0.3) 0%,
      rgba(11, 27, 51, 0.94) 52%,
      rgba(242, 184, 75, 0.24) 100%
    );
  box-shadow: var(--shadow-hard);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(250, 246, 236, 0.07) 0 1px,
    transparent 1px 6px
  );
}
.frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--1x1 { aspect-ratio: 1 / 1; }
.frame--3x4 { aspect-ratio: 3 / 4; }
.frame__tag {
  position: absolute;
  z-index: 2;
  left: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: rgba(7, 17, 31, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- 11. Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 200;
  height: 3px;
  pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--flag-blue) 0%,
    var(--gold) 55%,
    var(--barley) 100%
  );
}

/* ---------- 12. Reveal ---------- */
[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
[data-js="on"] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease);
}

/* ---------- 13. Focus ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.nav-link:focus-visible,
.footer-list a:focus-visible {
  outline-offset: 1px;
}

/* ---------- 14. Responsive ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: auto; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .header-bar {
    min-height: 62px;
    padding-block: 0.65rem;
  }
  .header-status { display: none; }
  .nav-toggle {
    display: inline-flex;
    margin-inline-start: auto;
  }
  .site-nav {
    display: none;
    padding-block: 0.25rem 0.6rem;
  }
  .site-nav[data-open] { display: block; }
  .nav-track {
    flex-direction: column;
    overflow: visible;
  }
  .nav-cell {
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .nav-cell:first-child {
    border-left: 0;
    border-top: 0;
  }
  .nav-link {
    padding: 0.9rem 0.15rem;
    font-size: var(--step-3);
    border-bottom: 0;
  }
  .nav-link[aria-current="page"] {
    padding-inline: 0.6rem;
  }
  .nav-num { font-size: 12px; }
  @media (prefers-reduced-motion: no-preference) {
    .site-nav[data-open] {
      animation: navDrop 0.22s var(--ease) both;
    }
  }
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .brand-glyph { width: 38px; height: 38px; font-size: 0.9rem; }
  .display { letter-spacing: -0.01em; }
}

@media (max-width: 520px) {
  .brand-tag { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-contact-line { flex-direction: column; gap: 0.1rem; }
  .footer-key { flex: 0 0 auto; }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-js="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .brand-glyph { transform: none; }
  .brand:hover .brand-glyph { transform: none; }
  .btn:hover { transform: none; }
}
