/* ==========================================================================
   米尔体育官网 · /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, p, ul, ol, li, figure, blockquote, dl, dt, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --bg-deep: #0B1A16;
  --bg-night: #0E1726;
  --panel: #16241F;
  --lime: #C7F94A;
  --red: #E2453A;
  --mist: #E8F0EA;
  --stone: #9AA9A1;
  --rule: #2A3B36;
  --aqua: #4FD1C5;
  --turf: #1F3A2C;
  --ink: #0B1A16;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --fs-h1: clamp(2rem, 6vw, 4.5rem);
  --fs-h2: clamp(1.5rem, 3.2vw, 2.5rem);
  --fs-h3: clamp(1.125rem, 1.8vw, 1.5rem);
  --fs-lede: clamp(1rem, 1.4vw, 1.125rem);
  --fs-body: 0.9375rem;
  --lh-body: 1.9;

  --gutter: 24px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  --header-h: 106px;
  --wrap: 1200px;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-panel: 0 24px 64px rgba(0, 0, 0, 0.5);
}

html[data-mode="day"] {
  --bg-deep: #EDF2EE;
  --bg-night: #E2EAE4;
  --panel: #FFFFFF;
  --mist: #0B1A16;
  --stone: #5B6B63;
  --rule: #C7D5CC;
  --turf: #DCE7DF;
  --shadow-panel: 0 20px 48px rgba(11, 26, 22, 0.12);
}

/* ---------- 3. 基础排版与页面底 ---------- */
body {
  background-color: var(--bg-deep);
  color: var(--mist);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  padding-top: var(--header-h);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

/* 蓝图网格层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.16;
}

/* 湿光反射 / 草皮氛围层 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(58% 38% at 78% 4%, rgba(199, 249, 74, 0.08), transparent 72%),
    radial-gradient(48% 46% at 6% 88%, rgba(226, 69, 58, 0.08), transparent 72%),
    radial-gradient(42% 30% at 34% 52%, rgba(79, 209, 197, 0.06), transparent 72%);
}

html[data-mode="day"] body::after { opacity: 0.5; }

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 800; }
p { color: var(--mist); }

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

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

/* ---------- 4. 工具类 ---------- */
.wrap {
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

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

.lede {
  font-size: var(--fs-lede);
  line-height: 1.85;
  color: var(--mist);
  max-width: 62ch;
}

.divider {
  height: 1px;
  border: 0;
  background: var(--rule);
  margin: var(--space-6) 0;
}

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

.section { padding-block: var(--space-12); }
.section--tight { padding-block: var(--space-8); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
}

.section__title {
  font-size: var(--fs-h2);
  max-width: 24ch;
}

[data-section-title] {
  position: relative;
  padding-left: 22px;
  color: var(--stone);
  transition: color 0.24s var(--ease);
}

[data-section-title]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  transition: background-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

[data-section-title].is-active { color: var(--mist); }

[data-section-title].is-active::before {
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(199, 249, 74, 0.14);
}

.section__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--stone);
  text-transform: uppercase;
}

.section__body { max-width: 68ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(199, 249, 74, 0.05);
}

/* ---------- 5. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header[data-scrolled] {
  background-color: rgba(11, 26, 22, 0.94);
  border-bottom-color: var(--rule);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

html[data-mode="day"] .site-header[data-scrolled] { background-color: rgba(237, 242, 238, 0.94); }

.header-grid {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: calc(var(--header-h) - 32px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
}

/* 品牌 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  border-radius: var(--radius-pill);
}

.brand-ruler {
  width: 4px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--lime) 0 55%, var(--red) 55% 100%);
  box-shadow: 0 0 14px rgba(199, 249, 74, 0.35);
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mist);
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

/* 导航 */
.site-nav { justify-self: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--stone);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--mist);
  background-color: rgba(199, 249, 74, 0.09);
}

.nav-link[aria-current="page"] {
  color: var(--mist);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--lime);
}

/* 头部动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--stone);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.mode-toggle:hover { border-color: var(--lime); color: var(--mist); }

.mode-toggle__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stone);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  flex: none;
}

.mode-toggle[aria-pressed="true"] .mode-toggle__dot {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(199, 249, 74, 0.55);
}

.mode-toggle__label { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 14px;
  height: 10px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), top 0.2s var(--ease), bottom 0.2s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  bottom: 4px;
  transform: rotate(-45deg);
}

.nav-toggle__text { white-space: nowrap; }

/* 状态条 */
.status-bar {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 1px solid rgba(42, 59, 54, 0.6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

html[data-mode="day"] .status-bar { border-top-color: rgba(199, 213, 204, 0.9); }

.status-bar__entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  transition: opacity 0.2s var(--ease);
}

.status-bar__entry:hover { opacity: 0.7; }

.status-bar__entry::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex: none;
  animation: status-pulse 2.6s var(--ease) infinite;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(199, 249, 74, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(199, 249, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 249, 74, 0); }
}

.status-bar__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--lime), var(--aqua));
  pointer-events: none;
}

/* ---------- 7. 通用按钮 / 胶囊 / 卡片 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.btn--primary { background: var(--lime); color: var(--ink); }
.btn--primary:hover { background: #d6ff63; }

.btn--ghost { border-color: var(--rule); color: var(--mist); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn--red { border-color: var(--red); color: var(--red); }
.btn--red:hover { background: rgba(226, 69, 58, 0.12); }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--stone);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pill:hover { color: var(--mist); border-color: var(--stone); }

.pill.is-active,
.pill[aria-pressed="true"] {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(199, 249, 74, 0.08);
}

.card {
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.card:hover {
  border-color: rgba(199, 249, 74, 0.42);
  transform: translateY(-2px);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.breadcrumb__sep { color: var(--rule); }

.breadcrumb a { color: var(--stone); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--lime); }

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

/* ---------- 9. 图片容器（页面阶段复用） ---------- */
.figure-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-image: linear-gradient(160deg, var(--turf), var(--bg-night));
}

.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--tall { aspect-ratio: 4 / 5; }
.figure-frame--square { aspect-ratio: 1 / 1; }

.figure-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-frame__cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(11, 26, 22, 0.76);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #E8F0EA;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: var(--space-12);
  padding-block: var(--space-12) var(--space-6);
  border-top: 1px solid var(--rule);
  background-color: var(--bg-night);
  background-image: radial-gradient(70% 100% at 100% 0%, rgba(199, 249, 74, 0.06), transparent 70%);
}

.footer-inner {
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.3fr;
  gap: var(--space-6) var(--space-4);
}

.footer-brand { display: flex; flex-direction: column; gap: 6px; }

.footer-brand__mark {
  width: 44px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--lime) 0 60%, var(--red) 60% 100%);
}

.footer-brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mist);
}

.footer-brand__domain {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

.footer-col__title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.footer-list { display: flex; flex-direction: column; gap: 4px; }

.footer-link {
  display: inline-flex;
  padding: 4px 0;
  font-size: 13px;
  color: var(--stone);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-link:hover { color: var(--lime); transform: translateX(2px); }

.footer-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--stone);
  word-break: break-word;
}

.footer-signature {
  grid-column: 1 / -1;
  justify-self: end;
  max-width: 22ch;
  margin-top: var(--space-4);
  padding-left: var(--space-8);
  text-align: right;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--stone);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: var(--space-8);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-legal__link {
  font-size: 12px;
  color: var(--stone);
  transition: color 0.2s var(--ease);
}

.footer-legal__link:hover { color: var(--lime); }

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

/* ---------- 11. 进入视口显现 ---------- */
[data-reveal] {
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-signature { justify-self: start; text-align: left; padding-left: 0; }
}

@media (max-width: 940px) {
  :root { --header-h: 98px; --space-12: 72px; }

  .header-grid { grid-template-columns: auto 1fr auto; }

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

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 130;
    padding: 16px;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    background-color: var(--panel);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(100% + 32px));
    transition: transform 0.32s var(--ease), opacity 0.32s var(--ease), visibility 0.32s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

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

  .nav-link {
    height: 46px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--mist);
  }

  .nav-link[aria-current="page"] { background: rgba(199, 249, 74, 0.1); }

  .nav-link[aria-current="page"]::after {
    left: 16px;
    right: auto;
    bottom: 14px;
    width: 20px;
  }

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

@media (max-width: 680px) {
  :root { --header-h: 92px; --gutter: 18px; }

  .brand-domain { display: none; }
  .mode-toggle { padding: 0 10px; }
  .mode-toggle__label { display: none; }
  .status-bar__meta { font-size: 10px; }
  .status-bar { font-size: 10px; }
  .section { padding-block: var(--space-8); }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-4); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .blueprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: var(--space-3); }
}

/* ---------- 13. 减少动态效果 ---------- */
@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;
  }

  [data-reveal],
  [data-reveal].is-hidden {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .card:hover,
  .footer-link:hover { transform: none; }
}
