/* =========================================================
   九博体育 中文站 · 共享样式 /assets/site.css
   框架式导航 · 深海蓝 × 珊瑚橙 · 锐利直角与 1px 精密网格
   ========================================================= */

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

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

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

body { margin: 0; }

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

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

input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --deep-900: #071A2B;
  --deep-700: #0E2F4A;
  --deep-500: #175A83;
  --tide-300: #6FB7D9;
  --coral-600: #D94A2B;
  --coral-400: #FF7A52;
  --sand-300: #F0C36A;
  --foam-50: #F6FAFD;
  --mint-400: #00C2A8;
  --ink-900: #0B1B26;
  --slate-500: #5A6B7A;

  --line: rgba(14, 47, 74, .14);
  --line-strong: rgba(14, 47, 74, .3);
  --line-light: rgba(111, 183, 217, .22);

  --font-display: "Archivo Black", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas, monospace;

  --frame-h: 72px;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1280px;
  --cut: 12px;
  --ease: cubic-bezier(.32, .9, .32, 1);
}

/* ---------- 3. Base 排版 ---------- */
body {
  background: var(--foam-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  padding-top: var(--frame-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--coral-400);
  color: #fff;
}

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

[id] { scroll-margin-top: calc(var(--frame-h) + 20px); }

.title-xl,
.title-lg,
.title-md {
  font-family: var(--font-display);
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
}

.title-xl {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.015em;
}

.title-lg {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.14;
  letter-spacing: -.01em;
}

.title-md {
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.35;
  font-weight: 800;
}

.lead {
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.8;
  color: var(--slate-500);
  max-width: 62ch;
}

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-900);
}

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

.mono {
  font-family: var(--font-mono);
  font-size: .86em;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

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

/* ---------- 4. 布局骨架 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.grid {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 200;
  padding: 10px 20px;
  background: var(--coral-600);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  transform: translate(-50%, -180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 6. 页头 · 框架式导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--frame-h);
  background: var(--deep-900);
  color: var(--foam-50);
  border-bottom: 1px solid var(--deep-700);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg,
    var(--coral-600) 0%,
    var(--coral-400) 20%,
    var(--sand-300) 42%,
    rgba(111, 183, 217, .18) 72%,
    transparent 100%);
  pointer-events: none;
}

.site-header[data-scrolled="true"] {
  box-shadow: 0 12px 32px rgba(7, 26, 43, .28);
}

.site-header__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--mint-400), var(--tide-300) 46%, var(--coral-400));
  will-change: transform;
  z-index: 3;
}

.site-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 30px);
  height: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--coral-600), var(--coral-400));
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.brand__text {
  display: block;
  min-width: 0;
}

.brand__name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}

.brand__desc {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  line-height: 1.2;
  color: var(--tide-300);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0px, .7vw, 6px);
  flex-wrap: nowrap;
}

.site-nav__item { display: flex; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #D5E6F2;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.site-nav__link:hover {
  color: #fff;
  border-color: rgba(111, 183, 217, .42);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--tide-300);
}

.site-nav__link[aria-current="page"] {
  color: #fff;
  background: var(--deep-700);
  border-color: var(--coral-400);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--coral-400), var(--sand-300));
}

/* 主入口 */
.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  background: linear-gradient(118deg, var(--coral-600), var(--coral-400));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.3;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: filter .18s ease, transform .18s ease;
}

.header-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* 移动抽屉按钮 */
.nav-toggle {
  display: none;
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-light);
  background: var(--deep-700);
}

.nav-toggle__bar {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--foam-50);
  transition: transform .22s var(--ease), opacity .18s ease;
}

.nav-toggle__bar:nth-child(1) { top: 13px; }
.nav-toggle__bar:nth-child(2) { top: 20px; }
.nav-toggle__bar:nth-child(3) { top: 27px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: var(--frame-h) 0 0 0;
  z-index: 1;
  background: rgba(7, 26, 43, .62);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s;
}

.nav-scrim[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--deep-900);
  color: #BFD6E6;
  border-top: 1px solid var(--deep-700);
  padding-top: clamp(40px, 6vw, 72px);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(111, 183, 217, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(111, 183, 217, .09) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 72%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(46%, 560px);
  height: 3px;
  background: linear-gradient(90deg, var(--coral-600), var(--coral-400), var(--sand-300));
  clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 3vw, 56px);
  padding-bottom: clamp(30px, 4vw, 54px);
}

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

.brand--footer .brand__name { color: #fff; }

.footer-brand__note {
  margin-top: 16px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.7;
  color: #8FAEC4;
}

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

.footer-col__title {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--sand-300);
  line-height: 1.4;
}

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

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #BFD6E6;
  transition: color .18s ease;
}

.footer-list a::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--tide-300);
  transition: width .2s var(--ease), background-color .18s ease;
}

.footer-list a:hover { color: #fff; }

.footer-list a:hover::before {
  width: 20px;
  background: var(--coral-400);
}

.footer-meta > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-light);
}

.footer-meta dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  line-height: 1.5;
  color: var(--tide-300);
  padding-top: 2px;
}

.footer-meta dd {
  font-size: 14.5px;
  line-height: 1.6;
  color: #D7E7F2;
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: #8FAEC4;
}

.footer-copy { margin: 0; }

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

.footer-legal a {
  color: var(--tide-300);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.footer-legal a:hover { color: #fff; }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
  transition: transform .18s var(--ease), filter .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn--primary {
  background: linear-gradient(115deg, var(--coral-600), var(--coral-400));
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.btn--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--deep-500);
  color: var(--deep-500);
}

.btn--ghost:hover {
  background: var(--deep-500);
  color: var(--foam-50);
}

.btn--dark {
  background: var(--deep-900);
  color: var(--foam-50);
  border-color: var(--deep-700);
}

.btn--dark:hover {
  background: var(--deep-700);
}

/* ---------- 9. 标签 / 索引 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  background: rgba(111, 183, 217, .1);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--deep-500);
}

.tag--coral {
  border-color: var(--coral-400);
  background: rgba(255, 122, 82, .12);
  color: var(--coral-600);
}

.tag--sand {
  border-color: rgba(11, 27, 38, .2);
  background: var(--sand-300);
  color: var(--ink-900);
}

.tag--mint {
  border-color: rgba(0, 194, 168, .5);
  background: rgba(0, 194, 168, .12);
  color: #067A6B;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  line-height: 1.4;
  color: var(--coral-600);
}

.section-index::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--coral-600);
}

/* ---------- 10. 章节头 ---------- */
.section-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  padding-bottom: 16px;
  margin-bottom: clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: clamp(60px, 14%, 190px);
  height: 3px;
  background: linear-gradient(90deg, var(--coral-600), var(--coral-400));
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

/* ---------- 11. 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
}

.panel--dark {
  background: var(--deep-900);
  border-color: var(--deep-700);
  color: #D7E7F2;
}

.panel--dark .title-md { color: #fff; }

.panel--tint {
  background: linear-gradient(160deg, rgba(111, 183, 217, .18), rgba(246, 250, 253, 0) 72%);
  border-color: var(--line);
}

.panel--sand {
  background: var(--sand-300);
  border-color: rgba(11, 27, 38, .14);
  color: var(--ink-900);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumbs {
  padding-block: 14px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--slate-500);
}

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

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

.breadcrumbs__list li + li::before {
  content: "/";
  color: var(--tide-300);
}

.breadcrumbs a {
  color: var(--deep-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.breadcrumbs a:hover { color: var(--coral-600); }

/* ---------- 13. 图片容器（页面阶段放图） ---------- */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  background:
    radial-gradient(120% 110% at 12% 8%, rgba(255, 122, 82, .34), transparent 58%),
    linear-gradient(140deg, var(--deep-900) 0%, var(--deep-500) 58%, var(--deep-700) 100%);
  border: 1px solid var(--line-strong);
}

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

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

.media__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 6px 12px;
  background: rgba(7, 26, 43, .82);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.5;
  color: var(--foam-50);
}

/* ---------- 14. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

[data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 平板 ---------- */
@media (max-width: 1120px) {
  .header-cta { display: none; }
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand__note { max-width: 46ch; }
}

/* ---------- 16. 移动端 · 左侧抽屉 ---------- */
@media (max-width: 860px) {
  :root { --frame-h: 60px; }

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

  .site-header__inner { gap: 12px; }

  .brand__mark { width: 30px; height: 30px; font-size: 14px; }
  .brand__name { font-size: 15.5px; }
  .brand__desc { font-size: 9.5px; letter-spacing: .06em; }

  .site-nav {
    position: fixed;
    top: var(--frame-h);
    left: 0;
    bottom: 0;
    z-index: 2;
    width: min(88vw, 320px);
    max-width: 320px;
    padding: 20px calc(var(--gutter) * .85) 40px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    background: var(--deep-900);
    border-right: 1px solid var(--deep-700);
    box-shadow: 24px 0 48px rgba(7, 26, 43, .4);
    transform: translateX(-104%);
    transition: transform .3s var(--ease);
  }

  .site-nav[data-open="true"] { transform: translateX(0); }

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

  .site-nav__item { display: block; }

  .site-nav__link {
    justify-content: flex-start;
    padding: 14px 12px;
    font-size: 16px;
    border: 0;
    border-bottom: 1px solid var(--line-light);
    border-left: 3px solid transparent;
    color: #D5E6F2;
  }

  .site-nav__link:hover {
    border-color: var(--line-light);
    border-left-color: var(--tide-300);
  }

  .site-nav__link[aria-current="page"] {
    background: var(--deep-700);
    border-color: transparent;
    border-left: 3px solid var(--coral-400);
  }

  .site-nav__link[aria-current="page"]::after { display: none; }

  .site-nav__idx { font-size: 11px; }
}

@media (min-width: 861px) {
  .nav-scrim { display: none; }
}

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

  .footer-top { grid-template-columns: 1fr; }
  .footer-brand__note { max-width: none; }

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

  .footer-meta > div { grid-template-columns: 44px 1fr; }
}

/* ---------- 18. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .skip-link { transition: none; }
  .site-nav, .nav-scrim, .nav-toggle__bar { transition: none; }
}
