/* ============================================================
   Site Kit · 米兰看台
   共享样式 /assets/site.css
   ============================================================ */

/* ---------- 1. CSS 变量 ---------- */
:root {
  --red: #C8102E;
  --black: #0A0A0A;
  --gray: #2A2A2A;
  --silver: #B0B5B9;
  --gold: #D6A85C;
  --cream: #F5F5EF;
  --glass: rgba(255,255,255,0.06);
  --dark-red: #8B0000;
  --slate: #4E5D6C;
  --green: #2E8B57;
  --border: rgba(176,181,185,0.16);
  --font-body: 'Noto Sans SC', 'PingFang SC', -apple-system, sans-serif;
  --font-mono: 'Roboto Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --container: 1280px;
  --header-h: 112px;
  --transition: 0.22s ease;
}

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

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

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

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  border: 0;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-body);
  font-weight: 900;
  color: var(--cream);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

a:hover {
  color: var(--gold);
}

main:focus {
  outline: none;
}

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

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

/* ---------- 4. 通用工具 ---------- */
.u-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 767.98px) {
  .container {
    padding: 0 16px;
  }
}

.page-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 52px 24px 48px;
  min-height: 55vh;
}

@media (max-width: 767.98px) {
  .page-container {
    padding: 28px 16px 32px;
  }
}

/* ---------- 5. 网格系统 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 1023.98px) {
  .col-3,
  .col-4,
  .col-6 {
    grid-column: span 6;
  }
  .col-8,
  .col-12 {
    grid-column: span 12;
  }
}

@media (max-width: 767.98px) {
  .col-3,
  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }
}

/* ---------- 6. 通用组件 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  letter-spacing: 0.03em;
}

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

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

.breadcrumb a {
  color: var(--silver);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--gold);
}

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}

.section-label::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
  transform: skewX(-24deg);
}

.card {
  position: relative;
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 24px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.card:hover {
  border-color: rgba(200, 16, 46, 0.65);
  background: #262626;
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid var(--silver);
  border-radius: 2px;
  background: transparent;
  color: var(--cream);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.btn:hover {
  border-color: var(--red);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--dark-red);
  border-color: var(--dark-red);
  color: var(--cream);
}

.btn--ghost {
  border-color: rgba(176, 181, 185, 0.4);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid rgba(214, 168, 92, 0.4);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.stat-block {
  padding: 16px 20px;
  border-left: 3px solid var(--red);
  background: rgba(42, 42, 42, 0.55);
}

.stat-block__value {
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 1.1;
  color: var(--cream);
}

.stat-block__label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--silver);
}

/* 图片占位容器：页面放图时替换容器内内容 */
.image-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray) 0%, var(--slate) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
}

.image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(176, 181, 185, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 181, 185, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.image-frame::after {
  content: "IMG";
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(176, 181, 185, 0.5);
}

.image-frame__label {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--silver);
  background: rgba(10, 10, 10, 0.72);
  border-top: 1px solid var(--border);
}

/* ---------- 7. 无障碍与状态层 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--red);
  color: var(--cream);
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.24s ease;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 55%, var(--gold) 100%);
  z-index: 1200;
  pointer-events: none;
  will-change: width;
}

/* ---------- 8. 头部 ---------- */
.site-header {
  position: relative;
  background: var(--black);
  border-bottom: 1px solid var(--border);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 24px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(176, 181, 185, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  letter-spacing: 0.02em;
}

.site-header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.site-header__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.18);
}

.site-header__path {
  margin: 0;
}

.site-header__path::before {
  content: "当前栏目：";
  color: var(--slate);
}

.site-header__bar {
  position: relative;
  background: var(--black);
}

.site-header__bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 100%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding-top: 16px;
  padding-bottom: 16px;
}

/* 品牌 */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.site-brand__slash {
  display: block;
  flex-shrink: 0;
  width: 8px;
  height: 46px;
  background: var(--red);
  transform: skewX(-20deg);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
}

.site-brand__name {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.site-brand__tag {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-brand--footer .site-brand__slash {
  height: 56px;
}

.site-brand--footer .site-brand__name {
  font-size: 28px;
}

/* 导航 */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(176, 181, 185, 0.32);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--transition);
  position: relative;
  z-index: 401;
}

.site-nav__toggle:hover {
  border-color: var(--red);
}

.site-nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

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

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

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

.site-nav__item {
  margin: 0;
  padding: 0;
}

.site-nav__list {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 36px;
  justify-content: end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 2px;
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--red);
  transition: color var(--transition);
}

.site-nav__label {
  display: inline-block;
}

.site-nav__link:hover {
  color: var(--gold);
  border-bottom-color: rgba(200, 16, 46, 0.8);
  transform: translateX(-3px);
}

.site-nav__link:hover .site-nav__index {
  color: var(--gold);
}

.site-nav__link[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--red);
}

.site-nav__link[aria-current="page"] .site-nav__index {
  color: var(--gold);
}

/* ---------- 9. 移动端抽屉导航 ---------- */
@media (max-width: 1023.98px) {
  .site-header__top {
    display: none;
  }

  .site-header__inner {
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-brand__slash {
    height: 36px;
    width: 6px;
  }

  .site-brand__name {
    font-size: 20px;
  }

  .site-brand__tag {
    font-size: 9px;
  }

  .site-nav__toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    width: min(320px, 86vw);
    padding: 84px 28px 32px;
    background: var(--black);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
  }

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

  .site-nav__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .site-nav__link {
    justify-content: flex-start;
    padding: 13px 6px;
    border-bottom: 1px solid rgba(176, 181, 185, 0.12);
    font-size: 16px;
  }

  .site-nav__link:hover {
    transform: translateX(4px);
  }
}

/* ---------- 10. 底部 ---------- */
.site-footer {
  position: relative;
  background: var(--black);
  border-top: 1px solid var(--border);
}

.site-footer__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 62%, var(--gold) 62%, var(--gold) 100%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 3fr;
  gap: 40px;
  padding: 48px 0 40px;
}

.site-footer__desc {
  margin-top: 16px;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--silver);
}

.site-footer__heading {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--cream);
}

.site-footer__heading::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--red);
  transform: skewX(-20deg);
}

.site-footer__list {
  display: grid;
  gap: 8px;
}

.site-footer__list a {
  color: var(--silver);
  font-size: 14px;
  transition: color var(--transition), padding-left var(--transition);
}

.site-footer__list a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.site-footer__contact-list {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--silver);
}

.site-footer__contact-label {
  display: inline-block;
  min-width: 4em;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.site-footer__contact-list a {
  color: var(--silver);
  transition: color var(--transition);
}

.site-footer__contact-list a:hover {
  color: var(--red);
}

.site-footer__note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--slate);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 0 24px;
  border-top: 1px solid rgba(176, 181, 185, 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  letter-spacing: 0.02em;
}

.site-footer__copy,
.site-footer__icp {
  margin: 0;
}

@media (max-width: 1023.98px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .site-footer__brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639.98px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 11. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ---------- 12. 减少动态偏好 ---------- */
@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;
    transition-delay: 0ms !important;
  }

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