/* =========================================================
   米兰赛事 · 共享样式 /assets/site.css
   轨道导航 + 切角面板 + 编辑部索引气质
   ========================================================= */

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

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

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

ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }

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

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

a { color: inherit; }

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink-950: #0A0B0D;
  --ink-900: #13161B;
  --charcoal-800: #1D2127;
  --paper: #E9E3D6;
  --paper-dim: #C7C0B0;
  --milan-red: #C8102E;
  --deep-red: #7A0C1C;
  --cyan: #22D3EE;
  --fluoro: #E8FF3A;
  --text: #F5F3EE;
  --muted: #9AA0A8;

  --rail-w: 88px;
  --topbar-h: 60px;
  --cut: 22px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --max: 1320px;
  --gap: 24px;
  --line: rgba(233, 227, 214, 0.12);

  --font-cn: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-num: "Barlow Condensed", "Roboto Condensed", "Oswald", "Arial Narrow", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --ease-out: cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* ---------- 3. Base ---------- */
html { background: var(--ink-950); }

body {
  min-height: 100vh;
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  color: var(--text);
  background-color: var(--ink-950);
  background-image:
    radial-gradient(1100px 560px at 88% -8%, rgba(200, 16, 46, 0.20), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(162deg, #171B21 0%, #0A0B0D 46%, #060708 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

body.is-nav-open { overflow: hidden; }

::selection { background: var(--milan-red); color: #FFF; }

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

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

.section {
  padding-block: clamp(40px, 6vw, 88px);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section__title {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* ---------- 5. 文字系统 ---------- */
.display {
  font-weight: 900;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1.4;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--milan-red);
  flex: none;
}

.num {
  font-family: var(--font-num);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.prose {
  max-width: 38em;
  line-height: 1.8;
}

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

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

/* ---------- 6. 面板 ---------- */
.panel {
  position: relative;
  background: var(--charcoal-800);
  border: 1px solid var(--line);
  padding: clamp(18px, 2.4vw, 30px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.panel--paper {
  background: var(--paper);
  color: #13161B;
  border-color: transparent;
}

.panel--paper .muted { color: #5C5647; }

.panel--flush { padding: 0; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

.btn--primary { background: var(--milan-red); color: #FFF; }
.btn--primary:hover { background: var(--deep-red); }

.btn--ghost { border-color: var(--fluoro); color: var(--fluoro); }
.btn--ghost:hover { background: var(--fluoro); color: var(--ink-950); }

.btn--quiet { border-color: rgba(233, 227, 214, 0.28); }
.btn--quiet:hover { border-color: var(--cyan); color: var(--cyan); }

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

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

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

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(233, 227, 214, 0.28);
}

.breadcrumb__link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.breadcrumb__link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.breadcrumb__current { color: var(--text); }

/* ---------- 9. 媒体容器（页面放置占位用） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #14171C;
  border: 1px solid var(--line);
}

.media > img,
.media > picture > img,
.media > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 13, 0) 42%, rgba(10, 11, 13, 0.62) 100%);
  pointer-events: none;
}

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

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- 10. 动效 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
  will-change: opacity, transform;
}

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

/* ---------- 11. Header · 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--milan-red) 0%, var(--fluoro) 58%, var(--cyan) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 90;
  pointer-events: none;
}

/* ---------- 12. Header · 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-950);
  background: var(--fluoro);
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-220%);
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); color: var(--ink-950); }

/* ---------- 13. Header · 移动顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  padding-inline: var(--gutter);
  background: rgba(11, 13, 16, 0.94);
  border-bottom: 1px solid var(--line);
  z-index: 70;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
}

.topbar__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 900;
  color: #FFF;
  background: var(--milan-red);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.topbar__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(233, 227, 214, 0.24);
  border-radius: 2px;
  color: var(--text);
  transition: border-color 0.18s ease, color 0.18s ease;
}

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

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

.site-header[data-open] .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- 14. Header · 遮罩 ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(6, 7, 8, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 15. Header · 侧边轨道 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0 18px;
  background: linear-gradient(180deg, #171B21 0%, #0B0D11 100%);
  border-right: 1px solid var(--line);
  z-index: 60;
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 120px;
  background: linear-gradient(180deg, var(--milan-red), transparent);
  pointer-events: none;
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex: none;
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 19px;
  font-weight: 900;
  color: #FFF;
  background: var(--milan-red);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.rail__en {
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--muted);
  max-width: 66px;
}

.rail__nav {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--charcoal-800) transparent;
}

.rail__nav::-webkit-scrollbar { width: 4px; }
.rail__nav::-webkit-scrollbar-thumb { background: var(--charcoal-800); border-radius: 2px; }

.rail__nav-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(199, 192, 176, 0.7);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin-bottom: 4px;
  flex: none;
}

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.rail__item {
  display: flex;
  justify-content: center;
  width: 100%;
}

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 6px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.18s ease;
}

.rail__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.rail__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10.5px;
  line-height: 1.25;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--milan-red);
  transform: translateY(-50%);
  transition: height 0.22s var(--ease-out);
}

.rail__link:hover { color: var(--cyan); }
.rail__link:hover .rail__num { color: var(--cyan); }

.rail__link[aria-current="page"] { color: var(--fluoro); }
.rail__link[aria-current="page"] .rail__num { color: var(--fluoro); }
.rail__link[aria-current="page"]::before { background: var(--fluoro); }

.rail__meta {
  flex: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rail__cta {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.2em;
  font-size: 11px;
  font-weight: 700;
  min-width: 44px;
  min-height: 44px;
  padding: 14px 7px;
  text-align: center;
  text-decoration: none;
  color: var(--fluoro);
  border: 1.5px solid var(--fluoro);
  background: rgba(232, 255, 58, 0.06);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rail__cta:hover { background: var(--fluoro); color: var(--ink-950); }

.rail__note {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- 16. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, #101318 0%, #08090B 100%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-strip {
  height: 6px;
  background: repeating-linear-gradient(
    115deg,
    var(--milan-red) 0 26px,
    transparent 26px 42px,
    var(--cyan) 42px 46px,
    transparent 46px 84px
  );
  opacity: 0.8;
}

.footer-inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(28px, 4.4vw, 60px) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 48px);
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 900;
  color: #FFF;
  background: var(--milan-red);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.footer-brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.footer-brand__en {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--cyan);
}

.footer-brand__line {
  margin-top: 16px;
  max-width: 26em;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
  align-content: start;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.footer-link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

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

.footer-panel {
  background: var(--paper);
  color: #13161B;
  padding: clamp(18px, 2.2vw, 26px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.footer-panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--deep-red);
  margin-bottom: 12px;
}

.footer-panel__text {
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: #13161B;
  word-break: break-all;
}

.footer-panel__meta {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #5C5647;
}

.footer-base {
  width: 100%;
  max-width: var(--max);
  margin: clamp(24px, 3.6vw, 44px) auto 0;
  padding: 16px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
}

.footer-base__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- 17. 桌面轨道 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .topbar { display: none; }
  .nav-scrim { display: none; }

  .skip-link { left: calc(var(--rail-w) + 12px); }

  .rail__link:hover::before,
  .rail__link:focus-visible::before { height: 62%; }

  .rail__link[aria-current="page"]::before { height: 72%; }

  .footer-inner {
    grid-template-columns: 1.05fr 1.55fr 1.1fr;
    align-items: start;
  }

  .footer-cols { gap: 24px 32px; }
}

/* ---------- 18. 移动 / 平板抽屉 ---------- */
@media (max-width: 1023px) {
  body { padding-top: var(--topbar-h); }

  .rail {
    top: var(--topbar-h);
    left: auto;
    right: 0;
    bottom: 0;
    width: min(86vw, 340px);
    align-items: stretch;
    gap: 0;
    padding: 20px 20px 28px;
    overflow-y: auto;
    border-right: 0;
    border-left: 1px solid var(--line);
    background: linear-gradient(180deg, #14171D 0%, #0A0C10 100%);
    transform: translateX(104%);
    transition: transform 0.3s var(--ease-out);
    will-change: transform;
  }

  .site-header[data-open] .rail { transform: translateX(0); }

  .rail::after { display: none; }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .rail__mark { width: 34px; height: 34px; font-size: 16px; }

  .rail__en { max-width: none; text-align: left; font-size: 9px; letter-spacing: 0.2em; }

  .rail__nav {
    width: 100%;
    padding-block: 16px;
    gap: 0;
  }

  .rail__nav-label {
    writing-mode: horizontal-tb;
    font-size: 10px;
    letter-spacing: 0.28em;
    margin-bottom: 10px;
    align-self: flex-start;
  }

  .rail__list { gap: 0; width: 100%; }

  .rail__item { justify-content: flex-start; }

  .rail__link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    padding: 13px 10px;
    border-bottom: 1px solid rgba(233, 227, 214, 0.07);
  }

  .rail__num { min-width: 22px; font-size: 10px; }

  .rail__label {
    writing-mode: horizontal-tb;
    font-size: 14px;
    letter-spacing: 0.02em;
    font-weight: 500;
  }

  .rail__link::before {
    top: 6px;
    bottom: 6px;
    height: auto;
    width: 2px;
    transform: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .rail__link:hover::before,
  .rail__link:focus-visible::before,
  .rail__link[aria-current="page"]::before {
    height: auto;
    opacity: 1;
  }

  .rail__meta {
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }

  .rail__cta {
    writing-mode: horizontal-tb;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .rail__note {
    display: block;
    text-align: center;
    font-size: 10px;
  }

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

/* ---------- 19. 手机细化 ---------- */
@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
  .footer-base { justify-content: flex-start; }
  .section { padding-block: 36px; }
}

/* ---------- 20. 无障碍动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover { transform: none; }
}
