/* ==========================================================================
   澳门赛事通 — /assets/site.css
   共享外壳：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;
}

ul, ol { padding: 0; list-style: none; }

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

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

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

:root {
  /* 色彩：近单色墨绿体系 + 唯一荧光黄强调 */
  --ink:        #041C18;
  --ink-2:      #062A24;
  --panel:      #0B3A32;
  --lime:       #D8FF3E;
  --lime-soft:  #F2FFB8;
  --brick:      #C4553B;
  --paper:      #F3EFE4;
  --mist:       #7FA79D;
  --line:       #1E4F45;
  --night:      #07110F;

  /* 排版 */
  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 结构 */
  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --rail-h: 72px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---------- 基础排版 ---------- */

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 78% at 82% -12%, rgba(30, 79, 69, .55) 0%, transparent 58%),
    radial-gradient(90% 58% at -6% 2%, rgba(11, 58, 50, .5) 0%, transparent 55%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .01em;
  color: var(--paper);
}

h1 { font-size: clamp(32px, 5vw, 60px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
h4 { font-size: clamp(17px, 1.6vw, 20px); }

strong { font-weight: 700; }

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

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

#main-content { scroll-margin-top: calc(var(--rail-h) + 16px); }

/* ---------- 容器与布局 ---------- */

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

.section { padding-block: clamp(52px, 7vw, 104px); }

.section--canvas { background: var(--ink-2); }

.section-head {
  display: grid;
  gap: 14px;
  max-width: 66ch;
  margin-bottom: clamp(26px, 4vw, 52px);
}

.section-title { font-size: clamp(24px, 3.2vw, 38px); }

.section-lede {
  color: var(--mist);
  font-size: 15px;
  line-height: 1.8;
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  line-height: 1.4;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--lime);
}

.grid { display: grid; gap: clamp(18px, 3vw, 40px); }

.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--8-4 { grid-template-columns: 8fr 4fr; }
.grid--5-7 { grid-template-columns: 5fr 7fr; }

@media (max-width: 900px) {
  .grid--7-5,
  .grid--8-4,
  .grid--5-7 { grid-template-columns: 1fr; }
}

/* ---------- 工具类 ---------- */

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

.prose { max-width: 68ch; }
.prose p { margin-bottom: 18px; color: rgba(243, 239, 228, .9); }
.prose p:last-child { margin-bottom: 0; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 跳转链接 ---------- */

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translate(-50%, -130%);
  transition: transform .18s var(--ease);
}

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

/* ==========================================================================
   头部：导航灯带
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(4, 28, 24, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime) 0%, rgba(216, 255, 62, .12) 46%, rgba(216, 255, 62, 0) 100%);
  pointer-events: none;
}

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

/* 品牌 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding-block: 8px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 36px;
  height: 26px;
  padding-inline: 5px;
  border: 2px solid var(--lime);
  border-radius: 1px;
}

.brand-mark-bar {
  display: block;
  width: 100%;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 4px, transparent 4px 9px);
}

.brand-text { display: grid; gap: 3px; }

.brand-name {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--paper);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .22em;
  color: var(--mist);
}

.brand:hover .brand-name { color: var(--lime-soft); }

/* 主导航 */

.site-nav {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.nav-index {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-item { display: block; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--paper);
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.nav-link::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--line);
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--mist);
  transition: color .18s var(--ease);
}

.nav-label { display: inline-block; }

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--lime-soft);
  background: var(--ink-2);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(216, 255, 62, .16);
}

.nav-link:hover .nav-num { color: var(--mist); }

.nav-link[aria-current="page"] {
  background: var(--lime);
  color: var(--ink);
}

.nav-link[aria-current="page"]::before {
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(4, 28, 24, .2);
}

.nav-link[aria-current="page"] .nav-num {
  color: var(--ink);
  opacity: .55;
}

/* 状态说明 */

.header-utility {
  flex: none;
  margin-left: clamp(8px, 1.6vw, 20px);
  padding-left: clamp(8px, 1.6vw, 18px);
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .06em;
  color: var(--mist);
  white-space: nowrap;
}

/* 移动按钮 */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .12em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--lime);
  color: var(--lime-soft);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color .2s var(--ease);
}

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

.nav-toggle-bars::before { transform: translateY(-5px); }
.nav-toggle-bars::after  { transform: translateY(5px); }

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

/* 阅读进度 */

.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(216, 255, 62, .55);
}

/* ---------- 头部响应式 ---------- */

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

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .48);
    max-height: calc(100vh - var(--rail-h));
    overflow-y: auto;
    justify-content: stretch;
  }

  .site-header[data-open="true"] .site-nav { display: block; }

  .nav-index {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 13px 12px;
    font-size: 15px;
  }

  .nav-label { flex: 1 1 auto; }
}

@media (max-width: 460px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 16px; }
}

/* ==========================================================================
   页脚：档案层级
   ========================================================================== */

.site-footer {
  position: relative;
  background: var(--night);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 10px, transparent 10px 26px);
  opacity: .42;
}

.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 68px) var(--gutter) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1.35fr;
  gap: clamp(22px, 3vw, 48px);
  padding-bottom: clamp(30px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-mark {
  display: block;
  width: 46px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 6px, transparent 6px 12px);
}

.footer-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .03em;
  color: var(--paper);
}

.footer-note {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-col { display: block; }

.footer-col-title {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .16em;
  color: var(--lime);
}

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

.footer-links a {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  transition: color .18s var(--ease), padding-left .18s var(--ease);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--lime);
  padding-left: 5px;
}

.footer-contact {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .14em;
  color: var(--mist);
}

.footer-contact-val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-all;
}

.footer-note-small {
  margin-top: 4px;
  padding-left: 10px;
  border-left: 2px solid var(--brick);
  font-size: 12px;
  line-height: 1.75;
  color: var(--mist);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .05em;
  color: var(--mist);
}

.footer-legal-text { color: var(--mist); }

.footer-copy { color: var(--line); }
.footer-copy [data-year] { color: var(--mist); }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .footer-note { max-width: none; }
}

/* ==========================================================================
   通用组件
   ========================================================================== */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

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

.btn--primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--lime-soft);
  border-color: var(--lime-soft);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}

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

.btn--small {
  padding: 8px 14px;
  font-size: 12px;
}

/* 面包屑 */
.breadcrumbs {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .06em;
}

.crumb {
  display: inline-flex;
  align-items: center;
  color: var(--mist);
}

.crumb + .crumb::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.crumb a { color: var(--mist); transition: color .18s var(--ease); }
.crumb a:hover { color: var(--lime); }
.crumb[aria-current="page"] { color: var(--paper); }

/* 资料面板 */
.panel {
  position: relative;
  padding: clamp(16px, 2.4vw, 28px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.panel:hover {
  border-color: var(--mist);
  transform: translateY(-2px);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 17, 15, .38);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--mist);
}

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

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

/* 档案索引行 */
.index-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.index-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}

.index-item:hover {
  background: var(--panel);
  color: var(--lime-soft);
}

.index-item[aria-current="true"] {
  background: var(--panel);
  box-shadow: inset 3px 0 0 var(--lime);
  color: var(--lime-soft);
}

/* 图片容器 */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 28, 24, 0) 42%, rgba(4, 28, 24, .72) 100%);
  pointer-events: none;
}

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

.media-frame--wide   { aspect-ratio: 16 / 9; }
.media-frame--tall   { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--plain::after { display: none; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--mist);
}

/* ==========================================================================
   可访问性
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .btn:hover,
  .panel:hover { transform: none; }

  .footer-links a:hover { padding-left: 0; }
}
