/* =========================================================
   米乐赛场 M6 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd, nav { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- variables ---------- */
:root {
  --ink: #071C16;
  --panel: #0E2A22;
  --coal: #050807;
  --paper: #F4F7F2;
  --silver: #A7B4AE;
  --lime: #C8FF3D;
  --orange: #FF6A2A;
  --amber: #E3B45C;
  --teal: #66D9C8;
  --moss: #2E403A;

  --line: rgba(167, 180, 174, .22);
  --line-soft: rgba(167, 180, 174, .12);
  --line-lime: rgba(200, 255, 61, .42);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(16px, 2vw, 26px);
  --pill: 999px;
  --header-h: 78px;

  --dur: 220ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-panel: 0 24px 48px -34px #000;
}

@media (max-width: 1079.98px) {
  :root { --header-h: 70px; }
}

/* ---------- base ---------- */
body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 84% -10%, rgba(200, 255, 61, .10), transparent 62%),
    radial-gradient(900px 520px at 4% 2%, rgba(102, 217, 200, .07), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(255, 106, 42, .06), transparent 68%),
    repeating-linear-gradient(90deg, rgba(167, 180, 174, .045) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(167, 180, 174, .035) 0 1px, transparent 1px 88px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--paper);
  text-wrap: balance;
}

p { text-wrap: pretty; }

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 16px);
  padding-top: clamp(18px, 3vw, 34px);
}

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

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  padding: 12px var(--gutter);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(7, 28, 22, .92) 56%, rgba(7, 28, 22, 0) 100%);
}

.header-shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 16px;
  background: rgba(14, 42, 34, .92);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              padding var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header[data-scrolled="true"] .header-shell {
  background: rgba(9, 30, 24, .97);
  border-color: var(--line-lime);
  padding-block: 4px;
  box-shadow: 0 26px 54px -28px #000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 58% 100%, 0 100%);
  transition: transform var(--dur) var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--paper);
}

.brand-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  color: var(--silver);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 168px;
}

/* nav — mobile dropdown by default */
.nav { display: none; }

@media (max-width: 1079.98px) {
  .nav {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(100% - 6px);
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--lime);
    border-radius: 20px;
    box-shadow: 0 34px 60px -30px #000;
    max-height: min(74vh, 560px);
    overflow-y: auto;
  }
  .site-header[data-open="true"] .nav { display: flex; }
}

.nav-list { display: flex; flex-direction: column; gap: 3px; }

.nav-link {
  display: block;
  padding: 11px 14px;
  border-radius: var(--pill);
  color: var(--silver);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--paper); background: rgba(200, 255, 61, .10); }
.nav-link[aria-current="page"] {
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}

.nav-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (min-width: 1080px) {
  .nav {
    display: flex;
    align-items: center;
    gap: clamp(4px, .9vw, 14px);
    margin-left: auto;
  }
  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }
  .nav-link { padding: 7px 11px; font-size: 13px; letter-spacing: .04em; }
  .nav-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
  }
}

/* mobile toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px;
  border-radius: var(--pill);
  background: rgba(5, 8, 7, .45);
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--line-lime); color: var(--lime); }

.nav-toggle-bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.site-header[data-open="true"] .nav-toggle { border-color: var(--line-lime); color: var(--lime); }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
}

/* scroll progress */
.header-progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 4px;
  height: 2px;
  background: rgba(167, 180, 174, .12);
  overflow: hidden;
  pointer-events: none;
}
.header-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--teal));
  transition: width 80ms linear;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-sm { padding: 8px 15px; font-size: 12.5px; }

.btn-solid { background: var(--lime); color: var(--ink); }
.btn-solid:hover { background: #DCFF7A; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(167, 180, 174, .40); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn-outline { background: transparent; color: var(--teal); border-color: rgba(102, 217, 200, .45); }
.btn-outline:hover { background: rgba(102, 217, 200, .12); color: var(--paper); }

/* ---------- layout containers ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.rule {
  height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(24px, 4vw, 48px);
}

/* ---------- typography helpers ---------- */
.display-xl {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 7.6vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--paper);
}

.lead {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
  color: var(--silver);
  max-width: 62ch;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--lime);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--lime);
  flex: 0 0 auto;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  padding-bottom: 14px;
  margin-bottom: clamp(18px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  letter-spacing: -.025em;
}

/* ---------- breadcrumb ---------- */
.breadcrumb { margin-bottom: clamp(14px, 2vw, 22px); }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--silver);
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--moss); }
.breadcrumb a { color: var(--silver); text-decoration: none; }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(5, 8, 7, .35);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--silver);
  white-space: nowrap;
}
.chip-lime { border-color: var(--line-lime); color: var(--lime); background: rgba(200, 255, 61, .10); }
.chip-amber { border-color: rgba(227, 180, 92, .42); color: var(--amber); background: rgba(227, 180, 92, .10); }
.chip-orange { border-color: rgba(255, 106, 42, .42); color: var(--orange); background: rgba(255, 106, 42, .10); }
.chip-teal { border-color: rgba(102, 217, 200, .42); color: var(--teal); background: rgba(102, 217, 200, .10); }

/* ---------- cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2vw, 22px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--lime);
  transition: height 320ms var(--ease);
}
.card:hover { border-color: rgba(200, 255, 61, .34); transform: translateY(-2px); }
.card:hover::before { height: 100%; }

.card-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 800;
  letter-spacing: -.012em;
  color: var(--paper);
}
.card-text { font-size: 14px; line-height: 1.78; color: var(--silver); }
.card-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .10em;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}
.card-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--lime);
  text-decoration: none;
}
.card-link:hover { color: #DCFF7A; }

/* ---------- media containers ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(14, 42, 34, .95), rgba(5, 8, 7, .95)),
    repeating-linear-gradient(115deg, rgba(167, 180, 174, .10) 0 1px, transparent 1px 12px);
  border: 1px solid var(--line);
  border-radius: 2px;
  isolation: isolate;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.06);
  transition: transform 520ms var(--ease), filter 520ms var(--ease);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(202deg, rgba(200, 255, 61, .10), transparent 46%),
    linear-gradient(0deg, rgba(5, 8, 7, .55), transparent 52%),
    repeating-linear-gradient(0deg, rgba(5, 8, 7, .10) 0 1px, transparent 1px 3px);
}
.media:hover img { transform: scale(1.03); filter: saturate(1.05) contrast(1.1); }

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }

/* ---------- reveal protocol ---------- */
html[data-motion="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
html[data-motion="on"] [data-reveal="2"] { transition-delay: 90ms; }
html[data-motion="on"] [data-reveal="3"] { transition-delay: 180ms; }
html[data-motion="on"] [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--silver);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--lime) 0 20%,
    var(--orange) 20% 27%,
    var(--teal) 27% 32%,
    var(--moss) 32% 100%);
}

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

.footer-top {
  display: grid;
  gap: clamp(28px, 4vw, 60px);
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: clamp(26px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) {
  .footer-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr); }
}

.footer-brand-line {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  letter-spacing: -.015em;
  color: var(--paper);
}
.footer-brand-code {
  font-family: var(--font-cond);
  letter-spacing: .08em;
  color: var(--lime);
}

.footer-summary {
  margin-top: 12px;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--silver);
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-cta:hover { background: #DCFF7A; transform: translateY(-1px); }

.footer-cols {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
}

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

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--silver);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-link::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--lime);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-link:hover { color: var(--paper); }
.footer-link:hover::before { opacity: 1; transform: none; }

.footer-contact {
  display: grid;
  gap: 14px;
  margin-top: clamp(26px, 4vw, 44px);
  padding: clamp(20px, 3vw, 32px);
  background: rgba(5, 8, 7, .40);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime);
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
}

.footer-mail {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.2vw, 21px);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--paper);
  word-break: break-word;
}

.footer-contact-grid {
  display: grid;
  gap: 10px 28px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .footer-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.footer-contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--silver);
}
.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--amber);
}

.footer-contact-note {
  max-width: 70ch;
  padding-top: 12px;
  border-top: 1px dashed rgba(167, 180, 174, .26);
  font-size: 13px;
  line-height: 1.8;
  color: var(--silver);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--silver);
}
.footer-legal { color: var(--silver); }
.footer-record { color: var(--moss); }
@media (max-width: 520px) {
  .footer-record { color: var(--silver); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html[data-motion="on"] [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition-delay: 0ms !important;
  }
  .card:hover,
  .btn:hover,
  .footer-cta:hover,
  .media:hover img { transform: none; }
  .header-progress-fill { transition: none; }
}
