/* ===========================================================
   米兰体育主站 · 共享样式表 /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, ol, ul {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --red:        #C8102E;
  --red-deep:   #8A0E22;
  --ink:        #111318;
  --ink-soft:   #1C1F26;
  --blue:       #1F4E6B;
  --steel:      #8B949E;
  --mist:       #DCE8F0;
  --paper:      #F5F2EC;
  --grass:      #6F8A8A;

  /* 语义色 */
  --text:        var(--ink-soft);
  --text-muted:  #5A6270;
  --text-light:  rgba(245, 242, 236, 0.78);

  /* 尺度 */
  --header-h:  76px;
  --shell:     1240px;
  --gutter:    clamp(18px, 4vw, 56px);
  --measure:   44ch;

  /* 形状与描边 */
  --line:      2px;
  --shadow-hard:     6px 6px 0 var(--ink);
  --shadow-hard-sm:  4px 4px 0 var(--ink-soft);

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

  /* 缓动 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.42vw + 13.4px, 17px);
  font-weight: 450;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  text-wrap: balance;
}

p { text-wrap: pretty; }

strong { font-weight: 800; }

::selection {
  background: var(--red);
  color: var(--paper);
}

/* ---------- 4. 焦点可见 ---------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 0;
}

.site-header :where(a, button):focus-visible,
.site-footer :where(a, button):focus-visible {
  outline-color: var(--mist);
}

/* ---------- 5. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 11px 20px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--mist);
  outline-offset: 2px;
}

/* ---------- 6. 页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--paper);
  background-image: linear-gradient(
    180deg,
    rgba(17, 19, 24, 0.86),
    rgba(17, 19, 24, 0.18) 72%,
    rgba(17, 19, 24, 0)
  );
  transition: background-color 0.28s var(--ease),
              box-shadow 0.28s var(--ease);
}

.site-header[data-scrolled] {
  background-color: var(--ink);
  background-image: none;
  box-shadow: 0 3px 0 var(--red),
              0 22px 40px -28px rgba(17, 19, 24, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  width: 100%;
  max-width: var(--shell);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  background: var(--red);
  color: var(--paper);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(17, 19, 24, 0.55);
  transform: skewX(-7deg);
  transition: transform 0.24s var(--ease), background-color 0.24s var(--ease);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  background: var(--red-deep);
  transform: skewX(-7deg) translateY(-2px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--paper);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--steel);
  white-space: nowrap;
}

/* 导航 */
.primary-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.7vw, 26px);
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 7px 2px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-light);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.26s var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #fff;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.nav-list a[aria-current="page"] {
  color: #fff;
}

.nav-list a[aria-current="page"]::after {
  height: 3px;
  transform: scaleX(1);
}

/* 动作区 */
.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  padding: 0;
  border: var(--line) solid rgba(245, 242, 236, 0.35);
  color: var(--paper);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--paper);
  background: rgba(245, 242, 236, 0.08);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s linear;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), top 0.24s var(--ease);
}

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

.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after  { top: 0; transform: rotate(-45deg); }

/* 阅读进度条 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 0.1s linear;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: var(--line) solid transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease),
              background-color 0.2s var(--ease),
              color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.btn-solid {
  background: var(--red);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(17, 19, 24, 0.5);
}

.btn-solid:hover,
.btn-solid:focus-visible {
  background: var(--red-deep);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(17, 19, 24, 0.55);
}

.btn-ghost {
  border-color: rgba(245, 242, 236, 0.4);
  color: var(--paper);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--paper);
  background: rgba(245, 242, 236, 0.1);
}

.btn-outline {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  background: transparent;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--ink-soft);
  color: var(--paper);
}

/* ---------- 8. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.main-offset {
  padding-top: calc(var(--header-h) + clamp(28px, 5vw, 68px));
}

.prose {
  max-width: var(--measure);
  color: var(--text);
}

.prose p + p { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; margin-bottom: 0.6em; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.5em; font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.prose ul, .prose ol { margin: 1em 0; padding-left: 0; display: grid; gap: 0.5em; }
.prose ul li { position: relative; padding-left: 1.4em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--red);
}
.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--red); }

/* 12 列非对称网格 */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 36px);
}

.grid-12 > * {
  grid-column: span var(--col-span, 12);
}

/* ---------- 9. 排版元件 ---------- */
.display {
  font-size: clamp(2.6rem, 6vw, 6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.038em;
  color: var(--ink-soft);
  text-wrap: balance;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--red);
}

.side-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--steel);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

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

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--red);
  font-weight: 700;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--red);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink-soft);
}

/* ---------- 11. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: var(--line) solid var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-soft);
  background: var(--paper);
}

.tag--red {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.tag--blue {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.tag--mist {
  background: var(--mist);
  border-color: var(--mist);
  color: var(--ink-soft);
}

/* ---------- 12. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background-color: var(--mist);
  background-image:
    linear-gradient(135deg, rgba(31, 78, 107, 0.14) 0%, rgba(31, 78, 107, 0) 55%),
    repeating-linear-gradient(90deg, rgba(28, 31, 38, 0.06) 0 1px, transparent 1px 64px);
  border: var(--line) solid var(--ink-soft);
  box-shadow: var(--shadow-hard-sm);
}

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

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

.media figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

/* ---------- 13. 滚动显现协议 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------- 14. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 110px);
  padding-top: clamp(44px, 6.5vw, 84px);
  background: var(--ink);
  color: var(--paper);
  border-top: 6px solid var(--red);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(130px, 0.8fr));
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(34px, 5vw, 62px);
  border-bottom: 1px solid rgba(245, 242, 236, 0.16);
}

.footer-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grass);
  margin-bottom: 14px;
}

.footer-title {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--paper);
  margin-bottom: 16px;
}

.footer-title-accent {
  display: inline-block;
  color: var(--red);
  box-shadow: inset 0 -0.14em 0 rgba(200, 16, 46, 0.28);
}

.footer-lede {
  max-width: 30ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(245, 242, 236, 0.72);
  margin-bottom: 24px;
}

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

.contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.contact-label {
  flex: 0 0 auto;
  min-width: 62px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grass);
}

.contact-value {
  color: rgba(245, 242, 236, 0.92);
  word-break: break-word;
}

.footer-hours {
  margin-top: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--red);
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(245, 242, 236, 0.62);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 18px;
}

.footer-links {
  display: grid;
  gap: 11px;
}

.footer-links a {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  color: rgba(245, 242, 236, 0.82);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--red);
  transform: translateX(5px);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  padding: 22px 0 30px;
}

.footer-legal,
.footer-copy,
.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--steel);
}

.footer-copy { color: rgba(245, 242, 236, 0.6); }

.footer-note { color: rgba(139, 148, 158, 0.85); }

/* ---------- 15. 响应式：平板 ---------- */
@media (max-width: 1120px) {
  .header-actions .btn-ghost { display: none; }

  .nav-list { gap: 14px; }

  .nav-list a { font-size: 13.5px; }
}

@media (max-width: 980px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: grid; }

  .header-actions { margin-left: auto; }

  .header-actions .btn-solid {
    padding: 8px 14px;
    font-size: 13px;
    box-shadow: 3px 3px 0 rgba(17, 19, 24, 0.55);
  }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 10px var(--gutter) 26px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--ink);
    border-top: var(--line) solid var(--red);
    box-shadow: 0 24px 40px -26px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease),
                transform 0.22s var(--ease),
                visibility 0.22s var(--ease);
  }

  .site-header[data-open] .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

  .nav-list a {
    display: block;
    padding: 15px 2px;
    font-size: 17px;
    font-weight: 700;
    border-bottom: 1px solid rgba(245, 242, 236, 0.12);
  }

  .nav-list a::after { display: none; }

  .nav-list a[aria-current="page"] {
    color: var(--red);
    padding-left: 12px;
    border-left: 3px solid var(--red);
  }

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

  .footer-brand { grid-column: 1 / -1; }

  .footer-lede { max-width: 44ch; }
}

/* ---------- 16. 响应式：手机 ---------- */
@media (max-width: 620px) {
  :root { --header-h: 62px; }

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

  .brand-name { font-size: 14.5px; }
  .brand-sub { display: none; }

  .header-actions .btn-solid {
    padding: 7px 11px;
    font-size: 12.5px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

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

  .contact-label { min-width: 56px; }

  .grid-12 > * { grid-column: span 12; }
}

@media (max-width: 400px) {
  .header-actions { display: none; }
}

/* ---------- 17. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .primary-nav {
    transform: none !important;
  }

  .skip-link {
    transform: translateY(-160%);
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .brand:hover .brand-mark { transform: skewX(-7deg); }
  .footer-links a:hover,
  .footer-links a:focus-visible { transform: none; }
  .btn-solid:hover,
  .btn-solid:focus-visible { transform: none; }
}
